Пример #1
0
        public void Run(VgcApis.Interfaces.Services.IApiService api)
        {
            orgSysProxySetting = Libs.Sys.ProxySetter.GetProxySetting();

            Microsoft.Win32.SystemEvents.SessionEnding += SessionEndingHandler;

            FileLogger.Info("ProxySetter: remember current sys proxy settings");

            this.vgcApi = api;

            var vgcSetting  = api.GetSettingService();
            var vgcServer   = api.GetServersService();
            var vgcNotifier = api.GetNotifierService();

            pacServer     = new PacServer();
            setting       = new PsSettings();
            serverTracker = new ServerTracker();

            // dependency injection
            setting.Run(vgcSetting);
            pacServer.Run(setting);

            serverTracker.OnSysProxyChanged += UpdateMenuItemCheckedStatHandler;
            serverTracker.Run(setting, pacServer, vgcServer, vgcNotifier);
        }
Пример #2
0
        public void Run(
            PsSettings setting,
            PacServer pacServer,
            VgcApis.Models.IServices.IServersService servers)
        {
            this.setting   = setting;
            this.pacServer = pacServer;
            this.servers   = servers;

            Restart();
        }
Пример #3
0
        public void Run(
            PsSettings setting,
            PacServer pacServer,
            VgcApis.Models.IServices.IServersService servers,
            VgcApis.Models.IServices.INotifierService notifier)
        {
            this.setting   = setting;
            this.pacServer = pacServer;
            this.servers   = servers;
            this.notifier  = notifier;

            Restart();
        }
Пример #4
0
        public void Run(
            VgcApis.Models.IUtils vgcUtils,
            PsSettings setting,
            PacServer pacServer,
            VgcApis.Models.IServersService servers)
        {
            this.vgcUtils  = vgcUtils;
            this.setting   = setting;
            this.pacServer = pacServer;
            this.servers   = servers;

            Restart();
        }
Пример #5
0
        public void Run(
            PsSettings setting,
            PacServer pacServer,
            VgcApis.Interfaces.Services.IServersService servers,
            VgcApis.Interfaces.Services.INotifierService notifier)
        {
            this.setting   = setting;
            this.pacServer = pacServer;
            this.servers   = servers;
            this.notifier  = notifier;

            UpdateHotkey();
            Restart();
        }
Пример #6
0
        public void Run(VgcApis.Models.IServices.IApiService api)
        {
            orgSysProxySetting = Lib.Sys.ProxySetter.GetProxySetting();
            VgcApis.Libs.Sys.FileLogger.Info("ProxySetter: save sys proxy settings");

            this.vgcApi = api;

            var vgcSetting  = api.GetSettingService();
            var vgcServer   = api.GetServersService();
            var vgcNotifier = api.GetNotifierService();

            pacServer     = new PacServer();
            setting       = new PsSettings();
            serverTracker = new ServerTracker();

            // dependency injection
            setting.Run(vgcSetting);
            pacServer.Run(setting);
            serverTracker.Run(setting, pacServer, vgcServer, vgcNotifier);
        }