Example #1
0
        public void TimersAdd(string name, string time, int multiplier, bool autoRestart, bool trayFlash)
        {
            Control_Timer timer = new Control_Timer(name, time, multiplier, autoRestart, trayFlash, Form_Main._traybarContainer);

            Timers.Add(timer);

            TimersPopulate();

            timer.deleteButton.Click += (s, ee) =>
            {
                timer.Stop();
                splitContainer.Panel2.Controls.Remove(timer);
                timer.Dispose();
            };
        }
Example #2
0
        private void Control_Timer_Tick(object sender, EventArgs e)
        {
            timer_current++;

            if (c > UserControl_Train_Setup.counter - 2)
            {
                Control_Timer.Stop();
                button1.Text = "STOPPED";
            }

            if (UserControl_Train_Setup.loop[c] == 1)
            {
                second           = UserControl_Train_Setup.loop[c + 1];
                pictureBox.Image = Leila_GUI.ResourceIcons.subt___Kopyala;
                label1.Text      = "Relaxed";
                timer_hold       = second;
            }
            if (UserControl_Train_Setup.loop[c] == 2)
            {
                second           = UserControl_Train_Setup.loop[c + 1];
                pictureBox.Image = Leila_GUI.ResourceIcons.right;
                label1.Text      = "";
                timer_hold       = second;
            }
            if (UserControl_Train_Setup.loop[c] == 3)
            {
                second           = UserControl_Train_Setup.loop[c + 1];
                pictureBox.Image = Leila_GUI.ResourceIcons.left;
                label1.Text      = "";
                timer_hold       = second;
            }
            if (UserControl_Train_Setup.loop[c] == 4)
            {
                second           = UserControl_Train_Setup.loop[c + 1];
                pictureBox.Image = Leila_GUI.ResourceIcons.add___Kopyala;
                label1.Text      = "Focus";
                timer_hold       = second;
            }

            if (timer_hold == timer_current)
            {
                c            += 2;
                timer_current = 0;
            }
        }