ToolInfo.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. using Prism.Mvvm;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace TeamAAS_VP.Models
  8. {
  9. public class ToolInfo : BindableBase
  10. {
  11. public Guid Id { get; set; }
  12. private int _Number;
  13. public int Number
  14. {
  15. get { return _Number; }
  16. set { SetProperty(ref _Number, value); }
  17. }
  18. private string _Name;
  19. public string Name
  20. {
  21. get { return _Name; }
  22. set { SetProperty(ref _Name, value); }
  23. }
  24. private double _OffsetX;
  25. public double OffsetX
  26. {
  27. get { return _OffsetX; }
  28. set { SetProperty(ref _OffsetX, value); }
  29. }
  30. private double _OffsetY;
  31. public double OffsetY
  32. {
  33. get { return _OffsetY; }
  34. set { SetProperty(ref _OffsetY, value); }
  35. }
  36. private double _OffsetU;
  37. public double OffsetU
  38. {
  39. get { return _OffsetU; }
  40. set { SetProperty(ref _OffsetU, value); }
  41. }
  42. private double _OffsetZ;
  43. public double OffsetZ
  44. {
  45. get { return _OffsetZ; }
  46. set { SetProperty(ref _OffsetZ, value); }
  47. }
  48. private RobotTool _Tool;
  49. public RobotTool Tool
  50. {
  51. get { return _Tool; }
  52. set { SetProperty(ref _Tool, value); }
  53. }
  54. private RPoint _Pick;
  55. public RPoint Pick
  56. {
  57. get { return _Pick; }
  58. set { SetProperty(ref _Pick, value); }
  59. }
  60. private RPoint _Place;
  61. public RPoint Place
  62. {
  63. get { return _Place; }
  64. set { SetProperty(ref _Place, value); }
  65. }
  66. private PickInfo _PickInfo;
  67. public PickInfo PickInfo
  68. {
  69. get { return _PickInfo; }
  70. set { SetProperty(ref _PickInfo, value); }
  71. }
  72. private bool _IsForward;
  73. /// <summary>
  74. /// 相机与机器人旋转方式相同
  75. /// </summary>
  76. public bool IsForward
  77. {
  78. get { return _IsForward; }
  79. set { SetProperty(ref _IsForward, value); }
  80. }
  81. private string _Description;
  82. public string Description
  83. {
  84. get { return _Description; }
  85. set { SetProperty(ref _Description, value); }
  86. }
  87. public ToolInfo Copy()
  88. {
  89. ToolInfo newTool = new ToolInfo();
  90. newTool.Id = this.Id;
  91. newTool.Description = this.Description;
  92. newTool.OffsetX = this.OffsetX;
  93. newTool.OffsetY = this.OffsetY;
  94. newTool.OffsetU = this.OffsetU;
  95. newTool.OffsetZ = this.OffsetZ;
  96. newTool.Tool = this.Tool?.Copy();
  97. newTool.Pick = this.Pick.Clone();
  98. newTool.Place = this.Place.Clone();
  99. newTool.PickInfo = this.PickInfo.Clone();
  100. newTool.IsForward = this.IsForward;
  101. return newTool;
  102. }
  103. }
  104. }