Index: branches/PersistenceSpeedUp/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
===================================================================
--- branches/PersistenceSpeedUp/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs	(revision 6206)
+++ branches/PersistenceSpeedUp/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs	(revision 6760)
@@ -31,23 +31,16 @@
 
 namespace HeuristicLab.Optimization.Views {
-  /// <summary>
-  /// The base class for visual representations of algorithms.
-  /// </summary>
   [View("Algorithm View")]
   [Content(typeof(Algorithm), true)]
   [Content(typeof(IAlgorithm), false)]
-  public partial class AlgorithmView : NamedItemView {
+  public partial class AlgorithmView : IOptimizerView {
     private TypeSelectorDialog problemTypeSelectorDialog;
+    public AlgorithmView() {
+      InitializeComponent();
+    }
 
     public new IAlgorithm Content {
       get { return (IAlgorithm)base.Content; }
       set { base.Content = value; }
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="ItemBaseView"/>.
-    /// </summary>
-    public AlgorithmView() {
-      InitializeComponent();
     }
 
@@ -75,11 +68,4 @@
 
     protected override void DeregisterContentEvents() {
-      Content.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
-      Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged);
-      Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged);
-      Content.Prepared -= new EventHandler(Content_Prepared);
-      Content.Started -= new EventHandler(Content_Started);
-      Content.Paused -= new EventHandler(Content_Paused);
-      Content.Stopped -= new EventHandler(Content_Stopped);
       Content.ProblemChanged -= new EventHandler(Content_ProblemChanged);
       Content.StoreAlgorithmInEachRunChanged -= new EventHandler(Content_StoreAlgorithmInEachRunChanged);
@@ -88,11 +74,4 @@
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
-      Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged);
-      Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged);
-      Content.Prepared += new EventHandler(Content_Prepared);
-      Content.Started += new EventHandler(Content_Started);
-      Content.Paused += new EventHandler(Content_Paused);
-      Content.Stopped += new EventHandler(Content_Stopped);
       Content.ProblemChanged += new EventHandler(Content_ProblemChanged);
       Content.StoreAlgorithmInEachRunChanged += new EventHandler(Content_StoreAlgorithmInEachRunChanged);
@@ -107,7 +86,5 @@
         runsView.Content = null;
         storeAlgorithmInEachRunCheckBox.Checked = true;
-        executionTimeTextBox.Text = "-";
       } else {
-        Locked = ReadOnly = Content.ExecutionState == ExecutionState.Started;
         parameterCollectionView.Content = Content.Parameters;
         problemViewHost.ViewType = null;
@@ -116,5 +93,4 @@
         runsView.Content = Content.Runs;
         storeAlgorithmInEachRunCheckBox.Checked = Content.StoreAlgorithmInEachRun;
-        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
       }
     }
@@ -129,6 +105,4 @@
       runsView.Enabled = Content != null;
       storeAlgorithmInEachRunCheckBox.Enabled = Content != null && !ReadOnly;
-      executionTimeTextBox.Enabled = Content != null;
-      SetEnabledStateOfExecutableButtons();
     }
 
@@ -146,4 +120,13 @@
 
     #region Content Events
+    protected override void Content_Prepared(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_Prepared), sender, e);
+      else {
+        base.Content_Prepared(sender, e);
+        resultsView.Content = Content.Results.AsReadOnly();
+      }
+    }
+
     protected virtual void Content_ProblemChanged(object sender, EventArgs e) {
       if (InvokeRequired)
@@ -154,16 +137,4 @@
       }
     }
-    protected virtual void Content_ExecutionStateChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
-      else
-        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;
-    }
-    protected virtual void Content_ExecutionTimeChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_ExecutionTimeChanged), sender, e);
-      else
-        executionTimeTextBox.Text = Content == null ? "-" : Content.ExecutionTime.ToString();
-    }
     protected virtual void Content_StoreAlgorithmInEachRunChanged(object sender, EventArgs e) {
       if (InvokeRequired)
@@ -171,43 +142,4 @@
       else
         storeAlgorithmInEachRunCheckBox.Checked = Content.StoreAlgorithmInEachRun;
-    }
-    protected virtual void Content_Prepared(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Prepared), sender, e);
-      else {
-        resultsView.Content = Content.Results.AsReadOnly();
-        ReadOnly = Locked = false;
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    protected virtual void Content_Started(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Started), sender, e);
-      else {
-        ReadOnly = Locked = true;
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    protected virtual void Content_Paused(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Paused), sender, e);
-      else {
-        ReadOnly = Locked = false;
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    protected virtual void Content_Stopped(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Stopped), sender, e);
-      else {
-        ReadOnly = Locked = false;
-        SetEnabledStateOfExecutableButtons();
-      }
-    }
-    protected virtual void Content_ExceptionOccurred(object sender, EventArgs<Exception> e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred), sender, e);
-      else
-        ErrorHandling.ShowErrorDialog(this, e.Value);
     }
     #endregion
@@ -264,16 +196,4 @@
       if (Content != null) Content.StoreAlgorithmInEachRun = storeAlgorithmInEachRunCheckBox.Checked;
     }
-    protected virtual void startButton_Click(object sender, EventArgs e) {
-      Content.Start();
-    }
-    protected virtual void pauseButton_Click(object sender, EventArgs e) {
-      Content.Pause();
-    }
-    protected virtual void stopButton_Click(object sender, EventArgs e) {
-      Content.Stop();
-    }
-    protected virtual void resetButton_Click(object sender, EventArgs e) {
-      Content.Prepare(false);
-    }
     protected virtual void problemTabPage_DragEnterOver(object sender, DragEventArgs e) {
       e.Effect = DragDropEffects.None;
@@ -294,17 +214,4 @@
     }
     #endregion
-
-    #region Helpers
-    private void SetEnabledStateOfExecutableButtons() {
-      if (Content == null) {
-        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;
-      } else {
-        startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);
-        pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started;
-        stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);
-        resetButton.Enabled = Content.ExecutionState != ExecutionState.Started;
-      }
-    }
-    #endregion
   }
 }
