Ignore:
Timestamp:
01/23/15 12:27:42 (6 years ago)
Author:
jkarder
Message:

#2077:

  • added temporary fix to avoid crash trough code completion
  • fixed updating of compilation succeeded/failed messages
  • added Keys and Values properties to the Variables class (again)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Scripting.Views/3.3/ScriptView.cs

    r11807 r11819  
    3838  [Content(typeof(Script), true)]
    3939  public partial class ScriptView : NamedItemView {
     40    private const string NotCompiledMessage = "Not compiled";
     41    private const string CompilationSucceededMessage = "Compilation succeeded";
     42    private const string CompilationFailedMessage = "Compilation failed";
    4043    private const string AssembliesLoadingMessage = "Loading Assemblies";
    4144    private const string AssembliesUnloadingMessage = "Unloading Assemblies";
     
    8487        if (Content.CompileErrors == null) {
    8588          compilationLabel.ForeColor = SystemColors.ControlDarkDark;
    86           compilationLabel.Text = "Not compiled";
    87         } else if (Content.CompileErrors.HasErrors) {
    88           compilationLabel.ForeColor = Color.DarkRed;
    89           compilationLabel.Text = "Compilation failed";
    90         } else {
    91           compilationLabel.ForeColor = Color.DarkGreen;
    92           compilationLabel.Text = "Compilation successful";
     89          compilationLabel.Text = NotCompiledMessage;
    9390        }
    9491      }
     
    119116      try {
    120117        Content.Compile();
    121         outputTextBox.AppendText("Compilation succeeded.");
     118        outputTextBox.AppendText(CompilationSucceededMessage);
     119        compilationLabel.ForeColor = Color.DarkGreen;
     120        compilationLabel.Text = CompilationSucceededMessage;
    122121        return true;
    123122      } catch (InvalidOperationException) {
    124123        if (Content.CompileErrors.HasErrors) {
    125           outputTextBox.AppendText("Compilation failed.");
     124          outputTextBox.AppendText(CompilationFailedMessage);
     125          compilationLabel.ForeColor = Color.DarkRed;
     126          compilationLabel.Text = CompilationFailedMessage;
    126127          return false;
    127128        } else {
    128           outputTextBox.AppendText("Compilation succeeded.");
     129          outputTextBox.AppendText(CompilationSucceededMessage);
     130          compilationLabel.ForeColor = Color.DarkGreen;
     131          compilationLabel.Text = CompilationSucceededMessage;
    129132          return true;
    130133        }
Note: See TracChangeset for help on using the changeset viewer.