Example #1
0
 public BaoGioTheoThoiGian(String sMaMay, Point pLocation)
 {
     InitializeComponent();
     this.Location = pLocation;
     lbMay.Text = "Máy " + sMaMay;
     sMay = sMaMay;
     timesUp = new TimesUp();
     this.Visible = false;
     cbChuyenMay.SelectedIndex = 0;
 }
Example #2
0
        private void timerCountDown_Tick(object sender, EventArgs e)
        {
            if ((minutes == 0) && (hours == 0) && (seconds == 0))
            {
                timerCountDown.Enabled = false;
                sGioNghi = DateTime.Now.ToShortTimeString();
                String sInfo = "TGian: " + tbHours.Text + "h " + tbMinutes.Text + "m " + tbSeconds.Text + "s";
                timesUp = new TimesUp(sMay, sInfo, sGioChoi, sGioNghi, true);
                this.Controls.Add(timesUp);
                pnBGTTG.SendToBack();

                timerCountDown.Enabled = false;
                NewBGTTG();
                lbTimesIn.Text = "Giờ nghỉ: " + DateTime.Now.ToShortTimeString();

                label1.Focus();
            }
            else
            {
                if (seconds < 1)
                {
                    seconds = 59;

                    if (minutes == 0)
                    {
                        minutes = 59;
                        if (hours != 0)
                        {
                            hours--;
                        }
                    }
                    else
                    {
                        minutes--;
                    }
                }
                else
                {
                    seconds--;
                }

                setCountDownTime();
            }
        }
Example #3
0
 public BaoGioTheoThoiGian()
 {
     InitializeComponent();
     timesUp = new TimesUp();
 }