private ThrottleTimer ( int milliseconds, System.Action handler ) : System | ||
milliseconds | int | |
handler | System.Action | |
return | System |
internal ThrottleTimer(int milliseconds, Action handler)
{
Action = handler;
throttleTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds((double)milliseconds) };
throttleTimer.Tick += delegate(object s, EventArgs e)
{
if (Action != null)
{
Action.Invoke();
}
throttleTimer.Stop();
};
}
ThrottleTimer::ThrottleTimer ( int milliseconds ) : System |