- Timestamp:
- 12/14/15 18:06:01 (9 years ago)
- File:
-
- 1 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);
Note: See TracChangeset
for help on using the changeset viewer.