Esempio n. 1
0
 public void Start()
 {
     BatDau  = A.ToString();
     KetThuc = B.ToString();
     BangChiaLuong.Start(A, B, SLuong);
     timer1.Start();
 }
Esempio n. 2
0
 public Luong(long a, long b, int luong) : this()
 {
     BangChiaLuong = new BangChiaLuong(panelBoardThread, a, b, luong);
     this.A        = a;
     this.B        = b;
     this.SLuong   = luong;
     Start();
 }
Esempio n. 3
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            GC.Collect();
            long a     = long.Parse(txtA.Text);
            long b     = long.Parse(txtB.Text);
            int  luong = GetThread();

            bangChiaLuong = new BangChiaLuong(panelBoardControls, panelBoardThread);
            bangChiaLuong.Start(a, b, luong);
            timer1.Start();
            btnOk.Enabled = false;
        }
Esempio n. 4
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     timer1.Stop();
     BangChiaLuong.CapNhatLuongChay(500);
     if (BangChiaLuong.KiemTraHoanThanh())
     {
         End();
     }
     else
     {
         timer1.Start();
     }
 }