コード例 #1
0
ファイル: DSF_LT_MENU.cs プロジェクト: ngoc333/DSF_LB
        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; }
        }
コード例 #2
0
ファイル: DSF_LT_MENU.cs プロジェクト: ngoc333/DSF_LB
 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);
             }
         }
     }
 }