Esempio n. 1
0
 private void ToolStripMenuItemExit_Click(object sender, EventArgs e)
 {
     notifyIcon1.Dispose();
     Application.ExitThread();
     EAPI_Library.EApiWDogStop();
     this.timerWatchdog.Stop();
 }
Esempio n. 2
0
        private void button_start_stop_Click(object sender, EventArgs e)
        {
            this.button_start_stop.Text = this.button_trigger.Enabled ? "Start" : "Stop";

            this.button_trigger.Enabled = !this.button_trigger.Enabled;

            if (this.button_trigger.Enabled)
            {
                uint timeout = Decimal.ToUInt32(this.numericUpDown_timer.Value);
                this.label_timer.Text = timeout.ToString();
                EAPI_Library.EApiWDogStart(0, 0, timeout * 1000);
                this.timerWatchdog.Start();
            }
            else
            {
                EAPI_Library.EApiWDogStop();
                this.timerWatchdog.Stop();
            }

            m_wdtEnable = this.button_trigger.Enabled;
            m_cfg.Save();
        }