Changeset 10857 for trunk/sources/HeuristicLab.Scripting.Views
- Timestamp:
- 05/19/14 09:09:39 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs
r10731 r10857 21 21 22 22 using System; 23 using System.Drawing;24 23 using System.Windows.Forms; 25 24 using HeuristicLab.Common; … … 95 94 base.OnContentChanged(); 96 95 if (Content == null) { 97 codeEditor.UserCode = string.Empty;98 96 variableStoreView.Content = null; 99 97 } else { 100 codeEditor.UserCode = Content.Code;101 foreach (var asm in Content.GetAssemblies())102 codeEditor.AddAssembly(asm);103 98 variableStoreView.Content = Content.VariableStore; 104 if (Content.CompileErrors == null) {105 compilationLabel.ForeColor = SystemColors.ControlDarkDark;106 compilationLabel.Text = "Not compiled";107 } else if (Content.CompileErrors.HasErrors) {108 compilationLabel.ForeColor = Color.DarkRed;109 compilationLabel.Text = "Compilation failed";110 } else {111 compilationLabel.ForeColor = Color.DarkGreen;112 compilationLabel.Text = "Compilation successful";113 }114 99 } 115 100 } … … 117 102 protected override void SetEnabledStateOfControls() { 118 103 base.SetEnabledStateOfControls(); 119 compileButton.Enabled = Content != null && !Locked && !ReadOnly;120 104 startStopButton.Enabled = Content != null && (!Locked || Running); 121 codeEditor.Enabled = Content != null && !Locked && !ReadOnly;122 105 } 123 106
Note: See TracChangeset
for help on using the changeset viewer.