Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/23/09 11:08:34 (15 years ago)
Author:
swagner
Message:

Implemented first draft of MainForm support in HeuristicLab.Core/HeuristicLab.Core.Views and all other depending plugins (#770)

Location:
trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.3/EditorForm.cs

    r1529 r2520  
    2929using WeifenLuo.WinFormsUI.Docking;
    3030using HeuristicLab.Core;
     31using HeuristicLab.Core.Views;
    3132
    3233namespace HeuristicLab.AdvancedOptimizationFrontend {
  • trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.3/HeuristicLab.AdvancedOptimizationFrontend-3.3.csproj

    r2134 r2520  
    119119  </ItemGroup>
    120120  <ItemGroup>
     121    <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
     122      <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>
     123      <Name>HeuristicLab.Core.Views-3.3</Name>
     124    </ProjectReference>
    121125    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    122126      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    123127      <Name>HeuristicLab.Core-3.3</Name>
     128    </ProjectReference>
     129    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.2\HeuristicLab.MainForm-3.2.csproj">
     130      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
     131      <Name>HeuristicLab.MainForm-3.2</Name>
    124132    </ProjectReference>
    125133    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
  • trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.3/HeuristicLabAdvancedOptimizationFrontendPlugin.cs

    r2134 r2520  
    3333  [PluginFile(Filename = "HeuristicLab.AdvancedOptimizationFrontend-3.3.dll", Filetype = PluginFileType.Assembly)]
    3434  [Dependency(Dependency = "HeuristicLab.Core-3.3")]
     35  [Dependency(Dependency = "HeuristicLab.Core.Views-3.3")]
     36  [Dependency(Dependency = "HeuristicLab.MainForm-3.2")]
    3537  public class HeuristicLabAdvancedOptimizationFrontendPlugin : PluginBase {
    3638  }
  • trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.3/MainForm.cs

    r1921 r2520  
    3232using HeuristicLab.Core;
    3333using System.IO;
     34using HeuristicLab.Core.Views;
     35using HeuristicLab.MainForm;
    3436
    3537namespace HeuristicLab.AdvancedOptimizationFrontend {
     
    104106      if (control is IEditor)
    105107        content = new EditorForm((IEditor)control);
    106       else if (control is IView)
    107         content = new ViewForm((IView)control);
     108      else if (control is HeuristicLab.Core.Views.IView)
     109        content = new ViewForm((HeuristicLab.Core.Views.IView)control);
    108110      else
    109111        throw new InvalidOperationException("Control is neither a view nor an editor.");
     
    178180          IEditable editable = task.storable as IEditable;
    179181          if (editable != null)
    180             editor = editable.CreateEditor();
     182            editor = (IEditor)MainFormManager.CreateDefaultView(editable);
    181183        }
    182184        if (editor == null)
     
    243245        MessageBox.Show("The selected item is not editable.", "Editable Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    244246      } else {
    245         IEditor editor = editable.CreateEditor();
     247        IEditor editor = (IEditor)MainFormManager.CreateDefaultView(editable);
    246248        if (editor == null) {
    247249          MessageBox.Show("The selected item doesn't provide an editor.", "Editor Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
  • trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.3/ViewForm.cs

    r1529 r2520  
    2929using WeifenLuo.WinFormsUI.Docking;
    3030using HeuristicLab.Core;
     31using HeuristicLab.Core.Views;
    3132
    3233namespace HeuristicLab.AdvancedOptimizationFrontend {
Note: See TracChangeset for help on using the changeset viewer.