Пример #1
0
        private void compilerWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (process.ExitCode == 0)
            {
                ConsoleView.TextBox().Text = "";
                setBottomBackColor("#008000", "#50cf50");
                ShowPanel(consoleView, lblConsole);
                runWorker.RunWorkerAsync();
            }
            else
            {
                string output = process.StandardError.ReadToEnd();
                int    error  = CompileErrors(output);
                setBottomBackColor("#ff0000", "#f72929");
                ShowPanel(problemsView, lblProblems);
                ProblemsView.TextBox().Text           = output;
                ProblemsView.TextBox().SelectionStart = ProblemsView.TextBox().Text.Length;
                ProblemsView.TextBox().ScrollToCaret();
                // change this to a grid view...

                /*if (error > 0)
                 *  lblProblems.Text = "PROBLEMS " + error;
                 * else
                 *  lblProblems.Text = "PROBLEMS -TOO MANY!";
                 */
            }
        }
Пример #2
0
 private void compilerWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (process.ExitCode == 0)
     {
         //string output = process.StandardOutput.ReadToEnd();
         //consoleBox.Text = "";
         //ConsoleView.SetText("", false);
         ConsoleView.TextBox().Text = "";
         //pnlBottom.BackColor = Color.Green;
         //bottomPanel.BackColor = Color.Green;
         // green 008000
         setBottomBackColor("#008000", "#50cf50");
         showConsolePanel();
         //Form1.displayConsolePanel();
         //Form1.SetCompileStatus("Compiled");
         runWorker.RunWorkerAsync();
         //MessageBox.Show("a: " + a + " out: "+ output);
     }
     else
     {
         //MessageBox.Show("error");
         //setCompileStatus("Compile Error");
         //Form1.SetCompileStatus("Compile Error");
         string output = process.StandardError.ReadToEnd();
         string error  = CompileErrors(output);
         //Console.WriteLine("er" + error);
         int  errNum;
         bool num = Int32.TryParse(error, out errNum);
         //problemsBox.Text = output;
         //problemsBox.SelectionStart = problemsBox.Text.Length;
         //problemsBox.ScrollToCaret();
         //bottomPanel.BackColor = Color.Red;
         setBottomBackColor("#ff0000", "#f72929");
         //Form1.displayProblemsPanel();
         showProblemsPanel();
         ProblemsView.TextBox().Text           = output;
         ProblemsView.TextBox().SelectionStart = ProblemsView.TextBox().Text.Length;
         ProblemsView.TextBox().ScrollToCaret();
         //ProblemsView;
         if (num)
         {
             //lblProblems.Text = "PROBLEMS " + errNum;
         }
         else
         {
             //lblProblems.Text = "PROBLEMS -TOO MANY!";
         }
         //pnlBottom.BackColor = Color.Red;
         //showProblemsPanel();
         //Form1.displayProblemsPanel(true);
         //MessageBox.Show("a: " + a + " out: " + output);
     }
 }
Пример #3
0
 private void ProblemsView_Load(object sender, EventArgs e)
 {
     pv            = this;
     staticTextBox = richTextBox1;
 }