PosResViewModel.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. public int TaskID { get; set; }
  14. public long FrequpHz { get; set; }
  15. public int TargetInfoID { get; set; }
  16. [Display(Name = "检测方式")]
  17. [ToolTip]
  18. public string CheckType { get; set; }
  19. [Display(Name = "定位点")]
  20. public string LonLat
  21. {
  22. get
  23. {
  24. if (PosLon == 0 && PosLat == 0)
  25. return "--";
  26. else if (PosLon > 180 || PosLon < -180)
  27. return "--";
  28. else
  29. return $"{PosLon:f4},{PosLat:f4}";
  30. }
  31. }
  32. [Display(Name = "镜像点")]
  33. public string MirrLonLat
  34. {
  35. get
  36. {
  37. if (MirrLon == 0 && MirrLat == 0)
  38. return "--";
  39. else if (MirrLon > 180 || MirrLon < -180)
  40. return "--";
  41. else
  42. return $"{MirrLon:f4},{MirrLat:f4}";
  43. }
  44. }
  45. [Display(Name = "定位类型")]
  46. public EnumPosResType PosResType { get; set; }
  47. }
  48. }