Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/AsynchronousContentView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/AsynchronousContentView.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,53 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class AsynchronousContentView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      components = new System.ComponentModel.Container();
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/AsynchronousContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/AsynchronousContentView.cs	(revision 5462)
+++ 	(revision )
@@ -1,64 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Threading;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public partial class AsynchronousContentView : ContentView {
-    public AsynchronousContentView() {
-      InitializeComponent();
-    }
-
-    /// <summary>
-    /// Asynchronous call of GUI updating.
-    /// </summary>
-    /// <param name="method">The delegate to invoke.</param>
-    protected new void Invoke(Delegate method) {
-      // prevents blocking of worker thread in Invoke, if the control is disposed
-      IAsyncResult result = BeginInvoke(method);
-      result.AsyncWaitHandle.WaitOne(1000, false);
-      if (result.IsCompleted) try { EndInvoke(result); }
-        catch (ObjectDisposedException) { } else {
-        ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle,
-          new WaitOrTimerCallback((x, b) => { try { EndInvoke(result); } catch (ObjectDisposedException) { } }),
-          null, -1, true);
-      }
-    }
-
-    /// <summary>
-    /// Asynchronous call of GUI updating.
-    /// </summary>
-    /// <param name="method">The delegate to invoke.</param>
-    /// <param name="args">The invoke arguments.</param>
-    protected new void Invoke(Delegate method, params object[] args) {
-      // prevents blocking of worker thread in Invoke, if the control is disposed
-      IAsyncResult result = BeginInvoke(method, args);
-      result.AsyncWaitHandle.WaitOne(1000, false);
-      if (result.IsCompleted) try { EndInvoke(result); }
-        catch (ObjectDisposedException) { } else {
-        ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle,
-          new WaitOrTimerCallback((x, b) => { try { EndInvoke(result); } catch (ObjectDisposedException) { } }),
-          null, -1, true);
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ContentView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ContentView.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,47 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class ContentView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // ContentView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Name = "ContentView";
-      this.ResumeLayout(false);
-
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ContentView.cs	(revision 5462)
+++ 	(revision )
@@ -1,126 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Reflection;
-using System.Windows.Forms;
-using HeuristicLab.Common;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public partial class ContentView : View, IContentView {
-    public ContentView()
-      : base() {
-      InitializeComponent();
-      this.locked = false;
-    }
-
-    private IContent content;
-    public IContent Content {
-      get { return content; }
-      set {
-        //check if the ContentView is tagged with a corresponding ContentAttribute for the type of the Content
-        if ((value != null) && (!MainFormManager.ViewCanViewContent(this, value)) &&
-          ContentAttribute.HasContentAttribute(this.GetType()))
-          throw new ArgumentException(string.Format("View \"{0}\" cannot view object \"{1}\".", this.GetType().Name, value.GetType().Name));
-        if (InvokeRequired) {
-          Invoke(new Action<IContent>(delegate(IContent o) { this.Content = o; }), value);
-        } else {
-          if (this.content != value) {
-            this.SuspendRepaint();
-            if (this.content != null) this.DeregisterContentEvents();
-            this.content = value;
-            if (this.content != null) this.RegisterContentEvents();
-            this.OnContentChanged();
-            this.SetEnabledStateOfControls();
-            this.OnChanged();
-            this.ResumeRepaint(true);
-          }
-        }
-      }
-    }
-
-    private bool locked;
-    public virtual bool Locked {
-      get { return this.locked; }
-      set {
-        if (InvokeRequired) {
-          Action<bool> action = delegate(bool b) { this.Locked = b; };
-          Invoke(action, value);
-        } else {
-          if (value != locked) {
-            locked = value;
-            OnLockedChanged();
-            PropertyInfo prop = typeof(IContentView).GetProperty("Locked");
-            PropagateStateChanges(this, typeof(IContentView), prop);
-            SetEnabledStateOfControls();
-            OnChanged();
-          }
-        }
-      }
-    }
-    public event EventHandler LockedChanged;
-    protected virtual void OnLockedChanged() {
-      if (InvokeRequired)
-        Invoke((MethodInvoker)OnLockedChanged);
-      else {
-        EventHandler handler = LockedChanged;
-        if (handler != null)
-          handler(this, EventArgs.Empty);
-      }
-    }
-    /// <summary>
-    /// Adds eventhandlers to the current instance.
-    /// </summary>
-    protected virtual void RegisterContentEvents() {
-    }
-
-    /// <summary>
-    /// Removes the eventhandlers from the current instance.
-    /// </summary>
-    protected virtual void DeregisterContentEvents() {
-    }
-
-    /// <summary>
-    /// Is called when the content property changes.
-    /// </summary>
-    protected virtual void OnContentChanged() {
-    }
-
-    /// <summary>
-    /// This method is called if the ReadyOnly, Locked or Content property of the ContentView changes to update the controls of the view.
-    /// </summary>
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-    }
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (Content != null) DeregisterContentEvents();
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ControlExtensions.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ControlExtensions.cs	(revision 5462)
+++ 	(revision )
@@ -1,48 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Runtime.InteropServices;
-using System.Windows.Forms;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public static class ControlExtensions {
-    [DllImport("user32.dll")]
-    private static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam);
-
-    private const int WM_SETREDRAW = 11;
-
-    public static void SuspendRepaint(this Control control) {
-      if (control.InvokeRequired)
-        control.Invoke(new Action<Control>(c => c.SuspendRepaint()), control);
-      else
-        SendMessage(control.Handle, WM_SETREDRAW, false, 0);
-    }
-    public static void ResumeRepaint(this Control control, bool refresh) {
-      if (control.InvokeRequired)
-        control.Invoke(new Action<Control, bool>((c, b) => c.ResumeRepaint(b)), control, refresh);
-      else {
-        SendMessage(control.Handle, WM_SETREDRAW, true, 0);
-        if (refresh) control.Refresh();
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ControlExtensions.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ControlExtensions.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ControlExtensions.cs	(revision 5463)
@@ -0,0 +1,48 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Runtime.InteropServices;
+using System.Windows.Forms;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public static class ControlExtensions {
+    [DllImport("user32.dll")]
+    private static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam);
+
+    private const int WM_SETREDRAW = 11;
+
+    public static void SuspendRepaint(this Control control) {
+      if (control.InvokeRequired)
+        control.Invoke(new Action<Control>(c => c.SuspendRepaint()), control);
+      else
+        SendMessage(control.Handle, WM_SETREDRAW, false, 0);
+    }
+    public static void ResumeRepaint(this Control control, bool refresh) {
+      if (control.InvokeRequired)
+        control.Invoke(new Action<Control, bool>((c, b) => c.ResumeRepaint(b)), control, refresh);
+      else {
+        SendMessage(control.Handle, WM_SETREDRAW, true, 0);
+        if (refresh) control.Refresh();
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/DragOverTabControl.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/DragOverTabControl.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/DragOverTabControl.Designer.cs	(revision 5463)
@@ -0,0 +1,59 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class DragOverTabControl {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // DragOverTabControl
+      // 
+      this.AllowDrop = true;
+      this.DragOver += new System.Windows.Forms.DragEventHandler(this.DragOverTabControl_DragOver);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/DragOverTabControl.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/DragOverTabControl.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/DragOverTabControl.cs	(revision 5463)
@@ -0,0 +1,42 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Drawing;
+using System.Windows.Forms;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class DragOverTabControl : TabControl {
+    public DragOverTabControl() {
+      InitializeComponent();
+    }
+
+    private void DragOverTabControl_DragOver(object sender, DragEventArgs e) {
+      Point position = PointToClient(Control.MousePosition);
+      int tabIndex = -1;
+      for (int i = 0; i < TabPages.Count; i++) {
+        if (GetTabRect(i).Contains(position)) tabIndex = i;
+      }
+
+      if (tabIndex != SelectedIndex)
+        SelectedIndex = tabIndex;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/Sidebar.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/Sidebar.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/Sidebar.Designer.cs	(revision 5463)
@@ -0,0 +1,61 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class Sidebar {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // DockSideBar
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "DockSideBar";
+      this.Size = new System.Drawing.Size(230, 225);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/Sidebar.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/Sidebar.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/Sidebar.cs	(revision 5463)
@@ -0,0 +1,62 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class Sidebar : View {
+    public Sidebar() {
+      InitializeComponent();
+    }
+
+    private bool collapsed;
+    public bool Collapsed {
+      get { return this.collapsed; }
+      set {
+        if (this.collapsed != value) {
+          this.collapsed = value;
+
+          DockForm form = MainFormManager.GetMainForm<MainForm>().GetForm(this) as DockForm;
+          if (form != null) {
+            if (form.DockState == DockState.DockLeft || form.DockState == DockState.DockLeftAutoHide)
+              form.DockState = collapsed ? DockState.DockLeftAutoHide : DockState.DockLeft;
+            else if (form.DockState == DockState.DockRight || form.DockState == DockState.DockRightAutoHide)
+              form.DockState = collapsed ? DockState.DockRightAutoHide : DockState.DockRight;
+          }
+
+          this.OnCollapsedChanged();
+        }
+      }
+    }
+
+    protected virtual void OnCollapsedChanged() {
+    }
+
+    internal protected override void OnClosing(FormClosingEventArgs e) {
+      base.OnClosing(e);
+      if (e.CloseReason == CloseReason.UserClosing) {
+        e.Cancel = true;
+        this.Hide();
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewContextMenuStrip.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewContextMenuStrip.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewContextMenuStrip.Designer.cs	(revision 5463)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class ViewContextMenuStrip {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // ViewContextMenuStrip
+      // 
+      this.ResumeLayout(false);
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewContextMenuStrip.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewContextMenuStrip.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewContextMenuStrip.cs	(revision 5463)
@@ -0,0 +1,83 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public sealed partial class ViewContextMenuStrip : ContextMenuStrip {
+    public ViewContextMenuStrip() {
+      InitializeComponent();
+      this.menuItems = new Dictionary<Type, ToolStripMenuItem>();
+      this.ignoredViewTypes = new List<Type>();
+    }
+
+    public ViewContextMenuStrip(object item)
+      : this() {
+      this.Item = item;
+    }
+
+    private object item;
+    public object Item {
+      get { return this.item; }
+      set {
+        if (this.item != value) {
+          this.item = value;
+          this.RefreshMenuItems();
+        }
+      }
+    }
+
+    private List<Type> ignoredViewTypes;
+    public IEnumerable<Type> IgnoredViewTypes {
+      get { return this.ignoredViewTypes; }
+      set { this.ignoredViewTypes = new List<Type>(value); RefreshMenuItems(); }
+    }
+
+    private Dictionary<Type, ToolStripMenuItem> menuItems;
+    public IEnumerable<KeyValuePair<Type, ToolStripMenuItem>> MenuItems {
+      get { return this.menuItems; }
+    }
+
+    private void RefreshMenuItems() {
+      if (InvokeRequired) Invoke((Action)RefreshMenuItems);
+      else {
+        this.Items.Clear();
+        this.menuItems.Clear();
+
+        if (this.item != null) {
+          ToolStripMenuItem menuItem;
+          IEnumerable<Type> types = MainFormManager.GetViewTypes(item.GetType(), true);
+          foreach (Type t in types.Except(IgnoredViewTypes)) {
+            menuItem = new ToolStripMenuItem();
+            menuItem.Tag = t;
+            menuItem.Text = ViewAttribute.GetViewName(t);
+
+            this.menuItems.Add(t, menuItem);
+            this.Items.Add(menuItem);
+          }
+        }
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.Designer.cs	(revision 5463)
@@ -0,0 +1,107 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class ViewHost {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewHost));
+      this.messageLabel = new System.Windows.Forms.Label();
+      this.viewsLabel = new System.Windows.Forms.Label();
+      this.viewContextMenuStrip = new HeuristicLab.MainForm.WindowsForms.ViewContextMenuStrip();
+      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+      this.SuspendLayout();
+      // 
+      // messageLabel
+      // 
+      this.messageLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.messageLabel.Location = new System.Drawing.Point(0, 0);
+      this.messageLabel.Name = "messageLabel";
+      this.messageLabel.Size = new System.Drawing.Size(227, 184);
+      this.messageLabel.TabIndex = 2;
+      this.messageLabel.Text = "No view available.";
+      this.messageLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+      // 
+      // viewsLabel
+      // 
+      this.viewsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.viewsLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Windows;
+      this.viewsLabel.Location = new System.Drawing.Point(211, 0);
+      this.viewsLabel.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
+      this.viewsLabel.Name = "viewsLabel";
+      this.viewsLabel.Size = new System.Drawing.Size(16, 16);
+      this.viewsLabel.TabIndex = 0;
+      this.toolTip.SetToolTip(this.viewsLabel, "Double-click to open a new window of the current view.\r\nRight-click to change cur" +
+              "rent view.\r\nDrag icon to copy or link content to another view.");
+      this.viewsLabel.DoubleClick += new System.EventHandler(this.viewsLabel_DoubleClick);
+      this.viewsLabel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.viewsLabel_MouseDown);
+      this.viewsLabel.MouseLeave += new System.EventHandler(this.viewsLabel_MouseLeave);
+      // 
+      // viewContextMenuStrip
+      // 
+      this.viewContextMenuStrip.IgnoredViewTypes = System.Linq.Enumerable.Empty<System.Type>();
+      this.viewContextMenuStrip.Item = null;
+      this.viewContextMenuStrip.Name = "viewContextMenuStrip";
+      this.viewContextMenuStrip.Size = new System.Drawing.Size(61, 4);
+      this.viewContextMenuStrip.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.viewContextMenuStrip_ItemClicked);
+      // 
+      // ViewHost
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.viewsLabel);
+      this.Controls.Add(this.messageLabel);
+      this.Name = "ViewHost";
+      this.Size = new System.Drawing.Size(227, 184);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+    private System.Windows.Forms.Label viewsLabel;
+    private System.Windows.Forms.Label messageLabel;
+    private System.Windows.Forms.ToolTip toolTip;
+    private HeuristicLab.MainForm.WindowsForms.ViewContextMenuStrip viewContextMenuStrip;
+
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.cs	(revision 5463)
@@ -0,0 +1,291 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  [Content(typeof(IContent))]
+  public sealed partial class ViewHost : AsynchronousContentView {
+    public ViewHost() {
+      InitializeComponent();
+      startDragAndDrop = false;
+      viewContextMenuStrip.IgnoredViewTypes = new List<Type>() { typeof(ViewHost) };
+
+      viewType = null;
+      activeView = null;
+      Content = null;
+      messageLabel.Visible = false;
+      viewsLabel.Visible = false;
+      viewsLabelVisible = true;
+    }
+
+    private bool viewsLabelVisible;
+    public bool ViewsLabelVisible {
+      get { return viewsLabelVisible; }
+      set {
+        if (viewsLabelVisible != value) {
+          viewsLabelVisible = value;
+          viewsLabel.Visible = value;
+          View view = activeView as View;
+          if (view != null) view.Dock = viewsLabelVisible ? DockStyle.None : DockStyle.Fill;
+        }
+      }
+    }
+
+    private IContentView cachedView;
+    private IContentView activeView;
+    public IContentView ActiveView {
+      get { return activeView; }
+      private set {
+        if (activeView != value) {
+          if (activeView != null) {
+            cachedView = activeView;
+            DeregisterActiveViewEvents();
+            View cached = cachedView as View;
+            if (cached != null) {
+              cached.OnHidden(EventArgs.Empty);
+              cached.Visible = false;
+            }
+          }
+
+          activeView = value;
+
+          if (activeView != null) {
+            #region disposed cachedView
+            if (activeView != cachedView) {
+              if (cachedView != null) cachedView.Content = null;  //needed to deregister events
+              View cached = cachedView as View;
+              if (cached != null) {
+                Controls.Remove(cached);
+                cached.Dispose();
+              }
+              cachedView = null;
+            }
+            #endregion
+
+            this.Caption = activeView.Caption;
+            viewType = activeView.GetType();
+            RegisterActiveViewEvents();
+            View view = activeView as View;
+            if (view != null) {
+              view.Visible = true;
+              view.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
+              view.Size = new Size(Width - this.viewsLabel.Width - this.viewsLabel.Margin.Left - this.viewsLabel.Margin.Right, this.Height);
+              view.Dock = viewsLabelVisible ? DockStyle.None : DockStyle.Fill;
+              view.OnShown(new ViewShownEventArgs(view, false));
+              if (!Controls.Contains((view))) Controls.Add(view);
+            }
+          } else viewType = null;
+        }
+      }
+    }
+
+    private Type viewType;
+    public Type ViewType {
+      get { return viewType; }
+      set {
+        if (viewType != value) {
+          if (value == typeof(ViewHost))
+            throw new ArgumentException("Directly nested ViewHosts are not allowed.");
+          if (value != null && Content != null && !ViewCanShowContent(value, Content))
+            throw new ArgumentException(string.Format("View \"{0}\" cannot display content \"{1}\".", value, Content.GetType()));
+
+          viewType = value;
+          OnViewTypeChanged();
+        }
+      }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      Enabled = Content != null;
+    }
+
+    protected override void OnContentChanged() {
+      viewContextMenuStrip.Item = Content;
+      //change ViewType if view of ViewType can not show content or is null
+      if (Content != null) {
+        if (!ViewCanShowContent(viewType, Content)) {
+          Type defaultViewType = MainFormManager.GetDefaultViewType(Content.GetType());
+          if (cachedView != null && cachedView.GetType() == defaultViewType)
+            ActiveView = cachedView;
+          else if (defaultViewType != null)
+            ViewType = defaultViewType;
+          else if (viewContextMenuStrip.Items.Count > 0)  // create first available view if no default view is available
+            ViewType = (Type)viewContextMenuStrip.Items[0].Tag;
+          else {
+            ViewType = null;
+            ActiveView = null;
+          }
+        }
+        if (ActiveView != null) ActiveView.Content = Content;
+      } else ActiveView = null;
+      UpdateLabels();
+      UpdateActiveMenuItem();
+    }
+
+    private void UpdateLabels() {
+      if (Content != null && viewContextMenuStrip.Items.Count > 0) {
+        messageLabel.Visible = false;
+        viewsLabel.Visible = viewsLabelVisible;
+      } else if (Content != null) {
+        messageLabel.Visible = true;
+        viewsLabel.Visible = false;
+      } else {
+        messageLabel.Visible = false;
+        viewsLabel.Visible = false;
+      }
+    }
+
+    private void OnViewTypeChanged() {
+      if (viewType != null) {
+        if (!ViewCanShowContent(viewType, Content))
+          throw new InvalidOperationException(string.Format("View \"{0}\" cannot display content \"{1}\".",
+                                                            viewType, Content.GetType()));
+        IContentView view = MainFormManager.CreateView(viewType);
+        view.Locked = Locked;
+        view.ReadOnly = ReadOnly;
+        ActiveView = view; //necessary to allow the views to change the status of the viewhost
+        view.Content = Content;
+
+        UpdateActiveMenuItem();
+      }
+    }
+
+    private void RegisterActiveViewEvents() {
+      activeView.CaptionChanged += new EventHandler(activeView_CaptionChanged);
+      activeView.LockedChanged += new EventHandler(activeView_LockedChanged);
+    }
+    private void DeregisterActiveViewEvents() {
+      activeView.CaptionChanged -= new EventHandler(activeView_CaptionChanged);
+      activeView.LockedChanged -= new EventHandler(activeView_LockedChanged);
+    }
+    private void activeView_CaptionChanged(object sender, EventArgs e) {
+      Caption = activeView.Caption;
+    }
+    private void activeView_LockedChanged(object sender, EventArgs e) {
+      Locked = activeView.Locked;
+    }
+
+    protected override void OnSizeChanged(EventArgs e) {
+      //mkommend: solution to resizing issues. taken from http://support.microsoft.com/kb/953934
+      //not implemented with a panel to reduce the number of nested controls
+      if (Handle != null)
+        this.BeginInvoke((Action<EventArgs>)OnSizeChangedHelper, e);
+    }
+    private void OnSizeChangedHelper(EventArgs e) {
+      base.OnSizeChanged(e);
+      viewsLabel.Location = new Point(Width - viewsLabel.Margin.Right - viewsLabel.Width, viewsLabel.Margin.Top);
+    }
+
+    #region forwarding of view events
+    internal protected override void OnShown(ViewShownEventArgs e) {
+      base.OnShown(e);
+      View view = ActiveView as View;
+      if (view != null)
+        view.OnShown(e);
+    }
+    internal protected override void OnHidden(EventArgs e) {
+      base.OnHidden(e);
+      View view = ActiveView as View;
+      if (view != null)
+        view.OnHidden(e);
+    }
+    internal protected override void OnClosing(FormClosingEventArgs e) {
+      base.OnClosing(e);
+      View view = ActiveView as View;
+      if (view != null)
+        view.OnClosing(e);
+    }
+    internal protected override void OnClosed(FormClosedEventArgs e) {
+      base.OnClosed(e);
+      View view = ActiveView as View;
+      if (view != null)
+        view.OnClosed(e);
+    }
+    #endregion
+
+    #region GUI actions
+    private void UpdateActiveMenuItem() {
+      foreach (KeyValuePair<Type, ToolStripMenuItem> item in viewContextMenuStrip.MenuItems) {
+        if (item.Key == viewType) {
+          item.Value.Checked = true;
+          item.Value.Enabled = false;
+        } else {
+          item.Value.Checked = false;
+          item.Value.Enabled = true;
+        }
+      }
+    }
+
+    private bool ViewCanShowContent(Type viewType, object content) {
+      if (content == null) // every view can display null
+        return true;
+      if (viewType == null)
+        return false;
+      return ContentAttribute.CanViewType(viewType, Content.GetType()) && viewContextMenuStrip.MenuItems.Any(item => item.Key == viewType);
+    }
+
+    private void viewsLabel_DoubleClick(object sender, EventArgs e) {
+      IContentView view = MainFormManager.MainForm.ShowContent(this.Content, this.ViewType);
+      if (view != null) {
+        view.ReadOnly = this.ReadOnly;
+        view.Locked = this.Locked;
+      }
+    }
+    private void viewContextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) {
+      Type viewType = (Type)e.ClickedItem.Tag;
+      ViewType = viewType;
+    }
+
+    private bool startDragAndDrop;
+    private void viewsLabel_MouseDown(object sender, MouseEventArgs e) {
+      if (e.Button == System.Windows.Forms.MouseButtons.Right) {
+        Screen screen = Screen.FromControl(viewsLabel);
+        int rightBorder = viewsLabel.PointToScreen(viewsLabel.Location).X + viewContextMenuStrip.Width; //
+        rightBorder = rightBorder - screen.Bounds.X; //pixel position on active screen
+
+        if (rightBorder < screen.Bounds.Width)
+          viewContextMenuStrip.Show(viewsLabel, viewsLabel.Margin.Left, viewsLabel.Margin.Top);
+        else
+          viewContextMenuStrip.Show(screen.Bounds.X + screen.Bounds.Width - viewContextMenuStrip.Width, viewsLabel.PointToScreen(viewsLabel.Location).Y - viewsLabel.Margin.Top);
+      } else if (!Locked) {
+        startDragAndDrop = true;
+        viewsLabel.Capture = false;
+        viewsLabel.Focus();
+      }
+    }
+    private void viewsLabel_MouseLeave(object sender, EventArgs e) {
+      if ((Control.MouseButtons & MouseButtons.Left) == MouseButtons.Left && startDragAndDrop) {
+        DataObject data = new DataObject();
+        data.SetData("Type", Content.GetType());
+        data.SetData("Value", Content);
+        DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link);
+      } else
+        startDragAndDrop = false;
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockForm.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,69 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class DockForm {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DockForm));
-      this.viewPanel = new System.Windows.Forms.Panel();
-      this.SuspendLayout();
-      // 
-      // viewPanel
-      // 
-      this.viewPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.viewPanel.Location = new System.Drawing.Point(12, 12);
-      this.viewPanel.Name = "viewPanel";
-      this.viewPanel.Size = new System.Drawing.Size(608, 422);
-      this.viewPanel.TabIndex = 0;
-      // 
-      // DockForm
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(632, 446);
-      this.Controls.Add(this.viewPanel);
-      this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-      this.Icon = HeuristicLab.Common.Resources.HeuristicLab.Icon;
-      this.Name = "DockForm";
-      this.ShowIcon = false;
-      this.ShowInTaskbar = false;
-      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
-      this.ResumeLayout(false);
-    }
-
-    #endregion
-
-    private System.Windows.Forms.Panel viewPanel;
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockForm.cs	(revision 5462)
+++ 	(revision )
@@ -1,114 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Windows.Forms;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  /// <summary>
-  /// Displays the used view.
-  /// </summary>
-  internal partial class DockForm : DockContent {
-    public DockForm(IView view) {
-      InitializeComponent();
-      this.view = view;
-      if (view != null) {
-        if (view is UserControl) {
-          switch (((UserControl)view).Dock) {
-            case DockStyle.Left:
-              this.ShowHint = DockState.DockLeft;
-              break;
-            case DockStyle.Right:
-              this.ShowHint = DockState.DockRight;
-              break;
-            case DockStyle.Top:
-              this.ShowHint = DockState.DockTop;
-              break;
-            case DockStyle.Bottom:
-              this.ShowHint = DockState.DockBottom;
-              break;
-          }
-          Sidebar sidebar = view as Sidebar;
-          if (sidebar != null) {
-            if (sidebar.Collapsed)
-              this.ShowHint = DockState.DockLeftAutoHide;
-            else
-              this.ShowHint = DockState.DockLeft;
-            this.DockAreas = DockAreas.DockLeft | DockAreas.DockRight;
-          }
-
-          Type viewType = view.GetType();
-          Control control = (Control)view;
-          control.Dock = DockStyle.Fill;
-          this.view.CaptionChanged += new EventHandler(View_CaptionChanged);
-          UpdateText();
-          viewPanel.Controls.Add(control);
-        }
-      } else {
-        Label errorLabel = new Label();
-        errorLabel.Name = "errorLabel";
-        errorLabel.Text = "No view available";
-        errorLabel.AutoSize = false;
-        errorLabel.Dock = DockStyle.Fill;
-        viewPanel.Controls.Add(errorLabel);
-      }
-    }
-
-    protected override void Dispose(bool disposing) {
-      if (View != null)
-        View.CaptionChanged -= new System.EventHandler(View_CaptionChanged);
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    private IView view;
-    public IView View {
-      get { return this.view; }
-    }
-
-    private void UpdateText() {
-      if (InvokeRequired)
-        Invoke(new MethodInvoker(UpdateText));
-      else
-        this.Text = this.View.Caption;
-    }
-
-    protected override void OnDockStateChanged(EventArgs e) {
-      base.OnDockStateChanged(e);
-      Sidebar sidebar = view as Sidebar;
-      if (sidebar != null) {
-        if (this.DockState == DockState.DockLeftAutoHide || this.DockState == DockState.DockRightAutoHide)
-          sidebar.Collapsed = true;
-        else
-          sidebar.Collapsed = false;
-      }
-    }
-
-    #region View Events
-    private void View_CaptionChanged(object sender, EventArgs e) {
-      UpdateText();
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockingMainForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockingMainForm.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,137 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class DockingMainForm {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary>
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
-      WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin1 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
-      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
-      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
-      WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
-      WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
-      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
-      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
-      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
-      WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
-      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
-      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
-      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
-      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
-      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
-      this.dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel();
-      this.SuspendLayout();
-      // 
-      // dockPanel
-      // 
-      this.dockPanel.ActiveAutoHideContent = null;
-      this.dockPanel.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.dockPanel.DockBackColor = System.Drawing.SystemColors.Control;
-      this.dockPanel.Location = new System.Drawing.Point(0, 49);
-      this.dockPanel.Name = "dockPanel";
-      this.dockPanel.Size = new System.Drawing.Size(624, 341);
-      dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
-      dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
-      autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
-      tabGradient1.EndColor = System.Drawing.SystemColors.Control;
-      tabGradient1.StartColor = System.Drawing.SystemColors.Control;
-      tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark;
-      autoHideStripSkin1.TabGradient = tabGradient1;
-      dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1;
-      tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight;
-      tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight;
-      tabGradient2.TextColor = System.Drawing.SystemColors.ControlText;
-      dockPaneStripGradient1.ActiveTabGradient = tabGradient2;
-      dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control;
-      dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control;
-      dockPaneStripGradient1.DockStripGradient = dockPanelGradient2;
-      tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
-      tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
-      tabGradient3.TextColor = System.Drawing.SystemColors.ControlText;
-      dockPaneStripGradient1.InactiveTabGradient = tabGradient3;
-      dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1;
-      tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption;
-      tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
-      tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
-      tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
-      dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4;
-      tabGradient5.EndColor = System.Drawing.SystemColors.Control;
-      tabGradient5.StartColor = System.Drawing.SystemColors.Control;
-      tabGradient5.TextColor = System.Drawing.SystemColors.ControlText;
-      dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5;
-      dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
-      dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
-      dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3;
-      tabGradient6.EndColor = System.Drawing.SystemColors.GradientInactiveCaption;
-      tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
-      tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
-      tabGradient6.TextColor = System.Drawing.SystemColors.ControlText;
-      dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
-      tabGradient7.EndColor = System.Drawing.Color.Transparent;
-      tabGradient7.StartColor = System.Drawing.Color.Transparent;
-      tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark;
-      dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7;
-      dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1;
-      dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1;
-      this.dockPanel.Skin = dockPanelSkin1;
-      this.dockPanel.TabIndex = 3;
-      this.dockPanel.ActiveContentChanged += new System.EventHandler(this.dockPanel_ActiveContentChanged);
-      // 
-      // DockingMainForm
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(624, 412);
-      this.Controls.Add(this.dockPanel);
-      this.IsMdiContainer = true;
-      this.Name = "DockingMainForm";
-      this.Controls.SetChildIndex(this.dockPanel, 0);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel;
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockingMainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockingMainForm.cs	(revision 5462)
+++ 	(revision )
@@ -1,71 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Windows.Forms;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public partial class DockingMainForm : MainForm {
-    public DockingMainForm()
-      : base() {
-      InitializeComponent();
-    }
-    public DockingMainForm(Type userInterfaceItemType)
-      : base(userInterfaceItemType) {
-      InitializeComponent();
-    }
-    public DockingMainForm(Type userInterfaceItemType, bool showContentInViewHost)
-      : this(userInterfaceItemType) {
-      this.ShowContentInViewHost = showContentInViewHost;
-    }
-
-    protected override void ShowView(IView view, bool firstTimeShown) {
-      if (InvokeRequired) Invoke((Action<IView, bool>)ShowView, view, firstTimeShown);
-      else {
-        base.ShowView(view, firstTimeShown);
-        if (firstTimeShown)
-          ((DockForm)GetForm(view)).Show(dockPanel);
-        else
-          ((DockForm)GetForm(view)).Activate();
-      }
-    }
-
-    protected override void Hide(IView view) {
-      if (InvokeRequired) Invoke((Action<IView>)HideView, view);
-      else {
-        Form form = this.GetForm(view);
-        if (form != null) {
-          ((DockForm)form).Hide();
-        }
-      }
-    }
-
-    protected override Form CreateForm(IView view) {
-      return new DockForm(view);
-    }
-
-    private void dockPanel_ActiveContentChanged(object sender, EventArgs e) {
-      DockForm content = this.dockPanel.ActiveContent as DockForm;
-      if (content != null)
-        this.ActiveView = content.View;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DocumentForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DocumentForm.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,69 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class DocumentForm {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DocumentForm));
-      this.viewPanel = new System.Windows.Forms.Panel();
-      this.SuspendLayout();
-      // 
-      // viewPanel
-      // 
-      this.viewPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.viewPanel.Location = new System.Drawing.Point(12, 12);
-      this.viewPanel.Name = "viewPanel";
-      this.viewPanel.Size = new System.Drawing.Size(608, 422);
-      this.viewPanel.TabIndex = 0;
-      // 
-      // ViewForm
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(632, 446);
-      this.Controls.Add(this.viewPanel);
-      this.Icon = HeuristicLab.Common.Resources.HeuristicLab.Icon;
-      this.Name = "ViewForm";
-      this.ShowInTaskbar = false;
-      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
-      this.Text = "View";
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.Panel viewPanel;
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DocumentForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DocumentForm.cs	(revision 5462)
+++ 	(revision )
@@ -1,74 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Windows.Forms;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  internal partial class DocumentForm : Form {
-    private IView view;
-
-    public DocumentForm() {
-      InitializeComponent();
-    }
-    public DocumentForm(IView view)
-      : this() {
-      this.view = view;
-      if (view != null) {
-        Type viewType = view.GetType();
-        Control control = (Control)view;
-        control.Dock = DockStyle.Fill;
-        view.CaptionChanged += new EventHandler(View_CaptionChanged);
-        UpdateText();
-        viewPanel.Controls.Add(control);
-      } else {
-        Label errorLabel = new Label();
-        errorLabel.Name = "errorLabel";
-        errorLabel.Text = "No view available";
-        errorLabel.AutoSize = false;
-        errorLabel.Dock = DockStyle.Fill;
-        viewPanel.Controls.Add(errorLabel);
-      }
-    }
-
-    protected override void Dispose(bool disposing) {
-      if (view != null)
-        view.CaptionChanged -= new System.EventHandler(View_CaptionChanged);
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    private void UpdateText() {
-      if (InvokeRequired)
-        Invoke(new MethodInvoker(UpdateText));
-      else
-        Text = view.Caption;
-    }
-
-    #region View Events
-    private void View_CaptionChanged(object sender, EventArgs e) {
-      UpdateText();
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLab.MainForm.WindowsForms-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLab.MainForm.WindowsForms-3.3.csproj	(revision 5462)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLab.MainForm.WindowsForms-3.3.csproj	(revision 5463)
@@ -12,5 +12,6 @@
     <AssemblyName>HeuristicLab.MainForm.WindowsForms-3.3</AssemblyName>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
-    <TargetFrameworkProfile></TargetFrameworkProfile>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
     <FileAlignment>512</FileAlignment>
     <SignAssembly>true</SignAssembly>
@@ -112,80 +113,86 @@
   <ItemGroup>
     <Compile Include="ActionUserInterfaceItem.cs" />
-    <Compile Include="AsynchronousContentView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="AsynchronousContentView.Designer.cs">
+    <Compile Include="Controls\DragOverTabControl.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="Controls\DragOverTabControl.Designer.cs">
+      <DependentUpon>DragOverTabControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Views\AsynchronousContentView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Views\AsynchronousContentView.Designer.cs">
       <DependentUpon>AsynchronousContentView.cs</DependentUpon>
     </Compile>
-    <Compile Include="ContentView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="ContentView.Designer.cs">
+    <Compile Include="Views\ContentView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Views\ContentView.Designer.cs">
       <DependentUpon>ContentView.cs</DependentUpon>
     </Compile>
     <None Include="HeuristicLabMainFormWindowsFormsPlugin.cs.frame" />
-    <Compile Include="ControlExtensions.cs" />
-    <Compile Include="DockForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="DockForm.Designer.cs">
+    <Compile Include="Controls\ControlExtensions.cs" />
+    <Compile Include="MainForms\DockForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="MainForms\DockForm.Designer.cs">
       <DependentUpon>DockForm.cs</DependentUpon>
     </Compile>
-    <Compile Include="DockingMainForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="DockingMainForm.Designer.cs">
+    <Compile Include="MainForms\DockingMainForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="MainForms\DockingMainForm.Designer.cs">
       <DependentUpon>DockingMainForm.cs</DependentUpon>
     </Compile>
-    <Compile Include="Sidebar.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="Sidebar.Designer.cs">
+    <Compile Include="Controls\Sidebar.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\Sidebar.Designer.cs">
       <DependentUpon>Sidebar.cs</DependentUpon>
     </Compile>
-    <Compile Include="DocumentForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="DocumentForm.Designer.cs">
+    <Compile Include="MainForms\DocumentForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="MainForms\DocumentForm.Designer.cs">
       <DependentUpon>DocumentForm.cs</DependentUpon>
     </Compile>
     <Compile Include="HeuristicLabMainFormWindowsFormsPlugin.cs" />
-    <Compile Include="MainForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="MainForm.Designer.cs">
+    <Compile Include="MainForms\MainForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="MainForms\MainForm.Designer.cs">
       <DependentUpon>MainForm.cs</DependentUpon>
     </Compile>
     <Compile Include="MenuItem.cs" />
-    <Compile Include="MultipleDocumentMainForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="MultipleDocumentMainForm.Designer.cs">
+    <Compile Include="MainForms\MultipleDocumentMainForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="MainForms\MultipleDocumentMainForm.Designer.cs">
       <DependentUpon>MultipleDocumentMainForm.cs</DependentUpon>
     </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="SingleDocumentMainForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="SingleDocumentMainForm.Designer.cs">
+    <Compile Include="MainForms\SingleDocumentMainForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="MainForms\SingleDocumentMainForm.Designer.cs">
       <DependentUpon>SingleDocumentMainForm.cs</DependentUpon>
     </Compile>
     <Compile Include="ToolBarItem.cs" />
-    <Compile Include="View.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="View.Designer.cs">
+    <Compile Include="Views\View.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Views\View.Designer.cs">
       <DependentUpon>View.cs</DependentUpon>
     </Compile>
-    <Compile Include="ViewContextMenuStrip.cs">
+    <Compile Include="Controls\ViewContextMenuStrip.cs">
       <SubType>Component</SubType>
     </Compile>
-    <Compile Include="ViewContextMenuStrip.Designer.cs">
+    <Compile Include="Controls\ViewContextMenuStrip.Designer.cs">
       <DependentUpon>ViewContextMenuStrip.cs</DependentUpon>
     </Compile>
-    <Compile Include="ViewHost.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="ViewHost.Designer.cs">
+    <Compile Include="Controls\ViewHost.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\ViewHost.Designer.cs">
       <DependentUpon>ViewHost.cs</DependentUpon>
     </Compile>
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,98 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class MainForm {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary>
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
-      this.menuStrip = new System.Windows.Forms.MenuStrip();
-      this.toolStrip = new System.Windows.Forms.ToolStrip();
-      this.statusStrip = new System.Windows.Forms.StatusStrip();
-      this.SuspendLayout();
-      // 
-      // menuStrip
-      // 
-      this.menuStrip.Location = new System.Drawing.Point(0, 0);
-      this.menuStrip.Name = "menuStrip";
-      this.menuStrip.Size = new System.Drawing.Size(624, 24);
-      this.menuStrip.TabIndex = 0;
-      this.menuStrip.Text = "menuStrip";
-      // 
-      // toolStrip
-      // 
-      this.toolStrip.Location = new System.Drawing.Point(0, 24);
-      this.toolStrip.Name = "toolStrip";
-      this.toolStrip.Size = new System.Drawing.Size(624, 25);
-      this.toolStrip.TabIndex = 1;
-      // 
-      // statusStrip
-      // 
-      this.statusStrip.Location = new System.Drawing.Point(0, 390);
-      this.statusStrip.Name = "statusStrip";
-      this.statusStrip.Size = new System.Drawing.Size(624, 22);
-      this.statusStrip.TabIndex = 2;
-      this.statusStrip.Text = "statusStrip";
-      // 
-      // MainFormBase
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(624, 412);
-      this.Controls.Add(this.statusStrip);
-      this.Controls.Add(this.toolStrip);
-      this.Controls.Add(this.menuStrip);
-      this.Icon = HeuristicLab.Common.Resources.HeuristicLab.Icon;
-      this.MainMenuStrip = this.menuStrip;
-      this.Name = "MainFormBase";
-      this.Load += new System.EventHandler(this.MainFormBase_Load);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    protected System.Windows.Forms.ToolStrip toolStrip;
-    protected System.Windows.Forms.StatusStrip statusStrip;
-    protected System.Windows.Forms.MenuStrip menuStrip;
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.cs	(revision 5462)
+++ 	(revision )
@@ -1,450 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Windows.Forms;
-using HeuristicLab.Common;
-using HeuristicLab.PluginInfrastructure;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public partial class MainForm : Form, IMainForm {
-    private bool initialized;
-
-    protected MainForm()
-      : base() {
-      InitializeComponent();
-      this.views = new Dictionary<IView, Form>();
-      this.userInterfaceItems = new List<IUserInterfaceItem>();
-      this.initialized = false;
-      this.showContentInViewHost = false;
-    }
-
-    protected MainForm(Type userInterfaceItemType)
-      : this() {
-      this.userInterfaceItemType = userInterfaceItemType;
-    }
-
-    #region properties
-    private bool showContentInViewHost;
-    public bool ShowContentInViewHost {
-      get { return this.showContentInViewHost; }
-      set { this.showContentInViewHost = value; }
-    }
-
-    public string Title {
-      get { return this.Text; }
-      set {
-        if (InvokeRequired) {
-          Action<string> action = delegate(string s) { this.Title = s; };
-          Invoke(action, value);
-        } else
-          this.Text = value;
-      }
-    }
-
-    public override Cursor Cursor {
-      get { return base.Cursor; }
-      set {
-        if (InvokeRequired) {
-          Action<Cursor> action = delegate(Cursor c) { this.Cursor = c; };
-          Invoke(action, value);
-        } else
-          base.Cursor = value;
-      }
-    }
-
-    private Type userInterfaceItemType;
-    public Type UserInterfaceItemType {
-      get { return this.userInterfaceItemType; }
-    }
-
-    private Dictionary<IView, Form> views;
-    public IEnumerable<IView> Views {
-      get { return views.Keys; }
-    }
-
-    private IView activeView;
-    public IView ActiveView {
-      get { return this.activeView; }
-      protected set {
-        if (this.activeView != value) {
-          if (InvokeRequired) {
-            Action<IView> action = delegate(IView activeView) { this.ActiveView = activeView; };
-            Invoke(action, value);
-          } else {
-            this.activeView = value;
-            OnActiveViewChanged();
-          }
-        }
-      }
-    }
-
-    private List<IUserInterfaceItem> userInterfaceItems;
-    protected IEnumerable<IUserInterfaceItem> UserInterfaceItems {
-      get { return this.userInterfaceItems; }
-    }
-    #endregion
-
-    #region events
-    public event EventHandler ActiveViewChanged;
-    protected virtual void OnActiveViewChanged() {
-      if (InvokeRequired)
-        Invoke((MethodInvoker)OnActiveViewChanged);
-      else {
-        EventHandler handler = ActiveViewChanged;
-        if (handler != null)
-          handler(this, EventArgs.Empty);
-      }
-    }
-
-    public event EventHandler<ViewEventArgs> ViewClosed;
-    protected virtual void OnViewClosed(IView view) {
-      if (InvokeRequired) Invoke((Action<IView>)OnViewClosed, view);
-      else {
-        EventHandler<ViewEventArgs> handler = ViewClosed;
-        if (handler != null)
-          handler(this, new ViewEventArgs(view));
-      }
-    }
-
-    public event EventHandler<ViewShownEventArgs> ViewShown;
-    protected virtual void OnViewShown(IView view, bool firstTimeShown) {
-      if (InvokeRequired) Invoke((Action<IView, bool>)OnViewShown, view, firstTimeShown);
-      else {
-        EventHandler<ViewShownEventArgs> handler = ViewShown;
-        if (handler != null)
-          handler(this, new ViewShownEventArgs(view, firstTimeShown));
-      }
-    }
-
-    public event EventHandler<ViewEventArgs> ViewHidden;
-    protected virtual void OnViewHidden(IView view) {
-      if (InvokeRequired) Invoke((Action<IView>)OnViewHidden, view);
-      else {
-        EventHandler<ViewEventArgs> handler = ViewHidden;
-        if (handler != null)
-          handler(this, new ViewEventArgs(view));
-      }
-    }
-
-    public event EventHandler Changed;
-    protected void OnChanged() {
-      if (InvokeRequired)
-        Invoke((MethodInvoker)OnChanged);
-      else {
-        EventHandler handler = Changed;
-        if (handler != null)
-          Changed(this, EventArgs.Empty);
-      }
-    }
-
-    private void MainFormBase_Load(object sender, EventArgs e) {
-      if (!DesignMode) {
-        MainFormManager.RegisterMainForm(this);
-        this.CreateGUI();
-        if (!this.initialized) {
-          this.initialized = true;
-          this.OnInitialized(EventArgs.Empty);
-        }
-      }
-    }
-
-    protected virtual void OnInitialized(EventArgs e) {
-    }
-
-    private void FormActivated(object sender, EventArgs e) {
-      this.ActiveView = GetView((Form)sender);
-    }
-
-    protected override void OnFormClosing(FormClosingEventArgs e) {
-      foreach (KeyValuePair<IView, Form> pair in this.views) {
-        DockForm dockForm = pair.Value as DockForm;
-        View view = pair.Key as View;
-        if (view != null && dockForm != null && dockForm.DockState != DockState.Document) {
-          view.CloseReason = CloseReason.ApplicationExitCall;
-          view.OnClosingHelper(dockForm, e);
-        }
-      }
-      base.OnFormClosing(e);
-    }
-
-    protected override void OnFormClosed(FormClosedEventArgs e) {
-      foreach (KeyValuePair<IView, Form> pair in this.views.ToList()) {
-        DockForm dockForm = pair.Value as DockForm;
-        View view = pair.Key as View;
-        if (view != null && dockForm != null && dockForm.DockState != DockState.Document) {
-          view.CloseReason = CloseReason.ApplicationExitCall;
-          view.OnClosedHelper(dockForm, e);
-          dockForm.Close();
-        }
-      }
-      base.OnFormClosed(e);
-    }
-    #endregion
-
-    #region create, get, show, hide, close views
-    protected virtual Form CreateForm(IView view) {
-      throw new NotImplementedException("CreateForm must be implemented in subclasses of MainForm.");
-    }
-
-    internal Form GetForm(IView view) {
-      if (views.ContainsKey(view))
-        return views[view];
-      return null;
-    }
-    protected IView GetView(Form form) {
-      return views.Where(x => x.Value == form).Single().Key;
-    }
-
-    public IContentView ShowContent(IContent content) {
-      if (content == null) throw new ArgumentNullException("Content cannot be null.");
-      Type viewType = MainFormManager.GetDefaultViewType(content.GetType());
-      if (viewType != null) return ShowContent(content, viewType);
-      return null;
-    }
-
-    public IContentView ShowContent<T>(T content, bool reuseExistingView, IEqualityComparer<T> comparer = null) where T : class,IContent {
-      if (content == null) throw new ArgumentNullException("Content cannot be null.");
-      if (!reuseExistingView) return ShowContent(content);
-
-      IContentView view = null;
-      if (comparer == null) view = Views.OfType<IContentView>().Where(v => (v.Content as T) == content).FirstOrDefault();
-      else view = Views.OfType<IContentView>().Where(v => comparer.Equals((v.Content as T), content)).FirstOrDefault();
-
-      if (view == null) view = ShowContent(content);
-      else view.Show();
-
-      return view;
-    }
-
-    public IContentView ShowContent(IContent content, Type viewType) {
-      if (InvokeRequired) return (IContentView)Invoke((Func<IContent, Type, IContentView>)ShowContent, content, viewType);
-      else {
-        if (content == null) throw new ArgumentNullException("Content cannot be null.");
-        if (viewType == null) throw new ArgumentNullException("ViewType cannot be null.");
-
-        IContentView view = null;
-        if (ShowContentInViewHost) {
-          ViewHost viewHost = new ViewHost();
-          viewHost.ViewType = viewType;
-          view = viewHost;
-
-        } else view = MainFormManager.CreateView(viewType);
-
-        view.Content = content;
-        view.Show();
-        return view;
-      }
-    }
-
-    internal void ShowView(IView view) {
-      if (InvokeRequired) Invoke((Action<IView>)ShowView, view);
-      else {
-        Form form = GetForm(view);
-        bool firstTimeShown = form == null;
-        if (firstTimeShown) {
-          form = CreateForm(view);
-          form.Activated += new EventHandler(FormActivated);
-          form.FormClosed += new FormClosedEventHandler(ChildFormClosed);
-          view.Changed += new EventHandler(View_Changed);
-          views[view] = form;
-        }
-        this.ShowView(view, firstTimeShown);
-        this.OnViewShown(view, firstTimeShown);
-      }
-    }
-
-    private void View_Changed(object sender, EventArgs e) {
-      IView view = (IView)sender;
-      if (view == this.ActiveView)
-        this.OnActiveViewChanged();
-      this.OnChanged();
-    }
-
-    protected virtual void ShowView(IView view, bool firstTimeShown) {
-    }
-
-    internal void HideView(IView view) {
-      if (InvokeRequired) Invoke((Action<IView>)HideView, view);
-      else {
-        this.Hide(view);
-        if (this.activeView == view)
-          this.ActiveView = null;
-        this.OnViewHidden(view);
-      }
-    }
-
-    protected virtual void Hide(IView view) {
-    }
-
-    private void ChildFormClosed(object sender, FormClosedEventArgs e) {
-      Form form = (Form)sender;
-      IView view = GetView(form);
-
-      view.Changed -= new EventHandler(View_Changed);
-      form.Activated -= new EventHandler(FormActivated);
-      form.FormClosed -= new FormClosedEventHandler(ChildFormClosed);
-
-      views.Remove(view);
-      this.OnViewClosed(view);
-      if (ActiveView == view)
-        ActiveView = null;
-    }
-
-    internal void CloseView(IView view) {
-      if (InvokeRequired) Invoke((Action<IView>)CloseView, view);
-      else if (views.ContainsKey(view)) {
-        this.views[view].Close();
-        this.OnViewClosed(view);
-      }
-    }
-
-    internal void CloseView(IView view, CloseReason closeReason) {
-      if (InvokeRequired) Invoke((Action<IView>)CloseView, view);
-      else if (views.ContainsKey(view)) {
-        ((View)view).CloseReason = closeReason;
-        this.CloseView(view);
-      }
-    }
-
-    public void CloseAllViews() {
-      foreach (IView view in views.Keys.ToArray())
-        CloseView(view);
-    }
-
-    public void CloseAllViews(CloseReason closeReason) {
-      foreach (IView view in views.Keys.ToArray())
-        CloseView(view, closeReason);
-    }
-    #endregion
-
-    #region create menu and toolbar
-    private void CreateGUI() {
-      IEnumerable<object> allUserInterfaceItems = ApplicationManager.Manager.GetInstances(userInterfaceItemType);
-
-      IEnumerable<IPositionableUserInterfaceItem> toolStripMenuItems =
-        from mi in allUserInterfaceItems
-        where (mi is IPositionableUserInterfaceItem) &&
-              (mi is IMenuItem || mi is IMenuSeparatorItem)
-        orderby ((IPositionableUserInterfaceItem)mi).Position
-        select (IPositionableUserInterfaceItem)mi;
-
-      foreach (IPositionableUserInterfaceItem menuItem in toolStripMenuItems) {
-        if (menuItem is IMenuItem)
-          AddToolStripMenuItem((IMenuItem)menuItem);
-        else if (menuItem is IMenuSeparatorItem)
-          AddToolStripMenuItem((IMenuSeparatorItem)menuItem);
-      }
-
-      IEnumerable<IPositionableUserInterfaceItem> toolStripButtonItems =
-        from bi in allUserInterfaceItems
-        where (bi is IPositionableUserInterfaceItem) &&
-              (bi is IToolBarItem || bi is IToolBarSeparatorItem)
-        orderby ((IPositionableUserInterfaceItem)bi).Position
-        select (IPositionableUserInterfaceItem)bi;
-
-      foreach (IPositionableUserInterfaceItem toolStripButtonItem in toolStripButtonItems) {
-        if (toolStripButtonItem is IToolBarItem)
-          AddToolStripButtonItem((IToolBarItem)toolStripButtonItem);
-        else if (toolStripButtonItem is IToolBarSeparatorItem)
-          AddToolStripButtonItem((IToolBarSeparatorItem)toolStripButtonItem);
-      }
-
-      this.AdditionalCreationOfGuiElements();
-    }
-
-    protected virtual void AdditionalCreationOfGuiElements() {
-    }
-
-    private void AddToolStripMenuItem(IMenuItem menuItem) {
-      ToolStripMenuItem item = new ToolStripMenuItem();
-      this.SetToolStripItemProperties(item, menuItem);
-      if (menuItem is MenuItem) {
-        MenuItem menuItemBase = (MenuItem)menuItem;
-        menuItemBase.ToolStripItem = item;
-        item.ShortcutKeys = menuItemBase.ShortCutKeys;
-        item.DisplayStyle = menuItemBase.ToolStripItemDisplayStyle;
-      }
-      this.InsertItem(menuItem.Structure, typeof(ToolStripMenuItem), item, menuStrip.Items);
-    }
-
-    private void AddToolStripMenuItem(IMenuSeparatorItem menuItem) {
-      this.InsertItem(menuItem.Structure, typeof(ToolStripMenuItem), new ToolStripSeparator(), menuStrip.Items);
-    }
-
-    private void AddToolStripButtonItem(IToolBarItem buttonItem) {
-      ToolStripItem item = new ToolStripButton();
-      if (buttonItem is ToolBarItem) {
-        ToolBarItem buttonItemBase = (ToolBarItem)buttonItem;
-        if (buttonItemBase.IsDropDownButton)
-          item = new ToolStripDropDownButton();
-
-        item.DisplayStyle = buttonItemBase.ToolStripItemDisplayStyle;
-        buttonItemBase.ToolStripItem = item;
-      }
-
-      this.SetToolStripItemProperties(item, buttonItem);
-      this.InsertItem(buttonItem.Structure, typeof(ToolStripDropDownButton), item, toolStrip.Items);
-    }
-
-    private void AddToolStripButtonItem(IToolBarSeparatorItem buttonItem) {
-      this.InsertItem(buttonItem.Structure, typeof(ToolStripDropDownButton), new ToolStripSeparator(), toolStrip.Items);
-    }
-
-    private void InsertItem(IEnumerable<string> structure, Type t, ToolStripItem item, ToolStripItemCollection parentItems) {
-      ToolStripDropDownItem parent = null;
-      foreach (string s in structure) {
-        if (parentItems.ContainsKey(s))
-          parent = (ToolStripDropDownItem)parentItems[s];
-        else {
-          parent = (ToolStripDropDownItem)Activator.CreateInstance(t, s, null, null, s); ;
-          parentItems.Add(parent);
-        }
-        parentItems = parent.DropDownItems;
-      }
-      parentItems.Add(item);
-    }
-
-    private void SetToolStripItemProperties(ToolStripItem toolStripItem, IActionUserInterfaceItem userInterfaceItem) {
-      toolStripItem.Name = userInterfaceItem.Name;
-      toolStripItem.Text = userInterfaceItem.Name;
-      toolStripItem.ToolTipText = userInterfaceItem.ToolTipText;
-      toolStripItem.Tag = userInterfaceItem;
-      toolStripItem.Image = userInterfaceItem.Image;
-      toolStripItem.Click += new EventHandler(ToolStripItemClicked);
-      this.userInterfaceItems.Add(userInterfaceItem);
-    }
-
-    private void ToolStripItemClicked(object sender, EventArgs e) {
-      System.Windows.Forms.ToolStripItem item = (System.Windows.Forms.ToolStripItem)sender;
-      try {
-        ((IActionUserInterfaceItem)item.Tag).Execute();
-      }
-      catch (Exception ex) {
-        ErrorHandling.ShowErrorDialog((Control)MainFormManager.MainForm, ex);
-      }
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockForm.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockForm.Designer.cs	(revision 5463)
@@ -0,0 +1,69 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class DockForm {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DockForm));
+      this.viewPanel = new System.Windows.Forms.Panel();
+      this.SuspendLayout();
+      // 
+      // viewPanel
+      // 
+      this.viewPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.viewPanel.Location = new System.Drawing.Point(12, 12);
+      this.viewPanel.Name = "viewPanel";
+      this.viewPanel.Size = new System.Drawing.Size(608, 422);
+      this.viewPanel.TabIndex = 0;
+      // 
+      // DockForm
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(632, 446);
+      this.Controls.Add(this.viewPanel);
+      this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+      this.Icon = HeuristicLab.Common.Resources.HeuristicLab.Icon;
+      this.Name = "DockForm";
+      this.ShowIcon = false;
+      this.ShowInTaskbar = false;
+      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+      this.ResumeLayout(false);
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Panel viewPanel;
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockForm.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockForm.cs	(revision 5463)
@@ -0,0 +1,114 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  /// <summary>
+  /// Displays the used view.
+  /// </summary>
+  internal partial class DockForm : DockContent {
+    public DockForm(IView view) {
+      InitializeComponent();
+      this.view = view;
+      if (view != null) {
+        if (view is UserControl) {
+          switch (((UserControl)view).Dock) {
+            case DockStyle.Left:
+              this.ShowHint = DockState.DockLeft;
+              break;
+            case DockStyle.Right:
+              this.ShowHint = DockState.DockRight;
+              break;
+            case DockStyle.Top:
+              this.ShowHint = DockState.DockTop;
+              break;
+            case DockStyle.Bottom:
+              this.ShowHint = DockState.DockBottom;
+              break;
+          }
+          Sidebar sidebar = view as Sidebar;
+          if (sidebar != null) {
+            if (sidebar.Collapsed)
+              this.ShowHint = DockState.DockLeftAutoHide;
+            else
+              this.ShowHint = DockState.DockLeft;
+            this.DockAreas = DockAreas.DockLeft | DockAreas.DockRight;
+          }
+
+          Type viewType = view.GetType();
+          Control control = (Control)view;
+          control.Dock = DockStyle.Fill;
+          this.view.CaptionChanged += new EventHandler(View_CaptionChanged);
+          UpdateText();
+          viewPanel.Controls.Add(control);
+        }
+      } else {
+        Label errorLabel = new Label();
+        errorLabel.Name = "errorLabel";
+        errorLabel.Text = "No view available";
+        errorLabel.AutoSize = false;
+        errorLabel.Dock = DockStyle.Fill;
+        viewPanel.Controls.Add(errorLabel);
+      }
+    }
+
+    protected override void Dispose(bool disposing) {
+      if (View != null)
+        View.CaptionChanged -= new System.EventHandler(View_CaptionChanged);
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    private IView view;
+    public IView View {
+      get { return this.view; }
+    }
+
+    private void UpdateText() {
+      if (InvokeRequired)
+        Invoke(new MethodInvoker(UpdateText));
+      else
+        this.Text = this.View.Caption;
+    }
+
+    protected override void OnDockStateChanged(EventArgs e) {
+      base.OnDockStateChanged(e);
+      Sidebar sidebar = view as Sidebar;
+      if (sidebar != null) {
+        if (this.DockState == DockState.DockLeftAutoHide || this.DockState == DockState.DockRightAutoHide)
+          sidebar.Collapsed = true;
+        else
+          sidebar.Collapsed = false;
+      }
+    }
+
+    #region View Events
+    private void View_CaptionChanged(object sender, EventArgs e) {
+      UpdateText();
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockingMainForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockingMainForm.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockingMainForm.Designer.cs	(revision 5463)
@@ -0,0 +1,137 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class DockingMainForm {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
+      WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin1 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
+      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+      WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
+      WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
+      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+      WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
+      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+      WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+      WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+      this.dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel();
+      this.SuspendLayout();
+      // 
+      // dockPanel
+      // 
+      this.dockPanel.ActiveAutoHideContent = null;
+      this.dockPanel.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.dockPanel.DockBackColor = System.Drawing.SystemColors.Control;
+      this.dockPanel.Location = new System.Drawing.Point(0, 49);
+      this.dockPanel.Name = "dockPanel";
+      this.dockPanel.Size = new System.Drawing.Size(624, 341);
+      dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
+      dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
+      autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
+      tabGradient1.EndColor = System.Drawing.SystemColors.Control;
+      tabGradient1.StartColor = System.Drawing.SystemColors.Control;
+      tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark;
+      autoHideStripSkin1.TabGradient = tabGradient1;
+      dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1;
+      tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight;
+      tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight;
+      tabGradient2.TextColor = System.Drawing.SystemColors.ControlText;
+      dockPaneStripGradient1.ActiveTabGradient = tabGradient2;
+      dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control;
+      dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control;
+      dockPaneStripGradient1.DockStripGradient = dockPanelGradient2;
+      tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
+      tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
+      tabGradient3.TextColor = System.Drawing.SystemColors.ControlText;
+      dockPaneStripGradient1.InactiveTabGradient = tabGradient3;
+      dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1;
+      tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption;
+      tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
+      tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
+      tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
+      dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4;
+      tabGradient5.EndColor = System.Drawing.SystemColors.Control;
+      tabGradient5.StartColor = System.Drawing.SystemColors.Control;
+      tabGradient5.TextColor = System.Drawing.SystemColors.ControlText;
+      dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5;
+      dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
+      dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
+      dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3;
+      tabGradient6.EndColor = System.Drawing.SystemColors.GradientInactiveCaption;
+      tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
+      tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
+      tabGradient6.TextColor = System.Drawing.SystemColors.ControlText;
+      dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
+      tabGradient7.EndColor = System.Drawing.Color.Transparent;
+      tabGradient7.StartColor = System.Drawing.Color.Transparent;
+      tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark;
+      dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7;
+      dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1;
+      dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1;
+      this.dockPanel.Skin = dockPanelSkin1;
+      this.dockPanel.TabIndex = 3;
+      this.dockPanel.ActiveContentChanged += new System.EventHandler(this.dockPanel_ActiveContentChanged);
+      // 
+      // DockingMainForm
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(624, 412);
+      this.Controls.Add(this.dockPanel);
+      this.IsMdiContainer = true;
+      this.Name = "DockingMainForm";
+      this.Controls.SetChildIndex(this.dockPanel, 0);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel;
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockingMainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockingMainForm.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockingMainForm.cs	(revision 5463)
@@ -0,0 +1,71 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class DockingMainForm : MainForm {
+    public DockingMainForm()
+      : base() {
+      InitializeComponent();
+    }
+    public DockingMainForm(Type userInterfaceItemType)
+      : base(userInterfaceItemType) {
+      InitializeComponent();
+    }
+    public DockingMainForm(Type userInterfaceItemType, bool showContentInViewHost)
+      : this(userInterfaceItemType) {
+      this.ShowContentInViewHost = showContentInViewHost;
+    }
+
+    protected override void ShowView(IView view, bool firstTimeShown) {
+      if (InvokeRequired) Invoke((Action<IView, bool>)ShowView, view, firstTimeShown);
+      else {
+        base.ShowView(view, firstTimeShown);
+        if (firstTimeShown)
+          ((DockForm)GetForm(view)).Show(dockPanel);
+        else
+          ((DockForm)GetForm(view)).Activate();
+      }
+    }
+
+    protected override void Hide(IView view) {
+      if (InvokeRequired) Invoke((Action<IView>)HideView, view);
+      else {
+        Form form = this.GetForm(view);
+        if (form != null) {
+          ((DockForm)form).Hide();
+        }
+      }
+    }
+
+    protected override Form CreateForm(IView view) {
+      return new DockForm(view);
+    }
+
+    private void dockPanel_ActiveContentChanged(object sender, EventArgs e) {
+      DockForm content = this.dockPanel.ActiveContent as DockForm;
+      if (content != null)
+        this.ActiveView = content.View;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DocumentForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DocumentForm.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DocumentForm.Designer.cs	(revision 5463)
@@ -0,0 +1,69 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class DocumentForm {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DocumentForm));
+      this.viewPanel = new System.Windows.Forms.Panel();
+      this.SuspendLayout();
+      // 
+      // viewPanel
+      // 
+      this.viewPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.viewPanel.Location = new System.Drawing.Point(12, 12);
+      this.viewPanel.Name = "viewPanel";
+      this.viewPanel.Size = new System.Drawing.Size(608, 422);
+      this.viewPanel.TabIndex = 0;
+      // 
+      // ViewForm
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(632, 446);
+      this.Controls.Add(this.viewPanel);
+      this.Icon = HeuristicLab.Common.Resources.HeuristicLab.Icon;
+      this.Name = "ViewForm";
+      this.ShowInTaskbar = false;
+      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+      this.Text = "View";
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Panel viewPanel;
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DocumentForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DocumentForm.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DocumentForm.cs	(revision 5463)
@@ -0,0 +1,74 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  internal partial class DocumentForm : Form {
+    private IView view;
+
+    public DocumentForm() {
+      InitializeComponent();
+    }
+    public DocumentForm(IView view)
+      : this() {
+      this.view = view;
+      if (view != null) {
+        Type viewType = view.GetType();
+        Control control = (Control)view;
+        control.Dock = DockStyle.Fill;
+        view.CaptionChanged += new EventHandler(View_CaptionChanged);
+        UpdateText();
+        viewPanel.Controls.Add(control);
+      } else {
+        Label errorLabel = new Label();
+        errorLabel.Name = "errorLabel";
+        errorLabel.Text = "No view available";
+        errorLabel.AutoSize = false;
+        errorLabel.Dock = DockStyle.Fill;
+        viewPanel.Controls.Add(errorLabel);
+      }
+    }
+
+    protected override void Dispose(bool disposing) {
+      if (view != null)
+        view.CaptionChanged -= new System.EventHandler(View_CaptionChanged);
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    private void UpdateText() {
+      if (InvokeRequired)
+        Invoke(new MethodInvoker(UpdateText));
+      else
+        Text = view.Caption;
+    }
+
+    #region View Events
+    private void View_CaptionChanged(object sender, EventArgs e) {
+      UpdateText();
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.Designer.cs	(revision 5463)
@@ -0,0 +1,98 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class MainForm {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
+      this.menuStrip = new System.Windows.Forms.MenuStrip();
+      this.toolStrip = new System.Windows.Forms.ToolStrip();
+      this.statusStrip = new System.Windows.Forms.StatusStrip();
+      this.SuspendLayout();
+      // 
+      // menuStrip
+      // 
+      this.menuStrip.Location = new System.Drawing.Point(0, 0);
+      this.menuStrip.Name = "menuStrip";
+      this.menuStrip.Size = new System.Drawing.Size(624, 24);
+      this.menuStrip.TabIndex = 0;
+      this.menuStrip.Text = "menuStrip";
+      // 
+      // toolStrip
+      // 
+      this.toolStrip.Location = new System.Drawing.Point(0, 24);
+      this.toolStrip.Name = "toolStrip";
+      this.toolStrip.Size = new System.Drawing.Size(624, 25);
+      this.toolStrip.TabIndex = 1;
+      // 
+      // statusStrip
+      // 
+      this.statusStrip.Location = new System.Drawing.Point(0, 390);
+      this.statusStrip.Name = "statusStrip";
+      this.statusStrip.Size = new System.Drawing.Size(624, 22);
+      this.statusStrip.TabIndex = 2;
+      this.statusStrip.Text = "statusStrip";
+      // 
+      // MainFormBase
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(624, 412);
+      this.Controls.Add(this.statusStrip);
+      this.Controls.Add(this.toolStrip);
+      this.Controls.Add(this.menuStrip);
+      this.Icon = HeuristicLab.Common.Resources.HeuristicLab.Icon;
+      this.MainMenuStrip = this.menuStrip;
+      this.Name = "MainFormBase";
+      this.Load += new System.EventHandler(this.MainFormBase_Load);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    protected System.Windows.Forms.ToolStrip toolStrip;
+    protected System.Windows.Forms.StatusStrip statusStrip;
+    protected System.Windows.Forms.MenuStrip menuStrip;
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs	(revision 5463)
@@ -0,0 +1,450 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.PluginInfrastructure;
+using WeifenLuo.WinFormsUI.Docking;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class MainForm : Form, IMainForm {
+    private bool initialized;
+
+    protected MainForm()
+      : base() {
+      InitializeComponent();
+      this.views = new Dictionary<IView, Form>();
+      this.userInterfaceItems = new List<IUserInterfaceItem>();
+      this.initialized = false;
+      this.showContentInViewHost = false;
+    }
+
+    protected MainForm(Type userInterfaceItemType)
+      : this() {
+      this.userInterfaceItemType = userInterfaceItemType;
+    }
+
+    #region properties
+    private bool showContentInViewHost;
+    public bool ShowContentInViewHost {
+      get { return this.showContentInViewHost; }
+      set { this.showContentInViewHost = value; }
+    }
+
+    public string Title {
+      get { return this.Text; }
+      set {
+        if (InvokeRequired) {
+          Action<string> action = delegate(string s) { this.Title = s; };
+          Invoke(action, value);
+        } else
+          this.Text = value;
+      }
+    }
+
+    public override Cursor Cursor {
+      get { return base.Cursor; }
+      set {
+        if (InvokeRequired) {
+          Action<Cursor> action = delegate(Cursor c) { this.Cursor = c; };
+          Invoke(action, value);
+        } else
+          base.Cursor = value;
+      }
+    }
+
+    private Type userInterfaceItemType;
+    public Type UserInterfaceItemType {
+      get { return this.userInterfaceItemType; }
+    }
+
+    private Dictionary<IView, Form> views;
+    public IEnumerable<IView> Views {
+      get { return views.Keys; }
+    }
+
+    private IView activeView;
+    public IView ActiveView {
+      get { return this.activeView; }
+      protected set {
+        if (this.activeView != value) {
+          if (InvokeRequired) {
+            Action<IView> action = delegate(IView activeView) { this.ActiveView = activeView; };
+            Invoke(action, value);
+          } else {
+            this.activeView = value;
+            OnActiveViewChanged();
+          }
+        }
+      }
+    }
+
+    private List<IUserInterfaceItem> userInterfaceItems;
+    protected IEnumerable<IUserInterfaceItem> UserInterfaceItems {
+      get { return this.userInterfaceItems; }
+    }
+    #endregion
+
+    #region events
+    public event EventHandler ActiveViewChanged;
+    protected virtual void OnActiveViewChanged() {
+      if (InvokeRequired)
+        Invoke((MethodInvoker)OnActiveViewChanged);
+      else {
+        EventHandler handler = ActiveViewChanged;
+        if (handler != null)
+          handler(this, EventArgs.Empty);
+      }
+    }
+
+    public event EventHandler<ViewEventArgs> ViewClosed;
+    protected virtual void OnViewClosed(IView view) {
+      if (InvokeRequired) Invoke((Action<IView>)OnViewClosed, view);
+      else {
+        EventHandler<ViewEventArgs> handler = ViewClosed;
+        if (handler != null)
+          handler(this, new ViewEventArgs(view));
+      }
+    }
+
+    public event EventHandler<ViewShownEventArgs> ViewShown;
+    protected virtual void OnViewShown(IView view, bool firstTimeShown) {
+      if (InvokeRequired) Invoke((Action<IView, bool>)OnViewShown, view, firstTimeShown);
+      else {
+        EventHandler<ViewShownEventArgs> handler = ViewShown;
+        if (handler != null)
+          handler(this, new ViewShownEventArgs(view, firstTimeShown));
+      }
+    }
+
+    public event EventHandler<ViewEventArgs> ViewHidden;
+    protected virtual void OnViewHidden(IView view) {
+      if (InvokeRequired) Invoke((Action<IView>)OnViewHidden, view);
+      else {
+        EventHandler<ViewEventArgs> handler = ViewHidden;
+        if (handler != null)
+          handler(this, new ViewEventArgs(view));
+      }
+    }
+
+    public event EventHandler Changed;
+    protected void OnChanged() {
+      if (InvokeRequired)
+        Invoke((MethodInvoker)OnChanged);
+      else {
+        EventHandler handler = Changed;
+        if (handler != null)
+          Changed(this, EventArgs.Empty);
+      }
+    }
+
+    private void MainFormBase_Load(object sender, EventArgs e) {
+      if (!DesignMode) {
+        MainFormManager.RegisterMainForm(this);
+        this.CreateGUI();
+        if (!this.initialized) {
+          this.initialized = true;
+          this.OnInitialized(EventArgs.Empty);
+        }
+      }
+    }
+
+    protected virtual void OnInitialized(EventArgs e) {
+    }
+
+    private void FormActivated(object sender, EventArgs e) {
+      this.ActiveView = GetView((Form)sender);
+    }
+
+    protected override void OnFormClosing(FormClosingEventArgs e) {
+      foreach (KeyValuePair<IView, Form> pair in this.views) {
+        DockForm dockForm = pair.Value as DockForm;
+        View view = pair.Key as View;
+        if (view != null && dockForm != null && dockForm.DockState != DockState.Document) {
+          view.CloseReason = CloseReason.ApplicationExitCall;
+          view.OnClosingHelper(dockForm, e);
+        }
+      }
+      base.OnFormClosing(e);
+    }
+
+    protected override void OnFormClosed(FormClosedEventArgs e) {
+      foreach (KeyValuePair<IView, Form> pair in this.views.ToList()) {
+        DockForm dockForm = pair.Value as DockForm;
+        View view = pair.Key as View;
+        if (view != null && dockForm != null && dockForm.DockState != DockState.Document) {
+          view.CloseReason = CloseReason.ApplicationExitCall;
+          view.OnClosedHelper(dockForm, e);
+          dockForm.Close();
+        }
+      }
+      base.OnFormClosed(e);
+    }
+    #endregion
+
+    #region create, get, show, hide, close views
+    protected virtual Form CreateForm(IView view) {
+      throw new NotImplementedException("CreateForm must be implemented in subclasses of MainForm.");
+    }
+
+    internal Form GetForm(IView view) {
+      if (views.ContainsKey(view))
+        return views[view];
+      return null;
+    }
+    protected IView GetView(Form form) {
+      return views.Where(x => x.Value == form).Single().Key;
+    }
+
+    public IContentView ShowContent(IContent content) {
+      if (content == null) throw new ArgumentNullException("Content cannot be null.");
+      Type viewType = MainFormManager.GetDefaultViewType(content.GetType());
+      if (viewType != null) return ShowContent(content, viewType);
+      return null;
+    }
+
+    public IContentView ShowContent<T>(T content, bool reuseExistingView, IEqualityComparer<T> comparer = null) where T : class,IContent {
+      if (content == null) throw new ArgumentNullException("Content cannot be null.");
+      if (!reuseExistingView) return ShowContent(content);
+
+      IContentView view = null;
+      if (comparer == null) view = Views.OfType<IContentView>().Where(v => (v.Content as T) == content).FirstOrDefault();
+      else view = Views.OfType<IContentView>().Where(v => comparer.Equals((v.Content as T), content)).FirstOrDefault();
+
+      if (view == null) view = ShowContent(content);
+      else view.Show();
+
+      return view;
+    }
+
+    public IContentView ShowContent(IContent content, Type viewType) {
+      if (InvokeRequired) return (IContentView)Invoke((Func<IContent, Type, IContentView>)ShowContent, content, viewType);
+      else {
+        if (content == null) throw new ArgumentNullException("Content cannot be null.");
+        if (viewType == null) throw new ArgumentNullException("ViewType cannot be null.");
+
+        IContentView view = null;
+        if (ShowContentInViewHost) {
+          ViewHost viewHost = new ViewHost();
+          viewHost.ViewType = viewType;
+          view = viewHost;
+
+        } else view = MainFormManager.CreateView(viewType);
+
+        view.Content = content;
+        view.Show();
+        return view;
+      }
+    }
+
+    internal void ShowView(IView view) {
+      if (InvokeRequired) Invoke((Action<IView>)ShowView, view);
+      else {
+        Form form = GetForm(view);
+        bool firstTimeShown = form == null;
+        if (firstTimeShown) {
+          form = CreateForm(view);
+          form.Activated += new EventHandler(FormActivated);
+          form.FormClosed += new FormClosedEventHandler(ChildFormClosed);
+          view.Changed += new EventHandler(View_Changed);
+          views[view] = form;
+        }
+        this.ShowView(view, firstTimeShown);
+        this.OnViewShown(view, firstTimeShown);
+      }
+    }
+
+    private void View_Changed(object sender, EventArgs e) {
+      IView view = (IView)sender;
+      if (view == this.ActiveView)
+        this.OnActiveViewChanged();
+      this.OnChanged();
+    }
+
+    protected virtual void ShowView(IView view, bool firstTimeShown) {
+    }
+
+    internal void HideView(IView view) {
+      if (InvokeRequired) Invoke((Action<IView>)HideView, view);
+      else {
+        this.Hide(view);
+        if (this.activeView == view)
+          this.ActiveView = null;
+        this.OnViewHidden(view);
+      }
+    }
+
+    protected virtual void Hide(IView view) {
+    }
+
+    private void ChildFormClosed(object sender, FormClosedEventArgs e) {
+      Form form = (Form)sender;
+      IView view = GetView(form);
+
+      view.Changed -= new EventHandler(View_Changed);
+      form.Activated -= new EventHandler(FormActivated);
+      form.FormClosed -= new FormClosedEventHandler(ChildFormClosed);
+
+      views.Remove(view);
+      this.OnViewClosed(view);
+      if (ActiveView == view)
+        ActiveView = null;
+    }
+
+    internal void CloseView(IView view) {
+      if (InvokeRequired) Invoke((Action<IView>)CloseView, view);
+      else if (views.ContainsKey(view)) {
+        this.views[view].Close();
+        this.OnViewClosed(view);
+      }
+    }
+
+    internal void CloseView(IView view, CloseReason closeReason) {
+      if (InvokeRequired) Invoke((Action<IView>)CloseView, view);
+      else if (views.ContainsKey(view)) {
+        ((View)view).CloseReason = closeReason;
+        this.CloseView(view);
+      }
+    }
+
+    public void CloseAllViews() {
+      foreach (IView view in views.Keys.ToArray())
+        CloseView(view);
+    }
+
+    public void CloseAllViews(CloseReason closeReason) {
+      foreach (IView view in views.Keys.ToArray())
+        CloseView(view, closeReason);
+    }
+    #endregion
+
+    #region create menu and toolbar
+    private void CreateGUI() {
+      IEnumerable<object> allUserInterfaceItems = ApplicationManager.Manager.GetInstances(userInterfaceItemType);
+
+      IEnumerable<IPositionableUserInterfaceItem> toolStripMenuItems =
+        from mi in allUserInterfaceItems
+        where (mi is IPositionableUserInterfaceItem) &&
+              (mi is IMenuItem || mi is IMenuSeparatorItem)
+        orderby ((IPositionableUserInterfaceItem)mi).Position
+        select (IPositionableUserInterfaceItem)mi;
+
+      foreach (IPositionableUserInterfaceItem menuItem in toolStripMenuItems) {
+        if (menuItem is IMenuItem)
+          AddToolStripMenuItem((IMenuItem)menuItem);
+        else if (menuItem is IMenuSeparatorItem)
+          AddToolStripMenuItem((IMenuSeparatorItem)menuItem);
+      }
+
+      IEnumerable<IPositionableUserInterfaceItem> toolStripButtonItems =
+        from bi in allUserInterfaceItems
+        where (bi is IPositionableUserInterfaceItem) &&
+              (bi is IToolBarItem || bi is IToolBarSeparatorItem)
+        orderby ((IPositionableUserInterfaceItem)bi).Position
+        select (IPositionableUserInterfaceItem)bi;
+
+      foreach (IPositionableUserInterfaceItem toolStripButtonItem in toolStripButtonItems) {
+        if (toolStripButtonItem is IToolBarItem)
+          AddToolStripButtonItem((IToolBarItem)toolStripButtonItem);
+        else if (toolStripButtonItem is IToolBarSeparatorItem)
+          AddToolStripButtonItem((IToolBarSeparatorItem)toolStripButtonItem);
+      }
+
+      this.AdditionalCreationOfGuiElements();
+    }
+
+    protected virtual void AdditionalCreationOfGuiElements() {
+    }
+
+    private void AddToolStripMenuItem(IMenuItem menuItem) {
+      ToolStripMenuItem item = new ToolStripMenuItem();
+      this.SetToolStripItemProperties(item, menuItem);
+      if (menuItem is MenuItem) {
+        MenuItem menuItemBase = (MenuItem)menuItem;
+        menuItemBase.ToolStripItem = item;
+        item.ShortcutKeys = menuItemBase.ShortCutKeys;
+        item.DisplayStyle = menuItemBase.ToolStripItemDisplayStyle;
+      }
+      this.InsertItem(menuItem.Structure, typeof(ToolStripMenuItem), item, menuStrip.Items);
+    }
+
+    private void AddToolStripMenuItem(IMenuSeparatorItem menuItem) {
+      this.InsertItem(menuItem.Structure, typeof(ToolStripMenuItem), new ToolStripSeparator(), menuStrip.Items);
+    }
+
+    private void AddToolStripButtonItem(IToolBarItem buttonItem) {
+      ToolStripItem item = new ToolStripButton();
+      if (buttonItem is ToolBarItem) {
+        ToolBarItem buttonItemBase = (ToolBarItem)buttonItem;
+        if (buttonItemBase.IsDropDownButton)
+          item = new ToolStripDropDownButton();
+
+        item.DisplayStyle = buttonItemBase.ToolStripItemDisplayStyle;
+        buttonItemBase.ToolStripItem = item;
+      }
+
+      this.SetToolStripItemProperties(item, buttonItem);
+      this.InsertItem(buttonItem.Structure, typeof(ToolStripDropDownButton), item, toolStrip.Items);
+    }
+
+    private void AddToolStripButtonItem(IToolBarSeparatorItem buttonItem) {
+      this.InsertItem(buttonItem.Structure, typeof(ToolStripDropDownButton), new ToolStripSeparator(), toolStrip.Items);
+    }
+
+    private void InsertItem(IEnumerable<string> structure, Type t, ToolStripItem item, ToolStripItemCollection parentItems) {
+      ToolStripDropDownItem parent = null;
+      foreach (string s in structure) {
+        if (parentItems.ContainsKey(s))
+          parent = (ToolStripDropDownItem)parentItems[s];
+        else {
+          parent = (ToolStripDropDownItem)Activator.CreateInstance(t, s, null, null, s); ;
+          parentItems.Add(parent);
+        }
+        parentItems = parent.DropDownItems;
+      }
+      parentItems.Add(item);
+    }
+
+    private void SetToolStripItemProperties(ToolStripItem toolStripItem, IActionUserInterfaceItem userInterfaceItem) {
+      toolStripItem.Name = userInterfaceItem.Name;
+      toolStripItem.Text = userInterfaceItem.Name;
+      toolStripItem.ToolTipText = userInterfaceItem.ToolTipText;
+      toolStripItem.Tag = userInterfaceItem;
+      toolStripItem.Image = userInterfaceItem.Image;
+      toolStripItem.Click += new EventHandler(ToolStripItemClicked);
+      this.userInterfaceItems.Add(userInterfaceItem);
+    }
+
+    private void ToolStripItemClicked(object sender, EventArgs e) {
+      System.Windows.Forms.ToolStripItem item = (System.Windows.Forms.ToolStripItem)sender;
+      try {
+        ((IActionUserInterfaceItem)item.Tag).Execute();
+      }
+      catch (Exception ex) {
+        ErrorHandling.ShowErrorDialog((Control)MainFormManager.MainForm, ex);
+      }
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MultipleDocumentMainForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MultipleDocumentMainForm.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MultipleDocumentMainForm.Designer.cs	(revision 5463)
@@ -0,0 +1,60 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class MultipleDocumentMainForm {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // MultipleDocumentMainForm
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(596, 407);
+      this.IsMdiContainer = true;
+      this.Name = "MultipleDocumentMainForm";
+      this.ResumeLayout(false);
+      this.PerformLayout();
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MultipleDocumentMainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MultipleDocumentMainForm.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MultipleDocumentMainForm.cs	(revision 5463)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class MultipleDocumentMainForm : MainForm {
+    public MultipleDocumentMainForm()
+      : base() {
+      InitializeComponent();
+    }
+    public MultipleDocumentMainForm(Type userInterfaceType)
+      : base(userInterfaceType) {
+      InitializeComponent();
+    }
+    public MultipleDocumentMainForm(Type userInterfaceItemType, bool showContentInViewHost)
+      : this(userInterfaceItemType) {
+      this.ShowContentInViewHost = showContentInViewHost;
+    }
+
+    protected override void AdditionalCreationOfGuiElements() {
+      base.AdditionalCreationOfGuiElements();
+      ToolStripMenuItem window = new ToolStripMenuItem("Windows");
+      this.menuStrip.MdiWindowListItem = window;
+      this.menuStrip.Items.Add(window);
+    }
+
+    protected override void ShowView(IView view, bool firstTimeShown) {
+      if (InvokeRequired) Invoke((Action<IView, bool>)ShowView, view, firstTimeShown);
+      else {
+        base.ShowView(view, firstTimeShown);
+        if (firstTimeShown)
+          this.GetForm(view).Show();
+        else {
+          this.GetForm(view).Visible = true;
+          this.GetForm(view).Activate();
+        }
+      }
+    }
+
+    protected override void Hide(IView view) {
+      if (InvokeRequired) Invoke((Action<IView>)Hide, view);
+      else {
+        base.Hide(view);
+        Form form = this.GetForm(view);
+        if (form != null) {
+          form.Hide();
+        }
+      }
+    }
+
+    protected override Form CreateForm(IView view) {
+      Form form = new DocumentForm(view);
+      form.MdiParent = this;
+      return form;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/SingleDocumentMainForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/SingleDocumentMainForm.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/SingleDocumentMainForm.Designer.cs	(revision 5463)
@@ -0,0 +1,62 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class SingleDocumentMainForm {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // SingleDocumentMainForm
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(624, 412);
+      this.Name = "SingleDocumentMainForm";
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/SingleDocumentMainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/SingleDocumentMainForm.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/SingleDocumentMainForm.cs	(revision 5463)
@@ -0,0 +1,70 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class SingleDocumentMainForm : MainForm {
+    public SingleDocumentMainForm()
+      : base() {
+      InitializeComponent();
+    }
+    public SingleDocumentMainForm(Type userInterfaceItemType)
+      : base(userInterfaceItemType) {
+      InitializeComponent();
+    }
+    public SingleDocumentMainForm(Type userInterfaceItemType, bool showContentInViewHost)
+      : this(userInterfaceItemType) {
+      this.ShowContentInViewHost = showContentInViewHost;
+    }
+
+    protected override void ShowView(IView view, bool firstTimeShown) {
+      if (InvokeRequired) Invoke((Action<IView, bool>)ShowView, view, firstTimeShown);
+      else {
+        base.ShowView(view, firstTimeShown);
+        if (firstTimeShown)
+          this.GetForm(view).Show(this);
+        else {
+          this.GetForm(view).Visible = true;
+          this.GetForm(view).Activate();
+        }
+      }
+    }
+
+    protected override void Hide(IView view) {
+      if (InvokeRequired) Invoke((Action<IView>)Hide, view);
+      else {
+        base.Hide(view);
+        Form form = this.GetForm(view);
+        if (form != null) {
+          form.Hide();
+        }
+      }
+    }
+
+    protected override Form CreateForm(IView view) {
+      Form form = new DocumentForm(view);
+      form.ShowInTaskbar = true;
+      return form;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MultipleDocumentMainForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MultipleDocumentMainForm.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,60 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class MultipleDocumentMainForm {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary>
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // MultipleDocumentMainForm
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(596, 407);
-      this.IsMdiContainer = true;
-      this.Name = "MultipleDocumentMainForm";
-      this.ResumeLayout(false);
-      this.PerformLayout();
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MultipleDocumentMainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MultipleDocumentMainForm.cs	(revision 5462)
+++ 	(revision )
@@ -1,77 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Windows.Forms;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public partial class MultipleDocumentMainForm : MainForm {
-    public MultipleDocumentMainForm()
-      : base() {
-      InitializeComponent();
-    }
-    public MultipleDocumentMainForm(Type userInterfaceType)
-      : base(userInterfaceType) {
-      InitializeComponent();
-    }
-    public MultipleDocumentMainForm(Type userInterfaceItemType, bool showContentInViewHost)
-      : this(userInterfaceItemType) {
-      this.ShowContentInViewHost = showContentInViewHost;
-    }
-
-    protected override void AdditionalCreationOfGuiElements() {
-      base.AdditionalCreationOfGuiElements();
-      ToolStripMenuItem window = new ToolStripMenuItem("Windows");
-      this.menuStrip.MdiWindowListItem = window;
-      this.menuStrip.Items.Add(window);
-    }
-
-    protected override void ShowView(IView view, bool firstTimeShown) {
-      if (InvokeRequired) Invoke((Action<IView, bool>)ShowView, view, firstTimeShown);
-      else {
-        base.ShowView(view, firstTimeShown);
-        if (firstTimeShown)
-          this.GetForm(view).Show();
-        else {
-          this.GetForm(view).Visible = true;
-          this.GetForm(view).Activate();
-        }
-      }
-    }
-
-    protected override void Hide(IView view) {
-      if (InvokeRequired) Invoke((Action<IView>)Hide, view);
-      else {
-        base.Hide(view);
-        Form form = this.GetForm(view);
-        if (form != null) {
-          form.Hide();
-        }
-      }
-    }
-
-    protected override Form CreateForm(IView view) {
-      Form form = new DocumentForm(view);
-      form.MdiParent = this;
-      return form;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SideBar.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SideBar.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,61 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class Sidebar {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // DockSideBar
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Name = "DockSideBar";
-      this.Size = new System.Drawing.Size(230, 225);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SideBar.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SideBar.cs	(revision 5462)
+++ 	(revision )
@@ -1,62 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Windows.Forms;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public partial class Sidebar : View {
-    public Sidebar() {
-      InitializeComponent();
-    }
-
-    private bool collapsed;
-    public bool Collapsed {
-      get { return this.collapsed; }
-      set {
-        if (this.collapsed != value) {
-          this.collapsed = value;
-
-          DockForm form = MainFormManager.GetMainForm<MainForm>().GetForm(this) as DockForm;
-          if (form != null) {
-            if (form.DockState == DockState.DockLeft || form.DockState == DockState.DockLeftAutoHide)
-              form.DockState = collapsed ? DockState.DockLeftAutoHide : DockState.DockLeft;
-            else if (form.DockState == DockState.DockRight || form.DockState == DockState.DockRightAutoHide)
-              form.DockState = collapsed ? DockState.DockRightAutoHide : DockState.DockRight;
-          }
-
-          this.OnCollapsedChanged();
-        }
-      }
-    }
-
-    protected virtual void OnCollapsedChanged() {
-    }
-
-    internal protected override void OnClosing(FormClosingEventArgs e) {
-      base.OnClosing(e);
-      if (e.CloseReason == CloseReason.UserClosing) {
-        e.Cancel = true;
-        this.Hide();
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SingleDocumentMainForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SingleDocumentMainForm.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,62 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class SingleDocumentMainForm {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary>
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // SingleDocumentMainForm
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(624, 412);
-      this.Name = "SingleDocumentMainForm";
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SingleDocumentMainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SingleDocumentMainForm.cs	(revision 5462)
+++ 	(revision )
@@ -1,70 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Windows.Forms;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public partial class SingleDocumentMainForm : MainForm {
-    public SingleDocumentMainForm()
-      : base() {
-      InitializeComponent();
-    }
-    public SingleDocumentMainForm(Type userInterfaceItemType)
-      : base(userInterfaceItemType) {
-      InitializeComponent();
-    }
-    public SingleDocumentMainForm(Type userInterfaceItemType, bool showContentInViewHost)
-      : this(userInterfaceItemType) {
-      this.ShowContentInViewHost = showContentInViewHost;
-    }
-
-    protected override void ShowView(IView view, bool firstTimeShown) {
-      if (InvokeRequired) Invoke((Action<IView, bool>)ShowView, view, firstTimeShown);
-      else {
-        base.ShowView(view, firstTimeShown);
-        if (firstTimeShown)
-          this.GetForm(view).Show(this);
-        else {
-          this.GetForm(view).Visible = true;
-          this.GetForm(view).Activate();
-        }
-      }
-    }
-
-    protected override void Hide(IView view) {
-      if (InvokeRequired) Invoke((Action<IView>)Hide, view);
-      else {
-        base.Hide(view);
-        Form form = this.GetForm(view);
-        if (form != null) {
-          form.Hide();
-        }
-      }
-    }
-
-    protected override Form CreateForm(IView view) {
-      Form form = new DocumentForm(view);
-      form.ShowInTaskbar = true;
-      return form;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/View.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/View.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,61 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class View {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // ViewBase
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Name = "ViewBase";
-      this.Load += new System.EventHandler(this.View_Load);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/View.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/View.cs	(revision 5462)
+++ 	(revision )
@@ -1,264 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Linq;
-using System.Reflection;
-using System.Windows.Forms;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public partial class View : UserControl, IView {
-    private bool initialized;
-    public View() {
-      InitializeComponent();
-      this.initialized = false;
-      this.isShown = false;
-      this.closeReason = CloseReason.None;
-      this.readOnly = false;
-      if (ViewAttribute.HasViewAttribute(this.GetType()))
-        this.Caption = ViewAttribute.GetViewName(this.GetType());
-      else
-        this.Caption = "View";
-    }
-
-    private string caption;
-    public string Caption {
-      get { return caption; }
-      set {
-        if (InvokeRequired) {
-          Action<string> action = delegate(string s) { this.Caption = s; };
-          Invoke(action, value);
-        } else {
-          if (value != caption) {
-            caption = value;
-            OnCaptionChanged();
-          }
-        }
-      }
-    }
-
-    private bool readOnly;
-    public virtual bool ReadOnly {
-      get { return this.readOnly; }
-      set {
-        if (InvokeRequired) {
-          Action<bool> action = delegate(bool b) { this.ReadOnly = b; };
-          Invoke(action, value);
-        } else {
-          if (value != readOnly) {
-            this.readOnly = value;
-            OnReadOnlyChanged();
-            PropertyInfo prop = typeof(IView).GetProperty("ReadOnly");
-            PropagateStateChanges(this, typeof(IView), prop);
-            SetEnabledStateOfControls();
-            OnChanged();
-          }
-        }
-      }
-    }
-
-    public new bool Enabled {
-      get { return base.Enabled; }
-      set {
-        if (base.Enabled != value) {
-          this.SuspendRepaint();
-          base.Enabled = value;
-          this.ResumeRepaint(true);
-          OnChanged();
-        }
-      }
-    }
-
-    bool IView.Enabled {
-      get { return Enabled; }
-      set { Enabled = value; }
-    }
-
-    protected override void OnEnabledChanged(EventArgs e) {
-      base.OnEnabledChanged(e);
-      if (Enabled) SetEnabledStateOfControls();
-    }
-
-    /// <summary>
-    /// This method is called if the ReadyOnly property of the View changes to update the controls of the view.
-    /// </summary>
-    protected virtual void SetEnabledStateOfControls() {
-    }
-
-    private bool isShown;
-    public bool IsShown {
-      get { return this.isShown; }
-      private set { this.isShown = value; }
-    }
-
-    public new void Show() {
-      MainForm mainform = MainFormManager.GetMainForm<MainForm>();
-      bool firstTimeShown = mainform.GetForm(this) == null;
-
-      this.IsShown = true;
-      mainform.ShowView(this);
-      if (firstTimeShown) {
-        Form form = mainform.GetForm(this);
-        form.FormClosed += new FormClosedEventHandler(OnClosedHelper);
-        form.FormClosing += new FormClosingEventHandler(OnClosingHelper);
-      }
-      this.OnShown(new ViewShownEventArgs(this, firstTimeShown));
-    }
-
-    public void Close() {
-      MainForm mainform = MainFormManager.GetMainForm<MainForm>();
-      Form form = mainform.GetForm(this);
-      if (form != null) {
-        this.IsShown = false;
-        mainform.CloseView(this);
-      }
-    }
-
-    public void Close(CloseReason closeReason) {
-      MainForm mainform = MainFormManager.GetMainForm<MainForm>();
-      Form form = mainform.GetForm(this);
-      if (form != null) {
-        this.IsShown = false;
-        mainform.CloseView(this, closeReason);
-      }
-    }
-
-    public new void Hide() {
-      this.IsShown = false;
-      MainFormManager.GetMainForm<MainForm>().HideView(this);
-      this.OnHidden(EventArgs.Empty);
-    }
-
-    public event EventHandler CaptionChanged;
-    protected virtual void OnCaptionChanged() {
-      if (InvokeRequired)
-        Invoke((MethodInvoker)OnCaptionChanged);
-      else {
-        EventHandler handler = CaptionChanged;
-        if (handler != null)
-          handler(this, EventArgs.Empty);
-      }
-    }
-    public event EventHandler ReadOnlyChanged;
-    protected virtual void OnReadOnlyChanged() {
-      if (InvokeRequired)
-        Invoke((MethodInvoker)OnReadOnlyChanged);
-      else {
-        EventHandler handler = ReadOnlyChanged;
-        if (handler != null)
-          handler(this, EventArgs.Empty);
-      }
-    }
-    protected virtual void PropagateStateChanges(Control control, Type type, PropertyInfo propertyInfo) {
-      if (!type.GetProperties().Contains(propertyInfo))
-        throw new ArgumentException("The specified type " + type + "implement the property " + propertyInfo.Name + ".");
-      if (!type.IsAssignableFrom(this.GetType()))
-        throw new ArgumentException("The specified type " + type + "must be the same or a base class / interface of this object.");
-      if (!propertyInfo.CanWrite)
-        throw new ArgumentException("The specified property " + propertyInfo.Name + " must have a setter.");
-
-      foreach (Control c in control.Controls) {
-        Type controlType = c.GetType();
-        PropertyInfo controlPropertyInfo = controlType.GetProperty(propertyInfo.Name, propertyInfo.PropertyType);
-        if (type.IsAssignableFrom(controlType) && controlPropertyInfo != null) {
-          var thisValue = propertyInfo.GetValue(this, null);
-          controlPropertyInfo.SetValue(c, thisValue, null);
-        } else PropagateStateChanges(c, type, propertyInfo);
-      }
-    }
-    public event EventHandler Changed;
-    protected virtual void OnChanged() {
-      if (InvokeRequired)
-        Invoke((MethodInvoker)OnChanged);
-      else {
-        EventHandler handler = Changed;
-        if (handler != null)
-          handler(this, EventArgs.Empty);
-      }
-    }
-
-    internal protected virtual void OnShown(ViewShownEventArgs e) {
-    }
-
-    internal protected virtual void OnHidden(EventArgs e) {
-    }
-
-    private CloseReason closeReason;
-    internal CloseReason CloseReason {
-      get { return this.closeReason; }
-      set { this.closeReason = value; }
-    }
-
-    internal void OnClosingHelper(object sender, FormClosingEventArgs e) {
-      FormClosingEventArgs eventArgs = new FormClosingEventArgs(this.closeReason, e.Cancel);
-      if (this.closeReason != CloseReason.None) {
-        this.OnClosing(eventArgs);
-        if (eventArgs.Cancel != e.Cancel)
-          e.Cancel = eventArgs.Cancel;
-      } else
-        this.OnClosing(e);
-      this.closeReason = CloseReason.None;
-    }
-
-    internal protected virtual void OnClosing(FormClosingEventArgs e) {
-    }
-
-    internal void OnClosedHelper(object sender, FormClosedEventArgs e) {
-      if (this.closeReason != CloseReason.None)
-        this.OnClosed(new FormClosedEventArgs(this.closeReason));
-      else
-        this.OnClosed(e);
-
-      Form form = (Form)sender;
-      form.FormClosed -= new FormClosedEventHandler(OnClosedHelper);
-      form.FormClosing -= new FormClosingEventHandler(OnClosingHelper);
-      this.closeReason = CloseReason.None;
-    }
-
-    internal protected virtual void OnClosed(FormClosedEventArgs e) {
-    }
-
-    private void View_Load(object sender, EventArgs e) {
-      if (!this.initialized && !this.DesignMode) {
-        this.OnInitialized(e);
-        this.initialized = true;
-      }
-    }
-
-    protected virtual void OnInitialized(EventArgs e) {
-      SetEnabledStateOfControls();
-    }
-
-
-    public void SuspendRepaint() {
-      if (InvokeRequired)
-        Invoke((MethodInvoker)SuspendRepaint);
-      else
-        ((Control)this).SuspendRepaint();
-    }
-    public void ResumeRepaint(bool refresh) {
-      if (InvokeRequired)
-        Invoke((Action<bool>)ResumeRepaint, refresh);
-      else
-        ((Control)this).ResumeRepaint(refresh);
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewContextMenuStrip.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewContextMenuStrip.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,56 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class ViewContextMenuStrip {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.SuspendLayout();
-      // 
-      // ViewContextMenuStrip
-      // 
-      this.ResumeLayout(false);
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewContextMenuStrip.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewContextMenuStrip.cs	(revision 5462)
+++ 	(revision )
@@ -1,83 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Windows.Forms;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  public sealed partial class ViewContextMenuStrip : ContextMenuStrip {
-    public ViewContextMenuStrip() {
-      InitializeComponent();
-      this.menuItems = new Dictionary<Type, ToolStripMenuItem>();
-      this.ignoredViewTypes = new List<Type>();
-    }
-
-    public ViewContextMenuStrip(object item)
-      : this() {
-      this.Item = item;
-    }
-
-    private object item;
-    public object Item {
-      get { return this.item; }
-      set {
-        if (this.item != value) {
-          this.item = value;
-          this.RefreshMenuItems();
-        }
-      }
-    }
-
-    private List<Type> ignoredViewTypes;
-    public IEnumerable<Type> IgnoredViewTypes {
-      get { return this.ignoredViewTypes; }
-      set { this.ignoredViewTypes = new List<Type>(value); RefreshMenuItems(); }
-    }
-
-    private Dictionary<Type, ToolStripMenuItem> menuItems;
-    public IEnumerable<KeyValuePair<Type, ToolStripMenuItem>> MenuItems {
-      get { return this.menuItems; }
-    }
-
-    private void RefreshMenuItems() {
-      if (InvokeRequired) Invoke((Action)RefreshMenuItems);
-      else {
-        this.Items.Clear();
-        this.menuItems.Clear();
-
-        if (this.item != null) {
-          ToolStripMenuItem menuItem;
-          IEnumerable<Type> types = MainFormManager.GetViewTypes(item.GetType(), true);
-          foreach (Type t in types.Except(IgnoredViewTypes)) {
-            menuItem = new ToolStripMenuItem();
-            menuItem.Tag = t;
-            menuItem.Text = ViewAttribute.GetViewName(t);
-
-            this.menuItems.Add(t, menuItem);
-            this.Items.Add(menuItem);
-          }
-        }
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.Designer.cs	(revision 5462)
+++ 	(revision )
@@ -1,107 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  partial class ViewHost {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewHost));
-      this.messageLabel = new System.Windows.Forms.Label();
-      this.viewsLabel = new System.Windows.Forms.Label();
-      this.viewContextMenuStrip = new HeuristicLab.MainForm.WindowsForms.ViewContextMenuStrip();
-      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
-      this.SuspendLayout();
-      // 
-      // messageLabel
-      // 
-      this.messageLabel.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.messageLabel.Location = new System.Drawing.Point(0, 0);
-      this.messageLabel.Name = "messageLabel";
-      this.messageLabel.Size = new System.Drawing.Size(227, 184);
-      this.messageLabel.TabIndex = 2;
-      this.messageLabel.Text = "No view available.";
-      this.messageLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
-      // 
-      // viewsLabel
-      // 
-      this.viewsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.viewsLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Windows;
-      this.viewsLabel.Location = new System.Drawing.Point(211, 0);
-      this.viewsLabel.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
-      this.viewsLabel.Name = "viewsLabel";
-      this.viewsLabel.Size = new System.Drawing.Size(16, 16);
-      this.viewsLabel.TabIndex = 0;
-      this.toolTip.SetToolTip(this.viewsLabel, "Double-click to open a new window of the current view.\r\nRight-click to change cur" +
-              "rent view.\r\nDrag icon to copy or link content to another view.");
-      this.viewsLabel.DoubleClick += new System.EventHandler(this.viewsLabel_DoubleClick);
-      this.viewsLabel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.viewsLabel_MouseDown);
-      this.viewsLabel.MouseLeave += new System.EventHandler(this.viewsLabel_MouseLeave);
-      // 
-      // viewContextMenuStrip
-      // 
-      this.viewContextMenuStrip.IgnoredViewTypes = System.Linq.Enumerable.Empty<System.Type>();
-      this.viewContextMenuStrip.Item = null;
-      this.viewContextMenuStrip.Name = "viewContextMenuStrip";
-      this.viewContextMenuStrip.Size = new System.Drawing.Size(61, 4);
-      this.viewContextMenuStrip.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.viewContextMenuStrip_ItemClicked);
-      // 
-      // ViewHost
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.viewsLabel);
-      this.Controls.Add(this.messageLabel);
-      this.Name = "ViewHost";
-      this.Size = new System.Drawing.Size(227, 184);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-    private System.Windows.Forms.Label viewsLabel;
-    private System.Windows.Forms.Label messageLabel;
-    private System.Windows.Forms.ToolTip toolTip;
-    private HeuristicLab.MainForm.WindowsForms.ViewContextMenuStrip viewContextMenuStrip;
-
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs	(revision 5462)
+++ 	(revision )
@@ -1,291 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Drawing;
-using System.Linq;
-using System.Windows.Forms;
-using HeuristicLab.Common;
-
-namespace HeuristicLab.MainForm.WindowsForms {
-  [Content(typeof(IContent))]
-  public sealed partial class ViewHost : AsynchronousContentView {
-    public ViewHost() {
-      InitializeComponent();
-      startDragAndDrop = false;
-      viewContextMenuStrip.IgnoredViewTypes = new List<Type>() { typeof(ViewHost) };
-
-      viewType = null;
-      activeView = null;
-      Content = null;
-      messageLabel.Visible = false;
-      viewsLabel.Visible = false;
-      viewsLabelVisible = true;
-    }
-
-    private bool viewsLabelVisible;
-    public bool ViewsLabelVisible {
-      get { return viewsLabelVisible; }
-      set {
-        if (viewsLabelVisible != value) {
-          viewsLabelVisible = value;
-          viewsLabel.Visible = value;
-          View view = activeView as View;
-          if (view != null) view.Dock = viewsLabelVisible ? DockStyle.None : DockStyle.Fill;
-        }
-      }
-    }
-
-    private IContentView cachedView;
-    private IContentView activeView;
-    public IContentView ActiveView {
-      get { return activeView; }
-      private set {
-        if (activeView != value) {
-          if (activeView != null) {
-            cachedView = activeView;
-            DeregisterActiveViewEvents();
-            View cached = cachedView as View;
-            if (cached != null) {
-              cached.OnHidden(EventArgs.Empty);
-              cached.Visible = false;
-            }
-          }
-
-          activeView = value;
-
-          if (activeView != null) {
-            #region disposed cachedView
-            if (activeView != cachedView) {
-              if (cachedView != null) cachedView.Content = null;  //needed to deregister events
-              View cached = cachedView as View;
-              if (cached != null) {
-                Controls.Remove(cached);
-                cached.Dispose();
-              }
-              cachedView = null;
-            }
-            #endregion
-
-            this.Caption = activeView.Caption;
-            viewType = activeView.GetType();
-            RegisterActiveViewEvents();
-            View view = activeView as View;
-            if (view != null) {
-              view.Visible = true;
-              view.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
-              view.Size = new Size(Width - this.viewsLabel.Width - this.viewsLabel.Margin.Left - this.viewsLabel.Margin.Right, this.Height);
-              view.Dock = viewsLabelVisible ? DockStyle.None : DockStyle.Fill;
-              view.OnShown(new ViewShownEventArgs(view, false));
-              if (!Controls.Contains((view))) Controls.Add(view);
-            }
-          } else viewType = null;
-        }
-      }
-    }
-
-    private Type viewType;
-    public Type ViewType {
-      get { return viewType; }
-      set {
-        if (viewType != value) {
-          if (value == typeof(ViewHost))
-            throw new ArgumentException("Directly nested ViewHosts are not allowed.");
-          if (value != null && Content != null && !ViewCanShowContent(value, Content))
-            throw new ArgumentException(string.Format("View \"{0}\" cannot display content \"{1}\".", value, Content.GetType()));
-
-          viewType = value;
-          OnViewTypeChanged();
-        }
-      }
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      Enabled = Content != null;
-    }
-
-    protected override void OnContentChanged() {
-      viewContextMenuStrip.Item = Content;
-      //change ViewType if view of ViewType can not show content or is null
-      if (Content != null) {
-        if (!ViewCanShowContent(viewType, Content)) {
-          Type defaultViewType = MainFormManager.GetDefaultViewType(Content.GetType());
-          if (cachedView != null && cachedView.GetType() == defaultViewType)
-            ActiveView = cachedView;
-          else if (defaultViewType != null)
-            ViewType = defaultViewType;
-          else if (viewContextMenuStrip.Items.Count > 0)  // create first available view if no default view is available
-            ViewType = (Type)viewContextMenuStrip.Items[0].Tag;
-          else {
-            ViewType = null;
-            ActiveView = null;
-          }
-        }
-        if (ActiveView != null) ActiveView.Content = Content;
-      } else ActiveView = null;
-      UpdateLabels();
-      UpdateActiveMenuItem();
-    }
-
-    private void UpdateLabels() {
-      if (Content != null && viewContextMenuStrip.Items.Count > 0) {
-        messageLabel.Visible = false;
-        viewsLabel.Visible = viewsLabelVisible;
-      } else if (Content != null) {
-        messageLabel.Visible = true;
-        viewsLabel.Visible = false;
-      } else {
-        messageLabel.Visible = false;
-        viewsLabel.Visible = false;
-      }
-    }
-
-    private void OnViewTypeChanged() {
-      if (viewType != null) {
-        if (!ViewCanShowContent(viewType, Content))
-          throw new InvalidOperationException(string.Format("View \"{0}\" cannot display content \"{1}\".",
-                                                            viewType, Content.GetType()));
-        IContentView view = MainFormManager.CreateView(viewType);
-        view.Locked = Locked;
-        view.ReadOnly = ReadOnly;
-        ActiveView = view; //necessary to allow the views to change the status of the viewhost
-        view.Content = Content;
-
-        UpdateActiveMenuItem();
-      }
-    }
-
-    private void RegisterActiveViewEvents() {
-      activeView.CaptionChanged += new EventHandler(activeView_CaptionChanged);
-      activeView.LockedChanged += new EventHandler(activeView_LockedChanged);
-    }
-    private void DeregisterActiveViewEvents() {
-      activeView.CaptionChanged -= new EventHandler(activeView_CaptionChanged);
-      activeView.LockedChanged -= new EventHandler(activeView_LockedChanged);
-    }
-    private void activeView_CaptionChanged(object sender, EventArgs e) {
-      Caption = activeView.Caption;
-    }
-    private void activeView_LockedChanged(object sender, EventArgs e) {
-      Locked = activeView.Locked;
-    }
-
-    protected override void OnSizeChanged(EventArgs e) {
-      //mkommend: solution to resizing issues. taken from http://support.microsoft.com/kb/953934
-      //not implemented with a panel to reduce the number of nested controls
-      if (Handle != null)
-        this.BeginInvoke((Action<EventArgs>)OnSizeChangedHelper, e);
-    }
-    private void OnSizeChangedHelper(EventArgs e) {
-      base.OnSizeChanged(e);
-      viewsLabel.Location = new Point(Width - viewsLabel.Margin.Right - viewsLabel.Width, viewsLabel.Margin.Top);
-    }
-
-    #region forwarding of view events
-    internal protected override void OnShown(ViewShownEventArgs e) {
-      base.OnShown(e);
-      View view = ActiveView as View;
-      if (view != null)
-        view.OnShown(e);
-    }
-    internal protected override void OnHidden(EventArgs e) {
-      base.OnHidden(e);
-      View view = ActiveView as View;
-      if (view != null)
-        view.OnHidden(e);
-    }
-    internal protected override void OnClosing(FormClosingEventArgs e) {
-      base.OnClosing(e);
-      View view = ActiveView as View;
-      if (view != null)
-        view.OnClosing(e);
-    }
-    internal protected override void OnClosed(FormClosedEventArgs e) {
-      base.OnClosed(e);
-      View view = ActiveView as View;
-      if (view != null)
-        view.OnClosed(e);
-    }
-    #endregion
-
-    #region GUI actions
-    private void UpdateActiveMenuItem() {
-      foreach (KeyValuePair<Type, ToolStripMenuItem> item in viewContextMenuStrip.MenuItems) {
-        if (item.Key == viewType) {
-          item.Value.Checked = true;
-          item.Value.Enabled = false;
-        } else {
-          item.Value.Checked = false;
-          item.Value.Enabled = true;
-        }
-      }
-    }
-
-    private bool ViewCanShowContent(Type viewType, object content) {
-      if (content == null) // every view can display null
-        return true;
-      if (viewType == null)
-        return false;
-      return ContentAttribute.CanViewType(viewType, Content.GetType()) && viewContextMenuStrip.MenuItems.Any(item => item.Key == viewType);
-    }
-
-    private void viewsLabel_DoubleClick(object sender, EventArgs e) {
-      IContentView view = MainFormManager.MainForm.ShowContent(this.Content, this.ViewType);
-      if (view != null) {
-        view.ReadOnly = this.ReadOnly;
-        view.Locked = this.Locked;
-      }
-    }
-    private void viewContextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) {
-      Type viewType = (Type)e.ClickedItem.Tag;
-      ViewType = viewType;
-    }
-
-    private bool startDragAndDrop;
-    private void viewsLabel_MouseDown(object sender, MouseEventArgs e) {
-      if (e.Button == System.Windows.Forms.MouseButtons.Right) {
-        Screen screen = Screen.FromControl(viewsLabel);
-        int rightBorder = viewsLabel.PointToScreen(viewsLabel.Location).X + viewContextMenuStrip.Width; //
-        rightBorder = rightBorder - screen.Bounds.X; //pixel position on active screen
-
-        if (rightBorder < screen.Bounds.Width)
-          viewContextMenuStrip.Show(viewsLabel, viewsLabel.Margin.Left, viewsLabel.Margin.Top);
-        else
-          viewContextMenuStrip.Show(screen.Bounds.X + screen.Bounds.Width - viewContextMenuStrip.Width, viewsLabel.PointToScreen(viewsLabel.Location).Y - viewsLabel.Margin.Top);
-      } else if (!Locked) {
-        startDragAndDrop = true;
-        viewsLabel.Capture = false;
-        viewsLabel.Focus();
-      }
-    }
-    private void viewsLabel_MouseLeave(object sender, EventArgs e) {
-      if ((Control.MouseButtons & MouseButtons.Left) == MouseButtons.Left && startDragAndDrop) {
-        DataObject data = new DataObject();
-        data.SetData("Type", Content.GetType());
-        data.SetData("Value", Content);
-        DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link);
-      } else
-        startDragAndDrop = false;
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/AsynchronousContentView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/AsynchronousContentView.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/AsynchronousContentView.Designer.cs	(revision 5463)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class AsynchronousContentView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      components = new System.ComponentModel.Container();
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/AsynchronousContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/AsynchronousContentView.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/AsynchronousContentView.cs	(revision 5463)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Threading;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class AsynchronousContentView : ContentView {
+    public AsynchronousContentView() {
+      InitializeComponent();
+    }
+
+    /// <summary>
+    /// Asynchronous call of GUI updating.
+    /// </summary>
+    /// <param name="method">The delegate to invoke.</param>
+    protected new void Invoke(Delegate method) {
+      // prevents blocking of worker thread in Invoke, if the control is disposed
+      IAsyncResult result = BeginInvoke(method);
+      result.AsyncWaitHandle.WaitOne(1000, false);
+      if (result.IsCompleted) try { EndInvoke(result); }
+        catch (ObjectDisposedException) { } else {
+        ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle,
+          new WaitOrTimerCallback((x, b) => { try { EndInvoke(result); } catch (ObjectDisposedException) { } }),
+          null, -1, true);
+      }
+    }
+
+    /// <summary>
+    /// Asynchronous call of GUI updating.
+    /// </summary>
+    /// <param name="method">The delegate to invoke.</param>
+    /// <param name="args">The invoke arguments.</param>
+    protected new void Invoke(Delegate method, params object[] args) {
+      // prevents blocking of worker thread in Invoke, if the control is disposed
+      IAsyncResult result = BeginInvoke(method, args);
+      result.AsyncWaitHandle.WaitOne(1000, false);
+      if (result.IsCompleted) try { EndInvoke(result); }
+        catch (ObjectDisposedException) { } else {
+        ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle,
+          new WaitOrTimerCallback((x, b) => { try { EndInvoke(result); } catch (ObjectDisposedException) { } }),
+          null, -1, true);
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ContentView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ContentView.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ContentView.Designer.cs	(revision 5463)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class ContentView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // ContentView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "ContentView";
+      this.ResumeLayout(false);
+
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ContentView.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/ContentView.cs	(revision 5463)
@@ -0,0 +1,126 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Reflection;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class ContentView : View, IContentView {
+    public ContentView()
+      : base() {
+      InitializeComponent();
+      this.locked = false;
+    }
+
+    private IContent content;
+    public IContent Content {
+      get { return content; }
+      set {
+        //check if the ContentView is tagged with a corresponding ContentAttribute for the type of the Content
+        if ((value != null) && (!MainFormManager.ViewCanViewContent(this, value)) &&
+          ContentAttribute.HasContentAttribute(this.GetType()))
+          throw new ArgumentException(string.Format("View \"{0}\" cannot view object \"{1}\".", this.GetType().Name, value.GetType().Name));
+        if (InvokeRequired) {
+          Invoke(new Action<IContent>(delegate(IContent o) { this.Content = o; }), value);
+        } else {
+          if (this.content != value) {
+            this.SuspendRepaint();
+            if (this.content != null) this.DeregisterContentEvents();
+            this.content = value;
+            if (this.content != null) this.RegisterContentEvents();
+            this.OnContentChanged();
+            this.SetEnabledStateOfControls();
+            this.OnChanged();
+            this.ResumeRepaint(true);
+          }
+        }
+      }
+    }
+
+    private bool locked;
+    public virtual bool Locked {
+      get { return this.locked; }
+      set {
+        if (InvokeRequired) {
+          Action<bool> action = delegate(bool b) { this.Locked = b; };
+          Invoke(action, value);
+        } else {
+          if (value != locked) {
+            locked = value;
+            OnLockedChanged();
+            PropertyInfo prop = typeof(IContentView).GetProperty("Locked");
+            PropagateStateChanges(this, typeof(IContentView), prop);
+            SetEnabledStateOfControls();
+            OnChanged();
+          }
+        }
+      }
+    }
+    public event EventHandler LockedChanged;
+    protected virtual void OnLockedChanged() {
+      if (InvokeRequired)
+        Invoke((MethodInvoker)OnLockedChanged);
+      else {
+        EventHandler handler = LockedChanged;
+        if (handler != null)
+          handler(this, EventArgs.Empty);
+      }
+    }
+    /// <summary>
+    /// Adds eventhandlers to the current instance.
+    /// </summary>
+    protected virtual void RegisterContentEvents() {
+    }
+
+    /// <summary>
+    /// Removes the eventhandlers from the current instance.
+    /// </summary>
+    protected virtual void DeregisterContentEvents() {
+    }
+
+    /// <summary>
+    /// Is called when the content property changes.
+    /// </summary>
+    protected virtual void OnContentChanged() {
+    }
+
+    /// <summary>
+    /// This method is called if the ReadyOnly, Locked or Content property of the ContentView changes to update the controls of the view.
+    /// </summary>
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+    }
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (Content != null) DeregisterContentEvents();
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/View.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/View.Designer.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/View.Designer.cs	(revision 5463)
@@ -0,0 +1,61 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  partial class View {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // ViewBase
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "ViewBase";
+      this.Load += new System.EventHandler(this.View_Load);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/View.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/View.cs	(revision 5463)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Views/View.cs	(revision 5463)
@@ -0,0 +1,264 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Linq;
+using System.Reflection;
+using System.Windows.Forms;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class View : UserControl, IView {
+    private bool initialized;
+    public View() {
+      InitializeComponent();
+      this.initialized = false;
+      this.isShown = false;
+      this.closeReason = CloseReason.None;
+      this.readOnly = false;
+      if (ViewAttribute.HasViewAttribute(this.GetType()))
+        this.Caption = ViewAttribute.GetViewName(this.GetType());
+      else
+        this.Caption = "View";
+    }
+
+    private string caption;
+    public string Caption {
+      get { return caption; }
+      set {
+        if (InvokeRequired) {
+          Action<string> action = delegate(string s) { this.Caption = s; };
+          Invoke(action, value);
+        } else {
+          if (value != caption) {
+            caption = value;
+            OnCaptionChanged();
+          }
+        }
+      }
+    }
+
+    private bool readOnly;
+    public virtual bool ReadOnly {
+      get { return this.readOnly; }
+      set {
+        if (InvokeRequired) {
+          Action<bool> action = delegate(bool b) { this.ReadOnly = b; };
+          Invoke(action, value);
+        } else {
+          if (value != readOnly) {
+            this.readOnly = value;
+            OnReadOnlyChanged();
+            PropertyInfo prop = typeof(IView).GetProperty("ReadOnly");
+            PropagateStateChanges(this, typeof(IView), prop);
+            SetEnabledStateOfControls();
+            OnChanged();
+          }
+        }
+      }
+    }
+
+    public new bool Enabled {
+      get { return base.Enabled; }
+      set {
+        if (base.Enabled != value) {
+          this.SuspendRepaint();
+          base.Enabled = value;
+          this.ResumeRepaint(true);
+          OnChanged();
+        }
+      }
+    }
+
+    bool IView.Enabled {
+      get { return Enabled; }
+      set { Enabled = value; }
+    }
+
+    protected override void OnEnabledChanged(EventArgs e) {
+      base.OnEnabledChanged(e);
+      if (Enabled) SetEnabledStateOfControls();
+    }
+
+    /// <summary>
+    /// This method is called if the ReadyOnly property of the View changes to update the controls of the view.
+    /// </summary>
+    protected virtual void SetEnabledStateOfControls() {
+    }
+
+    private bool isShown;
+    public bool IsShown {
+      get { return this.isShown; }
+      private set { this.isShown = value; }
+    }
+
+    public new void Show() {
+      MainForm mainform = MainFormManager.GetMainForm<MainForm>();
+      bool firstTimeShown = mainform.GetForm(this) == null;
+
+      this.IsShown = true;
+      mainform.ShowView(this);
+      if (firstTimeShown) {
+        Form form = mainform.GetForm(this);
+        form.FormClosed += new FormClosedEventHandler(OnClosedHelper);
+        form.FormClosing += new FormClosingEventHandler(OnClosingHelper);
+      }
+      this.OnShown(new ViewShownEventArgs(this, firstTimeShown));
+    }
+
+    public void Close() {
+      MainForm mainform = MainFormManager.GetMainForm<MainForm>();
+      Form form = mainform.GetForm(this);
+      if (form != null) {
+        this.IsShown = false;
+        mainform.CloseView(this);
+      }
+    }
+
+    public void Close(CloseReason closeReason) {
+      MainForm mainform = MainFormManager.GetMainForm<MainForm>();
+      Form form = mainform.GetForm(this);
+      if (form != null) {
+        this.IsShown = false;
+        mainform.CloseView(this, closeReason);
+      }
+    }
+
+    public new void Hide() {
+      this.IsShown = false;
+      MainFormManager.GetMainForm<MainForm>().HideView(this);
+      this.OnHidden(EventArgs.Empty);
+    }
+
+    public event EventHandler CaptionChanged;
+    protected virtual void OnCaptionChanged() {
+      if (InvokeRequired)
+        Invoke((MethodInvoker)OnCaptionChanged);
+      else {
+        EventHandler handler = CaptionChanged;
+        if (handler != null)
+          handler(this, EventArgs.Empty);
+      }
+    }
+    public event EventHandler ReadOnlyChanged;
+    protected virtual void OnReadOnlyChanged() {
+      if (InvokeRequired)
+        Invoke((MethodInvoker)OnReadOnlyChanged);
+      else {
+        EventHandler handler = ReadOnlyChanged;
+        if (handler != null)
+          handler(this, EventArgs.Empty);
+      }
+    }
+    protected virtual void PropagateStateChanges(Control control, Type type, PropertyInfo propertyInfo) {
+      if (!type.GetProperties().Contains(propertyInfo))
+        throw new ArgumentException("The specified type " + type + "implement the property " + propertyInfo.Name + ".");
+      if (!type.IsAssignableFrom(this.GetType()))
+        throw new ArgumentException("The specified type " + type + "must be the same or a base class / interface of this object.");
+      if (!propertyInfo.CanWrite)
+        throw new ArgumentException("The specified property " + propertyInfo.Name + " must have a setter.");
+
+      foreach (Control c in control.Controls) {
+        Type controlType = c.GetType();
+        PropertyInfo controlPropertyInfo = controlType.GetProperty(propertyInfo.Name, propertyInfo.PropertyType);
+        if (type.IsAssignableFrom(controlType) && controlPropertyInfo != null) {
+          var thisValue = propertyInfo.GetValue(this, null);
+          controlPropertyInfo.SetValue(c, thisValue, null);
+        } else PropagateStateChanges(c, type, propertyInfo);
+      }
+    }
+    public event EventHandler Changed;
+    protected virtual void OnChanged() {
+      if (InvokeRequired)
+        Invoke((MethodInvoker)OnChanged);
+      else {
+        EventHandler handler = Changed;
+        if (handler != null)
+          handler(this, EventArgs.Empty);
+      }
+    }
+
+    internal protected virtual void OnShown(ViewShownEventArgs e) {
+    }
+
+    internal protected virtual void OnHidden(EventArgs e) {
+    }
+
+    private CloseReason closeReason;
+    internal CloseReason CloseReason {
+      get { return this.closeReason; }
+      set { this.closeReason = value; }
+    }
+
+    internal void OnClosingHelper(object sender, FormClosingEventArgs e) {
+      FormClosingEventArgs eventArgs = new FormClosingEventArgs(this.closeReason, e.Cancel);
+      if (this.closeReason != CloseReason.None) {
+        this.OnClosing(eventArgs);
+        if (eventArgs.Cancel != e.Cancel)
+          e.Cancel = eventArgs.Cancel;
+      } else
+        this.OnClosing(e);
+      this.closeReason = CloseReason.None;
+    }
+
+    internal protected virtual void OnClosing(FormClosingEventArgs e) {
+    }
+
+    internal void OnClosedHelper(object sender, FormClosedEventArgs e) {
+      if (this.closeReason != CloseReason.None)
+        this.OnClosed(new FormClosedEventArgs(this.closeReason));
+      else
+        this.OnClosed(e);
+
+      Form form = (Form)sender;
+      form.FormClosed -= new FormClosedEventHandler(OnClosedHelper);
+      form.FormClosing -= new FormClosingEventHandler(OnClosingHelper);
+      this.closeReason = CloseReason.None;
+    }
+
+    internal protected virtual void OnClosed(FormClosedEventArgs e) {
+    }
+
+    private void View_Load(object sender, EventArgs e) {
+      if (!this.initialized && !this.DesignMode) {
+        this.OnInitialized(e);
+        this.initialized = true;
+      }
+    }
+
+    protected virtual void OnInitialized(EventArgs e) {
+      SetEnabledStateOfControls();
+    }
+
+
+    public void SuspendRepaint() {
+      if (InvokeRequired)
+        Invoke((MethodInvoker)SuspendRepaint);
+      else
+        ((Control)this).SuspendRepaint();
+    }
+    public void ResumeRepaint(bool refresh) {
+      if (InvokeRequired)
+        Invoke((Action<bool>)ResumeRepaint, refresh);
+      else
+        ((Control)this).ResumeRepaint(refresh);
+    }
+  }
+}
