- Timestamp:
- 01/20/14 17:33:22 (10 years ago)
- Location:
- branches/HLScript
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HLScript
- Property svn:mergeinfo changed
/trunk/sources (added) merged: 10346,10348,10355
- Property svn:mergeinfo changed
-
branches/HLScript/HeuristicLab.HLScript.Views/3.3/HLScriptView.cs
r10332 r10358 36 36 [View("HLScript View")] 37 37 [Content(typeof(HLScript), true)] 38 public partial class HLScriptView : ItemView {38 public partial class HLScriptView : NamedItemView { 39 39 private bool running; 40 40 … … 69 69 } 70 70 private void Content_ScriptExecutionStarted(object sender, EventArgs e) { 71 ReadOnly= true;71 Locked = true; 72 72 startStopButton.Image = VSImageLibrary.Stop; 73 73 } 74 74 private void Content_ScriptExecutionFinished(object sender, EventArgs e) { 75 ReadOnly= false;75 Locked = false; 76 76 startStopButton.Image = VSImageLibrary.Play; 77 77 running = false; … … 92 92 } else { 93 93 codeEditor.UserCode = Content.Code; 94 foreach (var asm in Content.GetAssemblies()) 95 codeEditor.AddAssembly(asm); 94 96 variableStoreView.Content = Content.VariableStore; 95 97 if (Content.CompileErrors == null) { … … 108 110 protected override void SetEnabledStateOfControls() { 109 111 base.SetEnabledStateOfControls(); 110 startStopButton.Enabled = Content != null ;112 startStopButton.Enabled = Content != null && !Locked; 111 113 showCodeButton.Enabled = Content != null && !string.IsNullOrEmpty(Content.CompilationUnitCode); 112 codeEditor.Enabled = Content != null && ! ReadOnly;114 codeEditor.Enabled = Content != null && !Locked && !ReadOnly; 113 115 } 114 116 … … 137 139 protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { 138 140 if (keyData == Keys.F5) { 139 if (Content == null || ReadOnly)141 if (Content == null || Locked) 140 142 return base.ProcessCmdKey(ref msg, keyData); 141 143 outputTextBox.Clear(); … … 144 146 outputTextBox.Clear(); 145 147 Content.Execute(); 148 running = true; 146 149 } 147 150 return true; … … 156 159 private bool Compile() { 157 160 ReadOnly = true; 161 Locked = true; 158 162 errorListView.Items.Clear(); 159 163 outputTextBox.Clear(); … … 170 174 OnContentChanged(); 171 175 ReadOnly = false; 176 Locked = false; 172 177 } 173 178 }
Note: See TracChangeset
for help on using the changeset viewer.