コード例 #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;
     }
 }
コード例 #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();
     }
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: poobalan-arumugam/stateproto
 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;
     }
 }
コード例 #4
0
ファイル: Form1.cs プロジェクト: poobalan-arumugam/stateproto
 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();
     }
 }