FOUPFrontView.xaml.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. 
  2. using System.Diagnostics;
  3. using System;
  4. using System.Windows;
  5. using System.Windows.Controls;
  6. using System.Windows.Input;
  7. using OpenSEMI.ClientBase;
  8. using OpenSEMI.Ctrlib.Controls;
  9. using CyberX8_Core;
  10. namespace CyberX8_Themes.UserControls
  11. {
  12. /// <summary>
  13. /// FOUPFrontView.xaml 的交互逻辑
  14. /// </summary>
  15. public partial class FOUPFrontView : UserControl
  16. {
  17. public FOUPFrontView()
  18. {
  19. InitializeComponent();
  20. }
  21. #region UnitData (DependencyProperty)
  22. public ModuleInfo UnitData
  23. {
  24. get { return (ModuleInfo)GetValue(UnitDataProperty); }
  25. set { SetValue(UnitDataProperty, value); }
  26. }
  27. public static readonly DependencyProperty UnitDataProperty =
  28. DependencyProperty.Register("UnitData", typeof(ModuleInfo), typeof(FOUPFrontView), new UIPropertyMetadata(null));
  29. public bool ShowTitle
  30. {
  31. get { return (bool)GetValue(ShowTitleProperty); }
  32. set { SetValue(ShowTitleProperty, value); }
  33. }
  34. public static readonly DependencyProperty ShowTitleProperty =
  35. DependencyProperty.Register("ShowTitle", typeof(bool), typeof(FOUPFrontView), new UIPropertyMetadata(true));
  36. public int SlotWidth
  37. {
  38. get { return (int)GetValue(SlotWidthProperty); }
  39. set { SetValue(SlotWidthProperty, value); }
  40. }
  41. public static readonly DependencyProperty SlotWidthProperty =
  42. DependencyProperty.Register("SlotWidth", typeof(int), typeof(FOUPFrontView), new PropertyMetadata(90));
  43. #endregion
  44. private void Slot_SlotMouseButtonDown(object sender, MouseButtonEventArgs e)
  45. {
  46. GlobalEvents.OnSlotRightClickChanged(sender as Slot);
  47. }
  48. private void Slot_WaferTransferStarted(object sender, DragDropEventArgs e)
  49. {
  50. try
  51. {
  52. GlobalEvents.OnSlotWaferTransfer(e);
  53. }
  54. catch (Exception ex)
  55. {
  56. Trace.WriteLine(ex);
  57. }
  58. }
  59. }
  60. }