/// <summary> /// The method shows note. /// </summary> /// <param name="sender">0object of class clock</param> /// <param name="eventArgs">Set info about event</param> private void ShowNote(Object sender, NewEventArgs eventArgs) { Console.WriteLine("You need to know :"); Console.WriteLine("Text = {0}, Time = {1} hh:mm:ss", eventArgs.Message, eventArgs.Time); }
/// <summary> /// The method shows message. /// </summary> /// <param name="sender">0object of class clock</param> /// <param name="eventArgs">Set info about event</param> private void ShowNote(Object sender, NewEventArgs eventArgs) { Console.WriteLine("wake up and remember :"); Console.WriteLine("Text = {0}, You sleep = {1} hh:mm:ss", eventArgs.Message, eventArgs.Time); }
protected virtual void OnNewEvent(object sender, NewEventArgs e) { NewEvent?.Invoke(sender, e); }