private void cmd_Fac1_Click(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; ComVar.Var._strValue1 = "001"; lang = ComVar.Var._strValue3; lblTitle.Text = _dtnInit["Title"]; if (ComVar.Var._strValue3 == "Vi") { btnLang.BackgroundImage = Properties.Resources.VieSel; } else { btnLang.BackgroundImage = Properties.Resources.enSel; ComVar.Var._strValue3 = "En"; } DataTable dt = dtPUPLayout(); DataTable dtModel = SEL_MODEL_NAME("Q", "001", "001"); if (ccount == 0) { if (dt != null && dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { DataTable dtOS = SEL_PROD_MDI(dt.Rows[i]["LINE_CD"].ToString(), dt.Rows[i]["LINE_CD1"].ToString()); UC.UC_MENU_DSF MENU_WS = new UC.UC_MENU_DSF(dt.Rows[i]["LINE_NM"].ToString(), dt.Rows[i]["LINE_CD"].ToString()); MENU_WS.Animation(lang, MENU_WS); tblMain1.Controls.Add(MENU_WS, Convert.ToInt32(dt.Rows[i]["LOC_COL"]), Convert.ToInt32(dt.Rows[i]["LOC_ROW"])); MENU_WS.BindingData(dtOS, i, dtModel); dtOS = null; MENU_WS.OnMenuClick += MenuOnClick; MENU_WS.MoveLeave += MoveLeaveClick; MENU_WS.Dock = DockStyle.Fill; // MENU_WS.GetImage(dt, i); } } loadLinePicture("F1"); } else { foreach (UserControl c in this.tblMain1.Controls) { UC.UC_MENU_DSF MENU_WS = null; MENU_WS = (UC.UC_MENU_DSF)c; MENU_WS.Animation(lang, c); } } ccount++; selectNos(); } catch { } finally { this.Cursor = Cursors.Default; } }
private void timer1_Tick(object sender, EventArgs e) { try { lblDateTime.Text = string.Format(DateTime.Now.ToString("yyyy-MM-dd\nHH:mm:ss")); _iCount++; if (_iCount >= 30) { DataTable dt = dtPUPLayout(); if (ComVar.Var._strValue1 != "099") { if (dt != null && dt.Rows.Count > 0) { int iLine = 0; foreach (UserControl c in this.tblMain1.Controls) { DataTable dtOS = SEL_PROD_MDI(dt.Rows[iLine]["LINE_CD"].ToString(), dt.Rows[iLine]["LINE_CD1"].ToString()); UC.UC_MENU_DSF MENU_WS = null; MENU_WS = (UC.UC_MENU_DSF)c; MENU_WS.BindingData(dtOS, iLine, dtModel); iLine++; } _iCount = 0; } } else if (ComVar.Var._strValue1 == "099") { if (dt != null && dt.Rows.Count > 0) { int iLine = 0; foreach (UserControl c in this.tblMain2.Controls) { DataTable dtOS = SEL_PROD_MDI(dt.Rows[iLine]["LINE_CD"].ToString(), dt.Rows[iLine]["LINE_CD1"].ToString()); UC.UC_MENU_DSF_2 MENU_WS = null; MENU_WS = (UC.UC_MENU_DSF_2)c; MENU_WS.BindingData(dtOS, iLine, dtModel); iLine++; } _iCount = 0; } } else { Init_Form(); } _iCount = 0; } } catch { } }
private void btnLang_Click(object sender, EventArgs e) { if (ComVar.Var._strValue3 == "Vi") { btnLang.BackgroundImage = Properties.Resources.enSel; btnLangClick = 0; ComVar.Var._strValue3 = "En"; if (ComVar.Var._strValue1 != "099") { foreach (UserControl c in this.tblMain1.Controls) { UC.UC_MENU_DSF MENU_WS = null; MENU_WS = (UC.UC_MENU_DSF)c; MENU_WS.Animation("En", c); } } else { foreach (UserControl c in this.tblMain2.Controls) { UC.UC_MENU_DSF_2 MENU_WS = null; MENU_WS = (UC.UC_MENU_DSF_2)c; MENU_WS.Animation("En", c); } } } else { // btnLangClick = 1; btnLang.BackgroundImage = Properties.Resources.VieSel; ComVar.Var._strValue3 = "Vi"; if (ComVar.Var._strValue1 != "099") { foreach ( UserControl c in this.tblMain1.Controls) { UC.UC_MENU_DSF MENU_WS = null; MENU_WS = (UC.UC_MENU_DSF)c; MENU_WS.Animation("Vi", c); } } else { foreach (UserControl c in this.tblMain2.Controls) { UC.UC_MENU_DSF_2 MENU_WS = null; MENU_WS = (UC.UC_MENU_DSF_2)c; MENU_WS.Animation("Vi", c); } } } }
private void timer2_Tick(object sender, EventArgs e) { try { if (ComVar.Var._strValue1 != "099") { int iLine = 0; foreach (UserControl c in this.tblMain1.Controls) { UC.UC_MENU_DSF MENU_WS = null; MENU_WS = (UC.UC_MENU_DSF)c; MENU_WS.changeColor(); MENU_WS.UpdateText(iLine); iLine++; } } else { if (lockTimerCounterN == 0) { int iLine = 0; foreach (UserControl c in this.tblMain2.Controls) { UC.UC_MENU_DSF_2 MENU_WS = null; MENU_WS = (UC.UC_MENU_DSF_2)c; MENU_WS.changeColor(); MENU_WS.UpdateText(iLine); lockTimerCounter--; iLine++; } } } } catch { } }