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(); }
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(); }
public void Run(Services.LuaServer luaServer) { this.luaServer = luaServer; BindEvents(luaServer); RefreshFlyPanel(); luaServer.OnLuaCoreCtrlListChange += OnLuaCoreCtrlListChangeHandler; }
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 */ }
public void Cleanup() { ReleaseEvent(this.luaCoreCtrl); lazyUpdater?.Dispose(); this.formMgrSvc = null; this.luaServerSvc = null; }
public LuaUI( Services.LuaServer luaServer, Controllers.LuaCoreCtrl luaCoreCtrl) { this.luaCoreCtrl = luaCoreCtrl; this.luaServer = luaServer; InitializeComponent(); }
public LuaUI( Services.LuaServer luaServer, Services.FormMgrSvc formMgrSvc, Controllers.LuaCoreCtrl luaCoreCtrl) { this.luaCoreCtrl = luaCoreCtrl; this.luaServer = luaServer; this.formMgrSvc = formMgrSvc; InitializeComponent(); }
public void Run( Services.Settings settings, Services.LuaServer luaServer) { this.settings = settings; this.luaServer = luaServer; BindEvents(luaServer); BindDragDropEvent(); RefreshFlyPanel(); luaServer.OnRequireFlyPanelUpdate += OnLuaCoreCtrlListChangeHandler; }
public FormMain( VgcApis.Models.IServices.IServersService vgcServers, Services.Settings settings, Services.LuaServer luaServer) { this.vgcServers = vgcServers; this.settings = settings; this.luaServer = luaServer; InitializeComponent(); VgcApis.Libs.UI.AutoSetFormIcon(this); this.Text = Properties.Resources.Name + " v" + Properties.Resources.Version; }
public static FormMain CreateForm( Services.Settings settings, Services.LuaServer luaServer, Services.FormMgrSvc formMgr) { FormMain r = null; VgcApis.Misc.UI.Invoke(() => { r = new FormMain(settings, luaServer, formMgr); }); return(r); }
FormMain( Services.Settings settings, Services.LuaServer luaServer, Services.FormMgrSvc formMgr) { this.settings = settings; this.luaServer = luaServer; this.formMgr = formMgr; InitializeComponent(); VgcApis.Misc.UI.AutoSetFormIcon(this); this.Text = string.Format(I18N.LunaScrMgr, Properties.Resources.Version); }
public void Run( Services.LuaServer luaServer, Services.FormMgrSvc formMgrSvc) { this.luaServer = luaServer; this.formMgrSvc = formMgrSvc; BindControlsEvent(luaServer); BindFlyPanelDragDropEvent(); RefreshFlyPanel(); luaServer.OnRequireFlyPanelUpdate += OnLuaCoreCtrlListChangeHandler; }
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; }
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); }
public void Reload( Services.LuaServer luaServerSvc, Services.FormMgrSvc formMgrSvc, Controllers.LuaCoreCtrl luaCoreCtrl) { this.luaServerSvc = luaServerSvc; this.formMgrSvc = formMgrSvc; var org = this.luaCoreCtrl; this.luaCoreCtrl = luaCoreCtrl; ReleaseEvent(org); BindEvent(luaCoreCtrl); UpdateUiLater(); }
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(); }
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); }
private void BindEvents(Services.LuaServer luaServer) { btnStopAll.Click += (s, a) => { var ctrls = luaServer.GetAllLuaCoreCtrls(); foreach (var c in ctrls) { c.Stop(); } }; btnKillAll.Click += (s, a) => { var ctrls = luaServer.GetAllLuaCoreCtrls(); foreach (var c in ctrls) { c.Kill(); } }; }
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; }
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 BindEvents(Services.LuaServer luaServer) { btnDelAll.Click += (s, a) => { if (!VgcApis.Misc.UI.Confirm(I18N.ConfirmDeleteAllScripts)) { return; } luaServer.RemoveAllScripts(); }; btnImport.Click += (s, a) => { try { var serializedScripts = VgcApis.Misc.UI.ReadFileContentFromDialog( VgcApis.Models.Consts.Files.TxtExt); // cancelle by user if (serializedScripts == null) { return; } var scripts = JsonConvert.DeserializeObject <List <string[]> >(serializedScripts); if (scripts != null && scripts.Count > 0) { luaServer.ImportScripts(scripts); MessageBox.Show(I18N.ImportScriptsSuccess); return; } } catch { } MessageBox.Show(I18N.ImportScriptsFail); }; btnExport.Click += (s, a) => { try { var scripts = luaServer.GetAllScripts(); var serializedScripts = JsonConvert.SerializeObject(scripts); VgcApis.Misc.UI.SaveToFile(VgcApis.Models.Consts.Files.TxtExt, serializedScripts); } catch { MessageBox.Show(I18N.ExportScriptsFail); } }; btnStopAll.Click += (s, a) => { var ctrls = luaServer.GetAllLuaCoreCtrls(); foreach (var c in ctrls) { c.Stop(); } }; btnKillAll.Click += (s, a) => { var ctrls = luaServer.GetAllLuaCoreCtrls(); foreach (var c in ctrls) { c.Abort(); } }; }