Exemple #1
0
 //  Load and Construct
 private void loadButton_Click(object sender, EventArgs e)
 {
     foreach (string configpath in ConfigurePathList)
     {
         TimerForm f = new TimerForm(configpath);
         f.Show();
     }
 }
Exemple #2
0
        //  Receive the event when start a timer in the TimerChooseForm UI logic.
        private void ChosenReceiver(object sender, TimerChooseForm.ChosenEventArgs e)
        {
            Console.WriteLine("Just Selected and started the timer.");
            Action DoAction = delegate()
            {
                TimerForm f = new TimerForm(e.duration, e.option, e.cycle_limit);
                f.Show();
                this.TCF.Close();
            };

            if (this.InvokeRequired)
            {
                ControlExtensions.UIThreadInvoke(this, delegate
                {
                    DoAction();
                });
            }
            else
            {
                DoAction();
            }
        }