Esempio n. 1
0
 public void Run(
     Settings settings,
     LuaServer luaServer,
     VgcApis.Models.IServices.IApiService api)
 {
     this.api       = api;
     this.settings  = settings;
     this.luaServer = luaServer;
 }
Esempio n. 2
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. 3
0
        public void Run(
            LuaServer luaServer,
            ToolStripMenuItem miRoot,
            ToolStripMenuItem miShowWindow)
        {
            this.luaServer = luaServer;

            this.miRoot       = miRoot;
            this.miShowWindow = miShowWindow;

            lazyMenuUpdater = new VgcApis.Libs.Tasks.LazyGuy(UpdateMenuLater, 1000);

            BindEvents();

            UpdateMenuLater();
        }
Esempio n. 4
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));
        }
Esempio n. 5
0
        protected override void Start(VgcApis.IService api)
        {
            this.api    = api;
            vgcServers  = api.GetVgcServersService();
            vgcSettings = api.GetVgcSettingService();

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

            settings.Run(vgcSettings);
            luaServer.Run(settings, vgcServers);

            // debug
            // this.Popup();
            // formMain.Activate();
        }
Esempio n. 6
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);
        }
Esempio n. 7
0
        public void Run(
            LuaServer luaServer,
            ToolStripMenuItem miRoot,
            ToolStripMenuItem miShowMgr,
            ToolStripMenuItem miShowEditor)
        {
            this.luaServer = luaServer;

            this.miRoot       = miRoot;
            this.miShowMgr    = miShowMgr;
            this.miShowEditor = miShowEditor;

            lazyMenuUpdater = new VgcApis.Libs.Tasks.LazyGuy(UpdateMenuWorker, 500, 3000)
            {
                Name = "Luna.MenuUpdater",
            };

            BindEvents();

            UpdateMenuLater();
        }