/// <summary>
 /// Constructor class Alarm
 /// </summary>
 /// <param name="hour">hours</param>
 /// <param name="minute">minute</param>
 /// <param name="second">second</param>
 public Alarm(int hour, int minute, int second)
 {
     this.eventInfo = new AlarmInfoEventArgs(hour, minute, second);
 }
        /// <summary>
        /// Method for call event with object information and information about event
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnAlarmRing(AlarmInfoEventArgs e)
        {
            AlarmRing(this, e);

            timer.Stop();
        }
Example #3
0
 /// <summary>
 /// Handler event end timer
 /// </summary>
 /// <param name="sender">information about object who send event</param>
 /// <param name="e">information about event</param>
 public void OnAlarmRing_Handler(object sender, AlarmInfoEventArgs e)
 {
     Console.WriteLine($"Call Fax : set time {e.Hours} : {e.Minutes} : {e.Seconds} expired.");
 }