TransporterGantryTeachControl.xaml.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace CyberX8_Themes.UserControls
  16. {
  17. /// <summary>
  18. /// TransporterGantryTeachControl.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class TransporterGantryTeachControl : UserControl
  21. {
  22. #region 属性
  23. public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register("ModuleName", typeof(string), typeof(TransporterGantryTeachControl),
  24. new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  25. /// <summary>
  26. /// 模块名称
  27. /// </summary>
  28. public string ModuleName
  29. {
  30. get
  31. {
  32. return (string)this.GetValue(ModuleNameProperty);
  33. }
  34. set
  35. {
  36. this.SetValue(ModuleNameProperty, value);
  37. }
  38. }
  39. public static readonly DependencyProperty SavedPositionProperty = DependencyProperty.Register("SavedPosition", typeof(double), typeof(TransporterGantryTeachControl),
  40. new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));
  41. /// <summary>
  42. /// 当前位置
  43. /// </summary>
  44. public double SavedPosition
  45. {
  46. get
  47. {
  48. return (double)this.GetValue(SavedPositionProperty);
  49. }
  50. set
  51. {
  52. SetValue(SavedPositionProperty, value);
  53. }
  54. }
  55. public static readonly DependencyProperty CurrentPositionProperty = DependencyProperty.Register("CurrentPosition", typeof(double), typeof(TransporterGantryTeachControl),
  56. new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));
  57. /// <summary>
  58. /// 当前位置
  59. /// </summary>
  60. public double CurrentPosition
  61. {
  62. get
  63. {
  64. return (double)this.GetValue(CurrentPositionProperty);
  65. }
  66. set
  67. {
  68. SetValue(CurrentPositionProperty, value);
  69. }
  70. }
  71. public static readonly DependencyProperty CurrentStationProperty = DependencyProperty.Register("CurrentStation", typeof(string), typeof(TransporterGantryTeachControl),
  72. new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  73. /// <summary>
  74. /// 当前工位
  75. /// </summary>
  76. public string CurrentStation
  77. {
  78. get
  79. {
  80. return (string)this.GetValue(CurrentStationProperty);
  81. }
  82. set
  83. {
  84. this.SetValue(CurrentStationProperty, value);
  85. }
  86. }
  87. public static readonly DependencyProperty DegValueProperty = DependencyProperty.Register(
  88. "DegValue", typeof(double), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));
  89. /// <summary>
  90. /// 调整数值
  91. /// </summary>
  92. public double DegValue
  93. {
  94. get
  95. {
  96. return (double)this.GetValue(DegValueProperty);
  97. }
  98. set
  99. {
  100. this.SetValue(DegValueProperty, value);
  101. }
  102. }
  103. public static readonly DependencyProperty IncrementValueProperty = DependencyProperty.Register(
  104. "IncrementValue", typeof(double), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));
  105. /// <summary>
  106. /// 步进数值
  107. /// </summary>
  108. public double IncrementValue
  109. {
  110. get
  111. {
  112. return (double)this.GetValue(IncrementValueProperty);
  113. }
  114. set
  115. {
  116. this.SetValue(IncrementValueProperty, value);
  117. }
  118. }
  119. public static readonly DependencyProperty MovingProperty = DependencyProperty.Register(
  120. "Moving", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  121. /// <summary>
  122. /// Moving
  123. /// </summary>
  124. public bool Moving
  125. {
  126. get
  127. {
  128. return (bool)this.GetValue(MovingProperty);
  129. }
  130. set
  131. {
  132. this.SetValue(MovingProperty, value);
  133. }
  134. }
  135. public static readonly DependencyProperty IsSwitchOnProperty = DependencyProperty.Register(
  136. "IsSwitchOn", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  137. /// <summary>
  138. /// IsSwitch
  139. /// </summary>
  140. public bool IsSwitchOn
  141. {
  142. get
  143. {
  144. return (bool)this.GetValue(IsSwitchOnProperty);
  145. }
  146. set
  147. {
  148. this.SetValue(IsSwitchOnProperty, value);
  149. }
  150. }
  151. public static readonly DependencyProperty HomedProperty = DependencyProperty.Register(
  152. "Homed", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  153. /// <summary>
  154. /// Homed
  155. /// </summary>
  156. public bool Homed
  157. {
  158. get
  159. {
  160. return (bool)this.GetValue(HomedProperty);
  161. }
  162. set
  163. {
  164. this.SetValue(HomedProperty, value);
  165. }
  166. }
  167. public static readonly DependencyProperty TorqueLimitedProperty = DependencyProperty.Register(
  168. "TorqueLimited", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsRender));
  169. /// <summary>
  170. /// TorqueLimited
  171. /// </summary>
  172. public bool TorqueLimited
  173. {
  174. get
  175. {
  176. return (bool)this.GetValue(TorqueLimitedProperty);
  177. }
  178. set
  179. {
  180. this.SetValue(TorqueLimitedProperty, value);
  181. }
  182. }
  183. public static readonly DependencyProperty PositiveHwSwitchedProperty = DependencyProperty.Register(
  184. "PositiveHwSwitched", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  185. /// <summary>
  186. /// PositiveHwSwitched
  187. /// </summary>
  188. public bool PositiveHwSwitched
  189. {
  190. get
  191. {
  192. return (bool)this.GetValue(PositiveHwSwitchedProperty);
  193. }
  194. set
  195. {
  196. this.SetValue(PositiveHwSwitchedProperty, value);
  197. }
  198. }
  199. public static readonly DependencyProperty NegativeHwSwitchedProperty = DependencyProperty.Register(
  200. "NegativeHwSwitched", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  201. /// <summary>
  202. /// NegativeHwSwitched
  203. /// </summary>
  204. public bool NegativeHwSwitched
  205. {
  206. get
  207. {
  208. return (bool)this.GetValue(NegativeHwSwitchedProperty);
  209. }
  210. set
  211. {
  212. this.SetValue(NegativeHwSwitchedProperty, value);
  213. }
  214. }
  215. public static readonly DependencyProperty PositiveSwSwitchedProperty = DependencyProperty.Register(
  216. "PositiveSwSwitched", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  217. /// <summary>
  218. /// PositiveSwSwitched
  219. /// </summary>
  220. public bool PositiveSwSwitched
  221. {
  222. get
  223. {
  224. return (bool)this.GetValue(PositiveSwSwitchedProperty);
  225. }
  226. set
  227. {
  228. this.SetValue(PositiveSwSwitchedProperty, value);
  229. }
  230. }
  231. public static readonly DependencyProperty NegativeSwSwitchedProperty = DependencyProperty.Register(
  232. "NegativeSwSwitched", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  233. /// <summary>
  234. /// NegativeSwSwitched
  235. /// </summary>
  236. public bool NegativeSwSwitched
  237. {
  238. get
  239. {
  240. return (bool)this.GetValue(NegativeSwSwitchedProperty);
  241. }
  242. set
  243. {
  244. this.SetValue(NegativeSwSwitchedProperty, value);
  245. }
  246. }
  247. public static readonly DependencyProperty ReadyToLock1Property = DependencyProperty.Register(
  248. "ReadyToLock1", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  249. /// <summary>
  250. /// ReadyToLock1
  251. /// </summary>
  252. public bool ReadyToLock1
  253. {
  254. get
  255. {
  256. return (bool)this.GetValue(ReadyToLock1Property);
  257. }
  258. set
  259. {
  260. this.SetValue(ReadyToLock1Property, value);
  261. }
  262. }
  263. public static readonly DependencyProperty ReadyToLock2Property = DependencyProperty.Register(
  264. "ReadyToLock2", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  265. /// <summary>
  266. /// ReadyToLock2
  267. /// </summary>
  268. public bool ReadyToLock2
  269. {
  270. get
  271. {
  272. return (bool)this.GetValue(ReadyToLock2Property);
  273. }
  274. set
  275. {
  276. this.SetValue(ReadyToLock2Property, value);
  277. }
  278. }
  279. public static readonly DependencyProperty WaferPresent1Property = DependencyProperty.Register(
  280. "WaferPresent1", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  281. /// <summary>
  282. /// WaferPresent1
  283. /// </summary>
  284. public bool WaferPresent1
  285. {
  286. get
  287. {
  288. return (bool)this.GetValue(WaferPresent1Property);
  289. }
  290. set
  291. {
  292. this.SetValue(WaferPresent1Property, value);
  293. }
  294. }
  295. public static readonly DependencyProperty WaferPresent2Property = DependencyProperty.Register(
  296. "WaferPresent2", typeof(bool), typeof(TransporterGantryTeachControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  297. /// <summary>
  298. /// WaferPresent2
  299. /// </summary>
  300. public bool WaferPresent2
  301. {
  302. get
  303. {
  304. return (bool)this.GetValue(WaferPresent2Property);
  305. }
  306. set
  307. {
  308. this.SetValue(WaferPresent2Property, value);
  309. }
  310. }
  311. #endregion
  312. public TransporterGantryTeachControl()
  313. {
  314. InitializeComponent();
  315. }
  316. }
  317. }