Ejemplo n.º 1
0
        private void FormMain_Load(object sender, System.EventArgs e)
        {
            chkEnableClrSupports.Checked = settings.isEnableClrSupports;
#if DEBUG
            tabControl1.SelectTab(1);
#endif

            InitSplitPanel();
            lbStatusBarMsg.Text = "";

            // TabGeneral should initialize before TabEditor.
            genCtrl = new Controllers.TabGeneralCtrl(
                flyScriptUIContainer,
                btnStopAllScript,
                btnKillAllScript,
                btnDeleteAllScripts,
                btnImportFromFile,
                btnExportToFile);

            genCtrl.Run(settings, luaServer);

            editorCtrl = new Controllers.TabEditorCtrl(
                this,
                cboxScriptName,
                btnNewScript,
                btnSaveScript,
                cboxFunctionList,
                btnRunScript,
                btnStopScript,
                btnKillScript,
                btnClearOutput,
                rtBoxOutput,
                pnlScriptEditor);

            editorCtrl.Run(api, settings, luaServer);

            menuCtrl = new Controllers.MenuCtrl(
                formMgr,
                this,
                editorCtrl,
                newWindowToolStripMenuItem,
                loadFileToolStripMenuItem,
                saveAsToolStripMenuItem,
                exitToolStripMenuItem,
                tabControl1);

            menuCtrl.Run();

            this.FormClosing += FormClosingHandler;
            this.FormClosed  += (s, a) =>
            {
                // reverse order
                editorCtrl.Cleanup();
                genCtrl.Cleanup();
            };

            this.KeyDown += (s, a) => editorCtrl?.KeyBoardShortcutHandler(a);
        }
Ejemplo n.º 2
0
        private void FormMain_Load(object sender, System.EventArgs e)
        {
            FixSplitPanelWidth();
            lbStatusBarMsg.Text = "";

            // TabGeneral should initialize before TabEditor.
            genCtrl = new Controllers.TabGeneralCtrl(
                flyScriptUIContainer,
                btnStopAllScript,
                btnKillAllScript);

            genCtrl.Run(luaServer);

            editorCtrl = new Controllers.TabEditorCtrl(
                cboxScriptName,
                btnNewScript,
                btnSaveScript,
                btnRemoveScript,
                btnRunScript,
                btnStopScript,
                btnKillScript,
                btnClearOutput,
                rtBoxOutput,
                pnlScriptEditor);

            editorCtrl.Run(api, settings, luaServer);

            menuCtrl = new Controllers.MenuCtrl(
                formMgr,
                this,
                editorCtrl,
                newWindowToolStripMenuItem,
                loadFileToolStripMenuItem,
                saveAsToolStripMenuItem,
                exitToolStripMenuItem);

            this.FormClosing += FormClosingHandler;
            this.FormClosed  += (s, a) =>
            {
                // reverse order
                editorCtrl.Cleanup();
                genCtrl.Cleanup();
            };

            this.KeyDown += (s, a) => editorCtrl?.KeyBoardShortcutHandler(a);
        }