StartPageViewModel.cs 858 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using AvaloniaApplication4.Models;
  4. using ReactiveUI;
  5. using Tmds.DBus.Protocol;
  6. namespace AvaloniaApplication4.ViewModels
  7. {
  8. public class StartPageViewModel : ViewModelBase
  9. {
  10. User? user;
  11. private string name = string.Empty;
  12. public StartPageViewModel(User? user)
  13. {
  14. this.user = user;
  15. if (user != null)
  16. {
  17. Name = user.Surname + " " + user.Name + " " + user.Patronumic + "!";
  18. }
  19. WriteToLog(user.IdUser, "âûïîëíèë(à) âõîä â ñèñòåìó");
  20. }
  21. public string Name
  22. {
  23. get { return name; }
  24. set
  25. {
  26. if (name == value)
  27. return;
  28. name = value;
  29. OnPropertyChanged("Name");
  30. }
  31. }
  32. }
  33. }