PosResViewModel.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using DW5S.Entity;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Xml.Linq;
  9. namespace DW5S.ViewModel
  10. {
  11. public class PosResViewModel : PosData
  12. {
  13. [Display(Name = "任务编号")]
  14. public int TaskID { get; set; }
  15. [Display(Name = "频点",AutoGenerateField =false)]
  16. public long FrequpHz { get; set; }
  17. [Display(Name = "上行频点(MHz)")]
  18. public double FreqUpDis => FrequpHz / 1e6;
  19. [Display(Name = "任务编号",AutoGenerateField =false)]
  20. public int? TargetInfoID { get; set; }
  21. [Display(Name = "检测方式")]
  22. [ToolTip]
  23. public string CheckType { get; set; }
  24. [Display(Name = "定位点")]
  25. public string LonLat
  26. {
  27. get
  28. {
  29. if (PosLon == 0 && PosLat == 0)
  30. return "--";
  31. else if (PosLon > 180 || PosLon < -180)
  32. return "--";
  33. else
  34. return $"{PosLon:f4},{PosLat:f4}";
  35. }
  36. }
  37. [Display(Name = "镜像点")]
  38. public string MirrLonLat
  39. {
  40. get
  41. {
  42. if (MirrLon == 0 && MirrLat == 0)
  43. return "--";
  44. else if (MirrLon > 180 || MirrLon < -180)
  45. return "--";
  46. else
  47. return $"{MirrLon:f4},{MirrLat:f4}";
  48. }
  49. }
  50. [Display(Name = "定位类型")]
  51. public EnumPosResType PosResType { get; set; }
  52. }
  53. }