示例#1
0
 private void OnTick()
 {
     if (IsRunning)
     {
         TimerTickEvent?.Invoke(this, new UITimerTickEventArgs {
             RemainningTime = remainningTime
         });
     }
 }
示例#2
0
        /// <summary>
        /// I use delegate to reach the picturebox of the form.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void ActualClockBitmap(object sender, EventArgs e)
        {
            ActualClockSight();

            if (TimerTickEvent != null)
            {
                TimerTickEvent.Invoke(ClockBitmap);
            }
        }
 protected virtual void HandleTimerTick(TimerTickEvent e)
 {
     try
     {
         EventHandler <TimerTickEvent> handler = OnTimerTick;
         if (handler != null)
         {
             handler(this, e);
         }
     }
     catch { }
 }
示例#4
0
 public void OnTimerTick(float f)
 {
     TimerTickEvent?.Invoke(f);
 }