Пример #1
0
 public bool compile(ConsoleBox log)
 {
     try
     {
         Process p = SystemCommand.init(SystemCommand.fpc(), this.getFilename(false));
         p.Start();
         p.WaitForExit();
         string output = p.StandardOutput.ReadToEnd();
         string error  = p.StandardError.ReadToEnd();
         if (p.ExitCode == 0)
         {
             return(true);
         }
         else
         {
             log.textField.Text = StringGenerator.beautify(error + output, this.getFilename(false));
             return(false);
         }
     }
     catch (Exception)
     {
         MessageBox.Show(MainForm.activeForm, "FPC could not be found on your computer! Please visit our homepage for the resolution", "Compile error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return(false);
     }
 }
Пример #2
0
 private void loadConsoleBox()
 {
     inputBox = new ConsoleBox("Input here", skinManager.ColorScheme.PrimaryColor, skinManager.ColorScheme.LightPrimaryColor, skinManager.ColorScheme.TextColor);
     //inputBox.Margin = new Padding(6);
     outputBox = new ConsoleBox("Output here", skinManager.ColorScheme.PrimaryColor, skinManager.ColorScheme.LightPrimaryColor, skinManager.ColorScheme.TextColor);
     //outputBox.Margin = new Padding(6, 0, 6, 6);
     rightTableLayoutPanel.Controls.Add(inputBox);
     rightTableLayoutPanel.Controls.Add(outputBox);
 }