using DevExpress.Xpo; using Ips.Library.Entity; using System; using System.ComponentModel.DataAnnotations; namespace Ips.Sps.Sats { public class Sat : XPObject { public Sat() : base() { } public Sat(Session session) : base(session) { } public override void AfterConstruction() { base.AfterConstruction(); SatType = SatType.HighOrbit; Enable = true; } private int _satNum; [DisplayName("卫星编号")] public int SatNum { get => _satNum; set => SetPropertyValue(nameof(SatNum), ref _satNum, value); } private string _name; [DisplayName("卫星名称")] [Size(100)] public string Name { get => _name; set => SetPropertyValue(nameof(Name), ref _name, value); } private SatType _satType; [DisplayName("卫星类型")] public SatType SatType { get => _satType; set => SetPropertyValue(nameof(SatType), ref _satType, value); } private double? _lon; [DisplayName("定轨经度")] public double? Lon { get => _lon; set => SetPropertyValue(nameof(Lon), ref _lon, value); } private double _satTurn; [DisplayName("卫星本振(MHz)")] public double SatTurn { get => _satTurn; set => SetPropertyValue(nameof(SatTurn), ref _satTurn, value); } private string _remark; [DisplayName("备注信息")] [Size(2000)] public string Remark { get => _remark; set => SetPropertyValue(nameof(Remark), ref _remark, value); } private bool _enable; [DisplayName("启用")] public bool Enable { get => _enable; set => SetPropertyValue(nameof(Enable), ref _enable, value); } public override string ToString() { string result; if (Lon.HasValue) { result = $"{Name}[{SatNum}]-{Lon.Value}°"; } else { result = $"{Name}[{SatNum}]"; } return result; } } }