Chamber.xaml.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. using Aitex.Core.Common;
  2. using Aitex.Sorter.Common;
  3. using MECF.Framework.Common.Equipment;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows;
  10. using System.Windows.Controls;
  11. using System.Windows.Data;
  12. using System.Windows.Documents;
  13. using System.Windows.Input;
  14. using System.Windows.Media;
  15. using System.Windows.Media.Imaging;
  16. using System.Windows.Navigation;
  17. using System.Windows.Shapes;
  18. using CB=OpenSEMI.ClientBase;
  19. namespace VirgoUI.Controls.Parts
  20. {
  21. /// <summary>
  22. /// Chamber.xaml 的交互逻辑
  23. /// </summary>
  24. public partial class Chamber : UserControl
  25. {
  26. public Chamber()
  27. {
  28. InitializeComponent();
  29. }
  30. public CB.WaferInfo WaferData
  31. {
  32. get { return (CB.WaferInfo)GetValue(WaferDataProperty); }
  33. set { SetValue(WaferDataProperty, value); }
  34. }
  35. public static readonly DependencyProperty WaferDataProperty =
  36. DependencyProperty.Register("WaferData", typeof(CB.WaferInfo), typeof(Chamber), new PropertyMetadata(null));
  37. // public WaferInfo Wafer
  38. // {
  39. // get { return (WaferInfo)GetValue(WaferProperty); }
  40. // set { SetValue(WaferProperty, value); }
  41. // }
  42. // // Using a DependencyProperty as the backing store for WaferItem. This enables animation, styling, binding, etc...
  43. // public static readonly DependencyProperty WaferProperty =
  44. // DependencyProperty.Register("Wafer", typeof(WaferInfo), typeof(Chamber), new PropertyMetadata(null));
  45. // public ModuleName Station
  46. // {
  47. // get { return (ModuleName)GetValue(StationProperty); }
  48. // set { SetValue(StationProperty, value); }
  49. // }
  50. // // Using a DependencyProperty as the backing store for WaferItem. This enables animation, styling, binding, etc...
  51. // public static readonly DependencyProperty SlotProperty =
  52. // DependencyProperty.Register("Slot", typeof(int), typeof(Chamber), new PropertyMetadata(0));
  53. // public int Slot
  54. // {
  55. // get { return (int)GetValue(SlotProperty); }
  56. // set { SetValue(SlotProperty, value); }
  57. // }
  58. // // Using a DependencyProperty as the backing store for Station. This enables animation, styling, binding, etc...
  59. // public static readonly DependencyProperty StationProperty =
  60. //DependencyProperty.Register("Station", typeof(ModuleName), typeof(Chamber), new PropertyMetadata(ModuleName.System));
  61. public FoupDoorState DoorState
  62. {
  63. get { return (FoupDoorState)GetValue(DoorStateProperty); }
  64. set { SetValue(DoorStateProperty, value); }
  65. }
  66. // Using a DependencyProperty as the backing store for DoorState. This enables animation, styling, binding, etc...
  67. public static readonly DependencyProperty DoorStateProperty =
  68. DependencyProperty.Register("DoorState", typeof(FoupDoorState), typeof(Chamber), new PropertyMetadata(FoupDoorState.Unknown));
  69. public ICommand Command
  70. {
  71. get { return (ICommand)GetValue(CommandProperty); }
  72. set { SetValue(CommandProperty, value); }
  73. }
  74. // Using a DependencyProperty as the backing store for Command. This enables animation, styling, binding, etc...
  75. public static readonly DependencyProperty CommandProperty =
  76. DependencyProperty.Register("Command", typeof(ICommand), typeof(Chamber), new PropertyMetadata(null));
  77. private void MenuItem_Click(object sender, RoutedEventArgs e)
  78. {
  79. var cmd = ((MenuItem)sender).Tag;
  80. Command.Execute(new[] { WaferData.ModuleID, cmd });
  81. }
  82. }
  83. }