Esempio n. 1
0
        private bool GetPause()
        {
            EventTogglePause arg = new EventTogglePause();
            EventHandler <EventTogglePause> handler = TogglePause;

            if (handler != null)
            {
                handler(null, arg);
            }
            return(arg.Pause);
        }
Esempio n. 2
0
 private void _showForm_TogglePause(object sender, EventTogglePause e)
 {
     if (mnuTimer.Checked)
     {
         tmrShow.Enabled = !tmrShow.Enabled;
         e.Pause         = !tmrShow.Enabled;
     }
     else
     {
         e.Pause = false;
     }
 }
Esempio n. 3
0
        private void ResetPause()
        {
            EventTogglePause arg = new EventTogglePause();
            EventHandler <EventTogglePause> handler = TogglePause;

            if (handler != null)
            {
                handler(null, arg);
            }
            if (arg.Pause)
            {
                handler(null, arg);             // Currently paused --> Set running
            }
        }
Esempio n. 4
0
        private void SetPause()
        {
            EventTogglePause arg = new EventTogglePause();
            EventHandler <EventTogglePause> handler = TogglePause;

            if (handler != null)
            {
                handler(null, arg);
            }
            if (!arg.Pause)
            {
                handler(null, arg);             // Currently running --> Set pause
            }
        }
Esempio n. 5
0
        private void picShow_Click(object sender, EventArgs e)
        {
            EventTogglePause arg = new EventTogglePause();
            EventHandler <EventTogglePause> handler = TogglePause;

            if (handler != null)
            {
                handler(null, arg);
            }
            if (arg.Pause)
            {
                lblState.Text = "Paused";
            }
            else
            {
                lblState.Text = "";
            }
        }