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