Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/14/15 18:06:01 (9 years ago)
Author:
ascheibe
Message:

#2205

  • fixed another deserialization bug
  • AlgorithmNode: made locker object protected so that inherited classes that override the Execute method can use it
  • Improved responsiveness of ProgrammableItemView
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Networks.Views/3.3/Scripting/ProgrammableItemView.cs

    r12232 r13459  
    2020#endregion
    2121
    22 using HeuristicLab.Common.Resources;
    23 using HeuristicLab.Core.Views;
    24 using HeuristicLab.MainForm;
    25 using HeuristicLab.PluginInfrastructure;
    2622using System;
    2723using System.CodeDom.Compiler;
     
    2925using System.Globalization;
    3026using System.Linq;
     27using System.Threading.Tasks;
    3128using System.Windows.Forms;
     29using HeuristicLab.Common.Resources;
     30using HeuristicLab.Core.Views;
     31using HeuristicLab.MainForm;
     32using HeuristicLab.PluginInfrastructure;
    3233
    3334namespace HeuristicLab.Scripting.Views {
     
    5556    }
    5657
    57     protected override void OnContentChanged() {
     58    protected async override void OnContentChanged() {
    5859      base.OnContentChanged();
    5960      errorsListView.Items.Clear();
     
    6364      } else {
    6465        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;
    6874      }
    6975      ShowCompilationResults();
     
    116122      try {
    117123        Content.Compile();
    118       } catch (Exception ex) {
     124      }
     125      catch (Exception ex) {
    119126        if (!(ex is InvalidOperationException) || (Content.CompileErrors == null))
    120127          ErrorHandling.ShowErrorDialog(this, ex);
Note: See TracChangeset for help on using the changeset viewer.