SwitchInstanceDataModel.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System.ComponentModel;
  2. namespace SWRIS.Models
  3. {
  4. public class SwitchInstanceDataModel : INotifyPropertyChanged
  5. {
  6. private string instanceName;
  7. private string progressName;
  8. private string imageSource;
  9. public string InstanceName
  10. {
  11. get => instanceName;
  12. set
  13. {
  14. instanceName = value;
  15. OnPropertyChanged(nameof(InstanceName));
  16. }
  17. }
  18. public string ProgressName
  19. {
  20. get => progressName;
  21. set
  22. {
  23. progressName = value;
  24. OnPropertyChanged(nameof(ProgressName));
  25. }
  26. }
  27. public string ImageSource
  28. {
  29. get => imageSource;
  30. set
  31. {
  32. imageSource = value;
  33. OnPropertyChanged(nameof(ImageSource));
  34. }
  35. }
  36. public event PropertyChangedEventHandler PropertyChanged;
  37. protected internal virtual void OnPropertyChanged(string propertyName)
  38. {
  39. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  40. }
  41. }
  42. }