ModelPosRes.cs 875 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using XdCxRhDW.Dto;
  8. using XdCxRhDW.Entity;
  9. namespace XdCxRhDW.App.Model
  10. {
  11. public class ModelPosRes : PosRes
  12. {
  13. public ModelPosRes()
  14. {
  15. if (TargetInfo != null && !string.IsNullOrWhiteSpace(TargetInfo.TargeColor))
  16. ColorKey = this.TargetInfo?.TargeColor;
  17. }
  18. [Display(Name = "目标名称")]
  19. [ToolTip]
  20. public string TargetName => TargetInfo?.TargetName;
  21. [Display(Name = "检测方式")]
  22. [ToolTip]
  23. public string CheckType => CheckRes?.PosCheckType?.GetEnumDisplayName();
  24. public override int GetHashCode()
  25. {
  26. return $"ModelPosRes_{TaskInfoID}_{ID}".GetHashCode();
  27. }
  28. }
  29. }