using System; using System.Linq; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Threading; using SmartX; using INT_LKD.DataStore; using INT_LKD.Controls; using INT_LKD.Part11_UserManager; using INT_LKD.DialogForms; using INT_LKD.Controls.MainDisplay; namespace INT_LKD.Forms { public partial class FormMainDisplay : Form { #region Field public string ChangeID; private bool BeforeEthernetStatus; private int FlagIgnoreCNT; private string MessageBoxRange; private int testIndex; private Define.E_ProcessStatus CurrentProcessStatus; private bool IsTestMode; private Color ColorProgressOn; private Color ColorProgressOff; private Color ColorProgressTextOn; private Color ColorProgressTextOff; private Color ColorSensorNormal; private Color ColorSensorError; private Color ColorNumberSelected; private Color ColorNumberUnSelected; //private Collection CollectionLabelPressureWorking; //private Collection CollectionLabelLeakRatePerSec; //private Collection CollectionLabelDisplacement; //private Collection CollectionLabelSbAlarm; //private Collection CollectionLabelNumber; //private Collection CollectionLabelDispAlarm; //private Collection CollectionControlResult; private FormMain m_ParentForm; public ControlMainModbus ChildModbus; public ControlMainDisplay10 ChildMainDisplay10; public ControlMainDisplay12 ChildMainDisplay12; public ControlMainStatus10 ChildMainStatus10; public ControlMainStatus12 ChildMainStatus12; #endregion #region Constructor public FormMainDisplay(FormMain parent) { InitializeComponent(); this.ParentForm = parent; this.DefaultSetting(); this.InitializeDesign(); this.InitializeProcessStatus(); } #endregion #region Property public FormMain ParentForm { get { return this.m_ParentForm; } private set { this.m_ParentForm = value; } } #endregion #region Method private void DefaultSetting() { int testIndex = 0; this.BeforeEthernetStatus = false; this.IsTestMode = false; this.FlagIgnoreCNT = 0; this.MessageBoxRange = ""; this.CurrentProcessStatus = Define.E_ProcessStatus._0_None; this.ColorProgressOff = Color.FromArgb(231, 231, 231); this.ColorProgressOn = Color.FromArgb(95, 196, 188); this.ColorProgressTextOff = Color.Black; this.ColorProgressTextOn = Color.Black; this.ColorSensorNormal = Color.FromArgb(39, 200, 64); this.ColorSensorError = Color.FromArgb(254, 70, 70); this.ColorNumberSelected = Color.Teal; this.ColorNumberUnSelected = Color.FromArgb(80, 92, 118); this.ChildModbus = new ControlMainModbus(this); this.Controls.Add(this.ChildModbus); this.ChildModbus.Location = new Point(0, 155); this.ChildModbus.BringToFront(); this.ChildModbus.Visible = false; if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10 = new ControlMainStatus10(this); this.Controls.Add(this.ChildMainStatus10); this.ChildMainStatus10.Location = new Point(596, 150); this.ChildMainStatus10.BringToFront(); this.ChildMainDisplay10 = new ControlMainDisplay10(this); this.Controls.Add(this.ChildMainDisplay10); this.ChildMainDisplay10.Location = new Point(0, 147); this.ChildMainDisplay10.BringToFront(); this.ChildMainDisplay10.Visible = false; } else { this.ChildMainStatus12 = new ControlMainStatus12(this); this.Controls.Add(this.ChildMainStatus12); this.ChildMainStatus12.Location = new Point(596, 150); this.ChildMainStatus12.BringToFront(); this.ChildMainDisplay12 = new ControlMainDisplay12(this); this.Controls.Add(this.ChildMainDisplay12); this.ChildMainDisplay12.Location = new Point(0, 147); this.ChildMainDisplay12.BringToFront(); this.ChildMainDisplay12.Visible = false; } this.buttonRecipeNo.ButtonText = this.ParentForm.SystemConfig.RECIPE_NUMBER.ToString(); this.UpdateDisplayUser(this.ParentForm.CurrentSystemStatus.CurrentUser); } public void InitializeDesign() { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.InitializeDesign(); this.ChildMainDisplay10.InitializeDesign(); } else { this.ChildMainStatus12.InitializeDesign(); this.ChildMainDisplay12.InitializeDesign(); } if (this.ChildModbus != null) this.ChildModbus.InitializeDesign(); switch (this.ParentForm.SystemConfig.LANGUAGE) { case Define.E_LanguageID.Chinese: this.labelTitleLeakDetetor.Text = "泄漏检测仪"; this.labelStart.Text = "运行"; this.labelStop.Text = "停止"; this.labelTitleTime.Text = "时间"; this.labelTitleAlarm.Text = "报警"; this.labelTitleProcess.Text = "工序"; this.labelProgress0_1.Text = "初始状态"; this.labelProgress1_1.Text = "移动及产品进入"; this.labelProgress2_1.Text = "测量中"; this.labelProgress3_1.Text = "排出及返回原点"; this.buttonInspection.ButtonText = "检测"; this.buttonDischarge.ButtonText = "排出"; this.buttonClear.ButtonText = "消除"; this.buttonDisplay.ButtonText = "显示"; this.buttonUser.ButtonText = "登錄"; this.buttonModbus.ButtonText = "Modbus"; this.buttonTest.ButtonText = "测试"; this.buttonMenu.ButtonText = "菜单"; break; default: this.labelTitleLeakDetetor.Text = "LEAK DETECTOR"; this.labelStart.Text = "Run"; this.labelStop.Text = "Stop"; this.labelTitleTime.Text = "Time"; this.labelTitleAlarm.Text = "Alarm"; this.labelTitleProcess.Text = "Process"; this.labelProgress0_1.Text = "Ready"; this.labelProgress1_1.Text = "Chamber shift"; this.labelProgress2_1.Text = "Measuring"; this.labelProgress3_1.Text = "Discharge"; this.buttonInspection.ButtonText = "Inspection"; this.buttonDischarge.ButtonText = "Discharge"; this.buttonClear.ButtonText = "Clear"; this.buttonDisplay.ButtonText = "Display"; this.buttonUser.ButtonText = "Login"; this.buttonModbus.ButtonText = "Modbus"; this.buttonTest.ButtonText = "Test"; this.buttonMenu.ButtonText = "Menu"; break; } } private void InitializeProcessStatus() { this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; this.progressBar1.Value = this.progressBar1.Minimum; this.SetLabelRoundRectFillColor(this.labelProgress0, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress1, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress2, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress3, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress0_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress1_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress2_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress3_1, this.ColorProgressOff); this.SetLabelTextColor(this.labelProgress0_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress1_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress2_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress3_1, this.ColorProgressTextOff); } private bool UI_Invoke(ThreadStart invoker) { try { if (this.InvokeRequired) { if (this.IsDisposed) return true; this.Invoke(invoker); } else { invoker(); } return true; } catch (Exception e) { return false; } } private void SetLabelBackGroundColor(SmartLabel label, Color c) { if (label.BackGroundColor != c) label.BackGroundColor = c; } private void SetLabelRoundRectFillColor(SmartLabel label, Color c) { if (label.RoundRectFillColor != c) label.RoundRectFillColor = c; } private void SetLabelTextColor(SmartLabel label, Color c) { if (label.TextColor != c) label.TextColor = c; } private void UpdateDisplayUser(UserItem user) { string id = "", group = "", expireDate = ""; switch (user.Group) { case Define.E_UserGroup.None: break; case Define.E_UserGroup.Level1: id = user.ID; group = user.Group.ToString(); if (this.labelUserLevel.TextColor != this.ParentForm.ColorLogOn) this.labelUserLevel.TextColor = this.labelUserID.TextColor = this.ParentForm.ColorLogOn; this.labelExpireOfPassword.Visible = true; this.buttonUser.ButtonDown(); this.buttonRecipeNo.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayProductChange; this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayClear; this.buttonInspection.Enabled = true; this.buttonDischarge.Enabled = true; this.buttonMenu.Enabled = true; this.buttonDisplay.Visible = false; break; case Define.E_UserGroup.Level2: id = user.ID; group = user.Group.ToString(); if (this.labelUserLevel.TextColor != this.ParentForm.ColorLogOn) this.labelUserLevel.TextColor = this.labelUserID.TextColor = this.ParentForm.ColorLogOn; this.labelExpireOfPassword.Visible = true; this.buttonUser.ButtonDown(); this.buttonRecipeNo.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayProductChange; this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayClear; this.buttonInspection.Enabled = true; this.buttonDischarge.Enabled = true; this.buttonMenu.Enabled = true; this.buttonDisplay.Visible = false; break; case Define.E_UserGroup.Level3: id = user.ID; group = user.Group.ToString(); this.labelExpireOfPassword.Visible = true; if (this.labelUserLevel.TextColor != this.ParentForm.ColorLogOn) this.labelUserLevel.TextColor = this.labelUserID.TextColor = this.ParentForm.ColorLogOn; this.buttonUser.ButtonDown(); this.buttonRecipeNo.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayProductChange; this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayClear; this.buttonInspection.Enabled = true; this.buttonDischarge.Enabled = true; this.buttonMenu.Enabled = true; this.buttonDisplay.Visible = false; break; case Define.E_UserGroup.Admin: id = user.ID; group = user.Group.ToString(); this.labelExpireOfPassword.Visible = false; if (this.labelUserLevel.TextColor != this.ParentForm.ColorLogOn) this.labelUserLevel.TextColor = this.labelUserID.TextColor = this.ParentForm.ColorLogOn; this.buttonUser.ButtonDown(); this.buttonRecipeNo.Enabled = true; this.buttonClear.Enabled = true; this.buttonInspection.Enabled = true; this.buttonDischarge.Enabled = true; this.buttonMenu.Enabled = true; this.buttonDisplay.Visible = false; break; case Define.E_UserGroup.Developer: id = user.ID; group = user.Group.ToString(); this.labelExpireOfPassword.Visible = true; if (this.labelUserLevel.TextColor != this.ParentForm.ColorLogOn) this.labelUserLevel.TextColor = this.labelUserID.TextColor = this.ParentForm.ColorLogOn; this.buttonUser.ButtonDown(); this.buttonRecipeNo.Enabled = true; this.buttonClear.Enabled = true; this.buttonInspection.Enabled = true; this.buttonDischarge.Enabled = true; this.buttonMenu.Enabled = true; this.buttonDisplay.Visible = true; break; case Define.E_UserGroup.NotLogin: id = ""; group = ""; this.labelExpireOfPassword.Visible = false; this.buttonRecipeNo.Enabled = true; this.buttonClear.Enabled = true; this.buttonInspection.Enabled = true; this.buttonDischarge.Enabled = true; this.buttonMenu.Enabled = true; this.buttonDisplay.Visible = false; break; case Define.E_UserGroup.LogOut: id = "Log Off"; group = "-"; this.labelExpireOfPassword.Visible = false; if (this.labelUserLevel.TextColor != this.ParentForm.ColorLogOff) this.labelUserLevel.TextColor = this.labelUserID.TextColor = this.ParentForm.ColorLogOff; this.buttonUser.ButtonUp(); this.buttonRecipeNo.Enabled = false; this.buttonClear.Enabled = false; this.buttonInspection.Enabled = false; this.buttonDischarge.Enabled = false; this.buttonMenu.Enabled = false; this.buttonDisplay.Visible = false; break; default: break; } // button Color this.buttonRecipeNo.ButtonColor = this.ParentForm.ButtonColorChange(this.buttonRecipeNo.Enabled); this.buttonClear.ButtonColor = this.ParentForm.ButtonColorChange(this.buttonClear.Enabled); this.buttonMenu.ButtonColor = this.ParentForm.ButtonColorChange(this.buttonMenu.Enabled); // button Inspection Color if (this.buttonInspection.Enabled == true) this.buttonInspection.ButtonColor = Color.DarkGreen; else this.buttonInspection.ButtonColor = this.ParentForm.ButtonColorChange(false); // button Discharge Color if (this.buttonDischarge.Enabled == true) this.buttonDischarge.ButtonColor = Color.DarkGreen; else this.buttonDischarge.ButtonColor = this.ParentForm.ButtonColorChange(false); expireDate = this.DisplayExpireOfPassword(user.Group); if (expireDate != "-") { int intExpireDate = int.Parse(expireDate); if (intExpireDate == 0) { this.labelExpireOfPassword.TextColor = this.ParentForm.ColorLogOff; this.labelExpireOfPassword.Text = "D-0"; } else if (intExpireDate < 0) { if (intExpireDate * -1 > this.ParentForm.CurrentSystemStatus.CurrentUser.ExpirePassword) expireDate = "-" + (this.ParentForm.CurrentSystemStatus.CurrentUser.ExpirePassword - 1).ToString(); this.labelExpireOfPassword.Text = "D" + expireDate; if (intExpireDate >= -10) this.labelExpireOfPassword.TextColor = this.ParentForm.ColorLogOff; else this.labelExpireOfPassword.TextColor = this.ParentForm.ColorLogOn; } else { this.labelExpireOfPassword.TextColor = this.ParentForm.ColorLogOn; this.labelExpireOfPassword.Text = "D+" + expireDate; } } else { this.labelExpireOfPassword.TextColor = this.ParentForm.ColorLogOn; this.labelExpireOfPassword.Text = "-"; } if (this.labelUserLevel.Text != group) this.labelUserLevel.Text = group; if (this.labelUserID.Text != id) this.labelUserID.Text = id; } private void Login() { int extract = 0; DialogResult result; DialogFormLogOn logOn = new DialogFormLogOn(this.ParentForm, false, false); result = logOn.ShowDialog(); if (result == DialogResult.OK) { if (this.ParentForm.CurrentSystemStatus.CurrentUser.Group == Define.E_UserGroup.Level1 || this.ParentForm.CurrentSystemStatus.CurrentUser.Group == Define.E_UserGroup.Level2 || this.ParentForm.CurrentSystemStatus.CurrentUser.Group == Define.E_UserGroup.Level3) { // 비밀번호 만료일 10일 미만 체크 후 비밀번호 변경 this.PasswordExpirationCheck(this.ParentForm.CurrentSystemStatus.CurrentUser); } //this.ParentForm.ChildFormMenu.CenterEquipUserGroupEditor.UpdateAllMenu(this.ParentForm.CurrentSystemStatus); this.DisplayRefresh(); this.buttonUser.ButtonDown(); this.ParentForm.ChildFormMenu.UpdateDisplayUser(this.ParentForm.CurrentSystemStatus.CurrentUser); } else if (result == DialogResult.Abort) { // 비밀 번호 변경 띄우기 DialogFormLogOn logOn1 = new DialogFormLogOn(this.ParentForm, false, true); if (logOn1.ShowDialog() == DialogResult.OK) { //this.ParentForm.ChildFormMenu.CenterEquipUserGroupEditor.UpdateAllMenu(this.ParentForm.CurrentSystemStatus); this.DisplayRefresh(); this.buttonUser.ButtonDown(); this.ParentForm.ChildFormMenu.UpdateDisplayUser(this.ParentForm.CurrentSystemStatus.CurrentUser); } else this.buttonUser.ButtonUp(); } else { this.buttonUser.ButtonUp(); } } public void Logout() { this.ParentForm.CurrentSystemStatus.CurrentUser.Group = Define.E_UserGroup.LogOut; this.buttonUser.ButtonUp(); switch (this.ParentForm.SystemConfig.LANGUAGE) { case Define.E_LanguageID.Chinese: this.buttonUser.ButtonText = "登錄"; break; default: this.buttonUser.ButtonText = "Login"; break; } this.ChangeID = ""; // Part 11 this.ParentForm.SetTrackingHistoryData(Define.E_TrackingOperation.Logout, ""); this.DisplayRefresh(); } private void PasswordExpirationCheck(UserItem user) { int expiryDay = 0; // 만료일 -10 일때 메시지 띄우기 expiryDay = user.GetPasswordExpiryDday(); if (expiryDay >= -10) { //Console.WriteLine("password : " + expiryDay.ToString()); if (expiryDay < 0) expiryDay *= -1; DialogFormYesNo myDlg = new DialogFormYesNo(this.ParentForm.SystemConfig.LANGUAGE, 2, expiryDay.ToString()); if (myDlg.ShowDialog() == DialogResult.Yes) { // 비밀 번호 변경 띄우기 DialogFormLogOn logOn = new DialogFormLogOn(this.ParentForm, true, true); if (logOn.ShowDialog() == DialogResult.OK) { } } } } public void Part11AutomaticLogoutReset() { //UserManager.UserManager_AutoLogoutTimeoutReset(); } public string DisplayExpireOfPassword(Define.E_UserGroup group) { string ret = ""; if (group == Define.E_UserGroup.Admin || group == Define.E_UserGroup.Developer) ret = "-"; else { //TimeSpan resultTime = DateTime.Now - this.ParentForm.CurrentSystemStatus.CurrentUser.DateExpireRegister; TimeSpan dayDiff = DateTime.Now.Date - this.ParentForm.CurrentSystemStatus.CurrentUser.DatePasswordExpire.Date; ret = dayDiff.Days.ToString(); } return ret; } public void CallBackUserListModifyInfoData(UserManager.UserMgr_user_info_t user) { this.ParentForm.CurrentSystemStatus.CurrentUser.DatePasswordExpire = DateTime.Now.AddDays(this.ParentForm.CurrentSystemStatus.CurrentUser.ExpirePassword - 1); this.DisplayExpireOfPassword(this.ParentForm.CurrentSystemStatus.CurrentUser.Group); } public void CallBackUserListLoginTimeoutDataEvent(UserManager.UserMgr_login_timeout_t user) { string code = "", message1 = "", message2 = ""; int warningTime = 0; if (user.remainder_time != 0) { switch (this.ParentForm.SystemConfig.LANGUAGE) { case Define.E_LanguageID.Korean: code = "로그인"; message1 = "잠시 후에 로그아웃 됩니다"; message2 = ""; break; case Define.E_LanguageID.English: code = "Login"; message1 = "You will be logged out after a while"; message2 = ""; break; case Define.E_LanguageID.Chinese: code = "登錄"; message1 = "稍后您将被注销"; message2 = ""; break; default: break; } warningTime = this.ParentForm.FlagAutomaticLogoutWarningTime - 2; this.UI_Invoke(delegate { DialogFormMessage msg = new DialogFormMessage(Define.E_MessageBoxIcon.Asterisk, code, message1, message2, warningTime); msg.ShowDialog(); }); } else { switch (this.ParentForm.SystemConfig.LANGUAGE) { case Define.E_LanguageID.Korean: code = "Login"; message1 = "자동 로그아웃 되었습니다"; message2 = ""; break; case Define.E_LanguageID.English: code = "Login"; message1 = "Automatically logged out"; message2 = ""; break; case Define.E_LanguageID.Chinese: code = "登錄"; message1 = "您已自动退出"; message2 = ""; break; default: break; } // User Logout UserManager.UserManager_UserLogout(); this.UI_Invoke(delegate { this.Logout(); }); this.UI_Invoke(delegate { DialogFormMessage msg = new DialogFormMessage(Define.E_MessageBoxIcon.Asterisk, code, message1, message2, 0); msg.ShowDialog(); }); } } private void ProgressBarSetting(Define.E_ProcessStatus status) { switch (status) { case Define.E_ProcessStatus._6_VacuumStart: this.smartTimerProgressBar.Start(); break; case Define.E_ProcessStatus._7_VacuumHold: this.progressBar1.Value = 30; break; case Define.E_ProcessStatus._8_Judgment: this.progressBar1.Value = 60; break; case Define.E_ProcessStatus._9_VacuumBreak: this.progressBar1.Value = this.progressBar1.Maximum; this.smartTimerProgressBar.Stop(); break; default: break; } } public void InitialEthernetIcon() { // 이더넷 if (this.ParentForm.SystemConfig.IsEthernetEnable == true) { this.pictureBoxEthernetDisable.Visible = false; this.pictureBoxEthernetDisconnection.Visible = true; this.pictureBoxEthernetConnection.Visible = false; } else { this.pictureBoxEthernetDisable.Visible = true; this.pictureBoxEthernetDisconnection.Visible = false; this.pictureBoxEthernetConnection.Visible = false; } } public void UpdateEthernetStatusDisplay(bool status) { //Console.Write("\n" + string.Format("UpdateEthernetStatusDisplay {0:yyyy-MM-dd HH:mm:ss}: {1}", DateTime.Now, status.ToString())); if (this.BeforeEthernetStatus == status) return; else this.BeforeEthernetStatus = status; if (status == true) { this.pictureBoxEthernetConnection.Visible = true; this.pictureBoxEthernetDisconnection.Visible = false; } else { this.pictureBoxEthernetConnection.Visible = false; this.pictureBoxEthernetDisconnection.Visible = true; } } public void TimerServer(bool value) { if (value == false) { if (this.timerServer.IsStart == true) this.timerServer.Stop(); } else { if (this.timerServer.IsStart == false) this.timerServer.Start(); } } public void MainButtonModbusAdd(bool bValue) { this.buttonModbus.Visible = bValue; } private void UpdateDisplayDotGraphDiff(SmartDraw draw, DiffData diff) { int iValue = 0; double dValue = 0.0; // 값 표시 범위 // 15.000 ~ -2.000 (17.000 ~ 0) // 그래프 영역 높이 102 // 17000 / 102 = 166.666666~ //dValue = (int.Parse(data.CurrentValueSign + data.CurrentValue) + 2000) / 166.66666; if (dValue > 110) dValue = 110; if (dValue < 1) dValue = 1; iValue = int.Parse(string.Format("{0:f0}", dValue)); draw.Chart.PutData(iValue); } private void UpdateDisplayDotGraphDisp(SmartDraw draw, DispData disp) { int iValue = 0; double dValue = 0.0; // 값 표시 범위 // 15.000 ~ -2.000 (17.000 ~ 0) // 그래프 영역 높이 102 // 17000 / 102 = 166.666666~ //dValue = (int.Parse(data.CurrentValueSign + data.CurrentValue) + 2000) / 166.66666; if (dValue > 110) dValue = 110; if (dValue < 1) dValue = 1; iValue = int.Parse(string.Format("{0:f0}", dValue)); draw.Chart.PutData(iValue); } public void UpdateEquipmentStatusDisplay(Define.E_EquipmentStatus status) { if (status == Define.E_EquipmentStatus.Start) { #region Start this.labelStart.Visible = true; this.labelStop.Visible = false; #endregion } else { #region Stop this.labelStart.Visible = false; this.labelStop.Visible = true; if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) this.ChildMainStatus10.InitializeData(); else this.ChildMainStatus12.InitializeData(); #endregion } } public void UpdateDisplayAlarmView(AlarmList alarm) { string value = ""; // A1_ServoEmergencyStop if (alarm.A1_ServoEmergencyStop == true) value = "a1_Emergency stop "; // A2_PressureError if (alarm.A2_PressureError == true) value += "a2_Pressure "; // A3_MasterSlaveComm if (alarm.A3_BoardStatusCOM == true) value += "a3_M/S Board "; // A4_ServoOrigin if (alarm.A4_ServoOrigin == true) value += "a4_Servo Origin "; // A5_ServoAlarm1 if (alarm.A5_ServoAlarm1 == true) value += "a5_Servo1 "; // A6_ServoTorqueAlarm1 if (alarm.A6_ServoTorqueAlarm1 == true) value += "a6_Servo Torque1 "; // A7_ServoAlarm2 if (alarm.A7_ServoAlarm2 == true) value += "a7_Servo2 "; // A8_ServoTorqueAlarm2 if (alarm.A8_ServoTorqueAlarm2 == true) value += "a8_Servo Torque2 "; // A9_PressureSensorError1 if (alarm.A9_PressureSensorError1 == true) value += "a9_Pressure Sensor1 "; // A10_PressureSensorError2 if (alarm.A10_PressureSensorError2 == true) value += "a10_Pressure Sensor2 "; // A13_차압센서에러1 if (alarm.A13_DiffSensorError1 == true) value += "a13_Diff Sensor1 "; // A14_차압센서에러2 if (alarm.A14_DiffSensorError2 == true) value += "a14_Diff Sensor2 "; // A17_변위센서에러1 if (alarm.A17_DispSensorError1 == true) value += "a17_Disp Sensor1 "; // A18_변위센서에러2 if (alarm.A18_DispSensorError2 == true) value += "a18_Disp Sensor2 "; value = value.Trim(); //this.labelAlarm.Size = new Size(value.Length * 9, 30); this.labelAlarm.Text = value; //if (this.labelAlarm.Width > 400) //{ // if (this.labelAlarm.Text != "") // this.smartTimerAlarm.Start(); //} //else //{ // this.smartTimerAlarm.Stop(); // this.labelAlarm.Location = new Point(3, 26); //} } private void ProcessStatusPicturBox(Define.E_ProcessStatus status) { switch (status) { case Define.E_ProcessStatus._0_None: break; case Define.E_ProcessStatus._1_Ready: this.pictureBoxProgress0_1.Visible = true; this.pictureBoxProgress0_1.BringToFront(); this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._2_ProductEntry: this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = true; this.pictureBoxProgress0_2.BringToFront(); this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._3_MoveToLeak: case Define.E_ProcessStatus._4_MoveToCheck: this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = true; this.pictureBoxProgress1_34.BringToFront(); this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._5_ChamberMerge: this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = true; this.pictureBoxProgress2_5.BringToFront(); this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._6_VacuumStart: case Define.E_ProcessStatus._7_VacuumHold: this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = true; this.pictureBoxProgress2_6.BringToFront(); this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._8_Judgment: this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = true; this.pictureBoxProgress2_78.BringToFront(); this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._9_VacuumBreak: case Define.E_ProcessStatus._10_ChamberRelease: this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = true; this.pictureBoxProgress2_910.BringToFront(); this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._11_MoveToReady: this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = true; this.pictureBoxProgress3_11.BringToFront(); break; default: break; } } // 진행상태 데이터 private void ProcessStatusStep1(Define.E_ProcessStatus status) { this.smartTimerProgressBar.Stop(); this.progressBar1.Value = this.progressBar1.Minimum; this.SetLabelRoundRectFillColor(this.labelProgress0, this.ColorProgressOn); this.SetLabelRoundRectFillColor(this.labelProgress1, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress2, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress3, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress0_1, this.ColorProgressOn); this.SetLabelBackGroundColor(this.labelProgress1_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress2_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress3_1, this.ColorProgressOff); this.SetLabelTextColor(this.labelProgress0_1, this.ColorProgressTextOn); this.SetLabelTextColor(this.labelProgress1_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress2_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress3_1, this.ColorProgressTextOff); } private void ProcessStatusStep2(Define.E_ProcessStatus status) { this.smartTimerProgressBar.Stop(); this.progressBar1.Value = this.progressBar1.Minimum; this.SetLabelRoundRectFillColor(this.labelProgress0, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress1, this.ColorProgressOn); this.SetLabelRoundRectFillColor(this.labelProgress2, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress3, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress0_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress1_1, this.ColorProgressOn); this.SetLabelBackGroundColor(this.labelProgress2_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress3_1, this.ColorProgressOff); this.SetLabelTextColor(this.labelProgress0_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress1_1, this.ColorProgressTextOn); this.SetLabelTextColor(this.labelProgress2_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress3_1, this.ColorProgressTextOff); } private void ProcessStatusStep3(Define.E_ProcessStatus status) { this.SetLabelRoundRectFillColor(this.labelProgress0, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress1, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress2, this.ColorProgressOn); this.SetLabelRoundRectFillColor(this.labelProgress3, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress0_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress1_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress2_1, this.ColorProgressOn); this.SetLabelBackGroundColor(this.labelProgress3_1, this.ColorProgressOff); this.SetLabelTextColor(this.labelProgress0_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress1_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress2_1, this.ColorProgressTextOn); this.SetLabelTextColor(this.labelProgress3_1, this.ColorProgressTextOff); this.ProgressBarSetting(status); } private void ProcessStatusStep4(Define.E_ProcessStatus status) { this.smartTimerProgressBar.Stop(); this.progressBar1.Value = this.progressBar1.Minimum; this.SetLabelRoundRectFillColor(this.labelProgress0, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress1, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress2, this.ColorProgressOff); this.SetLabelRoundRectFillColor(this.labelProgress3, this.ColorProgressOn); this.SetLabelBackGroundColor(this.labelProgress0_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress1_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress2_1, this.ColorProgressOff); this.SetLabelBackGroundColor(this.labelProgress3_1, this.ColorProgressOn); this.SetLabelTextColor(this.labelProgress0_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress1_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress2_1, this.ColorProgressTextOff); this.SetLabelTextColor(this.labelProgress3_1, this.ColorProgressTextOn); } public void UpdateDisplayProcessStatus(Define.E_ProcessStatus status) { this.CurrentProcessStatus = status; this.labelProcess.Text = status.ToString(); switch (status) { case Define.E_ProcessStatus._0_None: break; case Define.E_ProcessStatus._1_Ready: this.ProcessStatusStep1(status); for (int i = 0; i < this.ParentForm.SystemConfig.EQUIPMENT_LANE; i++) this.ParentForm.CurrentLeakDatas[i].ProcessStatus = Define.E_ProcessStatus._1_Ready; this.pictureBoxProgress0_1.Visible = true; this.pictureBoxProgress0_1.BringToFront(); this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._2_ProductEntry: this.ProcessStatusStep1(status); // Modbus if (this.ParentForm.SystemConfig.ETHERNET_COMM_MODE == 1) { this.ParentForm.Current30000ModbusData.Initialization(); for (int i = 0; i < this.ParentForm.SystemConfig.EQUIPMENT_LANE; i++) { this.ParentForm.Current30000ModbusData.CollectionIsProcessing[i] = 0; this.ParentForm.Current30000ModbusData.CollectionIsLeak[i] = 0; this.ParentForm.CurrentLeakDatas[i].Clear(); } } this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = true; this.pictureBoxProgress0_2.BringToFront(); this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._3_MoveToLeak: case Define.E_ProcessStatus._4_MoveToCheck: this.ProcessStatusStep2(status); this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = true; this.pictureBoxProgress1_34.BringToFront(); this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._5_ChamberMerge: this.ProcessStatusStep3(status); this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = true; this.pictureBoxProgress2_5.BringToFront(); this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._6_VacuumStart: this.ProcessStatusStep3(status); this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = true; this.pictureBoxProgress2_6.BringToFront(); this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._7_VacuumHold: case Define.E_ProcessStatus._8_Judgment: this.ProcessStatusStep3(status); this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = true; this.pictureBoxProgress2_78.BringToFront(); this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._9_VacuumBreak: case Define.E_ProcessStatus._10_ChamberRelease: this.ProcessStatusStep3(status); this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = true; this.pictureBoxProgress2_910.BringToFront(); this.pictureBoxProgress3_11.Visible = false; break; case Define.E_ProcessStatus._11_MoveToReady: this.ProcessStatusStep4(status); // Modbus this.ParentForm.ChildFormMainDisplay.UpdateDisplayJudgmentTrackingData(this.ParentForm.CurrentLeakDatas); this.pictureBoxProgress0_1.Visible = false; this.pictureBoxProgress0_2.Visible = false; this.pictureBoxProgress1_34.Visible = false; this.pictureBoxProgress2_5.Visible = false; this.pictureBoxProgress2_6.Visible = false; this.pictureBoxProgress2_78.Visible = false; this.pictureBoxProgress2_910.Visible = false; this.pictureBoxProgress3_11.Visible = true; this.pictureBoxProgress3_11.BringToFront(); break; default: break; } if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainDisplay10.UpdateDisplayProcessStatus(status); this.ChildMainStatus10.UpdateDisplayProcessStatus(status); } else { this.ChildMainDisplay12.UpdateDisplayProcessStatus(status); this.ChildMainStatus12.UpdateDisplayProcessStatus(status); } // Modbus if (this.ParentForm.SystemConfig.ETHERNET_COMM_MODE == 1) this.ParentForm.Update30000ModbusItem(); } public void UpdateDisplayProcessStatus1(Define.E_ProcessStatus status) { if (this.ParentForm.CurrentSystemStatus.EquipmentStatus == Define.E_EquipmentStatus.Start) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) this.ChildMainStatus10.UpdateDisplayProcessStatus1(status); else this.ChildMainStatus12.UpdateDisplayProcessStatus1(status); } } public void UpdateDisplayProcessStatus2(Define.E_ProcessStatus status) { } public void UpdateDisplayProcessStatus3(Define.E_ProcessStatus status) { if (this.ParentForm.CurrentSystemStatus.EquipmentStatus == Define.E_EquipmentStatus.Start) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) this.ChildMainStatus10.UpdateDisplayProcessStatus3(status); else this.ChildMainStatus12.UpdateDisplayProcessStatus3(status); } } public void UpdateDisplayProcessStatus4(Define.E_ProcessStatus status) { } public void UpdateDisplayProcessStatus5(Define.E_ProcessStatus status) { if (this.ParentForm.CurrentSystemStatus.EquipmentStatus == Define.E_EquipmentStatus.Start) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) this.ChildMainStatus10.UpdateDisplayProcessStatus5(status); else this.ChildMainStatus12.UpdateDisplayProcessStatus5(status); } } public void UpdateDisplayProcessStatus6(Define.E_ProcessStatus status) { } public void UpdateDisplayProcessStatus7(Define.E_ProcessStatus status) { if (this.ParentForm.CurrentSystemStatus.EquipmentStatus == Define.E_EquipmentStatus.Start) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) this.ChildMainStatus10.UpdateDisplayProcessStatus7(status); else this.ChildMainStatus12.UpdateDisplayProcessStatus7(status); } } public void UpdateDisplayProcessStatus8(Define.E_ProcessStatus status) { } public void UpdateDisplayProcessStatus9(Define.E_ProcessStatus status) { if (this.ParentForm.CurrentSystemStatus.EquipmentStatus == Define.E_EquipmentStatus.Start) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) this.ChildMainStatus10.UpdateDisplayProcessStatus9(status); else this.ChildMainStatus12.UpdateDisplayProcessStatus9(status); } } public void UpdateDisplayProcessStatus10(Define.E_ProcessStatus status) { } public void UpdateDisplayProcessStatus11(Define.E_ProcessStatus status) { if (this.ParentForm.CurrentSystemStatus.EquipmentStatus == Define.E_EquipmentStatus.Start) { if (status == Define.E_ProcessStatus._4_MoveToCheck || status == Define.E_ProcessStatus._5_ChamberMerge) { this.ChildMainStatus12.UpdateDisplayProcessStatus11(status); } } } public void UpdateDisplayProcessStatus12(Define.E_ProcessStatus status) { } // 차압센서 데이터 public void UpdateDisplayDiffData1(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData1(data); this.ChildMainDisplay10.UpdateDisplayDiffData1(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData1(data); this.ChildMainDisplay12.UpdateDisplayDiffData1(data); } } public void UpdateDisplayDiffData2(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData2(data); this.ChildMainDisplay10.UpdateDisplayDiffData2(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData2(data); this.ChildMainDisplay12.UpdateDisplayDiffData2(data); } } public void UpdateDisplayDiffData3(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData3(data); this.ChildMainDisplay10.UpdateDisplayDiffData3(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData3(data); this.ChildMainDisplay12.UpdateDisplayDiffData3(data); } } public void UpdateDisplayDiffData4(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData4(data); this.ChildMainDisplay10.UpdateDisplayDiffData4(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData4(data); this.ChildMainDisplay12.UpdateDisplayDiffData4(data); } } public void UpdateDisplayDiffData5(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData5(data); this.ChildMainDisplay10.UpdateDisplayDiffData5(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData5(data); this.ChildMainDisplay12.UpdateDisplayDiffData5(data); } } public void UpdateDisplayDiffData6(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData6(data); this.ChildMainDisplay10.UpdateDisplayDiffData6(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData6(data); this.ChildMainDisplay12.UpdateDisplayDiffData6(data); } } public void UpdateDisplayDiffData7(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData7(data); this.ChildMainDisplay10.UpdateDisplayDiffData7(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData7(data); this.ChildMainDisplay12.UpdateDisplayDiffData7(data); } } public void UpdateDisplayDiffData8(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData8(data); this.ChildMainDisplay10.UpdateDisplayDiffData8(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData8(data); this.ChildMainDisplay12.UpdateDisplayDiffData8(data); } } public void UpdateDisplayDiffData9(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData9(data); this.ChildMainDisplay10.UpdateDisplayDiffData9(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData9(data); this.ChildMainDisplay12.UpdateDisplayDiffData9(data); } } public void UpdateDisplayDiffData10(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDiffData10(data); this.ChildMainDisplay10.UpdateDisplayDiffData10(data); } else { this.ChildMainStatus12.UpdateDisplayDiffData10(data); this.ChildMainDisplay12.UpdateDisplayDiffData10(data); } } public void UpdateDisplayDiffData11(LeakData1 data) { this.ChildMainStatus12.UpdateDisplayDiffData11(data); this.ChildMainDisplay12.UpdateDisplayDiffData11(data); } public void UpdateDisplayDiffData12(LeakData1 data) { this.ChildMainStatus12.UpdateDisplayDiffData12(data); this.ChildMainDisplay12.UpdateDisplayDiffData12(data); } // 변위센서 데이터 public void UpdateDisplayDispData1(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData1(data); this.ChildMainDisplay10.UpdateDisplayDispData1(data); } else { this.ChildMainStatus12.UpdateDisplayDispData1(data); this.ChildMainDisplay12.UpdateDisplayDispData1(data); } } public void UpdateDisplayDispData2(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData2(data); this.ChildMainDisplay10.UpdateDisplayDispData2(data); } else { this.ChildMainStatus12.UpdateDisplayDispData2(data); this.ChildMainDisplay12.UpdateDisplayDispData2(data); } } public void UpdateDisplayDispData3(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData3(data); this.ChildMainDisplay10.UpdateDisplayDispData3(data); } else { this.ChildMainStatus12.UpdateDisplayDispData3(data); this.ChildMainDisplay12.UpdateDisplayDispData3(data); } } public void UpdateDisplayDispData4(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData4(data); this.ChildMainDisplay10.UpdateDisplayDispData4(data); } else { this.ChildMainStatus12.UpdateDisplayDispData4(data); this.ChildMainDisplay12.UpdateDisplayDispData4(data); } } public void UpdateDisplayDispData5(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData5(data); this.ChildMainDisplay10.UpdateDisplayDispData5(data); } else { this.ChildMainStatus12.UpdateDisplayDispData5(data); this.ChildMainDisplay12.UpdateDisplayDispData5(data); } } public void UpdateDisplayDispData6(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData6(data); this.ChildMainDisplay10.UpdateDisplayDispData6(data); } else { this.ChildMainStatus12.UpdateDisplayDispData6(data); this.ChildMainDisplay12.UpdateDisplayDispData6(data); } } public void UpdateDisplayDispData7(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData7(data); this.ChildMainDisplay10.UpdateDisplayDispData7(data); } else { this.ChildMainStatus12.UpdateDisplayDispData7(data); this.ChildMainDisplay12.UpdateDisplayDispData7(data); } } public void UpdateDisplayDispData8(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData8(data); this.ChildMainDisplay10.UpdateDisplayDispData8(data); } else { this.ChildMainStatus12.UpdateDisplayDispData8(data); this.ChildMainDisplay12.UpdateDisplayDispData8(data); } } public void UpdateDisplayDispData9(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData9(data); this.ChildMainDisplay10.UpdateDisplayDispData9(data); } else { this.ChildMainStatus12.UpdateDisplayDispData9(data); this.ChildMainDisplay12.UpdateDisplayDispData9(data); } } public void UpdateDisplayDispData10(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayDispData10(data); this.ChildMainDisplay10.UpdateDisplayDispData10(data); } else { this.ChildMainStatus12.UpdateDisplayDispData10(data); this.ChildMainDisplay12.UpdateDisplayDispData10(data); } } public void UpdateDisplayDispData11(LeakData1 data) { this.ChildMainStatus12.UpdateDisplayDispData11(data); this.ChildMainDisplay12.UpdateDisplayDispData11(data); } public void UpdateDisplayDispData12(LeakData1 data) { this.ChildMainStatus12.UpdateDisplayDispData12(data); this.ChildMainDisplay12.UpdateDisplayDispData12(data); } // 압력센서 데이터 public void UpdateDisplayPresData1(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData1(data); this.ChildMainDisplay10.UpdateDisplayPresData1(data); } else { this.ChildMainStatus12.UpdateDisplayPresData1(data); this.ChildMainDisplay12.UpdateDisplayPresData1(data); } } public void UpdateDisplayPresData2(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData2(data); this.ChildMainDisplay10.UpdateDisplayPresData2(data); } else { this.ChildMainStatus12.UpdateDisplayPresData2(data); this.ChildMainDisplay12.UpdateDisplayPresData2(data); } } public void UpdateDisplayPresData3(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData3(data); this.ChildMainDisplay10.UpdateDisplayPresData3(data); } else { this.ChildMainStatus12.UpdateDisplayPresData3(data); this.ChildMainDisplay12.UpdateDisplayPresData3(data); } } public void UpdateDisplayPresData4(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData4(data); this.ChildMainDisplay10.UpdateDisplayPresData4(data); } else { this.ChildMainStatus12.UpdateDisplayPresData4(data); this.ChildMainDisplay12.UpdateDisplayPresData4(data); } } public void UpdateDisplayPresData5(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData5(data); this.ChildMainDisplay10.UpdateDisplayPresData5(data); } else { this.ChildMainStatus12.UpdateDisplayPresData5(data); this.ChildMainDisplay12.UpdateDisplayPresData5(data); } } public void UpdateDisplayPresData6(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData6(data); this.ChildMainDisplay10.UpdateDisplayPresData6(data); } else { this.ChildMainStatus12.UpdateDisplayPresData6(data); this.ChildMainDisplay12.UpdateDisplayPresData6(data); } } public void UpdateDisplayPresData7(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData7(data); this.ChildMainDisplay10.UpdateDisplayPresData7(data); } else { this.ChildMainStatus12.UpdateDisplayPresData7(data); this.ChildMainDisplay12.UpdateDisplayPresData7(data); } } public void UpdateDisplayPresData8(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData8(data); this.ChildMainDisplay10.UpdateDisplayPresData8(data); } else { this.ChildMainStatus12.UpdateDisplayPresData8(data); this.ChildMainDisplay12.UpdateDisplayPresData8(data); } } public void UpdateDisplayPresData9(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData9(data); this.ChildMainDisplay10.UpdateDisplayPresData9(data); } else { this.ChildMainStatus12.UpdateDisplayPresData9(data); this.ChildMainDisplay12.UpdateDisplayPresData9(data); } } public void UpdateDisplayPresData10(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayPresData10(data); this.ChildMainDisplay10.UpdateDisplayPresData10(data); } else { this.ChildMainStatus12.UpdateDisplayPresData10(data); this.ChildMainDisplay12.UpdateDisplayPresData10(data); } } public void UpdateDisplayPresData11(LeakData1 data) { this.ChildMainStatus12.UpdateDisplayPresData11(data); this.ChildMainDisplay12.UpdateDisplayPresData11(data); } public void UpdateDisplayPresData12(LeakData1 data) { this.ChildMainStatus12.UpdateDisplayPresData12(data); this.ChildMainDisplay12.UpdateDisplayPresData12(data); } // 판정결과 public void UpdateDisplayJudgmentData1(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData1(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData1(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData1(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData1(data); } } public void UpdateDisplayJudgmentData2(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData2(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData2(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData2(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData2(data); } } public void UpdateDisplayJudgmentData3(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData3(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData3(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData3(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData3(data); } } public void UpdateDisplayJudgmentData4(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData4(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData4(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData4(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData4(data); } } public void UpdateDisplayJudgmentData5(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData5(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData5(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData5(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData5(data); } } public void UpdateDisplayJudgmentData6(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData6(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData6(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData6(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData6(data); } } public void UpdateDisplayJudgmentData7(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData7(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData7(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData7(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData7(data); } } public void UpdateDisplayJudgmentData8(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData8(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData8(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData8(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData8(data); } } public void UpdateDisplayJudgmentData9(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData9(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData9(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData9(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData9(data); } } public void UpdateDisplayJudgmentData10(LeakData1 data) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) { this.ChildMainStatus10.UpdateDisplayJudgmentData10(data); this.ChildMainDisplay10.UpdateDisplayJudgmentData10(data); } else { this.ChildMainStatus12.UpdateDisplayJudgmentData10(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData10(data); } } public void UpdateDisplayJudgmentData11(LeakData1 data) { this.ChildMainStatus12.UpdateDisplayJudgmentData11(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData11(data); } public void UpdateDisplayJudgmentData12(LeakData1 data) { this.ChildMainStatus12.UpdateDisplayJudgmentData12(data); this.ChildMainDisplay12.UpdateDisplayJudgmentData12(data); } public void UpdateDisplayJudgmentTrackingData(Collection items) { this.ParentForm.TrackingInspectionData(items); } public void UpdateDisplayRecipeData(Recipe data) { this.buttonRecipeNo.ButtonText = data.NUMBER.ToString(); if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) this.ChildMainStatus10.UpdateDisplayRecipeData(data); else this.ChildMainStatus12.UpdateDisplayRecipeData(data); } public void UpdateDisplayTime(DateTime time) { this.labelTime.Text = time.ToString("yyyy-MM-dd HH:mm:ss"); } public void DisplayRefresh() { this.ParentForm.CurrentSystemStatus.CurrentForm = Define.E_FormStore.FormMainDisplay; this.ParentForm.CurrentSystemStatus.CurrentDisplayMode = Define.E_DisplayModeStore.MainDisplay; this.ParentForm.SetDisplayMode(Define.E_EquipmentMode.Normal); this.ChildModbus.Visible = false; this.InitializeProcessStatus(); this.UpdateDisplayUser(this.ParentForm.CurrentSystemStatus.CurrentUser); this.UpdateDisplayRecipeData(this.ParentForm.CurrentRecipe); } #endregion #region Override Member protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.smartTimerLogin.Start(); } #endregion #region Event Handler private void labelStop_Click(object sender, EventArgs e) { this.ParentForm.TransferData(CommunicationCommand.Start, CommunicationID.MainBoard); this.ParentForm.SetTrackingHistoryData(Define.E_TrackingOperation.EquipmentStart, ""); } private void labelStart_Click(object sender, EventArgs e) { this.ParentForm.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard); this.ParentForm.SetTrackingHistoryData(Define.E_TrackingOperation.EquipmentStop, ""); } private void buttonProductNo_Click(object sender, EventArgs e) { string before = "", after = ""; this.Part11AutomaticLogoutReset(); before = this.buttonRecipeNo.ButtonText; DialogFormNumKeyPad myKeypad = new DialogFormNumKeyPad("NUMBER", this.buttonRecipeNo.ButtonText, 4, 0, false, this.ParentForm.SystemConfig.LANGUAGE); if (myKeypad.ShowDialog() == DialogResult.OK) { if (myKeypad.IntValue < 1 || myKeypad.IntValue > 1000) { this.MessageBoxRange = "1 ~ 1000"; this.buttonRecipeNo.ButtonText = before; this.smartTimerMessageShow.Start(); return; } this.buttonRecipeNo.ButtonText = "**"; this.ParentForm.TransferRecipeParameter9043(myKeypad.IntValue); after = myKeypad.StringValue; this.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.RecipeNumber, "", before, after); } } private void buttonInspection_Click(object sender, EventArgs e) { this.Part11AutomaticLogoutReset(); this.ParentForm.TransferData(CommunicationCommand.CutInpupt, CommunicationID.MainBoard); if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) this.ChildMainStatus10.InitializeData(); else { this.ChildMainStatus12.InitializeData(); this.ChildMainDisplay12.InitializeData(); } } private void buttonDischarge_Click(object sender, EventArgs e) { this.ParentForm.TransferData(CommunicationCommand.Clear, CommunicationID.MainBoard); } private void buttonUser_Click(object sender, EventArgs e) { this.Part11AutomaticLogoutReset(); if (this.ParentForm.CurrentSystemStatus.CurrentUser.Group == Define.E_UserGroup.LogOut) { this.Login(); } else { DialogFormYesNo msg = new DialogFormYesNo(this.ParentForm.SystemConfig.LANGUAGE, 12); if (msg.ShowDialog() == DialogResult.Yes) { this.Logout(); } } this.InitializeProcessStatus(); } private void buttonMenu_Click(object sender, EventArgs e) { this.Part11AutomaticLogoutReset(); if (this.ParentForm.CurrentSystemStatus.EquipmentStatus == Define.E_EquipmentStatus.Stop) { UserManager.UserManager_AutoLogoutTimeoutPause(); this.ParentForm.ChildFormMenu.DisplayRefresh(this.ParentForm.CurrentSystemStatus); this.ParentForm.FormChange((int)Define.E_FormStore.FormMenu); } } private void buttonModbus_Click(object sender, EventArgs e) { this.Part11AutomaticLogoutReset(); if (this.ChildModbus.Visible == true) { this.ChildModbus.Visible = false; } else { this.ChildModbus.DisplayRefresh(); this.ChildModbus.Visible = true; } } private void buttonDisplay_Click(object sender, EventArgs e) { if (this.ChildMainDisplay12.Visible == false) this.ChildMainDisplay12.Visible = true; else this.ChildMainDisplay12.Visible = false; } private void buttonClear_Click(object sender, EventArgs e) { if (this.ParentForm.SystemConfig.EQUIPMENT_LANE == 10) this.ChildMainStatus10.InitializeData(); else { this.ChildMainStatus12.InitializeData(); this.ChildMainDisplay12.InitializeData(); } this.ChildModbus.ClearData(); } private void buttonExit_Click(object sender, EventArgs e) { this.ParentForm.CloseSmartUartLink(); this.ParentForm.Dispose(); this.ParentForm.Close(); } private void smartTimerAlarm_Tick(object sender, EventArgs e) { this.labelAlarm.Left = this.labelAlarm.Left - 5; if (this.labelAlarm.Left < 0 - this.labelAlarm.Width - 20) this.labelAlarm.Left = this.smartGroupBox1.Width - 10; } private void smartTimerMessageShow_Tick(object sender, EventArgs e) { this.smartTimerMessageShow.Stop(); DialogFormMessage msg = new DialogFormMessage(1, this.ParentForm.SystemConfig.LANGUAGE, this.MessageBoxRange); msg.ShowDialog(); } private void smartTimerLogin_Tick(object sender, EventArgs e) { this.smartTimerLogin.Stop(); //this.Login(); } private void smartTimerProgressBar_Tick(object sender, EventArgs e) { if (this.CurrentProcessStatus == Define.E_ProcessStatus._6_VacuumStart) { if (this.progressBar1.Value < 30) this.progressBar1.Value++; } else if (this.CurrentProcessStatus == Define.E_ProcessStatus._7_VacuumHold) { if (this.progressBar1.Value < 60) this.progressBar1.Value++; } else if (this.CurrentProcessStatus == Define.E_ProcessStatus._8_Judgment) { if (this.progressBar1.Value == this.progressBar1.Maximum) this.smartTimerProgressBar.Stop(); else this.progressBar1.Value++; } } private void timerServer_Tick(object sender, EventArgs e) { if (this.ParentForm.smartTCPMultiServer.IsStart == true) { if (this.ParentForm.smartTCPMultiServer.ClientInfoList == null) this.UpdateEthernetStatusDisplay(false); else this.UpdateEthernetStatusDisplay(true); } } private void buttonTest_Click(object sender, EventArgs e) { if (this.buttonTest.ButtonStatus == SmartButton.BUTSTATUS.DOWN) { //this.InitializeData(); this.ParentForm.TransferData(CommunicationCommand.CutInpupt, CommunicationID.MainBoard); this.smartTimerTest.Start(); this.IsTestMode = true; } else { this.smartTimerTest.Stop(); this.IsTestMode = false; } } private void smartTimerTest_Tick(object sender, EventArgs e) { //this.InitializeData(); this.ParentForm.TransferData(CommunicationCommand.CutInpupt, CommunicationID.MainBoard); } #endregion private void smartButton4_Click(object sender, EventArgs e) { string value = ""; this.smartTimerAlarm.Stop(); value = "a1_Servo emergency stop "; value += "a2_Pressure "; value += "a3_M/S Board "; value += "a5_Servo1 "; value += "a6_Servo Torque1 "; value = value.Trim(); this.labelAlarm.Size = new Size(value.Length * 8, 20); this.labelAlarm.Text = value; if (this.labelAlarm.Width > 400) { if (this.labelAlarm.Text != "") this.smartTimerAlarm.Start(); } else { this.smartTimerAlarm.Stop(); this.labelAlarm.Location = new Point(3, 26); } } private void smartButton5_Click(object sender, EventArgs e) { switch (this.testIndex) { case 0: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._1_Ready); break; case 1: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._2_ProductEntry); break; case 2: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._3_MoveToLeak); break; case 3: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._4_MoveToCheck); break; case 4: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._5_ChamberMerge); break; case 5: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._6_VacuumStart); break; case 6: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._7_VacuumHold); break; case 7: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._8_Judgment); break; case 8: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._9_VacuumBreak); break; case 9: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._10_ChamberRelease); break; case 10: this.UpdateDisplayProcessStatus(Define.E_ProcessStatus._11_MoveToReady); break; default: break; } if (this.testIndex >= 10) this.testIndex = 0; else this.testIndex++; } } }