12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Aitex.Core.RT.Log;
- using Aitex.Sorter.Common;
- using Caliburn.Micro;
- using MECF.Framework.Common.OperationCenter;
- using OpenSEMI.ClientBase;
- using OpenSEMI.Ctrlib.Controls;
- using VirgoUI.Client.Dialog;
- namespace VirgoUI.Client
- {
- public class WaferMoveManager
- {
- #region single Instance
- private WaferMoveManager()
- {
- }
- private static WaferMoveManager m_Instance = null;
- public static WaferMoveManager Instance
- {
- get
- {
- if (m_Instance == null)
- {
- m_Instance = new WaferMoveManager();
- }
- return m_Instance;
- }
- }
- #endregion
- public void TransferWafer(Slot p_from, Slot p_to, float tempToChamber)
- {
- try
- {
- if (p_from == null || p_to == null || !p_from.IsValidSlot() || !p_to.IsValidSlot())
- return;
-
- string info = " from " + p_from.ModuleID + " slot " + (p_from.SlotID + 1).ToString() + " to " + p_to.ModuleID + " slot " + (p_to.SlotID + 1).ToString();
- string message = "Are you sure to transfer the wafer: \n" + info;
- bool displayAlignerCondition = (p_from.ModuleID != "Aligner1" && p_to.ModuleID != "Aligner1"
- && p_from.ModuleID != "Aligner2" && p_to.ModuleID != "Aligner2"
- && p_from.ModuleID != "Cooling1" && p_to.ModuleID != "Cooling1"
- && p_from.ModuleID != "Cooling2" && p_to.ModuleID != "Cooling2") && !p_from.ModuleID.Contains("PM");
- bool displayCoolingCondition = (p_from.ModuleID.Contains("PM") );
- displayCoolingCondition = displayCoolingCondition && !p_to.ModuleID.Contains("PM");
- string labelChamber = "";
- if (p_to.ModuleID.Contains("PM"))
- {
- labelChamber = $"{p_to.ModuleID} Temp. {tempToChamber:F2}℃";
- }
- WindowManager wm = new WindowManager();
- WaferTransferDialogViewModel _transferVM = new WaferTransferDialogViewModel(message, displayAlignerCondition, true, labelChamber);
- bool? bret = wm.ShowDialogWithNoStyle(_transferVM);
- if ((bool)bret)
- {
- //get and use transfer conditions
- WaferTransferCondition conditions = _transferVM.DialogResult;
- InvokeClient.Instance.Service.DoOperation("System.MoveWafer",
- p_from.ModuleID, p_from.SlotID, p_to.ModuleID, p_to.SlotID,
- conditions.IsPassAligner, conditions.AlignerAngle, conditions.IsPassCooling, conditions.CoolingTime, "Blade1");
- }
- p_from.ClearDragDropStatus();
- p_to.ClearDragDropStatus();
- }
- catch (Exception ex)
- {
- LOG.Write(ex);
- }
- }
- }
- }
|