Esempio n. 1
0
        public void NewAlarm()
        {
            while (time < AlarmTime)
            {
                time = DateTime.Now;
            }
            AlarmclockEventArgs alarmclockEventArgs = new AlarmclockEventArgs();

            alarmclockEventArgs.t = time;
            Alarming(this, alarmclockEventArgs);
        }
Esempio n. 2
0
        public void DoAlarm()
        {
            if (time > AlarmTime + ts1)
            {
                return;
            }
            else
            {
                while (time < AlarmTime)
                {
                    time = DateTime.Now;
                }

                if (time >= AlarmTime || time <= AlarmTime + ts1)
                {
                    AlarmclockEventArgs alarmclockEventArgs = new AlarmclockEventArgs();
                    alarmclockEventArgs.dt = time;
                    Alarming(this, alarmclockEventArgs);
                }
            }
        }
Esempio n. 3
0
 static void ShowAlarm(object sender, AlarmclockEventArgs e)
 {
     Console.WriteLine("现在是北京时间:" + e.t.ToString());
 }
Esempio n. 4
0
 static void ShowAlarm(object sender, AlarmclockEventArgs e)
 {
     Console.WriteLine(e.dt.ToString() + "已经到了");
 }