SignalBasic.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. using DevExpress.Xpo;
  2. using Ips.Library.Basic;
  3. using Ips.Library.Entity;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace Ips.Sps.Sigs
  10. {
  11. [NonPersistent]
  12. public class SignalBasic : XPObject
  13. {
  14. public SignalBasic() : base()
  15. {
  16. }
  17. public SignalBasic(Session session) : base(session)
  18. {
  19. }
  20. public override void AfterConstruction()
  21. {
  22. base.AfterConstruction();
  23. SigCategory = SignalCategory.TarSig;
  24. SigType = SignalType.NORMAL;
  25. }
  26. private SignalCategory _sigCategory;
  27. [DisplayName("信号类别")]
  28. public SignalCategory SigCategory
  29. {
  30. get => _sigCategory;
  31. set => SetPropertyValue(nameof(SigCategory), ref _sigCategory, value);
  32. }
  33. private SignalType _sigType;
  34. [DisplayName("信号类型")]
  35. public SignalType SigType
  36. {
  37. get => _sigType;
  38. set => SetPropertyValue(nameof(SigType), ref _sigType, value);
  39. }
  40. private double _sigFreq;
  41. [DisplayName("信号频点(MHz)")]
  42. public double SigFreq
  43. {
  44. get => _sigFreq;
  45. set => SetPropertyValue(nameof(SigFreq), ref _sigFreq, value);
  46. }
  47. private double _freqStart;
  48. [DisplayName("起始频点(MHz)")]
  49. public double FreqStart
  50. {
  51. get => _freqStart;
  52. set => SetPropertyValue(nameof(FreqStart), ref _freqStart, value);
  53. }
  54. private double _freqEnd;
  55. [DisplayName("结束频点(MHz)")]
  56. public double FreqEnd
  57. {
  58. get => _freqEnd;
  59. set => SetPropertyValue(nameof(FreqEnd), ref _freqEnd, value);
  60. }
  61. private double _freqStep;
  62. [DisplayName("频点步进(kHz)")]
  63. public double FreqStep
  64. {
  65. get => _freqStep;
  66. set => SetPropertyValue(nameof(FreqStep), ref _freqStep, value);
  67. }
  68. private double _bandWidth;
  69. [DisplayName("信号带宽(kHz)")]
  70. public double BandWidth
  71. {
  72. get => _bandWidth;
  73. set => SetPropertyValue(nameof(BandWidth), ref _bandWidth, value);
  74. }
  75. private int _sigLen;
  76. [DisplayName("信号时长(s)")]
  77. public int SigLen
  78. {
  79. get => _sigLen;
  80. set => SetPropertyValue(nameof(SigLen), ref _sigLen, value);
  81. }
  82. private int? _emtId;
  83. [DisplayName("信号目标")]
  84. public int? EmtId
  85. {
  86. get => _emtId;
  87. set => SetPropertyValue(nameof(EmtId), ref _emtId, value);
  88. }
  89. private int? _mainSatId;
  90. [DisplayName("通联主星")]
  91. public int? MainSatId
  92. {
  93. get => _mainSatId;
  94. set => SetPropertyValue(nameof(MainSatId), ref _mainSatId, value);
  95. }
  96. private string _adjaSatIds;
  97. [DisplayName("通联邻星")]
  98. public string AdjaSatIds
  99. {
  100. get => _adjaSatIds;
  101. set => SetPropertyValue(nameof(AdjaSatIds), ref _adjaSatIds, value);
  102. }
  103. private bool _hasRange;
  104. [DisplayName("包含范围")]
  105. [MemberDesignTimeVisibility(false)]
  106. public bool HasRange
  107. {
  108. get => _hasRange;
  109. set => SetPropertyValue(nameof(HasRange), ref _hasRange, value);
  110. }
  111. private double _sigLon;
  112. [DisplayName("信号经度")]
  113. [MemberDesignTimeVisibility(false)]
  114. public double SigLon
  115. {
  116. get => HasRange ? _sigLon : 0;
  117. set => SetPropertyValue(nameof(SigLon), ref _sigLon, value);
  118. }
  119. private double _sigLat;
  120. [DisplayName("信号纬度")]
  121. [MemberDesignTimeVisibility(false)]
  122. public double SigLat
  123. {
  124. get => HasRange ? _sigLat : 0;
  125. set => SetPropertyValue(nameof(SigLat), ref _sigLat, value);
  126. }
  127. private double _lonRange;
  128. [DisplayName("经度范围")]
  129. [MemberDesignTimeVisibility(false)]
  130. public double LonRange
  131. {
  132. get => HasRange ? _lonRange : 360;
  133. set => SetPropertyValue(nameof(LonRange), ref _lonRange, value);
  134. }
  135. private double _latRange;
  136. [DisplayName("纬度范围")]
  137. [MemberDesignTimeVisibility(false)]
  138. public double LatRange
  139. {
  140. get => HasRange ? _latRange : 180;
  141. set => SetPropertyValue(nameof(LatRange), ref _latRange, value);
  142. }
  143. private double _sigAlt;
  144. [DisplayName("信号高度")]
  145. [MemberDesignTimeVisibility(false)]
  146. public double SigAlt
  147. {
  148. get => _sigAlt;
  149. set => SetPropertyValue(nameof(SigAlt), ref _sigAlt, value);
  150. }
  151. [DisplayName("信号频点(MHz)"), NonPersistent]
  152. public string SigFreqText
  153. {
  154. get
  155. {
  156. string result;
  157. if (SigCategory == SignalCategory.SctSig)
  158. {
  159. result = $"{FreqStart}-{FreqEnd}[{FreqStep}kHz]";
  160. }
  161. else
  162. {
  163. result = SigFreq.ToString();
  164. }
  165. return result;
  166. }
  167. }
  168. [DisplayName("信号范围"), NonPersistent]
  169. public string SigRangText
  170. {
  171. get
  172. {
  173. string result;
  174. if (!HasRange)
  175. {
  176. result = $"({0},{0},{SigAlt})-[{360},{180}]";
  177. }
  178. else
  179. {
  180. result = $"({SigLon:F3},{SigLat:F3},{SigAlt:F1})-[{LonRange:F1},{LatRange:F1}]";
  181. }
  182. return result;
  183. }
  184. }
  185. }
  186. }