Changeset 13459
- Timestamp:
- 12/14/15 18:06:01 (9 years ago)
- Location:
- branches/OptimizationNetworks
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Networks.Views/3.3/Scripting/ProgrammableItemView.cs
r12232 r13459 20 20 #endregion 21 21 22 using HeuristicLab.Common.Resources;23 using HeuristicLab.Core.Views;24 using HeuristicLab.MainForm;25 using HeuristicLab.PluginInfrastructure;26 22 using System; 27 23 using System.CodeDom.Compiler; … … 29 25 using System.Globalization; 30 26 using System.Linq; 27 using System.Threading.Tasks; 31 28 using System.Windows.Forms; 29 using HeuristicLab.Common.Resources; 30 using HeuristicLab.Core.Views; 31 using HeuristicLab.MainForm; 32 using HeuristicLab.PluginInfrastructure; 32 33 33 34 namespace HeuristicLab.Scripting.Views { … … 55 56 } 56 57 57 protected override void OnContentChanged() {58 protected async override void OnContentChanged() { 58 59 base.OnContentChanged(); 59 60 errorsListView.Items.Clear(); … … 63 64 } else { 64 65 codeEditor.UserCode = Content.Code; 65 foreach (var asm in Content.GetAssemblies()) 66 codeEditor.AddAssembly(asm); 67 variableStoreView.Content = Content.VariableStore; 66 Locked = true; 67 Task t = Task.Factory.StartNew(() => { 68 foreach (var asm in Content.GetAssemblies()) 69 codeEditor.AddAssembly(asm); 70 variableStoreView.Content = Content.VariableStore; 71 }); 72 await t; 73 Locked = false; 68 74 } 69 75 ShowCompilationResults(); … … 116 122 try { 117 123 Content.Compile(); 118 } catch (Exception ex) { 124 } 125 catch (Exception ex) { 119 126 if (!(ex is InvalidOperationException) || (Content.CompileErrors == null)) 120 127 ErrorHandling.ShowErrorDialog(this, ex); -
branches/OptimizationNetworks/HeuristicLab.Networks/3.3/AlgorithmNode.cs
r11713 r13459 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Threading; 22 26 using HeuristicLab.Common; 23 27 using HeuristicLab.Core; … … 26 30 using HeuristicLab.Optimization; 27 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using System;29 using System.Collections.Generic;30 using System.Linq;31 using System.Threading;32 32 33 33 namespace HeuristicLab.Networks { … … 35 35 [StorableClass] 36 36 public class AlgorithmNode : Node, IAlgorithmNode { 37 pr ivateobject locker = new object();37 protected object locker = new object(); 38 38 39 39 new public PortCollection Ports { -
branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Core/Network.cs
r11577 r13459 20 20 #endregion 21 21 22 using HeuristicLab.Common;23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;24 22 using System.Collections.Generic; 25 23 using System.Drawing; 26 24 using System.Linq; 25 using HeuristicLab.Common; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 27 28 28 namespace HeuristicLab.Core.Networks { … … 84 84 [StorableHook(HookType.AfterDeserialization)] 85 85 private void AfterDeserialization() { 86 foreach (var n in Nodes )86 foreach (var n in Nodes.ToList()) 87 87 n.Parent = this; 88 88 RegisterNodesEvents();
Note: See TracChangeset
for help on using the changeset viewer.