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;
            }

            repaintCtrl = new VgcApis.Libs.Views.RepaintCtrl(rtboxOutput);
            logUpdater.Run();
        }
Esempio n. 2
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
             */
        }
Esempio n. 3
0
        private void pauseToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var pause = !pauseToolStripMenuItem.Checked;

            pauseToolStripMenuItem.Checked = pause;
            if (pause)
            {
                logDisplayer.Pause();
            }
            else
            {
                logDisplayer.Run();
            }
        }
Esempio n. 4
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();
        }
Esempio n. 5
0
        void RestartCoreWorker(Action next)
        {
            try
            {
                var finalConfig = configer.GetFinalConfig();
                if (finalConfig == null)
                {
                    StopCore();
                    return;
                }

                v2rayCore.title = coreStates.GetTitle();
                v2rayCore.RestartCore(finalConfig.ToString(), Misc.Utils.GetEnvVarsFromConfig(finalConfig));
                bookKeeper?.Run();
            }
            finally
            {
                next?.Invoke();
            }
        }
Esempio n. 6
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
        }
 private void FormSingleServerLog_Load(object sender, EventArgs e)
 {
     logUpdater.Run();
     repaintCtrl = new VgcApis.UserControls.RepaintController(rtBoxLogger);
 }
Esempio n. 8
0
 private void FormSingleServerLog_Load(object sender, EventArgs e)
 {
     logUpdater.Run();
     repaintCtrl = new VgcApis.Libs.Views.RepaintCtrl(rtBoxLogger);
 }
Esempio n. 9
0
 private void FormSingleServerLog_Load(object sender, EventArgs e)
 {
     logUpdater.Run();
 }
Esempio n. 10
0
 private void FormLog_Load(object sender, EventArgs e)
 {
     logDisplayer = new VgcApis.Libs.Tasks.Routine(UpdateLog, 500);
     logDisplayer.Run();
     // throw new NullReferenceException("for debugging");
 }