ProductModel.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. using Newtonsoft.Json;
  2. using Prism.Mvvm;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Collections.ObjectModel;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace TeamAAS_VP.Models
  10. {
  11. [JsonObject(MemberSerialization.OptOut)]
  12. public class ProductModel : BindableBase
  13. {
  14. private Guid _ID;
  15. public Guid ID
  16. {
  17. get { return _ID; }
  18. set { SetProperty(ref _ID, value); }
  19. }
  20. private string _Name;
  21. public string Name
  22. {
  23. get { return _Name; }
  24. set { SetProperty(ref _Name, value); }
  25. }
  26. private int _NumberCode;
  27. public int NumberCode
  28. {
  29. get { return _NumberCode; }
  30. set
  31. {
  32. SetProperty(ref _NumberCode, value);
  33. }
  34. }
  35. private string _Description;
  36. public string Description
  37. {
  38. get { return _Description; }
  39. set { SetProperty(ref _Description, value); }
  40. }
  41. private DateTime _DateTime;
  42. public DateTime DateTime
  43. {
  44. get { return _DateTime; }
  45. set { SetProperty(ref _DateTime, value); }
  46. }
  47. private ObservableCollection<CameraProcedure> _CameraProcedures;
  48. /// <summary>
  49. /// 相机流程集合
  50. /// </summary>
  51. public ObservableCollection<CameraProcedure> CameraProcedures
  52. {
  53. get { return _CameraProcedures; }
  54. set { SetProperty(ref _CameraProcedures, value); }
  55. }
  56. private RobotPoint _RobotPoint;
  57. /// <summary>
  58. /// 机器人点位表
  59. /// </summary>
  60. public RobotPoint RobotPoint
  61. {
  62. get { return _RobotPoint; }
  63. set { SetProperty(ref _RobotPoint, value); }
  64. }
  65. private int _Speed;
  66. /// <summary>
  67. /// PTP速度
  68. /// </summary>
  69. public int Speed
  70. {
  71. get { return _Speed; }
  72. set { SetProperty(ref _Speed, value); }
  73. }
  74. private int _Accel;
  75. /// <summary>
  76. /// PTP加减速度
  77. /// </summary>
  78. public int Accel
  79. {
  80. get { return _Accel; }
  81. set { SetProperty(ref _Accel, value); }
  82. }
  83. private int _Speeds;
  84. /// <summary>
  85. /// CP速度
  86. /// </summary>
  87. public int Speeds
  88. {
  89. get { return _Speeds; }
  90. set { SetProperty(ref _Speeds, value); }
  91. }
  92. private int _Accels;
  93. /// <summary>
  94. /// CP加减速度
  95. /// </summary>
  96. public int Accels
  97. {
  98. get { return _Accels; }
  99. set { SetProperty(ref _Accels, value); }
  100. }
  101. private bool _Power;
  102. /// <summary>
  103. /// 功率
  104. /// </summary>
  105. public bool Power
  106. {
  107. get { return _Power; }
  108. set { SetProperty(ref _Power, value); }
  109. }
  110. private bool _IsUserUpCamera;
  111. /// <summary>
  112. /// 启用二次定位相机
  113. /// </summary>
  114. public bool IsUserUpCamera
  115. {
  116. get { return _IsUserUpCamera; }
  117. set { SetProperty(ref _IsUserUpCamera, value); }
  118. }
  119. private ObservableCollection<ProductGlobalParam> _GlobalParamListCollection;
  120. /// <summary>
  121. /// 产品全局参数集合
  122. /// </summary>
  123. public ObservableCollection<ProductGlobalParam> GlobalParamListCollection
  124. {
  125. get { return _GlobalParamListCollection; }
  126. set { SetProperty(ref _GlobalParamListCollection, value); }
  127. }
  128. private bool _IsLoad;
  129. /// <summary>
  130. /// 是否已加载
  131. /// </summary>
  132. [JsonIgnore]
  133. public bool IsLoad
  134. {
  135. get { return _IsLoad; }
  136. set { SetProperty(ref _IsLoad, value); }
  137. }
  138. private bool _IsCreate;
  139. /// <summary>
  140. /// 正在创建
  141. /// </summary>
  142. [JsonIgnore]
  143. public bool IsCreate
  144. {
  145. get { return _IsCreate; }
  146. set { SetProperty(ref _IsCreate, value); }
  147. }
  148. public ProductModel Clone()
  149. {
  150. return JsonConvert.DeserializeObject<ProductModel>(JsonConvert.SerializeObject(this)); ;
  151. }
  152. }
  153. }