TLInfo.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using CommunityToolkit.Mvvm.ComponentModel;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Collections.ObjectModel;
  5. using System.Diagnostics;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Input;
  10. namespace ivf_tl_Entity.Entity.balance
  11. {
  12. public partial class TLInfo : ObservableObject
  13. {
  14. public event Action<string,int> StateChangedEvent;
  15. public long id { get; set; }
  16. private string _tlSn;
  17. public string tlSn { get => _tlSn; set => SetProperty(ref _tlSn, value); }
  18. private string _tlName;
  19. public string tlName { get => _tlName; set => SetProperty(ref _tlName, value); }
  20. private int _state;
  21. /// <summary>
  22. /// 0在线空闲 1在线培养
  23. /// </summary>
  24. public int state
  25. {
  26. get => _state;
  27. set
  28. {
  29. SetProperty(ref _state, value);
  30. }
  31. }
  32. private int _online;
  33. /// <summary>
  34. /// 在线状态 0离线 1在线 2解绑 3待初始化
  35. /// </summary>
  36. public int online
  37. {
  38. get => _online;
  39. set
  40. {
  41. if (_online != value)
  42. {
  43. //Debug.WriteLine($"{tlName}:{_online}->{value}");
  44. SetProperty(ref _online, value);
  45. StateChangedEvent?.Invoke(tlName,value);
  46. }
  47. }
  48. }
  49. private ObservableCollection<House> _houses;
  50. public ObservableCollection<House> houses { get => _houses; set => SetProperty(ref _houses, value); }
  51. }
  52. }