ChannelConfig.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using Prism.Mvvm;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace TeamAAS_VP.Models.Lights
  8. {
  9. public class ChannelConfig: BindableBase
  10. {
  11. private string _Name;
  12. /// <summary>
  13. /// 通道名称
  14. /// </summary>
  15. public string Name
  16. {
  17. get { return _Name; }
  18. set { SetProperty(ref _Name, value); }
  19. }
  20. private string _Description;
  21. /// <summary>
  22. /// 通道描述
  23. /// </summary>
  24. public string Description
  25. {
  26. get { return _Description; }
  27. set { SetProperty(ref _Description, value); }
  28. }
  29. private int _LocalIndex;
  30. /// <summary>
  31. /// 控制器内的通道索引
  32. /// </summary>
  33. public int LocalIndex
  34. {
  35. get { return _LocalIndex; }
  36. set { SetProperty(ref _LocalIndex, value); }
  37. }
  38. private int _GlobalIndex;
  39. /// <summary>
  40. /// 系统中的全局通道索引
  41. /// </summary>
  42. public int GlobalIndex
  43. {
  44. get { return _GlobalIndex; }
  45. set { SetProperty(ref _GlobalIndex, value); }
  46. }
  47. private int _DefaultBrightness=100;
  48. public int DefaultBrightness
  49. {
  50. get { return _DefaultBrightness; }
  51. set { SetProperty(ref _DefaultBrightness, value); }
  52. }
  53. public ChannelConfig()
  54. {
  55. }
  56. public ChannelConfig(int localIndex, int globalIndex, string name = "", string description = "", int defaultBrightness=100)
  57. {
  58. LocalIndex = localIndex;
  59. GlobalIndex = globalIndex;
  60. Name = name;
  61. Description = description;
  62. DefaultBrightness = defaultBrightness;
  63. }
  64. }
  65. }