using DevExpress.Xpo; using Ips.Library.Basic; using Ips.Library.Entity; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Ips.Sps.Sigs { [NonPersistent] public class SignalBasic : XPObject { public SignalBasic() : base() { } public SignalBasic(Session session) : base(session) { } public override void AfterConstruction() { base.AfterConstruction(); SigCategory = SignalCategory.TarSig; SigType = SignalType.NORMAL; } private SignalCategory _sigCategory; [DisplayName("信号类别")] public SignalCategory SigCategory { get => _sigCategory; set => SetPropertyValue(nameof(SigCategory), ref _sigCategory, value); } private SignalType _sigType; [DisplayName("信号类型")] public SignalType SigType { get => _sigType; set => SetPropertyValue(nameof(SigType), ref _sigType, value); } private double _sigFreq; [DisplayName("信号频点(MHz)")] public double SigFreq { get => _sigFreq; set => SetPropertyValue(nameof(SigFreq), ref _sigFreq, value); } private double _freqStart; [DisplayName("起始频点(MHz)")] public double FreqStart { get => _freqStart; set => SetPropertyValue(nameof(FreqStart), ref _freqStart, value); } private double _freqEnd; [DisplayName("结束频点(MHz)")] public double FreqEnd { get => _freqEnd; set => SetPropertyValue(nameof(FreqEnd), ref _freqEnd, value); } private double _freqStep; [DisplayName("频点步进(kHz)")] public double FreqStep { get => _freqStep; set => SetPropertyValue(nameof(FreqStep), ref _freqStep, value); } private double _bandWidth; [DisplayName("信号带宽(kHz)")] public double BandWidth { get => _bandWidth; set => SetPropertyValue(nameof(BandWidth), ref _bandWidth, value); } private int _sigLen; [DisplayName("信号时长(s)")] public int SigLen { get => _sigLen; set => SetPropertyValue(nameof(SigLen), ref _sigLen, value); } private int? _emtId; [DisplayName("信号目标")] public int? EmtId { get => _emtId; set => SetPropertyValue(nameof(EmtId), ref _emtId, value); } private int? _mainSatId; [DisplayName("通联主星")] public int? MainSatId { get => _mainSatId; set => SetPropertyValue(nameof(MainSatId), ref _mainSatId, value); } private string _adjaSatIds; [DisplayName("通联邻星")] public string AdjaSatIds { get => _adjaSatIds; set => SetPropertyValue(nameof(AdjaSatIds), ref _adjaSatIds, value); } private bool _hasRange; [DisplayName("包含范围")] [MemberDesignTimeVisibility(false)] public bool HasRange { get => _hasRange; set => SetPropertyValue(nameof(HasRange), ref _hasRange, value); } private double _sigLon; [DisplayName("信号经度")] [MemberDesignTimeVisibility(false)] public double SigLon { get => HasRange ? _sigLon : 0; set => SetPropertyValue(nameof(SigLon), ref _sigLon, value); } private double _sigLat; [DisplayName("信号纬度")] [MemberDesignTimeVisibility(false)] public double SigLat { get => HasRange ? _sigLat : 0; set => SetPropertyValue(nameof(SigLat), ref _sigLat, value); } private double _lonRange; [DisplayName("经度范围")] [MemberDesignTimeVisibility(false)] public double LonRange { get => HasRange ? _lonRange : 360; set => SetPropertyValue(nameof(LonRange), ref _lonRange, value); } private double _latRange; [DisplayName("纬度范围")] [MemberDesignTimeVisibility(false)] public double LatRange { get => HasRange ? _latRange : 180; set => SetPropertyValue(nameof(LatRange), ref _latRange, value); } private double _sigAlt; [DisplayName("信号高度")] [MemberDesignTimeVisibility(false)] public double SigAlt { get => _sigAlt; set => SetPropertyValue(nameof(SigAlt), ref _sigAlt, value); } [DisplayName("信号频点(MHz)"), NonPersistent] public string SigFreqText { get { string result; if (SigCategory == SignalCategory.SctSig) { result = $"{FreqStart}-{FreqEnd}[{FreqStep}kHz]"; } else { result = SigFreq.ToString(); } return result; } } [DisplayName("信号范围"), NonPersistent] public string SigRangText { get { string result; if (!HasRange) { result = $"({0},{0},{SigAlt})-[{360},{180}]"; } else { result = $"({SigLon:F3},{SigLat:F3},{SigAlt:F1})-[{LonRange:F1},{LatRange:F1}]"; } return result; } } } }