Пример #1
0
        public void Run(
            VgcApis.Interfaces.Services.IApiService api,
            Services.Settings settings,
            Services.FormMgrSvc formMgr,
            Services.LuaServer luaServer)
        {
            this.formMgr   = formMgr;
            this.settings  = settings;
            this.luaServer = luaServer;

            this.luaCoreCtrl = CreateLuaCoreCtrl(settings, api);


            isLoadClrLib = false;

            BindEvents();
            ReloadScriptName();

            rtboxFreezer = new VgcApis.UserControls.RepaintController(rtboxOutput);
            logUpdater.Run();

            /*
             #if DEBUG
             *          if (cboxScriptName.Items.Count > 0)
             *          {
             *              cboxScriptName.SelectedIndex = 0;
             *          }
             #endif
             */
        }
Пример #2
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);
        }
Пример #3
0
 public LuaApis(
     Services.Settings settings,
     VgcApis.Interfaces.Services.IApiService api)
 {
     this.settings          = settings;
     this.redirectLogWorker = settings.SendLog;
     vgcApi = api;
 }
Пример #4
0
 public Misc(
     Services.Settings settings,
     VgcApis.Interfaces.Services.IApiService api)
 {
     this.settings = settings;
     vgcUtils      = api.GetUtilsService();
     vgcSlinkMgr   = api.GetShareLinkMgrService();
 }
Пример #5
0
        protected override void Start(VgcApis.Interfaces.Services.IApiService api)
        {
            this.api   = api;
            vgcSetting = api.GetSettingService();
            vgcServers = api.GetServersService();

            settings = new Services.Settings();
            settings.Run(vgcSetting, vgcServers);
        }
Пример #6
0
 public void Run(
     Settings settings,
     LuaServer luaServer,
     VgcApis.Interfaces.Services.IApiService api)
 {
     this.api       = api;
     this.settings  = settings;
     this.luaServer = luaServer;
 }
Пример #7
0
        public void Run(
            Settings settings,
            VgcApis.Interfaces.Services.IApiService api)
        {
            this.settings = settings;
            this.luaApis  = new Models.Apis.LuaApis(settings, api);
            this.luaApis.Prepare();

            InitLuaCores();
        }
Пример #8
0
        public LuaApis(
            VgcApis.Interfaces.Services.IApiService api,
            Settings settings,
            FormMgrSvc formMgr)
        {
            this.settings     = settings;
            redirectLogWorker = settings.SendLog;

            vgcApi       = api;
            this.formMgr = formMgr;
        }
Пример #9
0
        public void Run(
            Settings settings,
            VgcApis.Interfaces.Services.IApiService api)
        {
            this.settings = settings;
            this.luaApis  = new Models.Apis.LuaApis(settings, api);
            this.luaApis.Prepare();

            luaCoreCtrls = InitLuaCores(settings, luaApis);
            WakeUpAutoRunScripts();
        }
Пример #10
0
        public LuaApis(
            Services.Settings settings,
            VgcApis.Interfaces.Services.IApiService api)
        {
            this.settings = settings;


            redirectLogWorker = settings.SendLog;
            vgcApi            = api;

            postOffice = new SysCmpos.PostOffice();
        }
Пример #11
0
        public void Run(
            VgcApis.Interfaces.Services.IApiService api,
            Settings settings,
            FormMgrSvc formMgr)
        {
            this.settings = settings;

            this.luaApis = new Models.Apis.LuaApis(api, settings, formMgr);
            this.luaApis.Prepare();

            InitLuaCores();
        }
Пример #12
0
 public Misc(
     VgcApis.Interfaces.Services.IApiService api,
     Services.Settings settings,
     Services.FormMgrSvc formMgr)
 {
     this.settings = settings;
     this.formMgr  = formMgr;
     vgcNotifier   = api.GetNotifierService();
     vgcUtils      = api.GetUtilsService();
     vgcSlinkMgr   = api.GetShareLinkMgrService();
     vgcServer     = api.GetServersService();
     vgcSettings   = api.GetSettingService();
 }
Пример #13
0
        public static FormMain CreateForm(
            VgcApis.Interfaces.Services.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer,
            Services.FormMgr formMgr)
        {
            FormMain r = null;

            VgcApis.Misc.UI.Invoke(() =>
            {
                r = new FormMain(api, settings, luaServer, formMgr);
            });
            return(r);
        }
Пример #14
0
 FormMain(
     VgcApis.Interfaces.Services.IApiService api,
     Services.Settings settings,
     Services.LuaServer luaServer,
     Services.FormMgr formMgr)
 {
     this.api       = api;
     this.formMgr   = formMgr;
     this.settings  = settings;
     this.luaServer = luaServer;
     InitializeComponent();
     VgcApis.Misc.UI.AutoSetFormIcon(this);
     this.Text = Properties.Resources.Name + " v" + Properties.Resources.Version;
 }
Пример #15
0
        protected override void Start(VgcApis.Interfaces.Services.IApiService api)
        {
            var vgcSettings = api.GetSettingService();

            settings    = new Services.Settings();
            luaServer   = new Services.LuaServer();
            formMgr     = new Services.FormMgrSvc();
            menuUpdater = new Services.MenuUpdater(settings);

            settings.Run(vgcSettings);
            luaServer.Run(api, settings, formMgr);
            formMgr.Run(settings, luaServer, api);
            menuUpdater.Run(luaServer, miRoot, miShowMgr, miShowEditor);

            luaServer.WakeUpAutoRunScripts(TimeSpan.FromSeconds(2));
        }
Пример #16
0
        LuaCoreCtrl CreateLuaCoreCtrl(
            Services.Settings settings,
            VgcApis.Interfaces.Services.IApiService api)
        {
            var luaApis = new Models.Apis.LuaApis(settings, api);

            luaApis.Prepare();
            luaApis.SetRedirectLogWorker(Log);

            var coreSettings = new Models.Data.LuaCoreSetting();

            var ctrl = new LuaCoreCtrl();

            ctrl.Run(settings, coreSettings, luaApis);
            return(ctrl);
        }
Пример #17
0
        public void Run(
            VgcApis.Interfaces.Services.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer)
        {
            this.settings    = settings;
            this.luaServer   = luaServer;
            this.luaCoreCtrl = CreateLuaCoreCtrl(settings, api);

            InitControls();
            BindEvents();

            ReloadScriptName();

            repaintCtrl = new VgcApis.Libs.Views.RepaintCtrl(rtboxOutput);
            logUpdater.Run();
        }
Пример #18
0
        protected override void Start(VgcApis.Interfaces.Services.IApiService api)
        {
            var vgcSettings = api.GetSettingService();
            var vgcNotifier = api.GetNotifierService();

            miRoot = GetMenu(); // make sure miRoot is not null

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

            settings.Run(vgcSettings);
            luaServer.Run(settings, api);
            formMgr.Run(settings, luaServer, api);
            menuUpdater.Run(luaServer, miRoot, miShowWindow);
        }
Пример #19
0
        LuaCoreCtrl CreateLuaCoreCtrl(
            Services.Settings settings,
            VgcApis.Interfaces.Services.IApiService api)
        {
            var luaApis = new Models.Apis.LuaApis(api, settings, formMgr);

            luaApis.Prepare();
            luaApis.SetRedirectLogWorker(Log);

            var coreSettings = new Models.Data.LuaCoreSetting()
            {
                isLoadClr = isLoadClrLib,
            };
            var ctrl = new LuaCoreCtrl(true);

            ctrl.Run(settings, coreSettings, luaApis);
            return(ctrl);
        }
Пример #20
0
        public static FormEditor CreateForm(
            VgcApis.Interfaces.Services.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer,
            Services.FormMgrSvc formMgr,

            Models.Data.LuaCoreSetting initialCoreSettings)
        {
            FormEditor r = null;

            VgcApis.Misc.UI.Invoke(() =>
            {
                r = new FormEditor(
                    api, settings, luaServer, formMgr,

                    initialCoreSettings);
            });
            return(r);
        }
Пример #21
0
        FormEditor(
            VgcApis.Interfaces.Services.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer,
            Services.FormMgrSvc formMgr,

            Models.Data.LuaCoreSetting initialCoreSettings)
        {
            this.api                 = api;
            this.formMgr             = formMgr;
            this.initialCoreSettings = initialCoreSettings;

            this.settings  = settings;
            this.luaServer = luaServer;

            InitializeComponent();
            VgcApis.Misc.UI.AutoSetFormIcon(this);
            title = string.Format(I18N.LunaScrEditor, Properties.Resources.Version);

            editor    = Misc.UI.CreateLuaEditor(pnlScriptEditor);
            this.Text = title;
        }
Пример #22
0
        public void Run(
            VgcApis.Interfaces.Services.IApiService api,
            Services.Settings settings,
            Services.LuaServer luaServer)
        {
            this.settings    = settings;
            this.luaServer   = luaServer;
            this.luaCoreCtrl = CreateLuaCoreCtrl(settings, api);

            InitControls();
            BindEvents();
            ReloadScriptName();

            rtboxFreezer = new VgcApis.Libs.Views.RepaintController(rtboxOutput);
            logUpdater.Run();

#if DEBUG
            if (cboxScriptName.Items.Count > 0)
            {
                cboxScriptName.SelectedIndex = 0;
            }
#endif
        }
Пример #23
0
 public void Run(VgcApis.Interfaces.Services.IApiService vgcApi)
 {
     vgcServers   = vgcApi.GetServersService();
     vgcSetting   = vgcApi.GetSettingService();
     userSettings = LoadUserSettings();
 }
Пример #24
0
 protected override void Start(VgcApis.Interfaces.Services.IApiService api)
 {
     settings = new Services.Settings();
     settings.Run(api);
 }
Пример #25
0
 public Json(
     VgcApis.Interfaces.Services.IApiService api)
 {
     this.vgcUtils = api.GetUtilsService();
 }
Пример #26
0
 public Server(
     VgcApis.Interfaces.Services.IApiService api)
 {
     vgcServers   = api.GetServersService();
     vgcConfigMgr = api.GetConfigMgrService();
 }
Пример #27
0
 public Web(VgcApis.Interfaces.Services.IApiService api)
 {
     vgcWeb      = api.GetWebService();
     vgcServers  = api.GetServersService();
     vgcSlinkMgr = api.GetShareLinkMgrService();
 }
Пример #28
0
 protected override void Start(VgcApis.Interfaces.Services.IApiService api)
 {
     luncher = new Services.PsLuncher();
     luncher.Run(api);
 }