public void DisplayCCCAlertMessage(object sender, EventArgs e) { if (InvokeRequired) { Invoke((MethodInvoker)(() => DisplayCCCAlertMessage(this, e))); } else { IsAlertFormActived(); var carrierid = _workcell.Process.OutputStationProcess.Controller.CurrentOutputHoldCarrier != null? _workcell.Process.OutputStationProcess.Controller.CurrentOutputHoldCarrier.CarrierID:string.Empty; HSTMachine.Workcell.CurretCCCActiveStatus.ChangeActiveStatus(true); string almsg = "Please inspect on Tail pad and TIC joint." + Environment.NewLine + "Then select bellow button in the cause of defect that you see." + Environment.NewLine + "Carrier Id : " + carrierid; CCCAlertForm frm = new CCCAlertForm(); frm.AssignAlert(CCCAlertForm.AlertType.Inspect, almsg, "ANC Triggering alert", string.Empty, string.Empty); frm.Show(); } }
private void UpdateCCCDefectChange(object sender, CCCDefectSelection args) { if (InvokeRequired) { Invoke((MethodInvoker)(() => UpdateCCCDefectChange(sender, args))); } else { if (args.Defect == CCCAlertInformation.CCCMcDefect.TICDefect) { string errmsg = string.Empty; string errcode = string.Empty; if (_workcell.CCCFailureInfo.LastFailureStation.ToString() == HSTMachine.Workcell.HSTSettings.ANCSettings.uTICMachineName1.ToString()) { HSTMachine.Workcell.getPanelData().lblLastTriggerMC1.Text = System.DateTime.Now.ToString(); errcode = _workcell.TICCccControl.CCCControlTicMc1.CccResult.CCCDataLogger.FAILURE_TYPE; } else if (_workcell.CCCFailureInfo.LastFailureStation.ToString() == HSTMachine.Workcell.HSTSettings.ANCSettings.uTICMachineName2.ToString()) { HSTMachine.Workcell.getPanelData().lblLastTriggerMC2.Text = System.DateTime.Now.ToString(); errcode = _workcell.TICCccControl.CCCControlTicMc2.CccResult.CCCDataLogger.FAILURE_TYPE; } else { //do nothing } if (errcode.Contains("ANC")) { errmsg = "ANC Fail Machine Trigger - TIC Defect"; } else if (errcode.Contains("CCC")) { errmsg = "CCC Fail Machine Trigger - TIC Defect"; } Log.Maintenance(this, "{0},{1},{2}", errmsg, "FailCode=" + _workcell.CCCFailureInfo.LastFailureMessage, "TIC Number=" + _workcell.CCCFailureInfo.LastFailureStation); IsAlertFormActived(); string topic = "uTIC Yield Triggering"; //Mar-2020 Fix error no Station and ErrorMsgCode //string almsg = "Please verify uTIC machine number : " + _workcell.CCCFailureInfo.FailedMc + Environment.NewLine + // "uTIC height failure code : " + _workcell.CCCFailureInfo.FailedCode; string almsg = "Please verify uTIC machine number : " + _workcell.CCCFailureInfo.LastFailureStation.ToString() + Environment.NewLine + "uTIC height failure code : " + _workcell.CCCFailureInfo.LastFailureMessage.ToString(); string txtDock = string.Format("UTIC Dock : {0}", _workcell.CCCFailureInfo.FailDockNumber); CCCAlertForm frm = new CCCAlertForm(); frm.AssignAlert(CCCAlertForm.AlertType.Acknowledge, almsg, topic, errcode, txtDock); frm.Show(); if (_workcell.CCCFailureInfo.LastFailureStation.ToString() == HSTMachine.Workcell.HSTSettings.ANCSettings.uTICMachineName1.ToString()) { HSTMachine.Workcell.getPanelData().lblLastTriggerMC1.Text = System.DateTime.Now.ToString(); } else if (_workcell.CCCFailureInfo.LastFailureStation.ToString() == HSTMachine.Workcell.HSTSettings.ANCSettings.uTICMachineName2.ToString()) { HSTMachine.Workcell.getPanelData().lblLastTriggerMC2.Text = System.DateTime.Now.ToString(); } } else if (args.Defect == CCCAlertInformation.CCCMcDefect.HSTDefect) { Log.Maintenance(this, "{0},{1},{2}", "ANC Machine Trigger - HST Defect", "FailCode=" + _workcell.CCCFailureInfo.LastFailureMessage, "TIC Number=" + _workcell.CCCFailureInfo.LastFailureStation); IsAlertFormActived(); string topic = "HST Probe Position Error"; string almsg = "HST Probe Position Fail!" + Environment.NewLine + "Please Re-setup probing teaching point on HST"; CCCAlertForm frm = new CCCAlertForm(); frm.AssignAlert(CCCAlertForm.AlertType.Acknowledge, almsg, topic, string.Empty, string.Empty); frm.Show(); } } }