private void Start_Click(object sender, EventArgs e) { bStart.BackColor = Color.Green; bStop.BackColor = Color.Red; bClear.BackColor = Color.White; bStart.Enabled = false; bStop.Enabled = true; bClear.Enabled = false; try { user_poss = Convert.ToDouble(tUserPoss.Text); } catch { } try { user_compl = Convert.ToInt32(tUserCompl.Text); user_compl1 = Convert.ToInt32(tUserCompl1.Text); if (1 <= user_compl && user_compl1 <= 1000 && user_compl1 >= user_compl) { ok_user_compl = true; } } catch { } /*timecheck = true; * if ((checkb.Checked == false) && (checkb1.Checked == true)) * { * timecheck = false; * }*/ this.TaskTimer.Interval = (int)(10 / user_poss); Fifo_Starting(); Planer_Starting(); Method3_Starting(); Method4_Starting(); _10SecTimer.Start(); TaskTimer.Start(); ProcTimer.Start(); /*if (checkTimers.Checked == true) * TaskTimer.Start(); * else NoTimer(); * if (timecheck == true) * _10SecTimer.Start();*/ }
private void Stop_Click(object sender, EventArgs e) { bStart.BackColor = Color.FromArgb(0, 192, 0); bStop.BackColor = Color.DarkRed; bStop.Enabled = false; bClear.Enabled = true; ProcTimer.Stop(); TaskTimer.Stop(); _10SecTimer.Stop(); //lTime.Text = "Секунд: 0"; Conclusion(); Conclusion2(); Conclusion3(); Conclusion4(); }