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

            if (handler != null)
            {
                handler(null, arg);
            }
            return(arg.Pause);
        }
Ejemplo 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;
     }
 }
Ejemplo 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
            }
        }
Ejemplo 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
            }
        }
Ejemplo 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 = "";
            }
        }