Index: trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj	(revision 3416)
+++ trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj	(revision 3437)
@@ -110,7 +110,7 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
-      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
-      <Name>HeuristicLab.Common-3.3</Name>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.2\HeuristicLab.Common-3.2.csproj">
+      <Project>{1FC004FC-59AF-4249-B1B6-FF25873A20E4}</Project>
+      <Name>HeuristicLab.Common-3.2</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
Index: trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLabMainFormPlugin.cs.frame
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLabMainFormPlugin.cs.frame	(revision 3416)
+++ trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLabMainFormPlugin.cs.frame	(revision 3437)
@@ -28,4 +28,5 @@
   [Plugin("HeuristicLab.MainForm", "3.2.0.$WCREV$")]
   [PluginFile("HeuristicLab.MainForm-3.2.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Common", "3.2")]
   public class HeuristicLabMainFormPlugin : PluginBase {
   }
Index: trunk/sources/HeuristicLab.MainForm/3.3/ActionUserInterfaceItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/ActionUserInterfaceItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/ActionUserInterfaceItem.cs	(revision 3437)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public abstract class ActionUserInterfaceItem : PositionableUserInterfaceItem, IActionUserInterfaceItem {
+    protected ActionUserInterfaceItem() {
+      MainFormManager.MainForm.ActiveViewChanged += this.OnActiveViewChanged;
+      MainFormManager.MainForm.Changed += this.OnMainFormChanged;
+      MainFormManager.MainForm.ViewShown += this.OnViewShown;
+      MainFormManager.MainForm.ViewClosed += this.OnViewClosed;
+    }
+
+    public abstract string Name { get; }
+
+    public virtual System.Drawing.Image Image {
+      get { return null; }
+    }
+
+    public virtual string ToolTipText {
+      get { return string.Empty; }
+    }
+
+    public abstract void Execute();
+
+    protected virtual void OnActiveViewChanged(object sender, EventArgs e) {
+    }
+
+    protected virtual void OnMainFormChanged(object sender, EventArgs e) {
+    }
+
+    protected virtual void OnViewChanged(object sender, EventArgs e) {
+    }
+
+    private void OnViewShown(object sender, ViewShownEventArgs e) {
+      if (e.FirstTimeShown)
+        e.View.Changed += this.OnViewChanged;
+    }
+
+    private void OnViewClosed(object sender, ViewEventArgs e) {
+      e.View.Changed -= this.OnViewChanged;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/ContentAttribute.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/ContentAttribute.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/ContentAttribute.cs	(revision 3437)
@@ -0,0 +1,74 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Reflection;
+
+namespace HeuristicLab.MainForm {
+  [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
+  public sealed class ContentAttribute : Attribute {
+    public ContentAttribute(Type contentType) {
+      this.contentType = contentType;
+    }
+
+    public ContentAttribute(Type contentType, bool isDefaultView)
+      : this(contentType) {
+      this.isDefaultView = isDefaultView;
+    }
+
+    private bool isDefaultView;
+    public bool IsDefaultView {
+      get { return this.isDefaultView; }
+      set { this.isDefaultView = value; }
+    }
+
+    private Type contentType;
+    public Type ContentType {
+      get { return this.contentType; }
+    }
+
+    public static bool HasContentAttribute(MemberInfo viewType) {
+      ContentAttribute[] attributes = (ContentAttribute[])viewType.GetCustomAttributes(typeof(ContentAttribute), false);
+      return attributes.Length != 0;
+    }
+
+    public static bool CanViewType(MemberInfo viewType, Type content) {
+      ContentAttribute[] attributes = (ContentAttribute[])viewType.GetCustomAttributes(typeof(ContentAttribute), false);
+      return attributes.Any(a => content.IsAssignableTo(a.contentType));
+    }
+
+    internal static IEnumerable<Type> GetDefaultViewableTypes(Type viewType) {
+      ContentAttribute[] attributes = (ContentAttribute[])viewType.GetCustomAttributes(typeof(ContentAttribute), false);
+      return from a in attributes
+             where a.isDefaultView
+             select a.contentType;
+    }
+
+    internal static IEnumerable<Type> GetViewableTypes(Type viewType) {
+      ContentAttribute[] attributes = (ContentAttribute[])viewType.GetCustomAttributes(typeof(ContentAttribute), false);
+      return from a in attributes
+             select a.contentType;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/HeuristicLab.MainForm-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/HeuristicLab.MainForm-3.3.csproj	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/HeuristicLab.MainForm-3.3.csproj	(revision 3437)
@@ -0,0 +1,142 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.MainForm</RootNamespace>
+    <AssemblyName>HeuristicLab.MainForm-3.3</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <DocumentationFile>bin\Release\HeuristicLab.MainForm-3.3.xml</DocumentationFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <DocumentationFile>bin\x64\Release\HeuristicLab.MainForm-3.3.xml</DocumentationFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <DocumentationFile>bin\x86\Release\HeuristicLab.MainForm-3.3.xml</DocumentationFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLabMainFormPlugin.cs.frame" />
+    <Compile Include="Interfaces\IStorableContentView.cs" />
+    <Compile Include="ViewAttribute.cs" />
+    <Compile Include="Interfaces\IContentView.cs" />
+    <Compile Include="Interfaces\IActionUserInterfaceItem.cs" />
+    <Compile Include="Interfaces\IPositionableUserInterfaceItem.cs" />
+    <Compile Include="PositionableUserInterfaceItem.cs" />
+    <Compile Include="TypeExtension.cs" />
+    <Compile Include="ViewShownEventArgs.cs" />
+    <Compile Include="ViewEventArgs.cs" />
+    <Compile Include="ToolBarSeparatorItem.cs" />
+    <Compile Include="Interfaces\IToolBarSeparatorItem.cs" />
+    <Compile Include="Interfaces\IMenuItem.cs" />
+    <Compile Include="Interfaces\IMenuSeparatorItem.cs" />
+    <Compile Include="Interfaces\IToolBarItem.cs" />
+    <Compile Include="MainFormManager.cs" />
+    <Compile Include="MenuSeparatorItem.cs" />
+    <Compile Include="HeuristicLabMainFormPlugin.cs" />
+    <Compile Include="Interfaces\IMainForm.cs" />
+    <Compile Include="Interfaces\IUserInterfaceItem.cs" />
+    <Compile Include="Interfaces\IView.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ActionUserInterfaceItem.cs" />
+    <Compile Include="ContentAttribute.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabMainFormPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabMainFormPlugin.cs"</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: trunk/sources/HeuristicLab.MainForm/3.3/HeuristicLabMainFormPlugin.cs.frame
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/HeuristicLabMainFormPlugin.cs.frame	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/HeuristicLabMainFormPlugin.cs.frame	(revision 3437)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Modeling.Database {
+  [Plugin("HeuristicLab.MainForm", "3.3.0.$WCREV$")]
+  [PluginFile("HeuristicLab.MainForm-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  public class HeuristicLabMainFormPlugin : PluginBase {
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IActionUserInterfaceItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IActionUserInterfaceItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IActionUserInterfaceItem.cs	(revision 3437)
@@ -0,0 +1,37 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Drawing;
+
+namespace HeuristicLab.MainForm {
+  public interface IActionUserInterfaceItem : IPositionableUserInterfaceItem {
+    string Name { get; }
+
+    Image Image { get; }
+    string ToolTipText { get; }
+
+    void Execute();
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IContentView.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IContentView.cs	(revision 3437)
@@ -0,0 +1,34 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.MainForm {
+  public interface IContentView : IView {
+    IContent Content { get; set; }
+    bool Locked { get; set; }
+    event EventHandler LockedChanged;
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMainForm.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMainForm.cs	(revision 3437)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Drawing;
+using System.ComponentModel;
+
+namespace HeuristicLab.MainForm {
+  public interface IMainForm {
+    string Title { get; set; }
+
+    IView ActiveView { get; }
+    IEnumerable<IView> Views { get; }
+
+    event EventHandler ActiveViewChanged;
+    event EventHandler Changed;
+
+    event EventHandler<ViewEventArgs> ViewClosed;
+    event EventHandler<ViewShownEventArgs> ViewShown;
+    event EventHandler<ViewEventArgs> ViewHidden;
+
+    Type UserInterfaceItemType { get; }
+    void CloseAllViews();
+    void Close();
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuItem.cs	(revision 3437)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Drawing;
+
+namespace HeuristicLab.MainForm {
+  public interface IMenuItem : IActionUserInterfaceItem {
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuSeparatorItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuSeparatorItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuSeparatorItem.cs	(revision 3437)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public interface IMenuSeparatorItem : IPositionableUserInterfaceItem {
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IPositionableUserInterfaceItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IPositionableUserInterfaceItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IPositionableUserInterfaceItem.cs	(revision 3437)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public interface IPositionableUserInterfaceItem : IUserInterfaceItem {
+    int Position { get; }
+    IEnumerable<string> Structure { get; }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IStorableContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IStorableContentView.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IStorableContentView.cs	(revision 3437)
@@ -0,0 +1,32 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.MainForm {
+  public interface IStorableContentView : IContentView {
+    new IStorableContent Content { get; set; }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarItem.cs	(revision 3437)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public interface IToolBarItem : IActionUserInterfaceItem {
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarSeparatorItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarSeparatorItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarSeparatorItem.cs	(revision 3437)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public interface IToolBarSeparatorItem : IPositionableUserInterfaceItem {
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IUserInterfaceItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IUserInterfaceItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IUserInterfaceItem.cs	(revision 3437)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Drawing;
+
+namespace HeuristicLab.MainForm {
+  public interface IUserInterfaceItem {
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IView.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IView.cs	(revision 3437)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+
+namespace HeuristicLab.MainForm {
+  public interface IView {
+    bool IsShown { get; }
+    string Caption { get; set; }
+    bool ReadOnly { get; set; }
+    event EventHandler ReadOnlyChanged;
+    event EventHandler CaptionChanged;
+    event EventHandler Changed;
+
+    void Show();
+    void Hide();
+    void Close();
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/MainFormManager.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/MainFormManager.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/MainFormManager.cs	(revision 3437)
@@ -0,0 +1,228 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+using System.Diagnostics;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.MainForm {
+  public static class MainFormManager {
+    private static object locker;
+    private static IMainForm mainform;
+    private static HashSet<Type> views;
+    private static Dictionary<Type, Type> defaultViews;
+
+    static MainFormManager() {
+      locker = new object();
+      mainform = null;
+      views = new HashSet<Type>();
+      defaultViews = new Dictionary<Type, Type>();
+    }
+
+    public static void RegisterMainForm(IMainForm mainForm) {
+      lock (locker) {
+        if (MainFormManager.mainform != null)
+          throw new ArgumentException("A mainform was already associated with the mainform manager.");
+        if (mainForm == null)
+          throw new ArgumentException("Could not associate null as a mainform in the mainform manager.");
+
+        MainFormManager.mainform = mainForm;
+        IEnumerable<Type> types =
+          from t in ApplicationManager.Manager.GetTypes(typeof(IContentView))
+          where !t.IsAbstract && !t.IsInterface && ContentAttribute.HasContentAttribute(t)
+          select t;
+
+        foreach (Type viewType in types) {
+          views.Add(viewType);
+          foreach (Type contentType in ContentAttribute.GetDefaultViewableTypes(viewType)) {
+            if (defaultViews.ContainsKey(contentType))
+              throw new ArgumentException("DefaultView for type " + contentType + " is " + defaultViews[contentType] +
+                ". Can't register additional DefaultView " + viewType + ".");
+            defaultViews[contentType] = viewType;
+          }
+        }
+      }
+    }
+
+    public static IMainForm MainForm {
+      get { return mainform; }
+    }
+
+    public static T GetMainForm<T>() where T : IMainForm {
+      return (T)mainform;
+    }
+
+    public static IEnumerable<Type> GetViewTypes(Type contentType) {
+      CheckForContentType(contentType);
+      List<Type> viewTypes = (from v in views
+                              where ContentAttribute.CanViewType(v, contentType)
+                              select v).ToList();
+      //transform generic type definitions to generic types
+      for (int i = 0; i < viewTypes.Count; i++) {
+        viewTypes[i] = TransformGenericTypeDefinition(viewTypes[i], contentType);
+      }
+      return viewTypes.Where(t => t != null);
+    }
+
+    public static IEnumerable<Type> GetViewTypes(Type contentType, bool returnOnlyMostSpecificViewTypes) {
+      CheckForContentType(contentType);
+      List<Type> viewTypes = new List<Type>(GetViewTypes(contentType));
+      if (returnOnlyMostSpecificViewTypes) {
+        Type defaultViewType = null;
+        try {
+          defaultViewType = GetDefaultViewType(contentType);
+        }
+        catch (InvalidOperationException) { }
+
+        foreach (Type viewType in viewTypes.ToList()) {
+          if ((viewType != defaultViewType) && viewTypes.Any(t => t.IsSubclassOf(viewType)))
+            viewTypes.Remove(viewType);
+        }
+      }
+      return viewTypes;
+    }
+
+    public static bool ViewCanViewObject(IContentView view, IContent content) {
+      return ContentAttribute.CanViewType(view.GetType(), content.GetType());
+    }
+
+    public static Type GetDefaultViewType(Type contentType) {
+      CheckForContentType(contentType);
+      //check base classes for default view
+      Type type = contentType;
+      while (type != null) {
+        //check classes
+        foreach (Type defaultContentType in defaultViews.Keys) {
+          if (type == defaultContentType || type.CheckGenericTypes(defaultContentType))
+            return TransformGenericTypeDefinition(defaultViews[defaultContentType], contentType);
+        }
+
+        //check interfaces
+        IEnumerable<Type> nonInheritedInterfaces = type.GetInterfaces().Where(i => !i.IsAssignableFrom(type.BaseType));
+        List<Type> defaultViewList = new List<Type>();
+        foreach (Type defaultContentType in defaultViews.Keys) {
+          if (nonInheritedInterfaces.Contains(defaultContentType) || nonInheritedInterfaces.Any(i => i.CheckGenericTypes(defaultContentType)))
+            defaultViewList.Add(defaultViews[defaultContentType]);
+        }
+
+        //return only most spefic view as default view
+        foreach (Type viewType in defaultViewList.ToList()) {
+          if (defaultViewList.Any(t => t.IsSubclassOf(viewType)))
+            defaultViewList.Remove(viewType);
+        }
+
+        if (defaultViewList.Count == 1)
+          return TransformGenericTypeDefinition(defaultViewList[0], contentType);
+        else if (defaultViewList.Count > 1)
+          throw new InvalidOperationException("Could not determine which is the default view for type " + contentType.ToString() + ". Because more than one implemented interfaces have a default view.");
+
+        type = type.BaseType;
+      }
+
+      return null;
+    }
+
+    public static IContentView CreateDefaultView(object content) {
+      Type t = GetDefaultViewType(content.GetType());
+      if (t == null)
+        return null;
+
+      return (IContentView)Activator.CreateInstance(t, content);
+    }
+    public static IContentView CreateView(Type viewType) {
+      if (!typeof(IView).IsAssignableFrom(viewType))
+        throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IView.");
+      if (viewType.IsGenericTypeDefinition)
+        throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is a generic type definition.");
+
+      return (IContentView)Activator.CreateInstance(viewType);
+    }
+    public static IContentView CreateView(Type viewType, object content) {
+      CheckForContentType(content.GetType());
+      CheckForContentViewType(viewType);
+
+      Type view = viewType;
+      if (view.IsGenericTypeDefinition)
+        view = TransformGenericTypeDefinition(view, content.GetType());
+
+      return (IContentView)Activator.CreateInstance(view, content);
+    }
+
+    private static void CheckForContentType(Type contentType) {
+          if (!typeof(IContent).IsAssignableFrom(contentType))
+        throw new ArgumentException("DefaultViews are only specified for types of IContent and not for " + contentType + ".");
+    }
+    private static void CheckForContentViewType(Type viewType) {
+      if (!typeof(IContentView).IsAssignableFrom(viewType))
+        throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IContentView.");
+    }
+
+    private static Type TransformGenericTypeDefinition(Type viewType, Type contentType) {
+      if (contentType.IsGenericTypeDefinition)
+        throw new ArgumentException("The content type " + contentType.ToString() + " must not be a generic type definition.");
+
+      if (!viewType.IsGenericTypeDefinition)
+        return viewType;
+
+      Type contentTypeBaseType = null;
+      foreach (Type type in ContentAttribute.GetViewableTypes(viewType)) {
+        contentTypeBaseType = contentType;
+        while (contentTypeBaseType != null && (!contentTypeBaseType.IsGenericType ||
+              type.GetGenericTypeDefinition() != contentTypeBaseType.GetGenericTypeDefinition()))
+          contentTypeBaseType = contentTypeBaseType.BaseType;
+
+        //check interfaces for generic type arguments
+        if (contentTypeBaseType == null) {
+          IEnumerable<Type> implementedInterfaces = contentType.GetInterfaces().Where(t => t.IsGenericType);
+          foreach (Type implementedInterface in implementedInterfaces) {
+            if (implementedInterface.CheckGenericTypes(type))
+              contentTypeBaseType = implementedInterface;
+          }
+        }
+        if (contentTypeBaseType != null) break;
+      }
+
+      if (!contentTypeBaseType.IsGenericType)
+        throw new ArgumentException("Neither content type itself nor any of its base classes is a generic type. Could not determine generic type argument for the view.");
+
+      Type[] viewTypeGenericArguments = viewType.GetGenericArguments();
+      Type[] contentTypeGenericArguments = contentTypeBaseType.GetGenericArguments();
+
+      if (contentTypeGenericArguments.Length != viewTypeGenericArguments.Length)
+        throw new ArgumentException("Neiter the type (" + contentType.ToString() + ") nor any of its base types specifies " +
+          viewTypeGenericArguments.Length + " generic type arguments.");
+
+      for (int i = 0; i < viewTypeGenericArguments.Length; i++) {
+        foreach (Type typeConstraint in viewTypeGenericArguments[i].GetGenericParameterConstraints()) {
+          if (!typeConstraint.IsAssignableFrom(contentTypeGenericArguments[i]))
+            return null;
+        }
+      }
+
+      Type returnType = viewType.MakeGenericType(contentTypeGenericArguments);
+      return returnType;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/MenuSeparatorItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/MenuSeparatorItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/MenuSeparatorItem.cs	(revision 3437)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public abstract class MenuSeparatorItem : PositionableUserInterfaceItem, IMenuSeparatorItem {
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/PositionableUserInterfaceItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/PositionableUserInterfaceItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/PositionableUserInterfaceItem.cs	(revision 3437)
@@ -0,0 +1,35 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public abstract class PositionableUserInterfaceItem : IPositionableUserInterfaceItem {
+    public abstract int Position { get; }
+
+    public virtual IEnumerable<string> Structure {
+      get { return Enumerable.Empty<string>(); }
+    } 
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/Properties/AssemblyInfo.frame
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/Properties/AssemblyInfo.frame	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/Properties/AssemblyInfo.frame	(revision 3437)
@@ -0,0 +1,56 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.MainForm")]
+[assembly: AssemblyDescription("HeuristicLab mainform classes")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2010 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("f9718239-4d37-4410-84d7-9c3468b01cbf")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
Index: trunk/sources/HeuristicLab.MainForm/3.3/ToolBarSeparatorItem.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/ToolBarSeparatorItem.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/ToolBarSeparatorItem.cs	(revision 3437)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public abstract class ToolBarSeparatorItem : PositionableUserInterfaceItem,IToolBarSeparatorItem {
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/TypeExtension.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/TypeExtension.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/TypeExtension.cs	(revision 3437)
@@ -0,0 +1,81 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Diagnostics;
+
+namespace HeuristicLab.MainForm {
+  internal static class TypeExtension {
+    internal static bool IsAssignableTo(this Type type, Type other) {
+      if (other.IsAssignableFrom(type))
+        return true;
+
+      if (RecursiveCheckGenericTypes(type, other))
+        return true;
+
+      IEnumerable<Type> implementedInterfaces = type.GetInterfaces().Where(t => t.IsGenericType);
+      foreach (Type implementedInterface in implementedInterfaces) {
+        if (implementedInterface.CheckGenericTypes(other))
+          return true;
+      }
+
+      return false;
+    }
+
+    private static bool RecursiveCheckGenericTypes(Type type, Type other) {
+      if (type.CheckGenericTypes(other))
+        return true;
+
+      if (type.BaseType == null)
+        return false;
+
+      return RecursiveCheckGenericTypes(type.BaseType, other);
+    }
+
+    internal static bool CheckGenericTypes(this Type type, Type other) {
+      if (!type.IsGenericType || !other.IsGenericType)
+        return false;
+
+      if (type.GetGenericTypeDefinition() == other.GetGenericTypeDefinition())
+        return type.CheckGenericArguments(other);
+
+      return false;
+    }
+
+    private static bool CheckGenericArguments(this Type type, Type other) {
+      Type[] typeGenericArguments = type.GetGenericArguments();
+      Type[] otherGenericArguments = other.GetGenericArguments();
+
+      if (typeGenericArguments.Length != otherGenericArguments.Length)
+        return false;
+
+      for (int i = 0; i < typeGenericArguments.Length; i++) {
+        if (typeGenericArguments[i] != otherGenericArguments[i]
+          && !otherGenericArguments[i].IsGenericParameter)
+          return false;
+      }
+      return true;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/ViewAttribute.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/ViewAttribute.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/ViewAttribute.cs	(revision 3437)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Reflection;
+
+namespace HeuristicLab.MainForm {
+  [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
+  public sealed class ViewAttribute : Attribute {
+    public ViewAttribute(string name) {
+      this.name = name;
+    }
+
+    private string name;
+    public string Name {
+      get { return this.name; }
+      set { this.name = value; }
+    }
+
+    public static bool HasViewAttribute(MemberInfo viewType) {
+      ViewAttribute[] attributes = (ViewAttribute[])viewType.GetCustomAttributes(typeof(ViewAttribute), false);
+      return attributes.Length != 0;
+    }
+
+    public static string GetViewName(MemberInfo viewType) {
+      ViewAttribute[] attributes = (ViewAttribute[])viewType.GetCustomAttributes(typeof(ViewAttribute), false);
+      if (attributes.Length == 1)
+        return attributes[0].Name;
+      return viewType.Name;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/ViewEventArgs.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/ViewEventArgs.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/ViewEventArgs.cs	(revision 3437)
@@ -0,0 +1,39 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public class ViewEventArgs : EventArgs {
+    public ViewEventArgs(IView view)
+      : base() {
+      this.view = view;
+    }
+
+    private IView view;
+    public IView View {
+      get { return this.view; }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.3/ViewShownEventArgs.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.3/ViewShownEventArgs.cs	(revision 3437)
+++ trunk/sources/HeuristicLab.MainForm/3.3/ViewShownEventArgs.cs	(revision 3437)
@@ -0,0 +1,39 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public class ViewShownEventArgs : ViewEventArgs {
+    public ViewShownEventArgs(IView view, bool firstTimeShown)
+      : base(view) {
+      this.firstTimeShown = firstTimeShown;
+    }
+
+    private bool firstTimeShown;
+    public bool  FirstTimeShown {
+      get { return this.firstTimeShown; }
+    }
+  }
+}
