Beispiel #1
0
 void RemoveFormFromList(Views.WinForms.FormEditor form)
 {
     lock (formLocker)
     {
         editors.RemoveAll(f => f == form);
     }
 }
Beispiel #2
0
        public void CreateNewEditor(Models.Data.LuaCoreSetting initialCoreSettings)
        {
            Views.WinForms.FormEditor form = null;

            VgcApis.Misc.UI.Invoke(() =>
            {
                form = Views.WinForms.FormEditor.CreateForm(
                    api, settings, luaServer, this,
                    initialCoreSettings);

                form.FormClosing += (s, a) =>
                {
                    var oldForm = s as Views.WinForms.FormEditor;
                    RemoveFormFromList(oldForm);
                };

                form.Show();
            });

            lock (formLocker)
            {
                if (form != null)
                {
                    editors.Add(form);
                }
            }
        }
Beispiel #3
0
        public MenuCtrl(
            Views.WinForms.FormEditor formEditor,

            ButtonCtrl editorCtrl,
            ToolStripMenuItem miNewWindow,
            ToolStripMenuItem miShowMgr,
            ToolStripMenuItem miLoad,
            ToolStripMenuItem miSaveAs,
            ToolStripMenuItem miExit,

            ToolStripMenuItem miLoadClrLib,


            ToolStripStatusLabel smiLbClrLib,


            ComboBox cboxScriptName)
        {
            this.editorCtrl   = editorCtrl;
            this.miNewWindow  = miNewWindow;
            this.miShowMgr    = miShowMgr;
            this.miLoad       = miLoad;
            this.miSaveAs     = miSaveAs;
            this.miExit       = miExit;
            this.miLoadClrLib = miLoadClrLib;

            this.smiLbClrLib = smiLbClrLib;

            this.cboxScriptName = cboxScriptName;
            this.formEditor     = formEditor;
        }