Esempio n. 1
0
 private void UpdateAlarmTime(object sender, AlarmClockEventArgs e)
 {
     // Is this method on the UI thread? If not then we need to marshal it to the UI thread.
     if (this.InvokeRequired)
     {
         AlarmClock.AlarmDisplayHandler alarmDisplayHandler = new AlarmClock.AlarmDisplayHandler(UpdateAlarmTime);
         Invoke(alarmDisplayHandler, new object[] { sender, e });
     }
     else
     {
         this.textBoxAlarm.Text = e.Message;
     }
 }
Esempio n. 2
0
 private void ShowAlarmPicture(object sender, AlarmClockEventArgs e)
 {
     // Is this method on the UI thread? If not then we need to marshal it to the UI thread.
     if (this.InvokeRequired)
     {
         AlarmClock.AlarmDisplayHandler alarmDisplayHandler = new AlarmClock.AlarmDisplayHandler(ShowAlarmPicture);
         Invoke(alarmDisplayHandler, new object[] { sender, e });
     }
     else
     {
         this.pictureBoxAlarm.Show();
         //this.Refresh();
     }
 }
Esempio n. 3
0
 private void AlarmActivated(object sender, AlarmClockEventArgs e)
 {
     //Posts message to self
     DispatchQ(new AlarmInitEvent(AlarmClockSignals.Alarm));
 }
Esempio n. 4
0
 private void UpdateTimeOfDay(object sender, AlarmClockEventArgs e)
 {
     // Is this method on the UI thread? If not then we need to marshal it to the UI thread.
     if (this.InvokeRequired)
     {
         AlarmClock.AlarmDisplayHandler alarmDisplayHandler = new AlarmClock.AlarmDisplayHandler(UpdateTimeOfDay);
         Invoke(alarmDisplayHandler, new object[] {sender, e});
     }
     else
     {
         this.textBoxTime.Text = e.Message;
     }
 }
Esempio n. 5
0
 private void ShowAlarmPicture(object sender, AlarmClockEventArgs e)
 {
     // Is this method on the UI thread? If not then we need to marshal it to the UI thread.
     if (this.InvokeRequired)
     {
         AlarmClock.AlarmDisplayHandler alarmDisplayHandler = new AlarmClock.AlarmDisplayHandler(ShowAlarmPicture);
         Invoke(alarmDisplayHandler, new object[] {sender, e});
     }
     else
     {
         this.pictureBoxAlarm.Show();
         //this.Refresh();
     }
 }
Esempio n. 6
0
 private void AlarmActivated(object sender, AlarmClockEventArgs e)
 {
     //Posts message to self
     DispatchQ(new AlarmInitEvent(AlarmClockSignals.Alarm));
 }