Changeset 11734
- Timestamp:
- 01/07/15 10:29:08 (10 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs
r11657 r11734 111 111 if (Compile()) { 112 112 outputTextBox.Clear(); 113 Content.Execute ();113 Content.ExecuteAsync(); 114 114 Running = true; 115 115 } … … 123 123 if (Compile()) { 124 124 outputTextBox.Clear(); 125 Content.Execute ();125 Content.ExecuteAsync(); 126 126 Running = true; 127 127 } -
trunk/sources/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs
r11721 r11734 241 241 } 242 242 protected virtual void variableListView_DragEnter(object sender, DragEventArgs e) { 243 validDragOperation = !Locked && !ReadOnly && e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) != null; 243 validDragOperation = !Locked && !ReadOnly; 244 245 object item = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 246 if (item is KeyValuePair<string, object>) { 247 var variable = (KeyValuePair<string, object>)item; 248 validDragOperation &= variable.Value is IDeepCloneable; 249 } else { 250 validDragOperation &= item is IDeepCloneable; 251 } 244 252 } 245 253 protected virtual void variableListView_DragOver(object sender, DragEventArgs e) { 246 254 e.Effect = DragDropEffects.None; 247 255 if (validDragOperation) { 248 if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy; 256 if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) 257 e.Effect = DragDropEffects.Copy; 249 258 } 250 259 } … … 269 278 270 279 var cloneable = item as IDeepCloneable; 271 if (cloneable != null) item = cloneable.Clone(); 272 273 Content.Add(variableName, item); 280 if (cloneable == null) return; 281 282 var clonedItem = cloneable.Clone(); 283 Content.Add(variableName, clonedItem); 274 284 275 285 var listViewItem = variableListView.FindItemWithText(variableName); -
trunk/sources/HeuristicLab.Scripting/3.3/CSharpScript.cs
r11721 r11734 95 95 96 96 private Thread scriptThread; 97 public virtual void Execute () {97 public virtual void ExecuteAsync() { 98 98 if (compiledScript == null) return; 99 99 scriptThread = new Thread(() => {
Note: See TracChangeset
for help on using the changeset viewer.