Changeset 10727 for trunk/sources
- Timestamp:
- 04/07/14 10:36:52 (11 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Scripting.Views/3.3/ScriptView.cs
r10642 r10727 76 76 ReadOnly = true; 77 77 startStopButton.Image = VSImageLibrary.Stop; 78 toolTip.SetToolTip(startStopButton, "Stop (Shift+F5)"); 78 79 infoTabControl.SelectedTab = outputTabPage; 79 80 } … … 86 87 ReadOnly = false; 87 88 startStopButton.Image = VSImageLibrary.Play; 89 toolTip.SetToolTip(startStopButton, "Run (F5)"); 88 90 running = false; 89 91 var ex = e.Value; … … 156 158 switch (keyData) { 157 159 case Keys.F5: 158 if (Content != null && !Locked ) {160 if (Content != null && !Locked && !running) { 159 161 if (Compile()) { 160 162 outputTextBox.Clear(); … … 168 170 break; 169 171 case Keys.F6: 170 Compile();172 if (!running) Compile(); 171 173 break; 172 174 } -
trunk/sources/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs
r10577 r10727 21 21 22 22 using System; 23 using System.Collections;24 23 using System.Collections.Generic; 25 24 using System.Drawing; … … 396 395 string toolTipText = string.Join(Environment.NewLine, lines); 397 396 if (!serializable) 398 toolTipText += Environment.NewLine + "CAUTION: Type is not serializable!";397 toolTipText = "Caution: Type is not serializable!" + Environment.NewLine + toolTipText; 399 398 return toolTipText; 400 399 } -
trunk/sources/HeuristicLab.Scripting/3.3/Script.cs
r10577 r10727 45 45 private const string ExecuteMethodName = "Execute"; 46 46 private const string CodeTemplate = 47 @"// use 'vars' to access variables in the script's variable store 48 // vars has a Contains(string) method to check if a variable exists and implements IEnumerable 47 @"// use 'vars' to access variables in the script's variable store (e.g. vars.x = 5) 48 // use 'vars.Contains(string)' to check if a variable exists 49 // use 'vars.Clear()' to remove all variables 50 // use 'foreach (KeyValuePair<string, object> v in vars) { ... }' to iterate over all variables 49 51 50 52 using System; -
trunk/sources/HeuristicLab.Scripting/3.3/Variables.cs
r10566 r10727 6 6 public class Variables : DynamicObject, IEnumerable<KeyValuePair<string, object>> { 7 7 private readonly VariableStore variableStore; 8 9 public ICollection<string> Keys {10 get { return variableStore.Keys; }11 }12 13 public ICollection<object> Values {14 get { return variableStore.Values; }15 }16 8 17 9 public Variables(VariableStore variableStore) { … … 32 24 } 33 25 26 public void Clear() { 27 variableStore.Clear(); 28 } 29 34 30 public IEnumerator<KeyValuePair<string, object>> GetEnumerator() { 35 31 return variableStore.GetEnumerator();
Note: See TracChangeset
for help on using the changeset viewer.