Emt.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. using DevExpress.Xpo;
  2. using Ips.Library.Entity;
  3. using System;
  4. using System.ComponentModel.DataAnnotations;
  5. namespace Ips.Sps.Emts
  6. {
  7. public class Emt : XPObject
  8. {
  9. public Emt() : base()
  10. {
  11. }
  12. public Emt(Session session) : base(session)
  13. {
  14. }
  15. public override void AfterConstruction()
  16. {
  17. base.AfterConstruction();
  18. this.Enable = true;
  19. }
  20. private string _code;
  21. [DisplayName("编码"), Size(50)]
  22. public string Code
  23. {
  24. get => _code;
  25. set => SetPropertyValue(nameof(Code), ref _code, value);
  26. }
  27. private string _name;
  28. [DisplayName("名称"), Size(100)]
  29. public string Name
  30. {
  31. get => _name;
  32. set => SetPropertyValue(nameof(Name), ref _name, value);
  33. }
  34. private EmtType _emtType;
  35. [DisplayName("类型")]
  36. public EmtType EmtType
  37. {
  38. get => _emtType;
  39. set => SetPropertyValue(nameof(EmtType), ref _emtType, value);
  40. }
  41. private double _speed;
  42. [DisplayName("速度(km/h)")]
  43. public double Speed
  44. {
  45. get => _speed;
  46. set => SetPropertyValue(nameof(Speed), ref _speed, value);
  47. }
  48. private double _lon;
  49. [DisplayName("经度")]
  50. public double Lon
  51. {
  52. get => _lon;
  53. set => SetPropertyValue(nameof(Lon), ref _lon, value);
  54. }
  55. private double _lat;
  56. [DisplayName("纬度")]
  57. public double Lat
  58. {
  59. get => _lat;
  60. set => SetPropertyValue(nameof(Lat), ref _lat, value);
  61. }
  62. private double _alt;
  63. [DisplayName("高度")]
  64. public double Alt
  65. {
  66. get => _alt;
  67. set => SetPropertyValue(nameof(Alt), ref _alt, value);
  68. }
  69. private string _remark;
  70. [DisplayName("备注"), Size(2000)]
  71. public string Remark
  72. {
  73. get => _remark;
  74. set => SetPropertyValue(nameof(Remark), ref _remark, value);
  75. }
  76. private bool _enable;
  77. [DisplayName("启用")]
  78. public bool Enable
  79. {
  80. get => _enable;
  81. set => SetPropertyValue(nameof(Enable), ref _enable, value);
  82. }
  83. private bool _hasSample;
  84. [DisplayName("扩频参考")]
  85. public bool HasSample
  86. {
  87. get => _hasSample;
  88. set => SetPropertyValue(nameof(HasSample), ref _hasSample, value);
  89. }
  90. [DisplayName("信号样本")]
  91. [DevExpress.Xpo.Association, Aggregated]
  92. public XPCollection<EmtSample> SigSamples
  93. {
  94. get => GetCollection<EmtSample>(nameof(SigSamples));
  95. }
  96. }
  97. }