Esempio n. 1
0
        public void Run(
            VgcApis.Models.IServices.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer)
        {
            this.api        = api;
            this.configMgr  = api.GetConfigMgrService();
            this.vgcServers = api.GetServersService();

            this.settings    = settings;
            this.luaServer   = luaServer;
            this.luaCoreCtrl = CreateLuaCoreCtrl(
                settings, api);

            InitControls();
            BindEvents();

            ReloadScriptName();
            if (cboxScriptName.Items.Count > 0)
            {
                cboxScriptName.SelectedIndex = 0;
            }

            updateOutputTimer.Tick += UpdateOutput;
            updateOutputTimer.Start();
        }
Esempio n. 2
0
        public void Run(
            VgcApis.Models.IServices.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer)
        {
            this.api        = api;
            this.configMgr  = api.GetConfigMgrService();
            this.vgcServers = api.GetServersService();

            this.settings    = settings;
            this.luaServer   = luaServer;
            this.luaCoreCtrl = CreateLuaCoreCtrl(
                settings, api);

            InitControls();
            BindEvents();

            ReloadScriptName();
            if (cboxScriptName.Items.Count > 0)
            {
                cboxScriptName.SelectedIndex = 0;
            }

            repaintCtrl = new VgcApis.Libs.Views.RepaintCtrl(rtboxOutput);
            logUpdater.Run();
        }
Esempio n. 3
0
 protected override void Start(VgcApis.Models.IServices.IApiService api)
 {
     this.api      = api;
     this.settings = new Services.Settings();
     vgcServers    = api.GetServersService();
     vgcSettings   = api.GetSettingService();
     settings.Run(api);
 }
Esempio n. 4
0
 public LuaApis(
     Services.Settings settings,
     VgcApis.Models.IServices.IApiService api)
 {
     this.settings          = settings;
     this.vgcConfigMgr      = api.GetConfigMgrService();
     this.vgcServers        = api.GetServersService();
     this.vgcWeb            = api.GetWebService();
     this.vgcUtils          = api.GetUtilsService();
     this.redirectLogWorker = settings.SendLog;
 }
Esempio n. 5
0
        protected override void Start(VgcApis.Models.IServices.IApiService api)
        {
            var vgcServers   = api.GetServersService();
            var vgcSettings  = api.GetSettingService();
            var vgcConfigMgr = api.GetConfigMgrService();

            settings  = new Services.Settings();
            luaServer = new Services.LuaServer();
            formMgr   = new Services.FormMgr();

            settings.Run(vgcSettings);
            luaServer.Run(settings, api);
            formMgr.Run(settings, luaServer, api);
        }
Esempio n. 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);
        }
Esempio n. 7
0
 public Server(
     VgcApis.Models.IServices.IApiService api)
 {
     vgcServers   = api.GetServersService();
     vgcConfigMgr = api.GetConfigMgrService();
 }
Esempio n. 8
0
 public void Run(VgcApis.Models.IServices.IApiService vgcApi)
 {
     vgcServers   = vgcApi.GetServersService();
     vgcSetting   = vgcApi.GetSettingService();
     userSettings = LoadUserSettings();
 }
Esempio n. 9
0
 public Web(VgcApis.Models.IServices.IApiService api)
 {
     vgcWeb      = api.GetWebService();
     vgcServers  = api.GetServersService();
     vgcSlinkMgr = api.GetShareLinkMgrService();
 }