Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2546


Ignore:
Timestamp:
12/07/09 02:44:23 (13 years ago)
Author:
swagner
Message:

Continued work on Optimizer and on adapting all views to the new MainForm concept (#770)

Location:
trunk/sources
Files:
10 added
7 deleted
59 edited
19 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab 3.3.sln

    r2524 r2546  
    3838    {EE2034D9-6E27-48A1-B855-42D45F69A4FC} = {EE2034D9-6E27-48A1-B855-42D45F69A4FC}
    3939    {A9E282EA-180F-4233-B809-AEDF0787545C} = {A9E282EA-180F-4233-B809-AEDF0787545C}
    40     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609} = {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}
    4140    {23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE} = {23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}
    4241    {BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937} = {BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}
     
    5958EndProject
    6059Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Operators-3.3", "HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj", "{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}"
    61 EndProject
    62 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.AdvancedOptimizationFrontend-3.3", "HeuristicLab.AdvancedOptimizationFrontend\3.3\HeuristicLab.AdvancedOptimizationFrontend-3.3.csproj", "{D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}"
    6360EndProject
    6461Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SequentialEngine-3.3", "HeuristicLab.SequentialEngine\3.3\HeuristicLab.SequentialEngine-3.3.csproj", "{DC3D7072-7999-4719-B65D-3997744D5DC1}"
     
    222219    {23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}.Release|x86.ActiveCfg = Release|x86
    223220    {23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}.Release|x86.Build.0 = Release|x86
    224     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    225     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|Any CPU.Build.0 = Debug|Any CPU
    226     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|x64.ActiveCfg = Debug|x64
    227     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|x64.Build.0 = Debug|x64
    228     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|x86.ActiveCfg = Debug|x86
    229     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Debug|x86.Build.0 = Debug|x86
    230     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|Any CPU.ActiveCfg = Release|Any CPU
    231     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|Any CPU.Build.0 = Release|Any CPU
    232     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|x64.ActiveCfg = Release|x64
    233     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|x64.Build.0 = Release|x64
    234     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|x86.ActiveCfg = Release|x86
    235     {D4E8C5EC-DB4A-4FF5-AE45-770A88B6D609}.Release|x86.Build.0 = Release|x86
    236221    {DC3D7072-7999-4719-B65D-3997744D5DC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    237222    {DC3D7072-7999-4719-B65D-3997744D5DC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
  • trunk/sources/HeuristicLab 3.3/CopyAssemblies.cmd

    r2524 r2546  
    77mkdir plugins\backup
    88
    9 copy "%SolutionDir%\HeuristicLab.AdvancedOptimizationFrontend\3.3\%Outdir%\HeuristicLab.AdvancedOptimizationFrontend-3.3.dll" .\plugins
    109copy "%SolutionDir%\HeuristicLab.Charting\3.3\%Outdir%\HeuristicLab.Charting-3.3.dll" .\plugins
    1110copy "%SolutionDir%\HeuristicLab.Charting.Data\3.3\%Outdir%\HeuristicLab.Charting.Data-3.3.dll" .\plugins
  • trunk/sources/HeuristicLab.Common.Resources/3.2/HeuristicLab.Common.Resources-3.2.csproj

    r2450 r2546  
    101101  <ItemGroup>
    102102    <EmbeddedResource Include="Resources.resx">
    103       <Generator>ResXFileCodeGenerator</Generator>
     103      <Generator>PublicResXFileCodeGenerator</Generator>
    104104      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    105105      <SubType>Designer</SubType>
     
    171171  <ItemGroup>
    172172    <None Include="Resources\RefreshDocument.png" />
     173  </ItemGroup>
     174  <ItemGroup>
     175    <None Include="Resources\ShowDetails.png" />
     176  </ItemGroup>
     177  <ItemGroup>
     178    <None Include="Resources\ShowLargeIcons.png" />
     179  </ItemGroup>
     180  <ItemGroup>
     181    <None Include="Resources\ShowSmallIcons.png" />
     182  </ItemGroup>
     183  <ItemGroup>
     184    <None Include="Resources\HeuristicLab.png" />
    173185  </ItemGroup>
    174186  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • trunk/sources/HeuristicLab.Common.Resources/3.2/Resources.Designer.cs

    r2450 r2546  
    3030       
    3131        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
    32         public Resources() {
     32        internal Resources() {
    3333        }
    3434       
     
    124124        }
    125125       
     126        public static System.Drawing.Bitmap HeuristicLab {
     127            get {
     128                object obj = ResourceManager.GetObject("HeuristicLab", resourceCulture);
     129                return ((System.Drawing.Bitmap)(obj));
     130            }
     131        }
     132       
    126133        public static System.Drawing.Icon HeuristicLabIcon {
    127134            get {
     
    201208        }
    202209       
     210        public static System.Drawing.Bitmap ShowDetails {
     211            get {
     212                object obj = ResourceManager.GetObject("ShowDetails", resourceCulture);
     213                return ((System.Drawing.Bitmap)(obj));
     214            }
     215        }
     216       
     217        public static System.Drawing.Bitmap ShowLargeIcons {
     218            get {
     219                object obj = ResourceManager.GetObject("ShowLargeIcons", resourceCulture);
     220                return ((System.Drawing.Bitmap)(obj));
     221            }
     222        }
     223       
     224        public static System.Drawing.Bitmap ShowSmallIcons {
     225            get {
     226                object obj = ResourceManager.GetObject("ShowSmallIcons", resourceCulture);
     227                return ((System.Drawing.Bitmap)(obj));
     228            }
     229        }
     230       
    203231        public static System.Drawing.Bitmap UndoIcon {
    204232            get {
  • trunk/sources/HeuristicLab.Common.Resources/3.2/Resources.resx

    r2450 r2546  
    146146    <value>Resources\FunctionIcon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    147147  </data>
     148  <data name="HeuristicLab" type="System.Resources.ResXFileRef, System.Windows.Forms">
     149    <value>Resources\HeuristicLab.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
     150  </data>
    148151  <data name="HeuristicLabIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
    149152    <value>Resources\HeuristicLab.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
     
    179182    <value>Resources\SaveIcon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
    180183  </data>
     184  <data name="ShowDetails" type="System.Resources.ResXFileRef, System.Windows.Forms">
     185    <value>Resources\ShowDetails.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
     186  </data>
     187  <data name="ShowLargeIcons" type="System.Resources.ResXFileRef, System.Windows.Forms">
     188    <value>Resources\ShowLargeIcons.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
     189  </data>
     190  <data name="ShowSmallIcons" type="System.Resources.ResXFileRef, System.Windows.Forms">
     191    <value>Resources\ShowSmallIcons.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
     192  </data>
    181193  <data name="UndoIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
    182194    <value>Resources\UndoIcon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  • trunk/sources/HeuristicLab.Core.Views/3.3/EngineBaseView.Designer.cs

    r2545 r2546  
    2121
    2222namespace HeuristicLab.Core.Views {
    23   partial class EngineBaseEditor {
     23  partial class EngineBaseView {
    2424    /// <summary>
    2525    /// Required designer variable.
  • trunk/sources/HeuristicLab.Core.Views/3.3/EngineBaseView.cs

    r2545 r2546  
    3636  /// </summary>
    3737  [Content(typeof(EngineBase), true)]
    38   public partial class EngineBaseEditor : EditorBase {
     38  public partial class EngineBaseView : ItemViewBase {
    3939    private int executionTimeCounter;
    4040
     
    5151    /// Initializes a new instance of <see cref="EngineBaseEditor"/>.
    5252    /// </summary>
    53     public EngineBaseEditor() {
     53    public EngineBaseView() {
    5454      InitializeComponent();
    5555    }
  • trunk/sources/HeuristicLab.Core.Views/3.3/HeuristicLab.Core.Views-3.3.csproj

    r2524 r2546  
    7070      <DependentUpon>ChooseTypeDialog.cs</DependentUpon>
    7171    </Compile>
    72     <Compile Include="EditorBase.cs">
    73       <SubType>UserControl</SubType>
    74     </Compile>
    75     <Compile Include="EditorBase.Designer.cs">
    76       <DependentUpon>EditorBase.cs</DependentUpon>
    77     </Compile>
    78     <Compile Include="EngineBaseEditor.cs">
    79       <SubType>UserControl</SubType>
    80     </Compile>
    81     <Compile Include="EngineBaseEditor.Designer.cs">
    82       <DependentUpon>EngineBaseEditor.cs</DependentUpon>
     72    <Compile Include="EngineBaseView.cs">
     73      <SubType>UserControl</SubType>
     74    </Compile>
     75    <Compile Include="EngineBaseView.Designer.cs">
     76      <DependentUpon>EngineBaseView.cs</DependentUpon>
    8377    </Compile>
    8478    <Compile Include="HeuristicLabCoreViewsPlugin.cs" />
    85     <Compile Include="IEditor.cs" />
     79    <Compile Include="IItemView.cs" />
    8680    <Compile Include="ItemBaseView.cs">
    8781      <SubType>UserControl</SubType>
     
    9084      <DependentUpon>ItemBaseView.cs</DependentUpon>
    9185    </Compile>
    92     <Compile Include="IView.cs" />
     86    <Compile Include="ItemViewBase.cs">
     87      <SubType>UserControl</SubType>
     88    </Compile>
     89    <Compile Include="ItemViewBase.Designer.cs">
     90      <DependentUpon>ItemViewBase.cs</DependentUpon>
     91    </Compile>
    9392    <Compile Include="OperatorBaseDescriptionView.cs">
    9493      <SubType>UserControl</SubType>
     
    121120      <DependentUpon>OperatorGraphView.cs</DependentUpon>
    122121    </Compile>
    123     <Compile Include="OperatorLibraryEditor.cs">
    124       <SubType>UserControl</SubType>
    125     </Compile>
    126     <Compile Include="OperatorLibraryEditor.Designer.cs">
    127       <DependentUpon>OperatorLibraryEditor.cs</DependentUpon>
     122    <Compile Include="OperatorLibraryView.cs">
     123      <SubType>UserControl</SubType>
     124    </Compile>
     125    <Compile Include="OperatorLibraryView.Designer.cs">
     126      <DependentUpon>OperatorLibraryView.cs</DependentUpon>
    128127    </Compile>
    129128    <Compile Include="Properties\AssemblyInfo.cs" />
     
    151150    <Compile Include="VariableView.Designer.cs">
    152151      <DependentUpon>VariableView.cs</DependentUpon>
    153     </Compile>
    154     <Compile Include="ViewBase.cs">
    155       <SubType>UserControl</SubType>
    156     </Compile>
    157     <Compile Include="ViewBase.Designer.cs">
    158       <DependentUpon>ViewBase.cs</DependentUpon>
    159152    </Compile>
    160153  </ItemGroup>
     
    205198      <DependentUpon>ChooseTypeDialog.cs</DependentUpon>
    206199    </EmbeddedResource>
    207     <EmbeddedResource Include="EditorBase.resx">
    208       <DependentUpon>EditorBase.cs</DependentUpon>
    209     </EmbeddedResource>
    210     <EmbeddedResource Include="EngineBaseEditor.resx">
    211       <DependentUpon>EngineBaseEditor.cs</DependentUpon>
     200    <EmbeddedResource Include="EngineBaseView.resx">
     201      <DependentUpon>EngineBaseView.cs</DependentUpon>
    212202    </EmbeddedResource>
    213203    <EmbeddedResource Include="ItemBaseView.resx">
     
    229219      <DependentUpon>OperatorGraphView.cs</DependentUpon>
    230220    </EmbeddedResource>
    231     <EmbeddedResource Include="OperatorLibraryEditor.resx">
    232       <DependentUpon>OperatorLibraryEditor.cs</DependentUpon>
     221    <EmbeddedResource Include="OperatorLibraryView.resx">
     222      <DependentUpon>OperatorLibraryView.cs</DependentUpon>
    233223    </EmbeddedResource>
    234224    <EmbeddedResource Include="ScopeView.resx">
  • trunk/sources/HeuristicLab.Core.Views/3.3/IItemView.cs

    r2537 r2546  
    2424using System.Text;
    2525using HeuristicLab.PluginInfrastructure;
     26using HeuristicLab.MainForm;
    2627
    2728namespace HeuristicLab.Core.Views {
     
    2930  /// An interface for all kinds visual representations of items (objects, operators...).
    3031  /// </summary>
    31   public interface IView : IControl, HeuristicLab.MainForm.IView{
     32  public interface IItemView : IView {
    3233    /// <summary>
    3334    /// Gets the current item instance.
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemBaseView.cs

    r2520 r2546  
    3434  /// </summary>
    3535  [Content(typeof(ItemBase), true)]
    36   public partial class ItemBaseView : ViewBase {
     36  public partial class ItemBaseView : ItemViewBase {
    3737    /// <summary>
    3838    /// Initializes a new instance of <see cref="ItemBaseView"/>.
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemViewBase.Designer.cs

    r2537 r2546  
    2323
    2424namespace HeuristicLab.Core.Views {
    25   partial class ViewBase {
     25  partial class ItemViewBase {
    2626    /// <summary>
    2727    /// Required designer variable.
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemViewBase.cs

    r2537 r2546  
    2828using System.Xml;
    2929using System.Windows.Forms;
     30using HeuristicLab.MainForm.WindowsForms;
    3031
    3132namespace HeuristicLab.Core.Views {
     
    3334  /// Base class for all visual representations.
    3435  /// </summary>
    35   public partial class ViewBase : HeuristicLab.MainForm.WindowsForms.ViewBase, IView {
     36  public partial class ItemViewBase : ViewBase, IItemView {
    3637    private IItem myItem;
    3738    /// <summary>
     
    7374    /// Initializes a new instance of <see cref="ViewBase"/> with the caption "View".
    7475    /// </summary>
    75     public ViewBase() {
     76    public ItemViewBase() {
    7677      InitializeComponent();
    7778      Caption = "View";
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorBaseDescriptionView.cs

    r2520 r2546  
    3232  /// The visual representation of the description of operators.
    3333  /// </summary>
    34   public partial class OperatorBaseDescriptionView : ViewBase {
     34  public partial class OperatorBaseDescriptionView : ItemViewBase {
    3535    /// <summary>
    3636    /// Gets or sets the operator whose description should be displayed.
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorBaseVariableInfosView.cs

    r2520 r2546  
    3434  /// The visual representation of the information of the variables of an operator.
    3535  /// </summary>
    36   public partial class OperatorBaseVariableInfosView : ViewBase {
     36  public partial class OperatorBaseVariableInfosView : ItemViewBase {
    3737    /// <summary>
    3838    /// Gets or sets the operator whose variable infos should be represented visually.
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorBaseVariablesView.cs

    r2520 r2546  
    3434  /// The visual representation of the variables of an operator.
    3535  /// </summary>
    36   public partial class OperatorBaseVariablesView : ViewBase {
     36  public partial class OperatorBaseVariablesView : ItemViewBase {
    3737    private ChooseItemDialog chooseItemDialog;
    3838
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorBaseView.cs

    r2524 r2546  
    3535  /// </summary>
    3636  [Content(typeof(OperatorBase), true)]
    37   public partial class OperatorBaseView : ViewBase {
     37  public partial class OperatorBaseView : ItemViewBase {
    3838    /// <summary>
    3939    /// Gets or sets the operator to represent visually.
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.cs

    r2526 r2546  
    3636  /// </summary>
    3737  [Content(typeof(OperatorGraph), true)]
    38   public partial class OperatorGraphView : ViewBase {
     38  public partial class OperatorGraphView : ItemViewBase {
    3939    private ChooseOperatorDialog chooseOperatorDialog;
    4040    private Dictionary<IOperator, IList<TreeNode>> operatorNodeTable;
     
    184184      if (operatorsListView.SelectedItems.Count == 1) {
    185185        IOperator op = (IOperator)operatorsListView.SelectedItems[0].Tag;
    186         IView view = (IView)MainFormManager.CreateDefaultView(op);
    187         if (view != null)
    188           PluginManager.ControlManager.ShowControl(view);
     186        IView view = MainFormManager.CreateDefaultView(op);
     187        if (view != null) MainFormManager.MainForm.ShowView(view);
    189188      }
    190189    }
     
    376375      if (operatorsListView.SelectedItems.Count == 1) {
    377376        IOperator op = (IOperator)operatorsListView.SelectedItems[0].Tag;
    378         IView view = (IView)MainFormManager.CreateDefaultView(op);
     377        IView view = MainFormManager.CreateDefaultView(op);
    379378        if (view != null) {
    380379          viewToolStripMenuItem.Enabled = true;
     
    388387    }
    389388    private void viewToolStripMenuItem_Click(object sender, EventArgs e) {
    390       IView view = (IView)((ToolStripMenuItem)sender).Tag;
    391       PluginManager.ControlManager.ShowControl(view);
     389      IView view = ((ToolStripMenuItem)sender).Tag as IView;
     390      if (view != null) MainFormManager.MainForm.ShowView(view);
    392391    }
    393392    private void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) {
     
    408407      if (graphTreeView.SelectedNode != null) {
    409408        IOperator op = (IOperator)graphTreeView.SelectedNode.Tag;
    410         IView view = (IView)MainFormManager.CreateDefaultView(op);
     409        IView view = MainFormManager.CreateDefaultView(op);
    411410        if (view != null) {
    412411          viewToolStripMenuItem1.Enabled = true;
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorLibraryView.Designer.cs

    r2545 r2546  
    2121
    2222namespace HeuristicLab.Core.Views {
    23   partial class OperatorLibraryEditor {
     23  partial class OperatorLibraryView {
    2424    /// <summary>
    2525    /// Required designer variable.
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorLibraryView.cs

    r2545 r2546  
    3636  /// </summary>
    3737  [Content(typeof(OperatorLibrary), true)]
    38   public partial class OperatorLibraryEditor : EditorBase {
     38  public partial class OperatorLibraryView : ItemViewBase {
    3939    private ChooseOperatorDialog chooseOperatorDialog;
    4040
     
    5252    /// <c>Operator Library</c>.
    5353    /// </summary>
    54     public OperatorLibraryEditor() {
     54    public OperatorLibraryView() {
    5555      InitializeComponent();
    5656      operatorsTreeView.TreeViewNodeSorter = new NodeSorter();
     
    6262    /// </summary>
    6363    /// <param name="operatorLibrary">The operator library to display.</param>
    64     public OperatorLibraryEditor(IOperatorLibrary operatorLibrary)
     64    public OperatorLibraryView(IOperatorLibrary operatorLibrary)
    6565      : this() {
    6666      OperatorLibrary = operatorLibrary;
     
    204204        IOperator op = operatorsTreeView.SelectedNode.Tag as IOperator;
    205205        if (op != null) {
    206           IView view = (IView)MainFormManager.CreateDefaultView(op);
    207           if (view != null)
    208             PluginManager.ControlManager.ShowControl(view);
     206          IView view = MainFormManager.CreateDefaultView(op);
     207          if (view != null) MainFormManager.MainForm.ShowView(view);
    209208        }
    210209      }
     
    279278        IOperator op = operatorsTreeView.SelectedNode.Tag as IOperator;
    280279        if (op != null) {
    281           IView view = (IView)MainFormManager.CreateDefaultView(op);
     280          IItemView view = (IItemView)MainFormManager.CreateDefaultView(op);
    282281          if (view != null) {
    283282            viewToolStripMenuItem.Enabled = true;
     
    288287    }
    289288    private void viewToolStripMenuItem_Click(object sender, EventArgs e) {
    290       IView view = (IView)viewToolStripMenuItem.Tag;
    291       PluginManager.ControlManager.ShowControl(view);
     289      IView view = viewToolStripMenuItem.Tag as IView;
     290      if (view != null) MainFormManager.MainForm.ShowView(view);
    292291    }
    293292    #endregion
  • trunk/sources/HeuristicLab.Core.Views/3.3/ScopeView.cs

    r2520 r2546  
    3636  /// </summary>
    3737  [Content(typeof(Scope), true)]
    38   public partial class ScopeView : ViewBase {
     38  public partial class ScopeView : ItemViewBase {
    3939    private Dictionary<IScope, TreeNode> scopeNodeTable;
    4040    private Dictionary<IScope, bool> scopeExpandedTable;
     
    133133      if(scopesTreeView.SelectedNode != null && scopesTreeView.SelectedNode.Tag != null) {
    134134        IScope scope = (IScope)scopesTreeView.SelectedNode.Tag;
    135         PluginManager.ControlManager.ShowControl(new VariablesScopeView(scope));
     135        MainFormManager.MainForm.ShowView(new VariablesScopeView(scope));
    136136      }
    137137    }
     
    201201    private void variablesToolStripMenuItem_Click(object sender, EventArgs e) {
    202202      IScope scope = (IScope)scopesTreeView.SelectedNode.Tag;
    203       PluginManager.ControlManager.ShowControl(new VariablesScopeView(scope));
     203      MainFormManager.MainForm.ShowView(new VariablesScopeView(scope));
    204204    }
    205205    private void showViewToolStripMenuItem_Click(object sender, EventArgs e) {
    206206      IItem item = (IItem)((ToolStripMenuItem)sender).Tag;
    207       PluginManager.ControlManager.ShowControl((IControl)MainFormManager.CreateDefaultView(item));
     207      IView view = MainFormManager.CreateDefaultView(item);
     208      if (view != null) MainFormManager.MainForm.ShowView(view);
    208209    }
    209210    #endregion
  • trunk/sources/HeuristicLab.Core.Views/3.3/VariableInfoView.cs

    r2520 r2546  
    3434  /// </summary>
    3535  [Content(typeof(VariableInfo), true)]
    36   public partial class VariableInfoView : ViewBase {
     36  public partial class VariableInfoView : ItemViewBase {
    3737    /// <summary>
    3838    /// Gets or sets the variable information to represent visually.
  • trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.cs

    r2520 r2546  
    3434  /// </summary>
    3535  [Content(typeof(Variable), true)]
    36   public partial class VariableView : ViewBase {
     36  public partial class VariableView : ItemViewBase {
    3737    private ChooseItemDialog chooseItemDialog;
    3838
  • trunk/sources/HeuristicLab.Core.Views/3.3/VariablesScopeView.cs

    r2520 r2546  
    3535  /// </summary>
    3636  [Content(typeof(Scope))]
    37   public partial class VariablesScopeView : ViewBase {
     37  public partial class VariablesScopeView : ItemViewBase {
    3838    private ChooseItemDialog chooseItemDialog;
    3939
  • trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj

    r2526 r2546  
    9595    </Reference>
    9696    <Reference Include="System.Data" />
     97    <Reference Include="System.Drawing" />
    9798    <Reference Include="System.Xml" />
    9899  </ItemGroup>
    99100  <ItemGroup>
    100101    <Compile Include="AtomicOperation.cs" />
     102    <Compile Include="Attributes\ItemAttribute.cs" />
    101103    <Compile Include="CompositeOperation.cs" />
    102104    <Compile Include="Cloner.cs" />
     105    <Compile Include="Attributes\CreatableAttribute.cs" />
    103106    <Compile Include="Interfaces\ICloner.cs" />
    104     <Compile Include="Interfaces\IEditable.cs" />
    105107    <Compile Include="Interfaces\IOperation.cs" />
    106108    <Compile Include="Interfaces\IOperatorLibrary.cs" />
     
    136138  </ItemGroup>
    137139  <ItemGroup>
     140    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.2\HeuristicLab.Common.Resources-3.2.csproj">
     141      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
     142      <Name>HeuristicLab.Common.Resources-3.2</Name>
     143    </ProjectReference>
    138144    <ProjectReference Include="..\..\HeuristicLab.Common\3.2\HeuristicLab.Common-3.2.csproj">
    139145      <Project>{1FC004FC-59AF-4249-B1B6-FF25873A20E4}</Project>
  • trunk/sources/HeuristicLab.Core/3.3/HeuristicLabCorePlugin.cs

    r2520 r2546  
    3232  [PluginFile(Filename = "HeuristicLab.Core-3.3.dll", Filetype = PluginFileType.Assembly)]
    3333  [Dependency(Dependency = "HeuristicLab.Common-3.2")]
     34  [Dependency(Dependency = "HeuristicLab.Common.Resources-3.2")]
    3435  [Dependency(Dependency = "HeuristicLab.Persistence-3.3")]
    3536  public class HeuristicLabCorePlugin : PluginBase {
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IItem.cs

    r2526 r2546  
    2323using System.Collections.Generic;
    2424using System.Text;
     25using System.Drawing;
    2526
    2627namespace HeuristicLab.Core {
     
    2930  /// </summary>
    3031  public interface IItem : ICloneable {
     32    string Name { get; }
     33    string Description { get; }
     34    Image Image { get; }
     35
    3136    /// <summary>
    3237    /// Creates a deep clone of this item.
  • trunk/sources/HeuristicLab.Core/3.3/ItemBase.cs

    r2526 r2546  
    2424using System.Text;
    2525using System.Xml;
     26using System.Drawing;
     27using System.Resources;
    2628using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HeuristicLab.Common.Resources;
    2730
    2831namespace HeuristicLab.Core {
     
    3033  /// Represents the base class for all basic item types.
    3134  /// </summary>
     35  [Item("ItemBase", "Base class for all HeuristicLab items.")]
    3236  [EmptyStorableClass]
    3337  public abstract class ItemBase : IItem {
     38    public virtual string Name {
     39      get {
     40        if (ItemAttribute.GetName(this.GetType()) != null)
     41          return ItemAttribute.GetName(this.GetType());
     42        else
     43          return this.GetType().Name;
     44      }
     45    }
     46    public virtual string Description {
     47      get {
     48        if (ItemAttribute.GetDescription(this.GetType()) != null)
     49          return ItemAttribute.GetDescription(this.GetType());
     50        else
     51          return "No description available.";
     52      }
     53    }
     54    public virtual Image Image {
     55      get { return Resources.HeuristicLab; }
     56    }
     57
    3458    /// <summary>
    3559    /// Creates a deep clone of this instance.
  • trunk/sources/HeuristicLab.Core/3.3/OperatorLibrary.cs

    r2526 r2546  
    3030  /// Represents a library of operators consisting of one <see cref="IOperatorGroup"/>.
    3131  /// </summary>
     32  [Creatable("Libraries")]
     33  [Item("Operator Library", "A library that contains multiple operators.")]
    3234  public class OperatorLibrary : ItemBase, IOperatorLibrary {
    3335
  • trunk/sources/HeuristicLab.Core/3.3/PersistenceManager.cs

    r2526 r2546  
    3636  public static class PersistenceManager {
    3737    /// <summary>
    38     /// Saves the specified <paramref name="instance"/> in the specified file through creating an
     38    /// Saves the specified <paramref name="instance"/> in th specified file through creating an
    3939    /// <see cref="XmlDocument"/>.
    4040    /// </summary>
     
    7878      return (IItem)XmlParser.Deserialize(stream);
    7979    }
    80 
    81     /// <summary>
    82     /// Builds a meaningful string for the given <paramref name="type"/> with the namespace information,
    83     /// all its arguments, the assembly name...
    84     /// </summary>
    85     /// <param name="type">The type for which a string should be created.</param>
    86     /// <returns>A string value of this type containing different additional information.</returns>
    87     public static string BuildTypeString(Type type) {
    88       string assembly = type.Assembly.FullName;
    89       assembly = assembly.Substring(0, assembly.IndexOf(", "));
    90 
    91       StringBuilder builder = new StringBuilder();
    92       builder.Append(type.Namespace);
    93       builder.Append(".");
    94       builder.Append(type.Name);
    95       Type[] args = type.GetGenericArguments();
    96       if (args.Length > 0) {
    97         builder.Append("[[");
    98         builder.Append(BuildTypeString(args[0]));
    99         builder.Append("]");
    100         for (int i = 1; i < args.Length; i++) {
    101           builder.Append(",[");
    102           builder.Append(BuildTypeString(args[i]));
    103           builder.Append("]");
    104         }
    105         builder.Append("]");
    106       }
    107       builder.Append(", ");
    108       builder.Append(assembly);
    109       return builder.ToString();
    110     }
    11180  }
    11281}
  • trunk/sources/HeuristicLab.Data/3.3/ArrayDataBaseView.cs

    r2520 r2546  
    3434  /// The visual representation of the class <see cref="ArrayDataBase"/>.
    3535  /// </summary>
    36   public partial class ArrayDataBaseView : ViewBase {
     36  public partial class ArrayDataBaseView : ItemViewBase {
    3737    /// <summary>
    3838    /// Gets or sets the instance of the array to represent.
  • trunk/sources/HeuristicLab.Data/3.3/BoolDataView.cs

    r2520 r2546  
    3636  /// </summary>
    3737  [Content(typeof(BoolData), true)]
    38   public partial class BoolDataView : ViewBase {
     38  public partial class BoolDataView : ItemViewBase {
    3939    /// <summary>
    4040    /// Gets or sets the boolean value to represent visually.
  • trunk/sources/HeuristicLab.Data/3.3/DoubleDataView.cs

    r2520 r2546  
    3636  /// </summary>
    3737  [Content(typeof(DoubleData), true)]
    38   public partial class DoubleDataView : ViewBase {
     38  public partial class DoubleDataView : ItemViewBase {
    3939    /// <summary>
    4040    /// Gets or sets the double value to represent visually.
  • trunk/sources/HeuristicLab.Data/3.3/IntDataView.cs

    r2520 r2546  
    3636  /// </summary>
    3737  [Content(typeof(IntData), true)]
    38   public partial class IntDataView : ViewBase {
     38  public partial class IntDataView : ItemViewBase {
    3939    /// <summary>
    4040    /// Gets or set the int value to represent visually.
  • trunk/sources/HeuristicLab.Data/3.3/ItemDictionaryView_T.cs

    r2520 r2546  
    1818  /// <typeparam name="V">The type of the values of the dictionary.</typeparam>
    1919  [Content(typeof(ItemDictionary<IItem, IItem>), true)]
    20   public partial class ItemDictionaryView<K, V> : ViewBase
     20  public partial class ItemDictionaryView<K, V> : ItemViewBase
    2121    where K : IItem
    2222    where V : IItem {
  • trunk/sources/HeuristicLab.Data/3.3/ItemListView_T.cs

    r2520 r2546  
    3737  /// </summary>
    3838  /// <typeparam name="T">The type of the items in the list.</typeparam>
    39   public partial class ItemListView<T> : ViewBase where T : IItem {
     39  public partial class ItemListView<T> : ItemViewBase where T : IItem {
    4040    private ChooseItemDialog chooseItemDialog;
    4141
  • trunk/sources/HeuristicLab.Data/3.3/MatrixDataBaseView.cs

    r2520 r2546  
    3434  /// The basic visual representation of a two-dimensional matrix.
    3535  /// </summary>
    36   public partial class MatrixDataBaseView : ViewBase {
     36  public partial class MatrixDataBaseView : ItemViewBase {
    3737
    3838    /// <summary>
  • trunk/sources/HeuristicLab.Data/3.3/StringDataView.cs

    r2520 r2546  
    3636  /// </summary>
    3737  [Content(typeof(StringData), true)]
    38   public partial class StringDataView : ViewBase {
     38  public partial class StringDataView : ItemViewBase {
    3939    /// <summary>
    4040    /// Gets or sets the string value to represent visually.
  • trunk/sources/HeuristicLab.Logging/3.3/LinechartView.cs

    r2520 r2546  
    4040  /// </summary>
    4141  [Content(typeof(Linechart), true)]
    42   public partial class LinechartView : ViewBase {
     42  public partial class LinechartView : ItemViewBase {
    4343    private double maxY = double.MinValue, minY = double.MaxValue;
    4444    private static int[] colors = new int[] {
  • trunk/sources/HeuristicLab.Logging/3.3/LogView.cs

    r2520 r2546  
    3838  /// </summary>
    3939  [Content(typeof(Log), true)]
    40   public partial class LogView : ViewBase {
     40  public partial class LogView : ItemViewBase {
    4141    /// <summary>
    4242    /// Gets or sets the Log item to represent visually.
  • trunk/sources/HeuristicLab.Logging/3.3/PointXYChartView.cs

    r2520 r2546  
    4040  /// </summary>
    4141  [Content(typeof(PointXYChart), true)]
    42   public partial class PointXYChartView : ViewBase {
     42  public partial class PointXYChartView : ItemViewBase {
    4343    private static int[] colors = new int[] {
    4444      182,182,255,
  • trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperatorView.cs

    r2524 r2546  
    3434namespace HeuristicLab.Operators.Programmable {
    3535  [Content(typeof(ProgrammableOperator), true)]
    36   public partial class ProgrammableOperatorView : ViewBase {
     36  public partial class ProgrammableOperatorView : ItemViewBase {
    3737    public ProgrammableOperator ProgrammableOperator {
    3838      get { return (ProgrammableOperator)Item; }
  • trunk/sources/HeuristicLab.Operators/3.3/CombinedOperatorView.cs

    r2524 r2546  
    3636  /// </summary>
    3737  [Content(typeof(CombinedOperator), true)]
    38   public partial class CombinedOperatorView : ViewBase {
     38  public partial class CombinedOperatorView : ItemViewBase {
    3939    /// <summary>
    4040    /// Gets or sets the combined operator to display.
  • trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj

    r2520 r2546  
    5151  </ItemGroup>
    5252  <ItemGroup>
    53     <Compile Include="Actions\SaveAsAction.cs" />
    54     <Compile Include="Actions\SaveAllAction.cs" />
    55     <Compile Include="Actions\SaveAction.cs" />
    56     <Compile Include="Actions\OpenAction.cs" />
    57     <Compile Include="Actions\NewAction.cs" />
     53    <Compile Include="FileManager.cs" />
    5854    <Compile Include="MenuItems\CloseMenuItem.cs" />
    5955    <Compile Include="MenuItems\CloseAllMenuItem.cs" />
     
    6864    <Compile Include="MenuItems\NewMenuItem.cs" />
    6965    <Compile Include="MenuItems\Separators.cs" />
    70     <Compile Include="NewDialog.cs">
     66    <Compile Include="NewItemDialog.cs">
    7167      <SubType>Form</SubType>
    7268    </Compile>
    73     <Compile Include="NewDialog.Designer.cs">
    74       <DependentUpon>NewDialog.cs</DependentUpon>
     69    <Compile Include="NewItemDialog.Designer.cs">
     70      <DependentUpon>NewItemDialog.cs</DependentUpon>
    7571    </Compile>
    7672    <Compile Include="Properties\AssemblyInfo.cs" />
     73    <Compile Include="Properties\Resources.Designer.cs">
     74      <AutoGen>True</AutoGen>
     75      <DesignTime>True</DesignTime>
     76      <DependentUpon>Resources.resx</DependentUpon>
     77    </Compile>
    7778    <Compile Include="ToolBarItems\SaveAllToolBarItem.cs" />
    7879    <Compile Include="ToolBarItems\SaveToolBarItem.cs" />
     
    8990      <Name>HeuristicLab.Common.Resources-3.2</Name>
    9091    </ProjectReference>
     92    <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
     93      <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>
     94      <Name>HeuristicLab.Core.Views-3.3</Name>
     95    </ProjectReference>
     96    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
     97      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
     98      <Name>HeuristicLab.Core-3.3</Name>
     99    </ProjectReference>
    91100    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj">
    92101      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
     
    97106      <Name>HeuristicLab.MainForm-3.2</Name>
    98107    </ProjectReference>
     108    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
     109      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
     110      <Name>HeuristicLab.Persistence-3.3</Name>
     111    </ProjectReference>
    99112    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
    100113      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
     
    103116  </ItemGroup>
    104117  <ItemGroup>
    105     <EmbeddedResource Include="NewDialog.resx">
    106       <DependentUpon>NewDialog.cs</DependentUpon>
     118    <EmbeddedResource Include="NewItemDialog.resx">
     119      <DependentUpon>NewItemDialog.cs</DependentUpon>
     120    </EmbeddedResource>
     121    <EmbeddedResource Include="Properties\Resources.resx">
     122      <Generator>ResXFileCodeGenerator</Generator>
     123      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    107124    </EmbeddedResource>
    108125  </ItemGroup>
  • trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLabOptimizerApplication.cs

    r2520 r2546  
    3131namespace HeuristicLab.Optimizer {
    3232  [ClassInfo(Name = "Optimizer 3.3", Description="Next generation heuristic optimization environment.")]
    33   class HeuristicLabOptimizerApplication : ApplicationBase {
     33  internal class HeuristicLabOptimizerApplication : ApplicationBase {
    3434    public override void Run() {
    3535      DockingMainForm mainForm = new DockingMainForm(typeof(IOptimizerUserInterfaceItemProvider));
  • trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLabOptimizerPlugin.cs

    r2501 r2546  
    2828  [ClassInfo(Name = "HeuristicLab.Optimizer-3.3")]
    2929  [PluginFile(Filename = "HeuristicLab.Optimizer-3.3.dll", Filetype = PluginFileType.Assembly)]
     30  [Dependency(Dependency = "HeuristicLab.Persistence-3.3")]
    3031  [Dependency(Dependency = "HeuristicLab.Common.Resources-3.2")]
     32  [Dependency(Dependency = "HeuristicLab.Core-3.3")]
     33  [Dependency(Dependency = "HeuristicLab.Core.Views-3.3")]
    3134  [Dependency(Dependency = "HeuristicLab.MainForm-3.2")]
    3235  [Dependency(Dependency = "HeuristicLab.MainForm.WindowsForms-3.2")]
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseAllMenuItem.cs

    r2520 r2546  
    1010
    1111namespace HeuristicLab.Optimizer.MenuItems {
    12   public class CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
    1313    public override string Name {
    1414      get { return "Clos&e All"; }
    1515    }
    16 
    1716    public override IEnumerable<string> Structure {
    1817      get { return new string[] { "&File" }; }
    1918    }
    20 
    2119    public override int Position {
    2220      get { return 1700; }
     21    }
     22
     23    public override void MainFormInitialized(object sender, EventArgs e) {
     24      ToolStripItem.Enabled = false;
     25    }
     26    public override void ActiveViewChanged(object sender, EventArgs e) {
     27      ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null;
    2328    }
    2429
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseMenuItem.cs

    r2520 r2546  
    1010
    1111namespace HeuristicLab.Optimizer.MenuItems {
    12   public class CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
    1313    public override string Name {
    1414      get { return "&Close"; }
    1515    }
    16 
    1716    public override IEnumerable<string> Structure {
    1817      get { return new string[] { "&File" }; }
    1918    }
    20 
    2119    public override int Position {
    2220      get { return 1600; }
     21    }
     22
     23    public override void MainFormInitialized(object sender, EventArgs e) {
     24      ToolStripItem.Enabled = false;
     25    }
     26    public override void ActiveViewChanged(object sender, EventArgs e) {
     27      ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null;
    2328    }
    2429
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ExitMenuItem.cs

    r2520 r2546  
    1010
    1111namespace HeuristicLab.Optimizer.MenuItems {
    12   public class ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
    1313    public override IEnumerable<string> Structure {
    1414      get { return new string[] { "&File" }; }
    1515    }
    16 
    1716    public override string Name {
    1817      get { return "E&xit"; }
    1918    }
    20 
    2119    public override int Position {
    2220      get { return 1999; }
    2321    }
    24 
    2522    public override Keys ShortCutKeys {
    2623      get { return Keys.Control | Keys.X; }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/NewMenuItem.cs

    r2520 r2546  
    99
    1010namespace HeuristicLab.Optimizer.MenuItems {
    11   public class NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     11  internal class NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
    1212    public override string Name {
    1313      get { return "&New..."; }
    1414    }
    15 
    1615    public override IEnumerable<string> Structure {
    1716      get { return new string[] { "&File" }; }
    1817    }
    19 
    2018    public override int Position {
    2119      get { return 1100; }
    2220    }
    23 
    2421    public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle {
    2522      get { return ToolStripItemDisplayStyle.ImageAndText; }
    2623    }
    27 
    2824    public override Image Image {
    2925      get { return Resources.NewIcon; }
    3026    }
    31 
    3227    public override Keys ShortCutKeys {
    3328      get { return Keys.Control | Keys.N; }
     
    3530
    3631    public override void Execute() {
    37       Actions.NewAction.Execute();
     32      FileManager.New();
    3833    }
    3934  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/OpenMenuItem.cs

    r2520 r2546  
    99
    1010namespace HeuristicLab.Optimizer.MenuItems {
    11   public class OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     11  internal class OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
    1212    public override string Name {
    1313      get { return "&Open..."; }
    1414    }
    15 
    1615    public override IEnumerable<string> Structure {
    1716      get { return new string[] { "&File" }; }
    1817    }
    19 
    2018    public override int Position {
    2119      get { return 1200; }
    2220    }
    23 
    2421    public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle {
    2522      get { return ToolStripItemDisplayStyle.ImageAndText; }
    2623    }
    27 
    2824    public override Image Image {
    2925      get { return Resources.OpenIcon; }
    3026    }
    31 
    3227    public override Keys ShortCutKeys {
    3328      get { return Keys.Control | Keys.O; }
     
    3530
    3631    public override void Execute() {
    37       Actions.OpenAction.Execute();
     32      FileManager.Open();
    3833    }
    3934  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs

    r2520 r2546  
    55using System.Windows.Forms;
    66using System.Drawing;
     7using HeuristicLab.MainForm;
    78using HeuristicLab.MainForm.WindowsForms;
    89using HeuristicLab.Common.Resources;
    910
    1011namespace HeuristicLab.Optimizer.MenuItems {
    11   public class SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
    1213    public override string Name {
    1314      get { return "Save Al&l"; }
    1415    }
    15 
    1616    public override IEnumerable<string> Structure {
    1717      get { return new string[] { "&File" }; }
    1818    }
    19 
    2019    public override int Position {
    2120      get { return 1500; }
    2221    }
    23 
    2422    public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle {
    2523      get { return ToolStripItemDisplayStyle.ImageAndText; }
    2624    }
    27 
    2825    public override Image Image {
    2926      get { return Resources.SaveAllIcon; }
    3027    }
    3128
     29    public override void MainFormInitialized(object sender, EventArgs e) {
     30      ToolStripItem.Enabled = false;
     31    }
     32    public override void ActiveViewChanged(object sender, EventArgs e) {
     33      ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null;
     34    }
     35
    3236    public override void Execute() {
    33       Actions.SaveAllAction.Execute();
     37      FileManager.SaveAll();
    3438    }
    3539  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs

    r2520 r2546  
    55using System.Windows.Forms;
    66using System.Drawing;
     7using HeuristicLab.MainForm;
    78using HeuristicLab.MainForm.WindowsForms;
    89using HeuristicLab.Common.Resources;
     10using HeuristicLab.Core;
     11using HeuristicLab.Core.Views;
    912
    1013namespace HeuristicLab.Optimizer.MenuItems {
    11   public class SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     14  internal class SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
    1215    public override string Name {
    1316      get { return "Save &As..."; }
    1417    }
    15 
    1618    public override IEnumerable<string> Structure {
    1719      get { return new string[] { "&File" }; }
    1820    }
    19 
    2021    public override int Position {
    2122      get { return 1400; }
    2223    }
    23 
    2424    public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle {
    2525      get { return ToolStripItemDisplayStyle.ImageAndText; }
    2626    }
    27 
    2827    public override Keys ShortCutKeys {
    2928      get { return Keys.Control | Keys.Shift | Keys.S; }
    3029    }
    3130
     31    public override void MainFormInitialized(object sender, EventArgs e) {
     32      ToolStripItem.Enabled = false;
     33    }
     34    public override void ActiveViewChanged(object sender, EventArgs e) {
     35      IItemView activeView = MainFormManager.MainForm.ActiveView as IItemView;
     36      ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Item.GetType())));
     37    }
     38
    3239    public override void Execute() {
    33       Actions.SaveAsAction.Execute();
     40      FileManager.SaveAs();
    3441    }
    3542  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs

    r2520 r2546  
    55using System.Windows.Forms;
    66using System.Drawing;
     7using HeuristicLab.MainForm;
    78using HeuristicLab.MainForm.WindowsForms;
    89using HeuristicLab.Common.Resources;
     10using HeuristicLab.Core;
     11using HeuristicLab.Core.Views;
    912
    1013namespace HeuristicLab.Optimizer.MenuItems {
    11   public class SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
     14  internal class SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
    1215    public override string Name {
    1316      get { return "&Save"; }
    1417    }
    15 
    1618    public override IEnumerable<string> Structure {
    1719      get { return new string[] { "&File" }; }
    1820    }
    19 
    2021    public override int Position {
    2122      get { return 1300; }
    2223    }
    23 
    2424    public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle {
    2525      get { return ToolStripItemDisplayStyle.ImageAndText; }
    2626    }
    27 
    2827    public override Image Image {
    2928      get { return Resources.SaveIcon; }
    3029    }
    31 
    3230    public override Keys ShortCutKeys {
    3331      get { return Keys.Control | Keys.S; }
    3432    }
    3533
     34    public override void MainFormInitialized(object sender, EventArgs e) {
     35      ToolStripItem.Enabled = false;
     36    }
     37    public override void ActiveViewChanged(object sender, EventArgs e) {
     38      IItemView activeView = MainFormManager.MainForm.ActiveView as IItemView;
     39      ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Item.GetType())));
     40    }
     41
    3642    public override void Execute() {
    37       Actions.SaveAction.Execute();
     43      FileManager.Save();
    3844    }
    3945  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/Separators.cs

    r2520 r2546  
    1010
    1111namespace HeuristicLab.Optimizer.MenuItems {
    12   public class SeparatorMenuItem : MenuSeparatorItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class SeparatorMenuItem : MenuSeparatorItemBase, IOptimizerUserInterfaceItemProvider {
    1313    public override IEnumerable<string> Structure {
    1414      get { return new string[] { "&File" }; }
  • trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.Designer.cs

    r2537 r2546  
    11namespace HeuristicLab.Optimizer {
    2   partial class NewDialog {
     2  partial class NewItemDialog {
    33    /// <summary>
    44    /// Required designer variable.
     
    2424    /// </summary>
    2525    private void InitializeComponent() {
     26      this.components = new System.ComponentModel.Container();
     27      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewItemDialog));
    2628      this.okButton = new System.Windows.Forms.Button();
    2729      this.cancelButton = new System.Windows.Forms.Button();
     30      this.itemsListView = new System.Windows.Forms.ListView();
     31      this.nameColumnHeader = new System.Windows.Forms.ColumnHeader();
     32      this.descriptioncolumnHeader = new System.Windows.Forms.ColumnHeader();
     33      this.itemsLabel = new System.Windows.Forms.Label();
     34      this.showIconsCheckBox = new System.Windows.Forms.CheckBox();
     35      this.showDetailsCheckBox = new System.Windows.Forms.CheckBox();
     36      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    2837      this.SuspendLayout();
    2938      //
     
    3342      this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
    3443      this.okButton.Enabled = false;
    35       this.okButton.Location = new System.Drawing.Point(380, 315);
     44      this.okButton.Location = new System.Drawing.Point(456, 409);
    3645      this.okButton.Name = "okButton";
    3746      this.okButton.Size = new System.Drawing.Size(75, 23);
    38       this.okButton.TabIndex = 0;
     47      this.okButton.TabIndex = 2;
    3948      this.okButton.Text = "&OK";
    4049      this.okButton.UseVisualStyleBackColor = true;
     50      this.okButton.Click += new System.EventHandler(this.okButton_Click);
    4151      //
    4252      // cancelButton
     
    4454      this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    4555      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
    46       this.cancelButton.Location = new System.Drawing.Point(461, 315);
     56      this.cancelButton.Location = new System.Drawing.Point(537, 409);
    4757      this.cancelButton.Name = "cancelButton";
    4858      this.cancelButton.Size = new System.Drawing.Size(75, 23);
    49       this.cancelButton.TabIndex = 0;
     59      this.cancelButton.TabIndex = 3;
    5060      this.cancelButton.Text = "&Cancel";
    5161      this.cancelButton.UseVisualStyleBackColor = true;
    5262      //
    53       // NewDialog
     63      // itemsListView
     64      //
     65      this.itemsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     66                  | System.Windows.Forms.AnchorStyles.Left)
     67                  | System.Windows.Forms.AnchorStyles.Right)));
     68      this.itemsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
     69            this.nameColumnHeader,
     70            this.descriptioncolumnHeader});
     71      this.itemsListView.HideSelection = false;
     72      this.itemsListView.Location = new System.Drawing.Point(12, 33);
     73      this.itemsListView.MultiSelect = false;
     74      this.itemsListView.Name = "itemsListView";
     75      this.itemsListView.Size = new System.Drawing.Size(600, 370);
     76      this.itemsListView.TabIndex = 1;
     77      this.itemsListView.UseCompatibleStateImageBehavior = false;
     78      this.itemsListView.View = System.Windows.Forms.View.SmallIcon;
     79      this.itemsListView.SelectedIndexChanged += new System.EventHandler(this.itemTypesListView_SelectedIndexChanged);
     80      this.itemsListView.DoubleClick += new System.EventHandler(this.itemTypesListView_DoubleClick);
     81      //
     82      // nameColumnHeader
     83      //
     84      this.nameColumnHeader.Text = "Name";
     85      //
     86      // descriptioncolumnHeader
     87      //
     88      this.descriptioncolumnHeader.Text = "Description";
     89      //
     90      // itemsLabel
     91      //
     92      this.itemsLabel.AutoSize = true;
     93      this.itemsLabel.Location = new System.Drawing.Point(12, 9);
     94      this.itemsLabel.Name = "itemsLabel";
     95      this.itemsLabel.Size = new System.Drawing.Size(35, 13);
     96      this.itemsLabel.TabIndex = 0;
     97      this.itemsLabel.Text = "&Items:";
     98      //
     99      // showIconsCheckBox
     100      //
     101      this.showIconsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     102      this.showIconsCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
     103      this.showIconsCheckBox.Checked = true;
     104      this.showIconsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
     105      this.showIconsCheckBox.Image = ((System.Drawing.Image)(resources.GetObject("showIconsCheckBox.Image")));
     106      this.showIconsCheckBox.Location = new System.Drawing.Point(558, 3);
     107      this.showIconsCheckBox.Name = "showIconsCheckBox";
     108      this.showIconsCheckBox.Size = new System.Drawing.Size(24, 24);
     109      this.showIconsCheckBox.TabIndex = 4;
     110      this.toolTip.SetToolTip(this.showIconsCheckBox, "Show Icons");
     111      this.showIconsCheckBox.UseVisualStyleBackColor = true;
     112      this.showIconsCheckBox.Click += new System.EventHandler(this.showIconsCheckBox_Click);
     113      //
     114      // showDetailsCheckBox
     115      //
     116      this.showDetailsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     117      this.showDetailsCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
     118      this.showDetailsCheckBox.Image = ((System.Drawing.Image)(resources.GetObject("showDetailsCheckBox.Image")));
     119      this.showDetailsCheckBox.Location = new System.Drawing.Point(588, 3);
     120      this.showDetailsCheckBox.Name = "showDetailsCheckBox";
     121      this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24);
     122      this.showDetailsCheckBox.TabIndex = 5;
     123      this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show Details");
     124      this.showDetailsCheckBox.UseVisualStyleBackColor = true;
     125      this.showDetailsCheckBox.Click += new System.EventHandler(this.showDetailsCheckBox_Click);
     126      //
     127      // NewItemDialog
    54128      //
    55129      this.AcceptButton = this.okButton;
     
    57131      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    58132      this.CancelButton = this.cancelButton;
    59       this.ClientSize = new System.Drawing.Size(548, 350);
     133      this.ClientSize = new System.Drawing.Size(624, 444);
     134      this.Controls.Add(this.showDetailsCheckBox);
     135      this.Controls.Add(this.showIconsCheckBox);
     136      this.Controls.Add(this.itemsLabel);
     137      this.Controls.Add(this.itemsListView);
    60138      this.Controls.Add(this.cancelButton);
    61139      this.Controls.Add(this.okButton);
    62       this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
    63140      this.MaximizeBox = false;
    64141      this.MinimizeBox = false;
    65       this.Name = "NewDialog";
     142      this.Name = "NewItemDialog";
     143      this.ShowIcon = false;
    66144      this.ShowInTaskbar = false;
    67145      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
    68146      this.Text = "New Item";
    69147      this.TopMost = true;
     148      this.Load += new System.EventHandler(this.NewItemDialog_Load);
     149      this.Shown += new System.EventHandler(this.NewItemDialog_Shown);
    70150      this.ResumeLayout(false);
     151      this.PerformLayout();
    71152
    72153    }
     
    76157    private System.Windows.Forms.Button okButton;
    77158    private System.Windows.Forms.Button cancelButton;
     159    private System.Windows.Forms.ListView itemsListView;
     160    private System.Windows.Forms.Label itemsLabel;
     161    private System.Windows.Forms.CheckBox showIconsCheckBox;
     162    private System.Windows.Forms.CheckBox showDetailsCheckBox;
     163    private System.Windows.Forms.ToolTip toolTip;
     164    private System.Windows.Forms.ColumnHeader nameColumnHeader;
     165    private System.Windows.Forms.ColumnHeader descriptioncolumnHeader;
    78166  }
    79167}
  • trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.cs

    r2537 r2546  
    77using System.Text;
    88using System.Windows.Forms;
     9using HeuristicLab.PluginInfrastructure;
     10using HeuristicLab.Common.Resources;
     11using HeuristicLab.Core;
    912
    1013namespace HeuristicLab.Optimizer {
    11   public partial class NewDialog : Form {
    12     private Type newItemType;
    13     public Type NewItemType {
    14       get { return newItemType; }
     14  internal partial class NewItemDialog : Form {
     15    private bool initialized;
     16    private List<IItem> items;
     17
     18    private IItem item;
     19    public IItem Item {
     20      get { return item; }
    1521    }
    1622
    17     public NewDialog() {
     23    public NewItemDialog() {
     24      initialized = false;
     25      items = new List<IItem>();
     26      item = null;
    1827      InitializeComponent();
    19       newItemType = null;
     28    }
     29
     30    private void NewItemDialog_Load(object sender, EventArgs e) {
     31      if (!initialized) {
     32        SetListViewDisplayStyleCheckBoxes();
     33
     34        DiscoveryService ds = new DiscoveryService();
     35        var categories = from t in ds.GetTypes(typeof(IItem))
     36                         where CreatableAttribute.IsCreatable(t)
     37                         orderby CreatableAttribute.GetCategory(t), ItemAttribute.GetName(t) ascending
     38                         group t by CreatableAttribute.GetCategory(t) into c
     39                         select c;
     40
     41        itemsListView.SmallImageList = new ImageList();
     42        foreach (var category in categories) {
     43          ListViewGroup group = new ListViewGroup(category.Key);
     44          itemsListView.Groups.Add(group);
     45          foreach (var creatable in category) {
     46            IItem i = (IItem)Activator.CreateInstance(creatable);
     47            items.Add(i);
     48            ListViewItem item = new ListViewItem(new string[] { i.Name, i.Description}, group);
     49            itemsListView.SmallImageList.Images.Add(i.Image);
     50            item.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
     51            item.Tag = i;
     52            itemsListView.Items.Add(item);
     53          }
     54        }
     55        initialized = true;
     56      }
     57    }
     58
     59    private void NewItemDialog_Shown(object sender, EventArgs e) {
     60      item = null;
     61    }
     62
     63    private void itemTypesListView_SelectedIndexChanged(object sender, EventArgs e) {
     64      okButton.Enabled = itemsListView.SelectedItems.Count == 1;
     65    }
     66
     67    private void okButton_Click(object sender, EventArgs e) {
     68      if (itemsListView.SelectedItems.Count == 1) {
     69        item = (IItem)((IItem)itemsListView.SelectedItems[0].Tag).Clone();
     70        DialogResult = DialogResult.OK;
     71        Close();
     72      }
     73    }
     74    private void itemTypesListView_DoubleClick(object sender, EventArgs e) {
     75      if (itemsListView.SelectedItems.Count == 1) {
     76        item = (IItem)((IItem)itemsListView.SelectedItems[0].Tag).Clone();
     77        DialogResult = DialogResult.OK;
     78        Close();
     79      }
     80    }
     81
     82    private void showIconsCheckBox_Click(object sender, EventArgs e) {
     83      itemsListView.View = View.SmallIcon;
     84      SetListViewDisplayStyleCheckBoxes();
     85    }
     86    private void showDetailsCheckBox_Click(object sender, EventArgs e) {
     87      itemsListView.View = View.Details;
     88      SetListViewDisplayStyleCheckBoxes();
     89      for (int i = 0; i < itemsListView.Columns.Count; i++)
     90        itemsListView.Columns[i].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     91    }
     92    private void SetListViewDisplayStyleCheckBoxes() {
     93      showIconsCheckBox.Checked = itemsListView.View == View.SmallIcon;
     94      showDetailsCheckBox.Checked = itemsListView.View == View.Details;
    2095    }
    2196  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.resx

    r2537 r2546  
    118118    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    119119  </resheader>
     120  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
     121  <data name="showIconsCheckBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     122    <value>
     123        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
     124        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAHdJREFUOE9j/P//
     125        PwOlAGQCJZjhP5dKFlkYajFFtoP9DwwG8gDcBTDtDAwNQBMhmBiA1QCQRmINwWkAzBBCLsPrBWRvwNjo
     126        LsMwAJe/sRkGcSU4BhGxgJ6gsHkB1TA0A4gJeWQ1JHgBNbEhXEYtF1CUmUCBSQkGALV/aRnqsiFZAAAA
     127        AElFTkSuQmCC
     128</value>
     129  </data>
     130  <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     131    <value>17, 17</value>
     132  </metadata>
     133  <data name="showDetailsCheckBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     134    <value>
     135        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
     136        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAF5JREFUOE9j/P//
     137        PwOlAGQCJZjhP5dKFlkYajFFtoP9DwwG8gDcBdi0I4cLSB6djyRGRRcwMDQAbSKMYS7G6wViQgXDAJDt
     138        aKaD/U7fMBhYFxATcMhqqJOUQYmMEgwAizNpEwxYZgUAAAAASUVORK5CYII=
     139</value>
     140  </data>
    120141</root>
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/NewToolBarItem.cs

    r2520 r2546  
    1010
    1111namespace HeuristicLab.Optimizer {
    12   public class NewToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class NewToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
    1313    public override string Name {
    1414      get { return "New..."; }
    1515    }
    16 
    1716    public override string ToolTipText {
    1817      get { return "New Item (Ctrl + N)"; }
    1918    }
    20 
    2119    public override int Position {
    2220      get { return 10; }
    2321    }
    24 
    2522    public override Image Image {
    2623      get { return Resources.NewIcon; }
     
    2825
    2926    public override void Execute() {
    30       Actions.NewAction.Execute();
     27      FileManager.New();
    3128    }
    3229  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/OpenToolBarItem.cs

    r2520 r2546  
    1010
    1111namespace HeuristicLab.Optimizer {
    12   public class OpenToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class OpenToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
    1313    public override string Name {
    1414      get { return "Open..."; }
    1515    }
    16 
    1716    public override string ToolTipText {
    1817      get { return "Open File (Ctrl + O)"; }
    1918    }
    20 
    2119    public override int Position {
    2220      get { return 20; }
    2321    }
    24 
    2522    public override Image Image {
    2623      get { return Resources.OpenIcon; }
     
    2825
    2926    public override void Execute() {
    30       Actions.OpenAction.Execute();
     27      FileManager.Open();
    3128    }
    3229  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs

    r2520 r2546  
    1010
    1111namespace HeuristicLab.Optimizer {
    12   public class SaveAllToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
     12  internal class SaveAllToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
    1313    public override string Name {
    1414      get { return "Save All"; }
    1515    }
    16 
    1716    public override string ToolTipText {
    1817      get { return "Save All Files"; }
    1918    }
    20 
    2119    public override int Position {
    2220      get { return 40; }
    2321    }
    24 
    2522    public override Image Image {
    2623      get { return Resources.SaveAllIcon; }
    2724    }
    2825
     26    public override void MainFormInitialized(object sender, EventArgs e) {
     27      ToolStripItem.Enabled = false;
     28    }
     29    public override void ActiveViewChanged(object sender, EventArgs e) {
     30      ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null;
     31    }
     32
    2933    public override void Execute() {
    30       Actions.SaveAllAction.Execute();
     34      FileManager.SaveAll();
    3135    }
    3236  }
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs

    r2520 r2546  
    88using HeuristicLab.MainForm.WindowsForms;
    99using HeuristicLab.Common.Resources;
     10using HeuristicLab.Core;
     11using HeuristicLab.Core.Views;
    1012
    1113namespace HeuristicLab.Optimizer {
    12   public class SaveToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
     14  internal class SaveToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, IOptimizerUserInterfaceItemProvider {
    1315    public override string Name {
    1416      get { return "Save"; }
    1517    }
    16 
    1718    public override string ToolTipText {
    1819      get { return "Save File (Ctrl + S)"; }
    1920    }
    20 
    2121    public override int Position {
    2222      get { return 30; }
    2323    }
    24 
    2524    public override Image Image {
    2625      get { return Resources.SaveIcon; }
    2726    }
    2827
     28    public override void MainFormInitialized(object sender, EventArgs e) {
     29      ToolStripItem.Enabled = false;
     30    }
     31    public override void ActiveViewChanged(object sender, EventArgs e) {
     32      IItemView activeView = MainFormManager.MainForm.ActiveView as IItemView;
     33      ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Item.GetType())));
     34    }
     35
    2936    public override void Execute() {
    30       Actions.SaveAction.Execute();
     37      FileManager.Save();
    3138    }
    3239  }
  • trunk/sources/HeuristicLab.Routing.TSP/3.3/TSPInjectorView.cs

    r2520 r2546  
    3838  /// </summary>
    3939  [Content(typeof(TSPInjector), true)]
    40   public partial class TSPInjectorView : ViewBase {
     40  public partial class TSPInjectorView : ItemViewBase {
    4141    /// <summary>
    4242    /// Gets or set the <see cref="TSPInjector"/> to represent visually.
  • trunk/sources/HeuristicLab.Routing.TSP/3.3/TSPTourView.cs

    r2520 r2546  
    3939  /// </summary>
    4040  [Content(typeof(TSPTour), true)]
    41   public partial class TSPTourView : ViewBase {
     41  public partial class TSPTourView : ItemViewBase {
    4242    /// <summary>
    4343    /// Gets or sets the <see cref="TSPTour"/> to represent visually.
  • trunk/sources/HeuristicLab.SGA/3.3/HeuristicLab.SGA-3.3.csproj

    r2524 r2546  
    8787    <Compile Include="Properties\AssemblyInfo.cs" />
    8888    <Compile Include="SGA.cs" />
    89     <Compile Include="SGAEditor.cs">
     89    <Compile Include="SGAView.cs">
    9090      <SubType>UserControl</SubType>
    9191    </Compile>
    92     <Compile Include="SGAEditor.Designer.cs">
    93       <DependentUpon>SGAEditor.cs</DependentUpon>
     92    <Compile Include="SGAView.Designer.cs">
     93      <DependentUpon>SGAView.cs</DependentUpon>
    9494    </Compile>
    9595  </ItemGroup>
     
    157157  </ItemGroup>
    158158  <ItemGroup>
    159     <EmbeddedResource Include="SGAEditor.resx">
    160       <SubType>Designer</SubType>
    161       <DependentUpon>SGAEditor.cs</DependentUpon>
     159    <EmbeddedResource Include="SGAView.resx">
     160      <DependentUpon>SGAView.cs</DependentUpon>
    162161    </EmbeddedResource>
    163162  </ItemGroup>
  • trunk/sources/HeuristicLab.SGA/3.3/SGAView.Designer.cs

    r2545 r2546  
    2121
    2222namespace HeuristicLab.SGA {
    23   partial class SGAEditor {
     23  partial class SGAView {
    2424    /// <summary>
    2525    /// Required designer variable.
  • trunk/sources/HeuristicLab.SGA/3.3/SGAView.cs

    r2545 r2546  
    3838  /// </summary>
    3939  [Content(typeof(SGA), true)]
    40   public partial class SGAEditor : EditorBase {
     40  public partial class SGAView : ItemViewBase {
    4141    private ChooseOperatorDialog chooseOperatorDialog;
    4242
     
    5454    /// Initializes a new instance of <see cref="SGAEditor"/>.
    5555    /// </summary>
    56     public SGAEditor() {
     56    public SGAView() {
    5757      InitializeComponent();
    5858    }
     
    6161    /// </summary>
    6262    /// <param name="sga">The simple genetic algorithm to represent visually.</param>
    63     public SGAEditor(SGA sga)
     63    public SGAView(SGA sga)
    6464      : this() {
    6565      SGA = sga;
     
    118118    #region Button Events
    119119    private void viewProblemInitializationButton_Click(object sender, EventArgs e) {
    120       HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.ProblemInjector);
    121       if (view != null)
    122         PluginManager.ControlManager.ShowControl(view);
     120      IView view = MainFormManager.CreateDefaultView(SGA.ProblemInjector);
     121      if (view != null) MainFormManager.MainForm.ShowView(view);
    123122    }
    124123    private void viewSolutionGenerationButton_Click(object sender, EventArgs e) {
    125       HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.SolutionGenerator);
    126       if (view != null)
    127         PluginManager.ControlManager.ShowControl(view);
     124      IView view = MainFormManager.CreateDefaultView(SGA.SolutionGenerator);
     125      if (view != null) MainFormManager.MainForm.ShowView(view);
    128126    }
    129127    private void viewSelectionButton_Click(object sender, EventArgs e) {
    130       HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.Selector);
    131       if (view != null)
    132         PluginManager.ControlManager.ShowControl(view);
     128      IView view = MainFormManager.CreateDefaultView(SGA.Selector);
     129      if (view != null) MainFormManager.MainForm.ShowView(view);
    133130    }
    134131    private void viewCrossoverButton_Click(object sender, EventArgs e) {
    135       HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.Crossover);
    136       if (view != null)
    137         PluginManager.ControlManager.ShowControl(view);
     132      IView view = MainFormManager.CreateDefaultView(SGA.Crossover);
     133      if (view != null) MainFormManager.MainForm.ShowView(view);
    138134    }
    139135    private void viewMutationButton_Click(object sender, EventArgs e) {
    140       HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.Mutator);
    141       if (view != null)
    142         PluginManager.ControlManager.ShowControl(view);
     136      IView view = MainFormManager.CreateDefaultView(SGA.Mutator);
     137      if (view != null) MainFormManager.MainForm.ShowView(view);
    143138    }
    144139    private void viewEvaluationButton_Click(object sender, EventArgs e) {
    145       HeuristicLab.Core.Views.IView view = (HeuristicLab.Core.Views.IView)MainFormManager.CreateDefaultView(SGA.Evaluator);
    146       if (view != null)
    147         PluginManager.ControlManager.ShowControl(view);
     140      IView view = MainFormManager.CreateDefaultView(SGA.Evaluator);
     141      if (view != null) MainFormManager.MainForm.ShowView(view);
    148142    }
    149143    private void setProblemInitializationButton_Click(object sender, EventArgs e) {
     
    202196    private void cloneEngineButton_Click(object sender, EventArgs e) {
    203197      IEngine clone = (IEngine)SGA.Engine.Clone();
    204       IEditor editor = (IEditor)MainFormManager.CreateDefaultView(clone);
    205       PluginManager.ControlManager.ShowControl(editor);
     198      IView view = MainFormManager.CreateDefaultView(clone);
     199      if (view != null) MainFormManager.MainForm.ShowView(view);
    206200    }
    207201    #endregion
  • trunk/sources/HeuristicLab.SequentialEngine/3.3/HeuristicLab.SequentialEngine-3.3.csproj

    r2520 r2546  
    8686    <Compile Include="Properties\AssemblyInfo.cs" />
    8787    <Compile Include="SequentialEngine.cs" />
    88     <Compile Include="SequentialEngineEditor.cs">
     88    <Compile Include="SequentialEngineView.cs">
    8989      <SubType>UserControl</SubType>
    9090    </Compile>
    91     <Compile Include="SequentialEngineEditor.Designer.cs">
    92       <DependentUpon>SequentialEngineEditor.cs</DependentUpon>
     91    <Compile Include="SequentialEngineView.Designer.cs">
     92      <DependentUpon>SequentialEngineView.cs</DependentUpon>
    9393    </Compile>
    9494  </ItemGroup>
  • trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs

    r2520 r2546  
    3333  /// </summary>
    3434  [EmptyStorableClass]
    35   public class SequentialEngine : EngineBase, IEditable {
     35  [Creatable("Engines")]
     36  [Item("Sequential Engine", "Engine for sequential execution of algorithms.")]
     37  public class SequentialEngine : EngineBase {
    3638    private IOperator currentOperator;
    3739
  • trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngineView.Designer.cs

    r2545 r2546  
    2121
    2222namespace HeuristicLab.SequentialEngine {
    23   partial class SequentialEngineEditor {
     23  partial class SequentialEngineView {
    2424    /// <summary>
    2525    /// Required designer variable.
  • trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngineView.cs

    r2545 r2546  
    3636  /// </summary>
    3737  [Content(typeof(SequentialEngine), true)]
    38   public partial class SequentialEngineEditor : EngineBaseEditor {
     38  public partial class SequentialEngineView : EngineBaseView {
    3939    /// <summary>
    4040    /// Gets or set the engine to represent visually.
     
    5050    /// Initializes a new instance of <see cref="SequentialEngineEditor"/>.
    5151    /// </summary>
    52     public SequentialEngineEditor() {
     52    public SequentialEngineView() {
    5353      InitializeComponent();
    5454    }
     
    5858    /// </summary>
    5959    /// <param name="sequentialEngine">The engine to display.</param>
    60     public SequentialEngineEditor(SequentialEngine sequentialEngine)
     60    public SequentialEngineView(SequentialEngine sequentialEngine)
    6161      : this() {
    6262      SequentialEngine = sequentialEngine;
  • trunk/sources/HeuristicLab.TestFunctions/3.3/TestFunctionInjectorView.cs

    r2520 r2546  
    3838  /// </summary>
    3939  [Content(typeof(TestFunctionInjector), true)]
    40   public partial class TestFunctionInjectorView : ViewBase {
     40  public partial class TestFunctionInjectorView : ItemViewBase {
    4141    /// <summary>
    4242    /// Gets or sets the TestFunctionInjector to represent visually.
  • trunk/sources/HeuristicLab.ThreadParallelEngine/3.3/HeuristicLab.ThreadParallelEngine-3.3.csproj

    r2520 r2546  
    8686    <Compile Include="Properties\AssemblyInfo.cs" />
    8787    <Compile Include="ThreadParallelEngine.cs" />
    88     <Compile Include="ThreadParallelEngineEditor.cs">
     88    <Compile Include="ThreadParallelEngineView.cs">
    8989      <SubType>UserControl</SubType>
    9090    </Compile>
    91     <Compile Include="ThreadParallelEngineEditor.Designer.cs">
    92       <DependentUpon>ThreadParallelEngineEditor.cs</DependentUpon>
     91    <Compile Include="ThreadParallelEngineView.Designer.cs">
     92      <DependentUpon>ThreadParallelEngineView.cs</DependentUpon>
    9393    </Compile>
    9494  </ItemGroup>
  • trunk/sources/HeuristicLab.ThreadParallelEngine/3.3/ThreadParallelEngine.cs

    r2526 r2546  
    3232  /// Implementation of an engine being able to run in parallel with threads.
    3333  /// </summary>
     34  [Creatable("Engines")]
     35  [Item("Parallel Engine", "Engine for parallel execution of algorithms using multiple threads.")]
    3436  public class ThreadParallelEngine : EngineBase {
    3537    #region Inner Class Task
  • trunk/sources/HeuristicLab.ThreadParallelEngine/3.3/ThreadParallelEngineView.Designer.cs

    r2545 r2546  
    2121
    2222namespace HeuristicLab.ThreadParallelEngine {
    23   partial class ThreadParallelEngineEditor {
     23  partial class ThreadParallelEngineView {
    2424    /// <summary>
    2525    /// Required designer variable.
  • trunk/sources/HeuristicLab.ThreadParallelEngine/3.3/ThreadParallelEngineView.cs

    r2545 r2546  
    3636  /// </summary>
    3737  [Content(typeof(ThreadParallelEngine), true)]
    38   public partial class ThreadParallelEngineEditor : EngineBaseEditor {
     38  public partial class ThreadParallelEngineView : EngineBaseView {
    3939    /// <summary>
    4040    /// Gets or sets the ThreadParallelEngine to display.
     
    5050    /// Initializes a new instance of <see cref="ThreadParallelEngineEditor"/>.
    5151    /// </summary>
    52     public ThreadParallelEngineEditor() {
     52    public ThreadParallelEngineView() {
    5353      InitializeComponent();
    5454    }
     
    5858    /// </summary>
    5959    /// <param name="threadParallelEngine">The engine to represent visually.</param>
    60     public ThreadParallelEngineEditor(ThreadParallelEngine threadParallelEngine)
     60    public ThreadParallelEngineView(ThreadParallelEngine threadParallelEngine)
    6161      : this() {
    6262      ThreadParallelEngine = threadParallelEngine;
Note: See TracChangeset for help on using the changeset viewer.