UnitModel.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Windows;
  4. using System.Windows.Controls;
  5. using System.Windows.Input;
  6. using Aitex.Core.RT.Log;
  7. using VirgoUI.Controls.Parts;
  8. using MECF.Framework.Common.Equipment;
  9. using OpenSEMI.ClientBase;
  10. using OpenSEMI.Ctrlib.Controls;
  11. using Slot = OpenSEMI.Ctrlib.Controls.Slot;
  12. /// <summary>
  13. /// This view model is basic model used for machine part
  14. /// </summary>
  15. ///
  16. namespace VirgoUI.Client.Models
  17. {
  18. public class UnitModel : BaseModel
  19. {
  20. #region Property
  21. public ModuleInfo FOUPA { get; set; }
  22. public ModuleInfo FOUPB { get; set; }
  23. public ModuleInfo TM { get; set; }
  24. public ModuleInfo EFEM { get; set; }
  25. public ModuleInfo Aligner { get; set; }
  26. public ModuleInfo LLA { get; set; }
  27. public ModuleInfo LLB { get; set; }
  28. public ModuleInfo PM1 { get; set; }
  29. public ModuleInfo PM2 { get; set; }
  30. public ModuleInfo PM3 { get; set; }
  31. public ModuleInfo PM4 { get; set; }
  32. public ModuleInfo PM5 { get; set; }
  33. public ModuleInfo PM6 { get; set; }
  34. #endregion
  35. protected override void OnInitialize()
  36. {
  37. base.OnInitialize();
  38. }
  39. protected void InitTM()
  40. {
  41. TM = ModuleManager.ModuleInfos["TMRobot"];
  42. }
  43. protected void InitLL()
  44. {
  45. LLA = ModuleManager.ModuleInfos["LLA"];
  46. LLB = ModuleManager.ModuleInfos["LLB"];
  47. }
  48. protected void InitEFEM()
  49. {
  50. EFEM = ModuleManager.ModuleInfos["EfemRobot"];
  51. Aligner = ModuleManager.ModuleInfos["Aligner"];
  52. }
  53. protected void InitFOUP()
  54. {
  55. FOUPA = ModuleManager.ModuleInfos["LP1"];
  56. FOUPB = ModuleManager.ModuleInfos["LP2"];
  57. }
  58. protected void InitPM()
  59. {
  60. PM1 = ModuleManager.ModuleInfos["PM1"];
  61. PM2 = ModuleManager.ModuleInfos["PM2"];
  62. PM3 = ModuleManager.ModuleInfos["PM3"];
  63. PM4 = ModuleManager.ModuleInfos["PM4"];
  64. PM5 = ModuleManager.ModuleInfos["PM5"];
  65. PM6 = ModuleManager.ModuleInfos["PM6"];
  66. }
  67. /// <summary>
  68. /// support wafer transfer for slot
  69. /// </summary>
  70. public void OnWaferTransfer(DragDropEventArgs args)
  71. {
  72. try
  73. {
  74. WaferMoveManager.Instance.TransferWafer(args.TranferFrom, args.TranferTo, 0.0f);
  75. }
  76. catch (Exception ex)
  77. {
  78. LOG.Error(ex.Message, ex);
  79. }
  80. }
  81. /// <summary>
  82. /// support context menu
  83. /// </summary>
  84. public void OnMouseUp(object sender, MouseButtonEventArgs e)
  85. {
  86. if (e.ChangedButton == MouseButton.Right)
  87. {
  88. Slot slot = sender as Slot;
  89. ContextMenu cm = ContextMenuManager.Instance.GetSlotMenus(slot);
  90. if (cm != null)
  91. {
  92. ((FrameworkElement)e.Source).ContextMenu = cm;
  93. }
  94. }
  95. }
  96. }
  97. }