예제 #1
0
파일: GuiTimer.cs 프로젝트: borkaborka/gmit
 /// <summary>Stops the given timer.</summary>
 /// <param name="timer">The timer to stop.</param>
 public static void Stop(GuiTimer timer) {
    if (timer != null) timer.Stop();
 }
예제 #2
0
파일: GuiTimer.cs 프로젝트: borkaborka/gmit
 /// <summary>Starts a timer that will be invoked when the application is idle.</summary>
 /// <param name="callback">The timer callback.</param>
 /// <returns>The <see cref="GuiTimer"/> object that can be used for stopping the timer. </returns>
 public static GuiTimer StartOnIdle(GuiTimerCallback callback) {
    var timer = new GuiTimer(DispatcherPriority.ApplicationIdle);
    timer.Start(callback);
    return timer;
 }
예제 #3
0
파일: GuiTimer.cs 프로젝트: borkaborka/gmit
 /// <summary>Starts a timer that will be invoked after the next layout and rendering pass.</summary>
 /// <param name="callback">The timer callback.</param>
 /// <returns>The <see cref="GuiTimer"/> object that can be used for stopping the timer. </returns>
 public static GuiTimer StartAfterRender(GuiTimerCallback callback) {
    var timer = new GuiTimer(DispatcherPriority.Loaded);
    timer.Start(callback);
    return timer;
 }
예제 #4
0
파일: GuiTimer.cs 프로젝트: borkaborka/gmit
 /// <summary>Starts a timer that will be invoked before the next layout and rendering pass.</summary>
 /// <param name="callback">The timer callback.</param>
 /// <returns>The <see cref="GuiTimer"/> object that can be used for stopping the timer. </returns>
 public static GuiTimer StartBeforeRender(GuiTimerCallback callback) {
    var timer = new GuiTimer(DispatcherPriority.DataBind);
    timer.Start(callback);
    return timer;
 }
예제 #5
0
파일: GuiTimer.cs 프로젝트: borkaborka/gmit
 /// <summary>Starts a timer that will be invoked after a specified delay.</summary>
 /// <param name="delay">The timer delay.</param>
 /// <param name="callback">The timer callback.</param>
 /// <returns>The <see cref="GuiTimer"/> object that can be used for stopping the timer. </returns>
 public static GuiTimer StartAfter(TimeSpan delay, GuiTimerCallback callback) {
    var timer = new GuiTimer();
    timer.Start(delay, callback);
    return timer;
 }