WaferHolderProcessCell.xaml.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. using CyberX8_Core;
  2. using MECF.Framework.Common.Equipment;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace CyberX8_Themes.UserControls
  18. {
  19. /// <summary>
  20. /// WaferHolderBuffer.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class WaferHolderProcessCell : UserControl
  23. {
  24. public WaferHolderProcessCell()
  25. {
  26. InitializeComponent();
  27. }
  28. public static readonly DependencyProperty CellNameProperty = DependencyProperty.Register(
  29. "CellName", typeof(string), typeof(WaferHolderProcessCell), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
  30. public string CellName
  31. {
  32. get { return this.GetValue(CellNameProperty).ToString(); }
  33. set { this.SetValue(CellNameProperty, value); }
  34. }
  35. public static readonly DependencyProperty WaferHolderVisibleProperty = DependencyProperty.Register(
  36. "WaferHolderVisible", typeof(bool), typeof(WaferHolderProcessCell), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  37. public bool WaferHolderVisible
  38. {
  39. get { return (bool)this.GetValue(WaferHolderVisibleProperty); }
  40. set { this.SetValue(WaferHolderVisibleProperty, value); }
  41. }
  42. public static readonly DependencyProperty CellStatusProperty = DependencyProperty.Register(
  43. "CellStatus", typeof(int), typeof(WaferHolderProcessCell), new FrameworkPropertyMetadata((int)UserControls.CellStatus.Idle, FrameworkPropertyMetadataOptions.AffectsRender));
  44. /// <summary>
  45. /// Cell 状态
  46. /// </summary>
  47. public int CellStatus
  48. {
  49. get { return (int)this.GetValue(CellStatusProperty); }
  50. set
  51. {
  52. this.SetValue(CellStatusProperty, value);
  53. }
  54. }
  55. public static readonly DependencyProperty IsWHEnableProperty = DependencyProperty.Register(
  56. "IsWHEnable", typeof(bool), typeof(WaferHolderProcessCell), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsRender));
  57. /// <summary>
  58. /// IsWHEnable
  59. /// </summary>
  60. public bool IsWHEnable
  61. {
  62. get { return (bool)this.GetValue(IsWHEnableProperty); }
  63. set
  64. {
  65. this.SetValue(IsWHEnableProperty, value);
  66. }
  67. }
  68. private void Canvas_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  69. {
  70. GlobalEvents.OnSwitchFixedTabItem("HardWare", "Modules", $"{CellName}");
  71. }
  72. }
  73. /// <summary>
  74. /// Cell状态枚举
  75. /// </summary>
  76. internal enum CellStatus
  77. {
  78. Init=0,
  79. //Idle
  80. Idle = 1,
  81. //Busy
  82. Busy = 2,
  83. //Disable
  84. Disabled = 3,
  85. //Error
  86. Error = 4
  87. }
  88. }