Exemplo n.º 1
0
 public static void CreateAndStart_DispatcherTimer(ref DispatcherTimer timer, DelegateTimerTick TimerTick)
 {
     if (timer == null)
     {
         timer = new System.Windows.Threading.DispatcherTimer();
     }
     timer.Tick    += new EventHandler(TimerTick);
     timer.Interval = new TimeSpan(0, 0, 0, 0, 20);
     timer.Start();
 }
Exemplo n.º 2
0
 public static void CreateAndStart_DispatcherTimer(ref DispatcherTimer timer, DelegateTimerTick TimerTick, TimeSpan _Interval)
 {
     if (timer == null)
     {
         timer = new System.Windows.Threading.DispatcherTimer();
     }
     else
     {
         StopAndNull_DispatcherTimer(ref timer);
         timer = new System.Windows.Threading.DispatcherTimer();
     }
     timer.Tick    += new EventHandler(TimerTick);
     timer.Interval = _Interval;
     timer.Start();
 }
Exemplo n.º 3
0
        public void Start(DelegateTimerTick TimerTick)
        {
            TimeSpan t = new TimeSpan(0, 0, 0, 0, 100);

            ToolsClass.CreateAndStart_DispatcherTimer(ref timer, TimerTick, t);
        }