MonItemGeneral.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System.Reflection;
  2. using System.Text.Json.Serialization;
  3. namespace qmonlib
  4. {
  5. [Serializable]
  6. public class MonItemGeneral
  7. {
  8. [JsonPropertyName("cpt")]
  9. public string Caption { get; set; }
  10. [JsonPropertyName("dsc")]
  11. public string Description { get; set; }
  12. [JsonPropertyName("vty")]
  13. public MonViewType ViewType { get; set; }
  14. [JsonPropertyName("key")]
  15. public List<int> KeyOrdinals { get; set; } = new List<int>();
  16. public List<ItemDescriptor> Items { get; set; } = new List<ItemDescriptor>();
  17. public class ItemDescriptor
  18. {
  19. [JsonPropertyName("nme")]
  20. public string Name { get; set; }
  21. [JsonPropertyName("tnm")]
  22. public string TypeName { get; set; }
  23. [JsonPropertyName("lbl")]
  24. public string Label { get; set; }
  25. [JsonPropertyName("dsc")]
  26. public string Description { get; set; }
  27. [JsonPropertyName("ord")]
  28. public int Order { get; set; }
  29. [NonSerialized] public PropertyInfo? _propertyInfo;
  30. }
  31. public enum MonViewType
  32. {
  33. Item,
  34. List
  35. }
  36. }
  37. }