예제 #1
0
 /// <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);
     }
 }
예제 #2
0
        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.");
        }
예제 #3
0
 /// <summary>
 /// Message for the specified sender.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected abstract void Message(object sender, ClockEventArgs e);