예제 #1
0
        void StartTracking()
        {
            lock (trackingLocker)
            {
                if (isTracking)
                {
                    return;
                }

                servers.OnServerStateChange += TrackingHandler;
                isTracking = true;
            }
            setting.DebugLog("Start tracking.");
        }
예제 #2
0
        void StartTracking()
        {
            lock (trackingLocker)
            {
                if (isTracking)
                {
                    return;
                }

                servers.OnCoreStop  += OnCoreRunningStatChangeHandler;
                servers.OnCoreStart += OnCoreRunningStatChangeHandler;
                isTracking           = true;
            }
            setting.DebugLog("Start tracking.");
        }
예제 #3
0
        void StartTracking()
        {
            lock (trackingLocker)
            {
                if (isTracking)
                {
                    return;
                }

                servers.OnCoreClosing += OnCoreClosingHandler;
                servers.OnCoreStart   += OnCoreStartHandler;
                isTracking             = true;
            }
            setting.DebugLog("Start tracking.");
        }
예제 #4
0
 public void Cleanup()
 {
     setting.DebugLog("call Luncher.cleanup");
     setting.isCleaning = true;
     formMain?.Close();
     serverTracker.Cleanup();
     pacServer.Cleanup();
     setting.Cleanup();
     Lib.Sys.ProxySetter.UpdateProxySettingOnDemand(orgSysProxySetting);
     FileLogger.Info("ProxySetter: restore sys proxy settings");
 }
예제 #5
0
        public void Cleanup()
        {
            setting.DebugLog("call Luncher.cleanup");
            setting.isCleaning = true;

            serverTracker.OnSysProxyChanged -= UpdateMenuItemCheckedStatHandler;
            VgcApis.Misc.UI.CloseFormIgnoreError(formMain);
            serverTracker.Cleanup();
            pacServer.Cleanup();
            setting.Cleanup();
            Libs.Sys.ProxySetter.UpdateProxySettingOnDemand(orgSysProxySetting);
            FileLogger.Info("ProxySetter: restore sys proxy settings");
        }
예제 #6
0
 public void Cleanup()
 {
     Microsoft.Win32.SystemEvents.SessionEnding += SessionEndingHandler;
     FileLogger.Info("ProxySetting.Cleanup() begin");
     setting.SetIsDisposing(true);
     setting.DebugLog("call Luncher.cleanup");
     serverTracker.OnSysProxyChanged -= UpdateMenuItemCheckedStatHandler;
     VgcApis.Misc.UI.CloseFormIgnoreError(formMain);
     serverTracker.Cleanup();
     pacServer.Cleanup();
     setting.Cleanup();
     FileLogger.Info("ProxySetter: restore sys proxy settings");
     Libs.Sys.ProxySetter.UpdateProxySettingOnDemand(orgSysProxySetting);
     FileLogger.Info("ProxySetter.Cleanup() done");
 }