Ejemplo n.º 1
0
 /// <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;
 }
Ejemplo n.º 2
0
 /// <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;
 }
Ejemplo n.º 3
0
 /// <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;
 }
Ejemplo n.º 4
0
 /// <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;
 }