Exemplo n.º 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
             */
        }
Exemplo n.º 2
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);
        }