private void lblStart_Click(object sender, EventArgs e) { AllSec = CommonFunctions.GetSecounds(curH, curM, curS); if (AllSec == 0) { return; } txtH.Enabled = false; lblHMinus.Enabled = false; lblHPlus.Enabled = false; txtM.Enabled = false; lblMMinus.Enabled = false; lblMplus.Enabled = false; txtS.Enabled = false; lblSMinus.Enabled = false; lblSPlus.Enabled = false; lblStandTime.Enabled = false; lblPause.Enabled = true; oldH = curH; oldM = curM; oldS = curS; cConfig.SetParameter("H", oldH.ToString()); cConfig.SetParameter("M", oldM.ToString()); cConfig.SetParameter("S", oldS.ToString()); cConfig.SaveConfig(); tmrCountdown.Enabled = true; tmrCountdown.Interval = 50; tmrCountdown.Start(); }
private void AllTextChanged(object sender, EventArgs e) { TextBox txt = (TextBox)sender; if (txt.Text.Trim() == "") { txt.Text = "00"; } curS = Convert.ToInt32(txtS.Text); curM = Convert.ToInt32(txtM.Text); curH = Convert.ToInt32(txtH.Text); if (CommonFunctions.GetSecounds(curH, curM, curS) >= 359999) { curS = 59; curM = 59; curH = 99; } SetTime(curH, curM, curS, false); }