Exemplo 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;
     }
 }
Exemplo 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();
     }
 }
Exemplo n.º 3
0
 private void AlarmActivated(object sender, AlarmClockEventArgs e)
 {
     //Posts message to self
     DispatchQ(new AlarmInitEvent(AlarmClockSignals.Alarm));
 }
Exemplo 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;
     }
 }
Exemplo 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();
     }
 }
Exemplo n.º 6
0
 private void AlarmActivated(object sender, AlarmClockEventArgs e)
 {
     //Posts message to self
     DispatchQ(new AlarmInitEvent(AlarmClockSignals.Alarm));
 }