Guest User

Untitled

a guest
Dec 11th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. using System.Collections.ObjectModel;
  2. using System.ComponentModel;
  3. using System.Diagnostics;
  4.  
  5. namespace MyMGTU
  6. {
  7. public class MenuPageModelView : Token_User_Info, INotifyPropertyChanged
  8. {
  9. public event PropertyChangedEventHandler PropertyChanged;
  10.  
  11. private string _fio;
  12. private string _avatar;
  13. private ObservableCollection<Menu_Object> _source;
  14.  
  15. public MenuPageModelView(Token_User_Info user)
  16. {
  17. Token = user.Token;
  18. Id_Client = user.Id_Client;
  19. About_User = user.About_User;
  20.  
  21.  
  22. //Display();
  23. Debug.WriteLine("Token: " + Token);
  24. _fio = About_User[0].fullname;
  25. _avatar = About_User[0].profileimageurl;
  26.  
  27. //_fio = About_User[0].fullname;
  28. //_avatar = About_User[0].profileimageurl;
  29.  
  30. _source = new MenuListData();
  31. }
  32.  
  33. public string FIO
  34. {
  35. get { return _fio; }
  36. set
  37. {
  38. if (_fio != value)
  39. {
  40. _fio = value;
  41. OnPropertyChanged("FIO");
  42. }
  43. }
  44. }
  45.  
  46. public string Avatar
  47. {
  48. get { return _avatar; }
  49. set
  50. {
  51. if (_avatar != value)
  52. {
  53. _avatar = value;
  54. OnPropertyChanged("Avatar");
  55. }
  56. }
  57. }
  58.  
  59. public ObservableCollection<Menu_Object> Source
  60. {
  61. get { return _source; }
  62. set
  63. {
  64. if (_source != value)
  65. {
  66. _source = value;
  67. OnPropertyChanged("Source");
  68. }
  69. }
  70. }
  71.  
  72. protected void OnPropertyChanged(string propName)
  73. {
  74. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
  75. }
  76. }
  77. }
Add Comment
Please, Sign In to add comment