示例#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();
 }