Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.ObjectModel;
- using System.ComponentModel;
- using System.Diagnostics;
- namespace MyMGTU
- {
- public class MenuPageModelView : Token_User_Info, INotifyPropertyChanged
- {
- public event PropertyChangedEventHandler PropertyChanged;
- private string _fio;
- private string _avatar;
- private ObservableCollection<Menu_Object> _source;
- public MenuPageModelView(Token_User_Info user)
- {
- Token = user.Token;
- Id_Client = user.Id_Client;
- About_User = user.About_User;
- //Display();
- Debug.WriteLine("Token: " + Token);
- _fio = About_User[0].fullname;
- _avatar = About_User[0].profileimageurl;
- //_fio = About_User[0].fullname;
- //_avatar = About_User[0].profileimageurl;
- _source = new MenuListData();
- }
- public string FIO
- {
- get { return _fio; }
- set
- {
- if (_fio != value)
- {
- _fio = value;
- OnPropertyChanged("FIO");
- }
- }
- }
- public string Avatar
- {
- get { return _avatar; }
- set
- {
- if (_avatar != value)
- {
- _avatar = value;
- OnPropertyChanged("Avatar");
- }
- }
- }
- public ObservableCollection<Menu_Object> Source
- {
- get { return _source; }
- set
- {
- if (_source != value)
- {
- _source = value;
- OnPropertyChanged("Source");
- }
- }
- }
- protected void OnPropertyChanged(string propName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
- }
- }
- }
Add Comment
Please, Sign In to add comment