Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2105


Ignore:
Timestamp:
06/25/09 16:34:27 (15 years ago)
Author:
gkronber
Message:
  • added a check for InvokeRequired in AdvancedOptimizationFrontend
  • open a new view for snapshots and finished engines from the hive engine.

#545 (Engine which can be executed in the Hive)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.2/MainForm.cs

    r1529 r2105  
    100100    /// is neither a view nor an editor.</exception>
    101101    /// <param name="control">The control to display.</param>
     102    delegate void ShowControlDelegate(IControl control);
    102103    public void ShowControl(IControl control) {
    103       DockContent content;
    104       if (control is IEditor)
    105         content = new EditorForm((IEditor)control);
    106       else if (control is IView)
    107         content = new ViewForm((IView)control);
    108       else
    109         throw new InvalidOperationException("Control is neither a view nor an editor.");
    110 
    111       content.TabText = content.Text;
    112       content.Show(dockPanel);
     104      if (InvokeRequired) Invoke((Action<IControl>)ShowControl,control);
     105      else {
     106        DockContent content;
     107        if (control is IEditor)
     108          content = new EditorForm((IEditor)control);
     109        else if (control is IView)
     110          content = new ViewForm((IView)control);
     111        else
     112          throw new InvalidOperationException("Control is neither a view nor an editor.");
     113
     114        content.TabText = content.Text;
     115        content.Show(dockPanel);
     116      }
    113117    }
    114118    #endregion
  • trunk/sources/HeuristicLab.Hive.Engine/3.2/HiveEngine.cs

    r2104 r2105  
    123123
    124124        job = restoredJob;
     125        PluginManager.ControlManager.ShowControl(job.Engine.CreateView());
    125126        OnChanged();
    126127        OnFinished();
Note: See TracChangeset for help on using the changeset viewer.