Index: trunk/sources/HeuristicLab.Core.Views/3.3/Clipboard.cs
===================================================================
--- trunk/sources/HeuristicLab.Core.Views/3.3/Clipboard.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Core.Views/3.3/Clipboard.cs	(revision 3416)
@@ -231,6 +231,9 @@
       if (listView.SelectedItems.Count == 1) {
         T item = (T)listView.SelectedItems[0].Tag;
-        IView view = MainFormManager.CreateDefaultView(item, ReadOnly);
-        if (view != null) view.Show();
+        IView view = MainFormManager.CreateDefaultView(item);
+        if (view != null) {
+          view.ReadOnly = this.ReadOnly;
+          view.Show();
+        }
       }
     }
Index: trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs
===================================================================
--- trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs	(revision 3416)
@@ -230,6 +230,9 @@
         T item = itemsListView.SelectedItems[0].Tag as T;
         if (item != null) {
-          IView view = MainFormManager.CreateDefaultView(item, ReadOnly);
-          if (view != null) view.Show();
+          IView view = MainFormManager.CreateDefaultView(item);
+          if (view != null) {
+            view.ReadOnly = ReadOnly;
+            view.Show();
+          }
         }
       }
Index: trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
===================================================================
--- trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs	(revision 3416)
@@ -190,6 +190,9 @@
       if (itemsListView.SelectedItems.Count == 1) {
         T item = (T)itemsListView.SelectedItems[0].Tag;
-        IView view = MainFormManager.CreateDefaultView(item, ReadOnly);
-        if (view != null) view.Show();
+        IView view = MainFormManager.CreateDefaultView(item);
+        if (view != null) {
+          view.ReadOnly = this.ReadOnly;
+          view.Show();
+        }
       }
     }
Index: trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
===================================================================
--- trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs	(revision 3416)
@@ -224,6 +224,9 @@
       if (itemsListView.SelectedItems.Count == 1) {
         T item = (T)itemsListView.SelectedItems[0].Tag;
-        IView view = MainFormManager.CreateDefaultView(item, ReadOnly);
-        if (view != null) view.Show();
+        IView view = MainFormManager.CreateDefaultView(item);
+        if (view != null) {
+          view.ReadOnly = ReadOnly;
+          view.Show();
+        }
       }
     }
Index: trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs
===================================================================
--- trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs	(revision 3416)
@@ -355,6 +355,7 @@
         IOperator op = GetOperatorTag(graphTreeView.SelectedNode);
         if (op != null) {
-          IView view = MainFormManager.CreateDefaultView(op, ReadOnly);
+          IView view = MainFormManager.CreateDefaultView(op);
           if (view != null) {
+            view.ReadOnly = this.ReadOnly;
             viewToolStripMenuItem.Enabled = true;
             viewToolStripMenuItem.Tag = view;
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/AsynchronousContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/AsynchronousContentView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/AsynchronousContentView.cs	(revision 3416)
@@ -8,4 +8,5 @@
 using System.Windows.Forms;
 using System.Threading;
+using HeuristicLab.Common;
 
 namespace HeuristicLab.MainForm.WindowsForms {
@@ -15,5 +16,5 @@
     }
 
-    public AsynchronousContentView(object content)
+    public AsynchronousContentView(IContent content)
       : this() {
       this.Content = content;
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/AsynchronousStorableContentView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/AsynchronousStorableContentView.Designer.cs	(revision 3416)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/AsynchronousStorableContentView.Designer.cs	(revision 3416)
@@ -0,0 +1,40 @@
+﻿namespace HeuristicLab.MainForm.WindowsForms {
+  partial class AsynchronousStorableContentView {
+    /// <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 (Content != null) DeregisterContentEvents();
+        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.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.2/AsynchronousStorableContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/AsynchronousStorableContentView.cs	(revision 3416)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/AsynchronousStorableContentView.cs	(revision 3416)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using System.Threading;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class AsynchronousStorableContentView : StorableContentView {
+    public AsynchronousStorableContentView()
+      : base() {
+      InitializeComponent();
+    }
+    public AsynchronousStorableContentView(IStorableContent content)
+      : base() {
+      this.Content = content;
+    }
+
+    /// <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.2/ContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ContentView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ContentView.cs	(revision 3416)
@@ -28,9 +28,11 @@
 using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Common;
+using System.Reflection;
 
 namespace HeuristicLab.MainForm.WindowsForms {
   public partial class ContentView : View, IContentView {
-    private object content;
-    public object Content {
+    private IContent content;
+    public IContent Content {
       get { return content; }
       set {
@@ -38,5 +40,5 @@
           throw new ArgumentException(string.Format("View \"{0}\" cannot view object \"{1}\".", this.GetType().Name, value.GetType().Name));
         if (InvokeRequired) {
-          Invoke(new Action<object>(delegate(object o) { this.Content = o; }), value);
+          Invoke(new Action<IContent>(delegate(IContent o) { this.Content = o; }), value);
         } else {
           if (this.content != value) {
@@ -49,23 +51,42 @@
       }
     }
-    private bool saveEnabled;
-    public bool SaveEnabled {
-      get { return saveEnabled; }
-      protected set {
-        if (value != saveEnabled) {
-          saveEnabled = value;
-          OnChanged();
-        }
-      }
-    }
 
     public ContentView()
       : base() {
       InitializeComponent();
-      saveEnabled = true;
+      this.locked = false;
     }
-    public ContentView(object content)
+    public ContentView(IContent content)
       : this() {
       this.content = content;
+    }
+
+    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;
+            PropertyInfo prop = typeof(IContentView).GetProperty("Locked");
+            PropagateStateChanges(this, typeof(IContentView), prop);
+            OnLockedChanged();
+            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);
+      }
     }
 
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/HeuristicLab.MainForm.WindowsForms-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/HeuristicLab.MainForm.WindowsForms-3.2.csproj	(revision 3415)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/HeuristicLab.MainForm.WindowsForms-3.2.csproj	(revision 3416)
@@ -100,4 +100,16 @@
     <None Include="HeuristicLabMainFormWindowsFormsPlugin.cs.frame" />
     <Compile Include="ControlExtensions.cs" />
+    <Compile Include="AsynchronousStorableContentView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="AsynchronousStorableContentView.Designer.cs">
+      <DependentUpon>AsynchronousStorableContentView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="StorableContentView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="StorableContentView.Designer.cs">
+      <DependentUpon>StorableContentView.cs</DependentUpon>
+    </Compile>
     <Compile Include="DockForm.cs">
       <SubType>Form</SubType>
@@ -167,4 +179,8 @@
       <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
       <Name>HeuristicLab.Common.Resources-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.WinFormsUI\2.3.1\WinFormsUI-2.3.1\WinFormsUI-2.3.1.csproj">
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/StorableContentView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/StorableContentView.Designer.cs	(revision 3416)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/StorableContentView.Designer.cs	(revision 3416)
@@ -0,0 +1,40 @@
+﻿namespace HeuristicLab.MainForm.WindowsForms {
+  partial class StorableContentView {
+    /// <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 (Content != null) DeregisterContentEvents();
+        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.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.2/StorableContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/StorableContentView.cs	(revision 3416)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/StorableContentView.cs	(revision 3416)
@@ -0,0 +1,48 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.MainForm.WindowsForms {
+  public partial class StorableContentView : ContentView, IStorableContentView {
+    public StorableContentView()
+      : base() {
+      InitializeComponent();
+    }
+    public StorableContentView(IStorableContent content)
+      : this() {
+      this.Content = content;
+    }
+
+    public new IStorableContent Content {
+      get { return (IStorableContent)base.Content; }
+      set { base.Content = value; }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/View.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/View.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/View.cs	(revision 3416)
@@ -21,5 +21,8 @@
 
 using System;
+using System.Linq;
 using System.Windows.Forms;
+using System.Reflection;
+using System.ComponentModel;
 
 namespace HeuristicLab.MainForm.WindowsForms {
@@ -65,4 +68,6 @@
           if (value != readOnly) {
             readOnly = value;
+            PropertyInfo prop = typeof(IView).GetProperty("ReadOnly");
+            PropagateStateChanges(this, typeof(IView), prop);
             OnReadOnlyChanged();
           }
@@ -135,4 +140,22 @@
       }
     }
+    protected 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() {
Index: trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewHost.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewHost.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewHost.cs	(revision 3416)
@@ -25,4 +25,5 @@
 using System.Windows.Forms;
 using HeuristicLab.MainForm;
+using HeuristicLab.Common;
 
 namespace HeuristicLab.MainForm.WindowsForms {
@@ -38,5 +39,5 @@
       activeView = null;
     }
-    public ViewHost(object content)
+    public ViewHost(IContent content)
       : this() {
       this.Content = content;
@@ -75,5 +76,5 @@
             View view = activeView as View;
             if (view != null)
-              view.OnShown(new ViewShownEventArgs(view,false));
+              view.OnShown(new ViewShownEventArgs(view, false));
           }
           ActiveViewChanged();
@@ -95,5 +96,5 @@
       }
     }
-    public new object Content {
+    public new IContent Content {
       get { return base.Content; }
       set {
@@ -116,9 +117,5 @@
     }
 
-    protected override void OnReadOnlyChanged() {
-      base.OnReadOnlyChanged();
-      foreach (IContentView view in cachedViews.Values)
-        view.ReadOnly = this.ReadOnly;
-    }
+
 
     protected override void OnContentChanged() {
@@ -162,5 +159,7 @@
         view = cachedViews[ViewType];
       else {
-        view = MainFormManager.CreateView(viewType, Content, ReadOnly);
+        view = MainFormManager.CreateView(viewType, Content);
+        view.ReadOnly = this.ReadOnly;
+        view.Locked = this.Locked;
         cachedViews.Add(viewType, view);
       }
@@ -192,9 +191,19 @@
       if (ActiveView != null) {
         this.Caption = this.ActiveView.Caption;
-        this.SaveEnabled = this.ActiveView.SaveEnabled;
+        this.Locked = this.ActiveView.Locked;
       }
     }
 
     #region forwarding of view events
+    protected override void OnReadOnlyChanged() {
+      base.OnReadOnlyChanged();
+      foreach (IContentView view in cachedViews.Values)
+        view.ReadOnly = this.ReadOnly;
+    }
+    protected override void OnLockedChanged() {
+      base.OnLockedChanged();
+      foreach (IContentView view in cachedViews.Values)
+        view.Locked = this.Locked;
+    }
     internal protected override void OnShown(ViewShownEventArgs e) {
       base.OnShown(e);
@@ -203,5 +212,4 @@
         view.OnShown(e);
     }
-
     internal protected override void OnHidden(EventArgs e) {
       base.OnHidden(e);
@@ -210,5 +218,4 @@
         view.OnHidden(e);
     }
-
     internal protected override void OnClosing(FormClosingEventArgs e) {
       base.OnClosing(e);
@@ -216,5 +223,4 @@
         view.OnClosing(e);
     }
-
     internal protected override void OnClosed(FormClosedEventArgs e) {
       base.OnClosed(e);
@@ -246,5 +252,8 @@
 
     private void viewsLabel_DoubleClick(object sender, EventArgs e) {
-      MainFormManager.CreateView(viewType, Content, ReadOnly).Show();
+      IContentView view = MainFormManager.CreateView(viewType, Content);
+      view.ReadOnly = this.ReadOnly;
+      view.Locked = this.Locked;
+      view.Show();
     }
     private void viewContextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) {
@@ -255,6 +264,8 @@
     private bool startDragAndDrop;
     private void viewsLabel_MouseDown(object sender, MouseEventArgs e) {
-      startDragAndDrop = true;
-      viewsLabel.Capture = false;
+      if (!Locked) {
+        startDragAndDrop = true;
+        viewsLabel.Capture = false;
+      }
     }
     private void viewsLabel_MouseLeave(object sender, EventArgs e) {
Index: trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj	(revision 3415)
+++ trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj	(revision 3416)
@@ -85,4 +85,5 @@
   <ItemGroup>
     <None Include="HeuristicLabMainFormPlugin.cs.frame" />
+    <Compile Include="Interfaces\IStorableContentView.cs" />
     <Compile Include="ViewAttribute.cs" />
     <Compile Include="Interfaces\IContentView.cs" />
@@ -109,4 +110,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
Index: trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IContentView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IContentView.cs	(revision 3416)
@@ -24,9 +24,11 @@
 using System.Text;
 using System.ComponentModel;
+using HeuristicLab.Common;
 
 namespace HeuristicLab.MainForm {
   public interface IContentView : IView {
-    object Content { get; set; }
-    bool SaveEnabled { get; }
+    IContent Content { get; set; }
+    bool Locked { get; set; }
+    event EventHandler LockedChanged;
   }
 }
Index: trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IStorableContentView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IStorableContentView.cs	(revision 3416)
+++ trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IStorableContentView.cs	(revision 3416)
@@ -0,0 +1,32 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.ComponentModel;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.MainForm {
+  public interface IStorableContentView : IContentView {
+    new IStorableContent Content { get; set; }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IView.cs	(revision 3416)
@@ -27,5 +27,4 @@
 namespace HeuristicLab.MainForm {
   public interface IView {
-
     bool IsShown { get; }
     string Caption { get; set; }
Index: trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 3416)
@@ -26,4 +26,5 @@
 using HeuristicLab.PluginInfrastructure;
 using System.Diagnostics;
+using HeuristicLab.Common;
 
 namespace HeuristicLab.MainForm {
@@ -75,4 +76,5 @@
 
     public static IEnumerable<Type> GetViewTypes(Type contentType) {
+      CheckForContentType(contentType);
       List<Type> viewTypes = (from v in views
                               where ContentAttribute.CanViewType(v, contentType)
@@ -86,4 +88,5 @@
 
     public static IEnumerable<Type> GetViewTypes(Type contentType, bool returnOnlyMostSpecificViewTypes) {
+      CheckForContentType(contentType);
       List<Type> viewTypes = new List<Type>(GetViewTypes(contentType));
       if (returnOnlyMostSpecificViewTypes) {
@@ -102,9 +105,10 @@
     }
 
-    public static bool ViewCanViewObject(IContentView view, object content) {
+    public static bool ViewCanViewObject(IContentView view, IContent content) {
       return ContentAttribute.CanViewType(view.GetType(), content.GetType());
     }
 
     public static Type GetDefaultViewType(Type contentType) {
+      CheckForContentType(contentType);
       //check base classes for default view
       Type type = contentType;
@@ -148,13 +152,6 @@
       return (IContentView)Activator.CreateInstance(t, content);
     }
-    public static IContentView CreateDefaultView(object content, bool readOnly) {
-      IContentView view = CreateDefaultView(content);
-      if (view != null)
-        view.ReadOnly = readOnly;
-      return view;
-    }
-
     public static IContentView CreateView(Type viewType) {
-      if (!typeof(IContentView).IsAssignableFrom(viewType))
+      if (!typeof(IView).IsAssignableFrom(viewType))
         throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IView.");
       if (viewType.IsGenericTypeDefinition)
@@ -163,13 +160,8 @@
       return (IContentView)Activator.CreateInstance(viewType);
     }
-    public static IContentView CreateView(Type viewType, bool readOnly) {
-      IContentView view = CreateView(viewType);
-      view.ReadOnly = readOnly;
-      return view;
-    }
-
     public static IContentView CreateView(Type viewType, object content) {
-      if (!typeof(IContentView).IsAssignableFrom(viewType))
-        throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IView.");
+      CheckForContentType(content.GetType());
+      CheckForContentViewType(viewType);
+
       Type view = viewType;
       if (view.IsGenericTypeDefinition)
@@ -178,8 +170,12 @@
       return (IContentView)Activator.CreateInstance(view, content);
     }
-    public static IContentView CreateView(Type viewType, object content, bool readOnly) {
-      IContentView view = CreateView(viewType, content);
-      view.ReadOnly = readOnly;
-      return view;
+
+    private static void CheckForContentType(Type contentType) {
+          if (!typeof(IContent).IsAssignableFrom(contentType))
+        throw new ArgumentException("DefaultViews are only specified for types of IContent and not for " + contentType + ".");
+    }
+    private static void CheckForContentViewType(Type viewType) {
+      if (!typeof(IContentView).IsAssignableFrom(viewType))
+        throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IContentView.");
     }
 
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs	(revision 3416)
@@ -153,5 +153,5 @@
       else {
         this.ReadOnly = Content.ExecutionState == ExecutionState.Started;
-        SaveEnabled = Content.ExecutionState != ExecutionState.Started;
+        Locked = Content.ExecutionState == ExecutionState.Started;
         EnableDisableButtons();
       }
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs	(revision 3416)
@@ -120,5 +120,5 @@
       else {
         this.ReadOnly = Content.ExecutionState == ExecutionState.Started;
-        SaveEnabled = Content.ExecutionState != ExecutionState.Started;
+        Locked = Content.ExecutionState == ExecutionState.Started;
         newAlgorithmButton.Enabled = openAlgorithmButton.Enabled = saveAlgorithmButton.Enabled = Content.ExecutionState != ExecutionState.Started;
         EnableDisableButtons();
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/ExperimentView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/ExperimentView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/ExperimentView.cs	(revision 3416)
@@ -107,5 +107,5 @@
         nameTextBox.Enabled = Content.ExecutionState != ExecutionState.Started;
         descriptionTextBox.Enabled = Content.ExecutionState != ExecutionState.Started;
-        SaveEnabled = Content.ExecutionState != ExecutionState.Started;
+        Locked = Content.ExecutionState == ExecutionState.Started;
         EnableDisableButtons();
       }
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs	(revision 3416)
@@ -166,6 +166,9 @@
       if (itemsListView.SelectedItems.Count == 1) {
         IRun item = (IRun)itemsListView.SelectedItems[0].Tag;
-        IView view = MainFormManager.CreateDefaultView(item,ReadOnly);
-        if (view != null) view.Show();
+        IView view = MainFormManager.CreateDefaultView(item);
+        if (view != null) {
+          view.ReadOnly = ReadOnly;
+          view.Show();
+        }
       }
     }
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs	(revision 3416)
@@ -120,5 +120,5 @@
       if (listView.SelectedItems.Count == 1) {
         viewHost.ViewType = null;
-        viewHost.Content = listView.SelectedItems[0].Tag;
+        viewHost.Content = (IContent) listView.SelectedItems[0].Tag;
       } else {
         viewHost.Content = null;
@@ -128,6 +128,9 @@
       if (listView.SelectedItems.Count == 1) {
         IItem item = (IItem)listView.SelectedItems[0].Tag;
-        IView view = MainFormManager.CreateDefaultView(item,ReadOnly);
-        if (view != null) view.Show();
+        IView view = MainFormManager.CreateDefaultView(item);
+        if (view != null) {
+          view.ReadOnly = ReadOnly;
+          view.Show();
+        }
       }
     }
@@ -141,5 +144,9 @@
     }
     private void showAlgorithmButton_Click(object sender, EventArgs e) {
-      MainFormManager.CreateDefaultView(Content.Algorithm.Clone(),ReadOnly).Show();
+      IContentView view = MainFormManager.CreateDefaultView(Content.Algorithm.Clone());
+      if (view != null) {
+        view.ReadOnly = ReadOnly;
+        view.Show();
+      }
     }
   }
Index: trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs	(revision 3416)
@@ -108,5 +108,5 @@
     }
     private static void Save(IContentView view) {
-      if (view.SaveEnabled) {
+      if (!view.Locked) {
         if ((!files.ContainsKey(view)) || (!File.Exists(files[view].Filename))) {
           SaveAs(view);
@@ -127,5 +127,5 @@
     }
     public static void SaveAs(IContentView view) {
-      if (view.SaveEnabled) {
+      if (!view.Locked) {
         if (saveFileDialog == null) {
           saveFileDialog = new SaveFileDialog();
Index: trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CopyToClipboardMenuItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CopyToClipboardMenuItem.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CopyToClipboardMenuItem.cs	(revision 3416)
@@ -48,10 +48,10 @@
     protected override void OnActiveViewChanged(object sender, EventArgs e) {
       ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView;
-      ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
+      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
     }
 
     public override void Execute() {
       ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView;
-      if ((activeView != null) && (activeView.SaveEnabled)) {
+      if ((activeView != null) && (!activeView.Locked)) {
         Clipboard<IItem> clipboard = ((OptimizerMainForm)MainFormManager.MainForm).Clipboard;
         clipboard.AddItem((IItem)activeView.Content.Clone());
Index: trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs	(revision 3416)
@@ -47,5 +47,5 @@
     protected override void OnActiveViewChanged(object sender, EventArgs e) {
       var views = from v in MainFormManager.MainForm.Views.OfType<IContentView>()
-                  where v.SaveEnabled
+                  where !v.Locked
                   select v;
       ToolStripItem.Enabled = views.FirstOrDefault() != null;
Index: trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs	(revision 3416)
@@ -45,5 +45,5 @@
     protected override void OnActiveViewChanged(object sender, EventArgs e) {
       IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
-      ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
+      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
     }
 
Index: trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs	(revision 3416)
@@ -49,5 +49,5 @@
     protected override void OnActiveViewChanged(object sender, EventArgs e) {
       IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
-      ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
+      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
     }
 
Index: trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs	(revision 3416)
@@ -46,5 +46,5 @@
     protected override void OnActiveViewChanged(object sender, EventArgs e) {
       var views = from v in MainFormManager.MainForm.Views.OfType<IContentView>()
-                  where v.SaveEnabled
+                  where !v.Locked
                   select v;
       ToolStripItem.Enabled = views.FirstOrDefault() != null;
Index: trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs	(revision 3415)
+++ trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs	(revision 3416)
@@ -45,5 +45,5 @@
     protected override void OnActiveViewChanged(object sender, EventArgs e) {
       IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
-      ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
+      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
     }
 
