/// <summary> /// Called when clock countdown. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="ClockEventArgs"/> instance containing the event data.</param> private void OnClockEvent(object sender, ClockEventArgs e) { if (this.ClockEvent != null) { this.ClockEvent.Invoke(this, e); } }
protected override void Message(object sender, ClockEventArgs e) { if (e == null) { return; } Console.WriteLine($"Time of initialization: {e.DateTime}."); Console.WriteLine($"Time spend: {e.Ms / (double)3600000} hours."); }
/// <summary> /// Message for the specified sender. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected abstract void Message(object sender, ClockEventArgs e);