示例#1
0
        private void tmrLoad_Tick(object sender, EventArgs e)
        {
            cCount++;
            lblDate.Text = string.Format(DateTime.Now.ToString("yyyy-MM-dd\nHH:mm:ss")); //Gán dữ liệu giờ cho label ngày giờ
            if (cCount >= 300)
            {
                try
                {
                    splashScreenManager1.ShowWaitForm();
                    //loadding
                    DataTable dt = getTMSHomeRATIO("", "", DateTime.Now.ToString("yyyyMMdd"), "", "SYHONG");

                    for (int j = 0; j < 9; j++)
                    {
                        UC.UC_TMS_CARD_V2 TMS_CARD = (UC.UC_TMS_CARD_V2)tblCard.GetControlFromPosition(j, 0);
                        TMS_CARD.BindingRatio(dt);
                    }
                    cCount = 0;
                    splashScreenManager1.CloseWaitForm();
                }
                catch { splashScreenManager1.CloseWaitForm(); }
            }
            else if (cCount % 10 == 0)
            {
                tmrTitle.Start();
            }
        }
示例#2
0
 private void initUserControl()
 {
     try
     {
         splashScreenManager1.ShowWaitForm();
         string[] tit = new string[] { "F1", "PLANT N", "VJ3", "BOTTOM", "OUTSOLE", "IP", "PHYLON", "PU", "DMP" };
         //string[] tit = new string[] { "F1", "PLANT N", "UPPER", "BOTTOM", "OUTSOLE", "IP", "PHYLON", "PU", "DMP" };
         //string[] code = new string[] { "F1", "99", "UP", "BT", "OS", "IP", "PH", "PU", "DMP" };
         string[] code = new string[] { "F1", "99", "VJ3", "BT", "OS", "IP", "PH", "PU", "DMP" };
         string[] desc = new string[] { "VJ2->F1", "VJ2->Plant N", "VJ3->VJ1", "VJ1->VJ2", "Outsole->VJ1,VJ2", "IP->VJ1,VJ2", "Phylon->VJ1,VJ2", "PU->VJ1,VJ2", "DMP->VJ1,VJ2" };
         //  DataTable dt = getTMSHomeRATIO("", "", DateTime.Now.ToString("yyyyMMdd"), "", "SYHONG");
         for (int i = 0; i < tblCard.ColumnCount; i++)
         {
             UC.UC_TMS_CARD_V2 TMS_CARD = new UC.UC_TMS_CARD_V2();
             tblCard.Controls.Add(TMS_CARD, i, 0);
             TMS_CARD.InitLabel(tit[i], code[i], desc[i]);
             // TMS_CARD.BindingRatio(dt);
             TMS_CARD.Dock = DockStyle.Fill;
             //-----Reg Event here!
         }
         splashScreenManager1.CloseWaitForm();
     }
     catch { splashScreenManager1.CloseWaitForm(); }
 }