Exemple #1
0
 /// <summary>
 /// add a clock to the form using the clock class.
 /// if there are ten clocks in the system already it will notify the user.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnAdd_Click(object sender, EventArgs e)
 {
     UserClockEditor = new InputTime(this, true, 0);
     UserClockEditor.Show();
     if (clocks.Count >= 10)
     {
         BtnAdd.Enabled = false;
     }
 }
Exemple #2
0
        /// <summary>
        /// edits an existing alarm, by pulling it out of the cloks list.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            int hold = Display.SelectedIndex;
            //MessageBox.Show(hold.ToString());
            int ClocksSize = clocks.Count();

            if ((hold < ClocksSize) && hold > -1)
            {
                UserClockEditor = new InputTime(this, false, hold);
                UserClockEditor.Show();
                clocks.Remove(clocks[hold]);
            }
        }