public void stop_action(bool balloon) { AM_timer.Stop(); time_groupBox.Enabled = true; action_groupBox.Enabled = true; main_button.Text = "Start"; main_label.Text = "Auto Machine"; AM_notifyIcon.Text = main_label.Text; if (balloon == true) { AM_notifyIcon.BalloonTipIcon = ToolTipIcon.Info; AM_notifyIcon.ShowBalloonTip(5); } warning1 = 0; warning2 = 0; cancel = false; }
private void start_action(bool type1, bool type2, DateTime type1time, DateTime type2time, int action, bool force, bool warnings) { if (type1 == true) { main_label.Text = String.Format("{0} {1} {2}", actionTxt, language_at, type1time.ToLongTimeString()); AM_notifyIcon.Text = main_label.Text; timer_time = type1time; timer_action = action; timer_force = force; timer_warnings = warnings; AM_timer.Start(); } if (type2 == true) { type2time = type2time + DateTime.Now.TimeOfDay; main_label.Text = String.Format("{0} {1} {2}", actionTxt, language_at, type2time.ToLongTimeString()); AM_notifyIcon.Text = main_label.Text; timer_time = type2time; timer_action = action; timer_force = force; timer_warnings = warnings; AM_timer.Start(); } main_button.Text = "Stop"; }