Exemple #1
0
        public bool StartCompiler()
        {
            bool blnResult = false;

            //if (this.disableCompilesyntaxCheckToolStripMenuItem.Checked)
            //	return false;

            if (this.IsScript)
            {
                StopCompiler();

                if (this.parent != null)
                {
                    runtime = new RuntimeConsole(this.parent);

                    // for disposing
                    this.components.Add(runtime);

                    if (!runtime.Compile(this))
                    {
                        this.tabControl1.SelectedIndex = 0;
                        return(false);
                    }

                    TabPage tabPage = new TabPage("Debug");
                    tabPage.Controls.Add(runtime);
                    this.tabControl1.TabPages.Add(tabPage);
                    this.tabControl1.SelectedIndex = 1;
                    blnResult = true;
                }
            }
            return(blnResult);
        }
Exemple #2
0
        public bool StartCompiler()
        {
            bool blnResult = false;

            //if (this.disableCompilesyntaxCheckToolStripMenuItem.Checked)
            //	return false;

            if (this.IsScript)
            {
                StopCompiler();

                if (this.parent != null)
                {
                    runtime = new RuntimeConsole(this.parent);

                    // for disposing
                    this.components.Add(runtime);

                    foreach (string message in verboseQueue)
                    {
                        runtime.VerboseConsole(message);

                        if (message.StartsWith("Error: "))
                        {
                            StopCompiler();
                            this.tabControl1.SelectedIndex = 0;
                            verboseQueue = new List <string>();
                            return(false);
                        }
                    }

                    if (!runtime.Compile(this))
                    {
                        this.tabControl1.SelectedIndex = 0;
                        return(false);
                    }


                    TabPage tabPage = new TabPage("Debug");
                    tabPage.Controls.Add(runtime);
                    this.tabControl1.TabPages.Add(tabPage);
                    this.tabControl1.SelectedIndex = 1;
                    blnResult = true;
                }
            }
            return(blnResult);
        }
Exemple #3
0
        public void StopCompiler()
        {
            this.numberedTextBoxUC1.TextBox.MakeAllInvis();

            if (runtime != null)
            {
                this.components.Remove(runtime);
                if (!runtime.IsDisposed)
                {
                    runtime.Dispose();
                }
                runtime = null;
            }

            for (int intI = this.tabControl1.TabPages.Count - 1; intI > 0; intI--)
            {
                this.tabControl1.TabPages.RemoveAt(intI);
            }
        }