コード例 #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);