Example #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Interval = 1000;
            int hour   = (int)numericUpDown1.Value;
            int minute = (int)numericUpDown2.Value;
            int second = (int)numericUpDown3.Value;
            int h      = DateTime.Now.Hour;
            int m      = DateTime.Now.Minute;
            int s      = DateTime.Now.Second;

            if (begin)
            {
                if (hour == h && minute == m && second == s)
                {
                    pub.text = textBox1.Text.ToString();
                    Tips fm = new Tips();
                    fm.HeightMax = 500;
                    fm.WidthMax  = 280;
                    fm.Show();
                }
            }
        }
Example #2
0
 //提示
 private void timer4_Tick_1(object sender, EventArgs e)
 {
     timer4.Interval = 1000;
     int hour3 = (int)numericUpDown9.Value;
     int minute3 = (int)numericUpDown8.Value;
     int second3 = (int)numericUpDown7.Value;
     int h = DateTime.Now.Hour;
     int m = DateTime.Now.Minute;
     int s = DateTime.Now.Second;
     if (begin)
     {
         if (hour3 == h && minute3 == m && second3 == s)
         {
             pub.text = textBox3.Text.ToString();
             Tips fm = new Tips();
             fm.HeightMax = 500;
             fm.WidthMax = 280;
             fm.Show();
         }
     }
 }