Пример #1
0
 void DoServerTrackingLater(Action onTimeout)
 {
     lazyServerTrackingTimer?.Release();
     lazyServerTrackingTimer = null;
     lazyServerTrackingTimer = new Libs.Sys.CancelableTimeout(onTimeout, 2000);
     lazyServerTrackingTimer.Start();
 }
Пример #2
0
 void WakeupLazyProxyUpdater()
 {
     if (lazyProxyUpdateTimer == null)
     {
         lazyProxyUpdateTimer =
             new Libs.Sys.CancelableTimeout(
                 LazyProxyUpdater, 2000);
     }
     lazyProxyUpdateTimer.Start();
 }
Пример #3
0
        void LazyCustomPacFileCacheUpdate()
        {
            if (lazyCustomPacFileCacheUpdateTimer == null)
            {
                lazyCustomPacFileCacheUpdateTimer =
                    new Libs.Sys.CancelableTimeout(
                        UpdateCustomPacCache, 2000);
            }

            lazyCustomPacFileCacheUpdateTimer.Start();
        }
Пример #4
0
 void LazyInvokeOnPacServerStateChange()
 {
     // Create on demand.
     if (lazyStateChangeTimer == null)
     {
         lazyStateChangeTimer = new Libs.Sys.CancelableTimeout(
             () =>
         {
             try
             {
                 OnPACServerStateChanged?.Invoke(this, EventArgs.Empty);
             }
             catch { }
         },
             1000);
     }
     lazyStateChangeTimer.Start();
 }