Index: trunk/sources/HeuristicLab 3.3.sln
===================================================================
--- trunk/sources/HeuristicLab 3.3.sln	(revision 4565)
+++ trunk/sources/HeuristicLab 3.3.sln	(revision 4569)
@@ -309,4 +309,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DataAnalysis.Classification.Views-3.3", "HeuristicLab.Problems.DataAnalysis.Classification.Views\3.3\HeuristicLab.Problems.DataAnalysis.Classification.Views-3.3.csproj", "{7F038E9A-B91E-4F49-8C27-D47BC86F1220}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.DataAnalysis.Views-3.3", "HeuristicLab.Algorithms.DataAnalysis.Views\3.3\HeuristicLab.Algorithms.DataAnalysis.Views-3.3.csproj", "{C3E69936-0DB5-42A4-B1B4-12E9700B080E}"
 EndProject
 Global
@@ -1403,4 +1405,16 @@
 		{7F038E9A-B91E-4F49-8C27-D47BC86F1220}.Release|x86.ActiveCfg = Release|x86
 		{7F038E9A-B91E-4F49-8C27-D47BC86F1220}.Release|x86.Build.0 = Release|x86
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Debug|x64.ActiveCfg = Debug|x64
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Debug|x64.Build.0 = Debug|x64
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Debug|x86.ActiveCfg = Debug|x86
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Debug|x86.Build.0 = Debug|x86
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Release|x64.ActiveCfg = Release|x64
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Release|x64.Build.0 = Release|x64
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Release|x86.ActiveCfg = Release|x86
+		{C3E69936-0DB5-42A4-B1B4-12E9700B080E}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.Designer.cs	(revision 4569)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.Designer.cs	(revision 4569)
@@ -0,0 +1,617 @@
+﻿#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
+
+
+namespace HeuristicLab.Algorithms.DataAnalysis.Views {
+  partial class CrossValidationView {
+    /// <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() {
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CrossValidationView));
+      this.startButton = new System.Windows.Forms.Button();
+      this.pauseButton = new System.Windows.Forms.Button();
+      this.stopButton = new System.Windows.Forms.Button();
+      this.resetButton = new System.Windows.Forms.Button();
+      this.executionTimeTextBox = new System.Windows.Forms.TextBox();
+      this.executionTimeLabel = new System.Windows.Forms.Label();
+      this.foldsNumericUpDown = new System.Windows.Forms.NumericUpDown();
+      this.foldsLabel = new System.Windows.Forms.Label();
+      this.workersNumericUpDown = new System.Windows.Forms.NumericUpDown();
+      this.workersLabel = new System.Windows.Forms.Label();
+      this.samplesStartLabel = new System.Windows.Forms.Label();
+      this.samplesEndLabel = new System.Windows.Forms.Label();
+      this.samplesEndStringConvertibleValueView = new HeuristicLab.Data.Views.StringConvertibleValueView();
+      this.samplesStartStringConvertibleValueView = new HeuristicLab.Data.Views.StringConvertibleValueView();
+      this.tabControl = new System.Windows.Forms.TabControl();
+      this.algorithmTabPage = new System.Windows.Forms.TabPage();
+      this.algorithmNamedItemView = new HeuristicLab.Core.Views.NamedItemView();
+      this.algorithmTabControl = new System.Windows.Forms.TabControl();
+      this.algorithmProblemTabPage = new System.Windows.Forms.TabPage();
+      this.openProblemButton = new System.Windows.Forms.Button();
+      this.algorithmProblemViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.newProblemButton = new System.Windows.Forms.Button();
+      this.algorithmParametersTabPage = new System.Windows.Forms.TabPage();
+      this.algorithmParameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();
+      this.openAlgorithmButton = new System.Windows.Forms.Button();
+      this.newAlgorithmButton = new System.Windows.Forms.Button();
+      this.resultsTabPage = new System.Windows.Forms.TabPage();
+      this.runsTabPage = new System.Windows.Forms.TabPage();
+      this.storeAlgorithmInEachRunCheckBox = new System.Windows.Forms.CheckBox();
+      this.runCollectionView = new HeuristicLab.Optimization.Views.RunCollectionView();
+      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.resultCollectionView = new HeuristicLab.Optimization.Views.ResultCollectionView();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.foldsNumericUpDown)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.workersNumericUpDown)).BeginInit();
+      this.tabControl.SuspendLayout();
+      this.algorithmTabPage.SuspendLayout();
+      this.algorithmTabControl.SuspendLayout();
+      this.algorithmProblemTabPage.SuspendLayout();
+      this.algorithmParametersTabPage.SuspendLayout();
+      this.resultsTabPage.SuspendLayout();
+      this.runsTabPage.SuspendLayout();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Location = new System.Drawing.Point(80, 0);
+      this.nameTextBox.Size = new System.Drawing.Size(533, 20);
+      // 
+      // descriptionTextBox
+      // 
+      this.descriptionTextBox.Location = new System.Drawing.Point(80, 26);
+      this.descriptionTextBox.Size = new System.Drawing.Size(533, 20);
+      // 
+      // startButton
+      // 
+      this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.startButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Play;
+      this.startButton.Location = new System.Drawing.Point(0, 514);
+      this.startButton.Name = "startButton";
+      this.startButton.Size = new System.Drawing.Size(24, 24);
+      this.startButton.TabIndex = 11;
+      this.startButton.UseVisualStyleBackColor = true;
+      this.startButton.Click += new System.EventHandler(this.startButton_Click);
+      // 
+      // pauseButton
+      // 
+      this.pauseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.pauseButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Pause;
+      this.pauseButton.Location = new System.Drawing.Point(30, 514);
+      this.pauseButton.Name = "pauseButton";
+      this.pauseButton.Size = new System.Drawing.Size(24, 24);
+      this.pauseButton.TabIndex = 12;
+      this.pauseButton.UseVisualStyleBackColor = true;
+      this.pauseButton.Click += new System.EventHandler(this.pauseButton_Click);
+      // 
+      // stopButton
+      // 
+      this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.stopButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Stop;
+      this.stopButton.Location = new System.Drawing.Point(60, 514);
+      this.stopButton.Name = "stopButton";
+      this.stopButton.Size = new System.Drawing.Size(24, 24);
+      this.stopButton.TabIndex = 13;
+      this.stopButton.UseVisualStyleBackColor = true;
+      this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
+      // 
+      // resetButton
+      // 
+      this.resetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.resetButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Restart;
+      this.resetButton.Location = new System.Drawing.Point(90, 514);
+      this.resetButton.Name = "resetButton";
+      this.resetButton.Size = new System.Drawing.Size(24, 24);
+      this.resetButton.TabIndex = 14;
+      this.resetButton.UseVisualStyleBackColor = true;
+      this.resetButton.Click += new System.EventHandler(this.resetButton_Click);
+      // 
+      // executionTimeTextBox
+      // 
+      this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.executionTimeTextBox.Location = new System.Drawing.Point(478, 517);
+      this.executionTimeTextBox.Name = "executionTimeTextBox";
+      this.executionTimeTextBox.ReadOnly = true;
+      this.executionTimeTextBox.Size = new System.Drawing.Size(137, 20);
+      this.executionTimeTextBox.TabIndex = 16;
+      // 
+      // executionTimeLabel
+      // 
+      this.executionTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.executionTimeLabel.AutoSize = true;
+      this.executionTimeLabel.Location = new System.Drawing.Point(389, 520);
+      this.executionTimeLabel.Name = "executionTimeLabel";
+      this.executionTimeLabel.Size = new System.Drawing.Size(83, 13);
+      this.executionTimeLabel.TabIndex = 15;
+      this.executionTimeLabel.Text = "&Execution Time:";
+      // 
+      // foldsNumericUpDown
+      // 
+      this.foldsNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.foldsNumericUpDown.Location = new System.Drawing.Point(55, 26);
+      this.foldsNumericUpDown.Maximum = new decimal(new int[] {
+            50,
+            0,
+            0,
+            0});
+      this.foldsNumericUpDown.Minimum = new decimal(new int[] {
+            2,
+            0,
+            0,
+            0});
+      this.foldsNumericUpDown.Name = "foldsNumericUpDown";
+      this.foldsNumericUpDown.Size = new System.Drawing.Size(248, 20);
+      this.foldsNumericUpDown.TabIndex = 18;
+      this.foldsNumericUpDown.ThousandsSeparator = true;
+      this.foldsNumericUpDown.Value = new decimal(new int[] {
+            2,
+            0,
+            0,
+            0});
+      this.foldsNumericUpDown.ValueChanged += new System.EventHandler(this.foldsNumericUpDown_ValueChanged);
+      this.foldsNumericUpDown.Validated += new System.EventHandler(this.foldsNumericUpDown_Validated);
+      // 
+      // foldsLabel
+      // 
+      this.foldsLabel.AutoSize = true;
+      this.foldsLabel.Location = new System.Drawing.Point(3, 29);
+      this.foldsLabel.Name = "foldsLabel";
+      this.foldsLabel.Size = new System.Drawing.Size(35, 13);
+      this.foldsLabel.TabIndex = 17;
+      this.foldsLabel.Text = "&Folds:";
+      // 
+      // workersNumericUpDown
+      // 
+      this.workersNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.workersNumericUpDown.Location = new System.Drawing.Point(55, 0);
+      this.workersNumericUpDown.Maximum = new decimal(new int[] {
+            50,
+            0,
+            0,
+            0});
+      this.workersNumericUpDown.Minimum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+      this.workersNumericUpDown.Name = "workersNumericUpDown";
+      this.workersNumericUpDown.Size = new System.Drawing.Size(248, 20);
+      this.workersNumericUpDown.TabIndex = 20;
+      this.workersNumericUpDown.ThousandsSeparator = true;
+      this.workersNumericUpDown.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+      this.workersNumericUpDown.ValueChanged += new System.EventHandler(this.workersNumericUpDown_ValueChanged);
+      this.workersNumericUpDown.Validated += new System.EventHandler(this.workersNumericUpDown_Validated);
+      // 
+      // workersLabel
+      // 
+      this.workersLabel.AutoSize = true;
+      this.workersLabel.Location = new System.Drawing.Point(3, 3);
+      this.workersLabel.Name = "workersLabel";
+      this.workersLabel.Size = new System.Drawing.Size(50, 13);
+      this.workersLabel.TabIndex = 19;
+      this.workersLabel.Text = "&Workers:";
+      // 
+      // samplesStartLabel
+      // 
+      this.samplesStartLabel.AutoSize = true;
+      this.samplesStartLabel.Location = new System.Drawing.Point(3, 3);
+      this.samplesStartLabel.Name = "samplesStartLabel";
+      this.samplesStartLabel.Size = new System.Drawing.Size(75, 13);
+      this.samplesStartLabel.TabIndex = 21;
+      this.samplesStartLabel.Text = "&Samples Start:";
+      // 
+      // samplesEndLabel
+      // 
+      this.samplesEndLabel.AutoSize = true;
+      this.samplesEndLabel.Location = new System.Drawing.Point(3, 29);
+      this.samplesEndLabel.Name = "samplesEndLabel";
+      this.samplesEndLabel.Size = new System.Drawing.Size(72, 13);
+      this.samplesEndLabel.TabIndex = 23;
+      this.samplesEndLabel.Text = "&Samples End:";
+      // 
+      // samplesEndStringConvertibleValueView
+      // 
+      this.samplesEndStringConvertibleValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.samplesEndStringConvertibleValueView.Caption = "StringConvertibleValue View";
+      this.samplesEndStringConvertibleValueView.Content = null;
+      this.samplesEndStringConvertibleValueView.LabelVisible = false;
+      this.samplesEndStringConvertibleValueView.Location = new System.Drawing.Point(80, 26);
+      this.samplesEndStringConvertibleValueView.Name = "samplesEndStringConvertibleValueView";
+      this.samplesEndStringConvertibleValueView.ReadOnly = false;
+      this.samplesEndStringConvertibleValueView.Size = new System.Drawing.Size(223, 20);
+      this.samplesEndStringConvertibleValueView.TabIndex = 24;
+      // 
+      // samplesStartStringConvertibleValueView
+      // 
+      this.samplesStartStringConvertibleValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.samplesStartStringConvertibleValueView.Caption = "StringConvertibleValue View";
+      this.samplesStartStringConvertibleValueView.Content = null;
+      this.samplesStartStringConvertibleValueView.LabelVisible = false;
+      this.samplesStartStringConvertibleValueView.Location = new System.Drawing.Point(80, 0);
+      this.samplesStartStringConvertibleValueView.Name = "samplesStartStringConvertibleValueView";
+      this.samplesStartStringConvertibleValueView.ReadOnly = false;
+      this.samplesStartStringConvertibleValueView.Size = new System.Drawing.Size(223, 20);
+      this.samplesStartStringConvertibleValueView.TabIndex = 22;
+      // 
+      // tabControl
+      // 
+      this.tabControl.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.tabControl.Controls.Add(this.algorithmTabPage);
+      this.tabControl.Controls.Add(this.resultsTabPage);
+      this.tabControl.Controls.Add(this.runsTabPage);
+      this.tabControl.Location = new System.Drawing.Point(0, 113);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(616, 395);
+      this.tabControl.TabIndex = 25;
+      // 
+      // algorithmTabPage
+      // 
+      this.algorithmTabPage.AllowDrop = true;
+      this.algorithmTabPage.Controls.Add(this.algorithmNamedItemView);
+      this.algorithmTabPage.Controls.Add(this.algorithmTabControl);
+      this.algorithmTabPage.Controls.Add(this.openAlgorithmButton);
+      this.algorithmTabPage.Controls.Add(this.newAlgorithmButton);
+      this.algorithmTabPage.Location = new System.Drawing.Point(4, 22);
+      this.algorithmTabPage.Name = "algorithmTabPage";
+      this.algorithmTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.algorithmTabPage.Size = new System.Drawing.Size(608, 369);
+      this.algorithmTabPage.TabIndex = 0;
+      this.algorithmTabPage.Text = "Algorithm";
+      this.algorithmTabPage.UseVisualStyleBackColor = true;
+      this.algorithmTabPage.DragDrop += new System.Windows.Forms.DragEventHandler(this.algorithmTabPage_DragDrop);
+      this.algorithmTabPage.DragEnter += new System.Windows.Forms.DragEventHandler(this.algorithmTabPage_DragEnterOver);
+      this.algorithmTabPage.DragOver += new System.Windows.Forms.DragEventHandler(this.algorithmTabPage_DragEnterOver);
+      // 
+      // algorithmNamedItemView
+      // 
+      this.algorithmNamedItemView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.algorithmNamedItemView.Caption = "NamedItem View";
+      this.algorithmNamedItemView.Content = null;
+      this.algorithmNamedItemView.Location = new System.Drawing.Point(6, 36);
+      this.algorithmNamedItemView.Name = "algorithmNamedItemView";
+      this.algorithmNamedItemView.ReadOnly = false;
+      this.algorithmNamedItemView.Size = new System.Drawing.Size(596, 52);
+      this.algorithmNamedItemView.TabIndex = 29;
+      // 
+      // algorithmTabControl
+      // 
+      this.algorithmTabControl.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.algorithmTabControl.Controls.Add(this.algorithmProblemTabPage);
+      this.algorithmTabControl.Controls.Add(this.algorithmParametersTabPage);
+      this.algorithmTabControl.Location = new System.Drawing.Point(8, 94);
+      this.algorithmTabControl.Name = "algorithmTabControl";
+      this.algorithmTabControl.SelectedIndex = 0;
+      this.algorithmTabControl.Size = new System.Drawing.Size(594, 269);
+      this.algorithmTabControl.TabIndex = 28;
+      // 
+      // algorithmProblemTabPage
+      // 
+      this.algorithmProblemTabPage.Controls.Add(this.openProblemButton);
+      this.algorithmProblemTabPage.Controls.Add(this.algorithmProblemViewHost);
+      this.algorithmProblemTabPage.Controls.Add(this.newProblemButton);
+      this.algorithmProblemTabPage.Location = new System.Drawing.Point(4, 22);
+      this.algorithmProblemTabPage.Name = "algorithmProblemTabPage";
+      this.algorithmProblemTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.algorithmProblemTabPage.Size = new System.Drawing.Size(586, 243);
+      this.algorithmProblemTabPage.TabIndex = 0;
+      this.algorithmProblemTabPage.Text = "Problem";
+      this.algorithmProblemTabPage.UseVisualStyleBackColor = true;
+      this.algorithmProblemTabPage.DragDrop += new System.Windows.Forms.DragEventHandler(this.algorithmProblemTabPage_DragDrop);
+      this.algorithmProblemTabPage.DragEnter += new System.Windows.Forms.DragEventHandler(this.algorithmProblemTabPage_DragEnterOver);
+      this.algorithmProblemTabPage.DragOver += new System.Windows.Forms.DragEventHandler(this.algorithmProblemTabPage_DragEnterOver);
+      // 
+      // openProblemButton
+      // 
+      this.openProblemButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Open;
+      this.openProblemButton.Location = new System.Drawing.Point(36, 6);
+      this.openProblemButton.Name = "openProblemButton";
+      this.openProblemButton.Size = new System.Drawing.Size(24, 24);
+      this.openProblemButton.TabIndex = 31;
+      this.toolTip.SetToolTip(this.openProblemButton, "Open Problem");
+      this.openProblemButton.UseVisualStyleBackColor = true;
+      this.openProblemButton.Click += new System.EventHandler(this.openProblemButton_Click);
+      // 
+      // algorithmProblemViewHost
+      // 
+      this.algorithmProblemViewHost.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.algorithmProblemViewHost.Caption = "View";
+      this.algorithmProblemViewHost.Content = null;
+      this.algorithmProblemViewHost.Enabled = false;
+      this.algorithmProblemViewHost.Location = new System.Drawing.Point(6, 36);
+      this.algorithmProblemViewHost.Name = "algorithmProblemViewHost";
+      this.algorithmProblemViewHost.ReadOnly = false;
+      this.algorithmProblemViewHost.Size = new System.Drawing.Size(574, 201);
+      this.algorithmProblemViewHost.TabIndex = 0;
+      this.algorithmProblemViewHost.ViewType = null;
+      // 
+      // newProblemButton
+      // 
+      this.newProblemButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.NewDocument;
+      this.newProblemButton.Location = new System.Drawing.Point(6, 6);
+      this.newProblemButton.Name = "newProblemButton";
+      this.newProblemButton.Size = new System.Drawing.Size(24, 24);
+      this.newProblemButton.TabIndex = 30;
+      this.toolTip.SetToolTip(this.newProblemButton, "NewProblem");
+      this.newProblemButton.UseVisualStyleBackColor = true;
+      this.newProblemButton.Click += new System.EventHandler(this.newProblemButton_Click);
+      // 
+      // algorithmParametersTabPage
+      // 
+      this.algorithmParametersTabPage.Controls.Add(this.algorithmParameterCollectionView);
+      this.algorithmParametersTabPage.Location = new System.Drawing.Point(4, 22);
+      this.algorithmParametersTabPage.Name = "algorithmParametersTabPage";
+      this.algorithmParametersTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.algorithmParametersTabPage.Size = new System.Drawing.Size(586, 243);
+      this.algorithmParametersTabPage.TabIndex = 1;
+      this.algorithmParametersTabPage.Text = "Parameters";
+      this.algorithmParametersTabPage.UseVisualStyleBackColor = true;
+      // 
+      // algorithmParameterCollectionView
+      // 
+      this.algorithmParameterCollectionView.Caption = "ParameterCollection View";
+      this.algorithmParameterCollectionView.Content = null;
+      this.algorithmParameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.algorithmParameterCollectionView.Location = new System.Drawing.Point(3, 3);
+      this.algorithmParameterCollectionView.Name = "algorithmParameterCollectionView";
+      this.algorithmParameterCollectionView.ReadOnly = false;
+      this.algorithmParameterCollectionView.Size = new System.Drawing.Size(580, 237);
+      this.algorithmParameterCollectionView.TabIndex = 0;
+      // 
+      // openAlgorithmButton
+      // 
+      this.openAlgorithmButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Open;
+      this.openAlgorithmButton.Location = new System.Drawing.Point(38, 6);
+      this.openAlgorithmButton.Name = "openAlgorithmButton";
+      this.openAlgorithmButton.Size = new System.Drawing.Size(24, 24);
+      this.openAlgorithmButton.TabIndex = 27;
+      this.toolTip.SetToolTip(this.openAlgorithmButton, "Open Algorithm");
+      this.openAlgorithmButton.UseVisualStyleBackColor = true;
+      this.openAlgorithmButton.Click += new System.EventHandler(this.openAlgorithmButton_Click);
+      // 
+      // newAlgorithmButton
+      // 
+      this.newAlgorithmButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.NewDocument;
+      this.newAlgorithmButton.Location = new System.Drawing.Point(8, 6);
+      this.newAlgorithmButton.Name = "newAlgorithmButton";
+      this.newAlgorithmButton.Size = new System.Drawing.Size(24, 24);
+      this.newAlgorithmButton.TabIndex = 26;
+      this.toolTip.SetToolTip(this.newAlgorithmButton, "New Algorithm");
+      this.newAlgorithmButton.UseVisualStyleBackColor = true;
+      this.newAlgorithmButton.Click += new System.EventHandler(this.newAlgorithmButton_Click);
+      // 
+      // resultsTabPage
+      // 
+      this.resultsTabPage.Controls.Add(this.resultCollectionView);
+      this.resultsTabPage.Location = new System.Drawing.Point(4, 22);
+      this.resultsTabPage.Name = "resultsTabPage";
+      this.resultsTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.resultsTabPage.Size = new System.Drawing.Size(608, 369);
+      this.resultsTabPage.TabIndex = 1;
+      this.resultsTabPage.Text = "Results";
+      this.resultsTabPage.UseVisualStyleBackColor = true;
+      // 
+      // runsTabPage
+      // 
+      this.runsTabPage.Controls.Add(this.storeAlgorithmInEachRunCheckBox);
+      this.runsTabPage.Controls.Add(this.runCollectionView);
+      this.runsTabPage.Location = new System.Drawing.Point(4, 22);
+      this.runsTabPage.Name = "runsTabPage";
+      this.runsTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.runsTabPage.Size = new System.Drawing.Size(608, 369);
+      this.runsTabPage.TabIndex = 2;
+      this.runsTabPage.Text = "Runs";
+      this.runsTabPage.UseVisualStyleBackColor = true;
+      // 
+      // storeAlgorithmInEachRunCheckBox
+      // 
+      this.storeAlgorithmInEachRunCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.storeAlgorithmInEachRunCheckBox.AutoSize = true;
+      this.storeAlgorithmInEachRunCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+      this.storeAlgorithmInEachRunCheckBox.Checked = true;
+      this.storeAlgorithmInEachRunCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+      this.storeAlgorithmInEachRunCheckBox.Location = new System.Drawing.Point(440, 4);
+      this.storeAlgorithmInEachRunCheckBox.Name = "storeAlgorithmInEachRunCheckBox";
+      this.storeAlgorithmInEachRunCheckBox.Size = new System.Drawing.Size(161, 17);
+      this.storeAlgorithmInEachRunCheckBox.TabIndex = 2;
+      this.storeAlgorithmInEachRunCheckBox.Text = "&Store Algorithm in each Run:";
+      this.toolTip.SetToolTip(this.storeAlgorithmInEachRunCheckBox, "Check to store a copy of the algorithm in each run.");
+      this.storeAlgorithmInEachRunCheckBox.UseVisualStyleBackColor = true;
+      this.storeAlgorithmInEachRunCheckBox.CheckedChanged += new System.EventHandler(this.storeAlgorithmInEachRunCheckBox_CheckedChanged);
+      // 
+      // runCollectionView
+      // 
+      this.runCollectionView.Caption = "RunCollection View";
+      this.runCollectionView.Content = null;
+      this.runCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.runCollectionView.Location = new System.Drawing.Point(3, 3);
+      this.runCollectionView.Name = "runCollectionView";
+      this.runCollectionView.ReadOnly = false;
+      this.runCollectionView.Size = new System.Drawing.Size(602, 363);
+      this.runCollectionView.TabIndex = 3;
+      // 
+      // openFileDialog
+      // 
+      this.openFileDialog.DefaultExt = "hl";
+      this.openFileDialog.FileName = "Algorithm";
+      this.openFileDialog.Filter = "HeuristicLab Files|*.hl|All Files|*.*";
+      this.openFileDialog.Title = "Open Algorithm";
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.splitContainer.Location = new System.Drawing.Point(0, 52);
+      this.splitContainer.Name = "splitContainer";
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.samplesEndStringConvertibleValueView);
+      this.splitContainer.Panel1.Controls.Add(this.samplesStartStringConvertibleValueView);
+      this.splitContainer.Panel1.Controls.Add(this.samplesStartLabel);
+      this.splitContainer.Panel1.Controls.Add(this.samplesEndLabel);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.foldsNumericUpDown);
+      this.splitContainer.Panel2.Controls.Add(this.foldsLabel);
+      this.splitContainer.Panel2.Controls.Add(this.workersLabel);
+      this.splitContainer.Panel2.Controls.Add(this.workersNumericUpDown);
+      this.splitContainer.Size = new System.Drawing.Size(616, 55);
+      this.splitContainer.SplitterDistance = 306;
+      this.splitContainer.TabIndex = 26;
+      // 
+      // resultCollectionView
+      // 
+      this.resultCollectionView.Caption = "ResultCollection View";
+      this.resultCollectionView.Content = null;
+      this.resultCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.resultCollectionView.Location = new System.Drawing.Point(3, 3);
+      this.resultCollectionView.Name = "resultCollectionView";
+      this.resultCollectionView.ReadOnly = true;
+      this.resultCollectionView.Size = new System.Drawing.Size(602, 363);
+      this.resultCollectionView.TabIndex = 0;
+      // 
+      // CrossValidationView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.tabControl);
+      this.Controls.Add(this.executionTimeTextBox);
+      this.Controls.Add(this.executionTimeLabel);
+      this.Controls.Add(this.startButton);
+      this.Controls.Add(this.pauseButton);
+      this.Controls.Add(this.stopButton);
+      this.Controls.Add(this.resetButton);
+      this.Controls.Add(this.splitContainer);
+      this.Name = "CrossValidationView";
+      this.Size = new System.Drawing.Size(616, 538);
+      this.Controls.SetChildIndex(this.splitContainer, 0);
+      this.Controls.SetChildIndex(this.resetButton, 0);
+      this.Controls.SetChildIndex(this.stopButton, 0);
+      this.Controls.SetChildIndex(this.pauseButton, 0);
+      this.Controls.SetChildIndex(this.startButton, 0);
+      this.Controls.SetChildIndex(this.executionTimeLabel, 0);
+      this.Controls.SetChildIndex(this.executionTimeTextBox, 0);
+      this.Controls.SetChildIndex(this.tabControl, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.descriptionLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      ((System.ComponentModel.ISupportInitialize)(this.foldsNumericUpDown)).EndInit();
+      ((System.ComponentModel.ISupportInitialize)(this.workersNumericUpDown)).EndInit();
+      this.tabControl.ResumeLayout(false);
+      this.algorithmTabPage.ResumeLayout(false);
+      this.algorithmTabControl.ResumeLayout(false);
+      this.algorithmProblemTabPage.ResumeLayout(false);
+      this.algorithmParametersTabPage.ResumeLayout(false);
+      this.resultsTabPage.ResumeLayout(false);
+      this.runsTabPage.ResumeLayout(false);
+      this.runsTabPage.PerformLayout();
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel1.PerformLayout();
+      this.splitContainer.Panel2.ResumeLayout(false);
+      this.splitContainer.Panel2.PerformLayout();
+      this.splitContainer.ResumeLayout(false);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button startButton;
+    private System.Windows.Forms.Button pauseButton;
+    private System.Windows.Forms.Button stopButton;
+    private System.Windows.Forms.Button resetButton;
+    private System.Windows.Forms.TextBox executionTimeTextBox;
+    private System.Windows.Forms.Label executionTimeLabel;
+    private System.Windows.Forms.NumericUpDown foldsNumericUpDown;
+    private System.Windows.Forms.Label foldsLabel;
+    private System.Windows.Forms.NumericUpDown workersNumericUpDown;
+    private System.Windows.Forms.Label workersLabel;
+    private System.Windows.Forms.Label samplesStartLabel;
+    private Data.Views.StringConvertibleValueView samplesStartStringConvertibleValueView;
+    private Data.Views.StringConvertibleValueView samplesEndStringConvertibleValueView;
+    private System.Windows.Forms.Label samplesEndLabel;
+    private System.Windows.Forms.TabControl tabControl;
+    private System.Windows.Forms.TabPage algorithmTabPage;
+    private System.Windows.Forms.TabPage resultsTabPage;
+    private System.Windows.Forms.Button openAlgorithmButton;
+    private System.Windows.Forms.Button newAlgorithmButton;
+    private Core.Views.NamedItemView algorithmNamedItemView;
+    private System.Windows.Forms.TabControl algorithmTabControl;
+    private System.Windows.Forms.TabPage algorithmProblemTabPage;
+    private System.Windows.Forms.TabPage algorithmParametersTabPage;
+    private MainForm.WindowsForms.ViewHost algorithmProblemViewHost;
+    private System.Windows.Forms.Button openProblemButton;
+    private System.Windows.Forms.Button newProblemButton;
+    private Core.Views.ParameterCollectionView algorithmParameterCollectionView;
+    private System.Windows.Forms.OpenFileDialog openFileDialog;
+    private System.Windows.Forms.TabPage runsTabPage;
+    private Optimization.Views.RunCollectionView runCollectionView;
+    private System.Windows.Forms.CheckBox storeAlgorithmInEachRunCheckBox;
+    private System.Windows.Forms.SplitContainer splitContainer;
+    private Optimization.Views.ResultCollectionView resultCollectionView;
+  }
+}
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.cs	(revision 4569)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.cs	(revision 4569)
@@ -0,0 +1,353 @@
+﻿#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.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimization;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Algorithms.DataAnalysis.Views {
+  [View("Cross Validation View")]
+  [Content(typeof(CrossValidation), true)]
+  public sealed partial class CrossValidationView : NamedItemView {
+    private TypeSelectorDialog algorithmTypeSelectorDialog;
+    private TypeSelectorDialog problemTypeSelectorDialog;
+
+    public CrossValidationView() {
+      InitializeComponent();
+      workersNumericUpDown.Maximum = Environment.ProcessorCount * 2;
+    }
+
+    public new CrossValidation Content {
+      get { return (CrossValidation)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        workersNumericUpDown.Value = 1;
+        foldsNumericUpDown.Value = 2;
+        samplesStartStringConvertibleValueView.Content = null;
+        samplesEndStringConvertibleValueView.Content = null;
+        algorithmNamedItemView.Content = null;
+        algorithmProblemViewHost.Content = null;
+        algorithmParameterCollectionView.Content = null;
+        resultCollectionView.Content = null;
+        runCollectionView.Content = null;
+        storeAlgorithmInEachRunCheckBox.Checked = true;
+      } else {
+        Locked = ReadOnly = Content.ExecutionState == ExecutionState.Started;
+        workersNumericUpDown.Value = Content.NumberOfWorkers.Value;
+        foldsNumericUpDown.Value = Content.Folds.Value;
+        samplesStartStringConvertibleValueView.Content = Content.SamplesStart;
+        samplesEndStringConvertibleValueView.Content = Content.SamplesEnd;
+        UpdateAlgorithmView();
+        UpdateProblemView();
+        runCollectionView.Content = Content.Runs;
+        algorithmParameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters;
+        resultCollectionView.Content = Content.Results;
+        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
+        storeAlgorithmInEachRunCheckBox.Checked = Content.StoreAlgorithmInEachRun;
+      }
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.AlgorithmChanged += new EventHandler(Content_AlgorithmChanged);
+      Content.ProblemChanged += new EventHandler(Content_ProblemChanged);
+      Content.Folds.ValueChanged += new EventHandler(Content_Folds_ValueChanged);
+      Content.NumberOfWorkers.ValueChanged += new EventHandler(Content_NumberOfWorker_ValueChanged);
+
+      Content.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
+      Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged);
+      Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged);
+      Content.StoreAlgorithmInEachRunChanged += new EventHandler(Content_StoreAlgorithmInEachRunChanged);
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.AlgorithmChanged -= new EventHandler(Content_AlgorithmChanged);
+      Content.ProblemChanged -= new EventHandler(Content_ProblemChanged);
+      Content.Folds.ValueChanged -= new EventHandler(Content_Folds_ValueChanged);
+      Content.NumberOfWorkers.ValueChanged -= new EventHandler(Content_NumberOfWorker_ValueChanged);
+
+      Content.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
+      Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged);
+      Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged);
+      Content.StoreAlgorithmInEachRunChanged -= new EventHandler(Content_StoreAlgorithmInEachRunChanged);
+      base.DeregisterContentEvents();
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      if (InvokeRequired) Invoke((Action)SetEnabledStateOfControls);
+      else {
+        base.SetEnabledStateOfControls();
+        this.Enabled = Content != null;
+
+        if (Content != null) {
+          storeAlgorithmInEachRunCheckBox.Enabled = !ReadOnly;
+
+          algorithmNamedItemView.Enabled = Content.Algorithm != null && (Content.ExecutionState == ExecutionState.Prepared || Content.ExecutionState == ExecutionState.Stopped);
+          algorithmTabControl.Enabled = Content.Algorithm != null && (Content.ExecutionState == ExecutionState.Prepared || Content.ExecutionState == ExecutionState.Stopped);
+          foldsNumericUpDown.Enabled = Content.ExecutionState == ExecutionState.Prepared;
+          samplesStartStringConvertibleValueView.Enabled = Content.ExecutionState == ExecutionState.Prepared;
+          samplesEndStringConvertibleValueView.Enabled = Content.ExecutionState == ExecutionState.Prepared;
+          workersNumericUpDown.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);
+
+          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;
+        }
+      }
+    }
+
+    #region Content Events
+    private void Content_AlgorithmChanged(object sender, EventArgs e) {
+      UpdateAlgorithmView();
+      UpdateProblemView();
+      SetEnabledStateOfControls();
+    }
+    private void UpdateAlgorithmView() {
+      algorithmNamedItemView.Content = Content.Algorithm;
+      UpdateProblemView();
+    }
+
+    private void Content_ProblemChanged(object sender, EventArgs e) {
+      UpdateProblemView();
+      SetEnabledStateOfControls();
+    }
+    private void UpdateProblemView() {
+      algorithmProblemViewHost.Content = Content.Problem;
+    }
+
+    private void Content_Folds_ValueChanged(object sender, EventArgs e) {
+      foldsNumericUpDown.Value = Content.Folds.Value;
+    }
+    private void Content_NumberOfWorker_ValueChanged(object sender, EventArgs e) {
+      workersNumericUpDown.Value = Content.NumberOfWorkers.Value;
+    }
+
+    private void Content_ExecutionStateChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
+      else {
+        Locked = ReadOnly = Content.ExecutionState == ExecutionState.Started;
+        SetEnabledStateOfControls();
+      }
+    }
+
+    private void Content_ExecutionTimeChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ExecutionTimeChanged), sender, e);
+      else
+        executionTimeTextBox.Text = Content == null ? "-" : Content.ExecutionTime.ToString();
+    }
+    private 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);
+    }
+    private void Content_StoreAlgorithmInEachRunChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_StoreAlgorithmInEachRunChanged), sender, e);
+      else
+        storeAlgorithmInEachRunCheckBox.Checked = Content.StoreAlgorithmInEachRun;
+    }
+    #endregion
+
+    #region GUI events
+    private void foldsNumericUpDown_Validated(object sender, EventArgs e) {
+      if (foldsNumericUpDown.Text == string.Empty)
+        foldsNumericUpDown.Text = foldsNumericUpDown.Value.ToString();
+    }
+    private void foldsNumericUpDown_ValueChanged(object sender, EventArgs e) {
+      if (Content != null)
+        Content.Folds.Value = (int)foldsNumericUpDown.Value;
+    }
+
+    private void workersNumericUpDown_Validated(object sender, EventArgs e) {
+      if (workersNumericUpDown.Text == string.Empty)
+        workersNumericUpDown.Text = workersNumericUpDown.Value.ToString();
+    }
+    private void workersNumericUpDown_ValueChanged(object sender, EventArgs e) {
+      if (Content != null)
+        Content.NumberOfWorkers.Value = (int)workersNumericUpDown.Value;
+    }
+
+    private void startButton_Click(object sender, EventArgs e) {
+      Content.Start();
+    }
+    private void pauseButton_Click(object sender, EventArgs e) {
+      Content.Pause();
+    }
+    private void stopButton_Click(object sender, EventArgs e) {
+      Content.Stop();
+    }
+    private void resetButton_Click(object sender, EventArgs e) {
+      Content.Prepare(false);
+    }
+
+    private void newAlgorithmButton_Click(object sender, EventArgs e) {
+      if (algorithmTypeSelectorDialog == null) {
+        algorithmTypeSelectorDialog = new TypeSelectorDialog();
+        algorithmTypeSelectorDialog.Caption = "Select Algorithm";
+        algorithmTypeSelectorDialog.TypeSelector.Caption = "Available Algorithms";
+        algorithmTypeSelectorDialog.TypeSelector.Configure(typeof(IAlgorithm), false, true);
+      }
+      if (algorithmTypeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
+        try {
+          Content.Algorithm = (IAlgorithm)algorithmTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
+        }
+        catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog(this, ex);
+        }
+      }
+    }
+
+    private void openAlgorithmButton_Click(object sender, EventArgs e) {
+      openFileDialog.Title = "Open Algorithm";
+      if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
+        algorithmTabControl.Enabled = false;
+
+        ContentManager.LoadAsync(openFileDialog.FileName, delegate(IStorableContent content, Exception error) {
+          try {
+            if (error != null) throw error;
+            IAlgorithm algorithm = content as IAlgorithm;
+            if (algorithm == null || !(algorithm.Problem is IDataAnalysisProblem))
+              MessageBox.Show(this, "The selected file does not contain an algorithm or the problem of the algorithm is not a DataAnalysisProblem.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            else
+              Content.Algorithm = algorithm;
+          }
+          catch (Exception ex) {
+            ErrorHandling.ShowErrorDialog(this, ex);
+          }
+          finally {
+            Invoke(new Action(delegate() {
+              algorithmTabControl.Enabled = true;
+            }));
+          }
+        });
+      }
+    }
+
+    private void newProblemButton_Click(object sender, EventArgs e) {
+      if (problemTypeSelectorDialog == null) {
+        problemTypeSelectorDialog = new TypeSelectorDialog();
+        problemTypeSelectorDialog.Caption = "Select Problem";
+        problemTypeSelectorDialog.TypeSelector.Caption = "Available Problems";
+        problemTypeSelectorDialog.TypeSelector.Configure(Content.ProblemType, false, true);
+      }
+      if (problemTypeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
+        try {
+          Content.Problem = (ISingleObjectiveDataAnalysisProblem)problemTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
+        }
+        catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog(this, ex);
+        }
+      }
+    }
+
+    private void openProblemButton_Click(object sender, EventArgs e) {
+      openFileDialog.Title = "Open Problem";
+      if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
+        newProblemButton.Enabled = openProblemButton.Enabled = false;
+        algorithmProblemViewHost.Enabled = false;
+
+        ContentManager.LoadAsync(openFileDialog.FileName, delegate(IStorableContent content, Exception error) {
+          try {
+            if (error != null) throw error;
+            ISingleObjectiveDataAnalysisProblem problem = content as ISingleObjectiveDataAnalysisProblem;
+            if (problem == null && (Content.Algorithm.ProblemType.IsAssignableFrom(content.GetType())))
+              Invoke(new Action(() =>
+                MessageBox.Show(this, "The selected file does not contain a DataAnalysisProblem problem.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error)));
+            else
+              Content.Problem = problem;
+          }
+          catch (Exception ex) {
+            Invoke(new Action(() => ErrorHandling.ShowErrorDialog(this, ex)));
+          }
+          finally {
+            Invoke(new Action(delegate() {
+              algorithmProblemViewHost.Enabled = true;
+              newProblemButton.Enabled = openProblemButton.Enabled = true;
+            }));
+          }
+        });
+      }
+    }
+
+    private void algorithmTabPage_DragEnterOver(object sender, DragEventArgs e) {
+      e.Effect = DragDropEffects.None;
+      if (ReadOnly) return;
+      Type type = e.Data.GetData("Type") as Type;
+      IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm;
+      if ((type != null) && (typeof(IAlgorithm).IsAssignableFrom(type)) &&
+        algorithm != null && Content.ProblemType.IsAssignableFrom(algorithm.Problem.GetType())) {
+        if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link;  // ALT key
+        else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move;  // SHIFT key
+        else if ((e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) e.Effect = DragDropEffects.Copy;
+        else if ((e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) e.Effect = DragDropEffects.Move;
+        else if ((e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) e.Effect = DragDropEffects.Link;
+      }
+    }
+    private void algorithmTabPage_DragDrop(object sender, DragEventArgs e) {
+      if (e.Effect != DragDropEffects.None) {
+        IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm;
+        if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) algorithm = (IAlgorithm)algorithm.Clone();
+        Content.Algorithm = algorithm;
+      }
+    }
+
+    private void algorithmProblemTabPage_DragEnterOver(object sender, DragEventArgs e) {
+      e.Effect = DragDropEffects.None;
+      if (ReadOnly) return;
+      Type type = e.Data.GetData("Type") as Type;
+      if ((type != null) && (Content.ProblemType.IsAssignableFrom(type)) &&
+        (Content.Algorithm.ProblemType.IsAssignableFrom(type))) {
+        if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link;  // ALT key
+        else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move;  // SHIFT key
+        else if ((e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) e.Effect = DragDropEffects.Copy;
+        else if ((e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) e.Effect = DragDropEffects.Move;
+        else if ((e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) e.Effect = DragDropEffects.Link;
+      }
+    }
+    private void algorithmProblemTabPage_DragDrop(object sender, DragEventArgs e) {
+      if (e.Effect != DragDropEffects.None) {
+        ISingleObjectiveDataAnalysisProblem problem = e.Data.GetData("Value") as ISingleObjectiveDataAnalysisProblem;
+        if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) problem = (ISingleObjectiveDataAnalysisProblem)problem.Clone();
+        Content.Problem = problem;
+      }
+    }
+
+    private void storeAlgorithmInEachRunCheckBox_CheckedChanged(object sender, EventArgs e) {
+      if (Content != null) Content.StoreAlgorithmInEachRun = storeAlgorithmInEachRunCheckBox.Checked;
+    }
+    #endregion
+
+  }
+}
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/HeuristicLab.Algorithms.DataAnalysis.Views-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/HeuristicLab.Algorithms.DataAnalysis.Views-3.3.csproj	(revision 4569)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/HeuristicLab.Algorithms.DataAnalysis.Views-3.3.csproj	(revision 4569)
@@ -0,0 +1,206 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{C3E69936-0DB5-42A4-B1B4-12E9700B080E}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Algorithms.DataAnalysis.Views</RootNamespace>
+    <AssemblyName>HeuristicLab.Algorithms.DataAnalysis.Views-3.3</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\HeuristicLab.Algorithms.DataAnalysis.Views.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Release\HeuristicLab.Algorithms.DataAnalysis.Views.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\HeuristicLab.Algorithms.DataAnalysis.Views.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Release\HeuristicLab.Algorithms.DataAnalysis.Views.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Windows.Forms.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="CrossValidationView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="CrossValidationView.Designer.cs">
+      <DependentUpon>CrossValidationView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="HeuristicLabAlgorithmsDataAnalysisViewsPlugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="HeuristicLabAlgorithmsDataAnalysisViewsPlugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Algorithms.DataAnalysis\3.3\HeuristicLab.Algorithms.DataAnalysis-3.3.csproj">
+      <Project>{A8D5676D-9662-437A-B44D-ECB4046CDE12}</Project>
+      <Name>HeuristicLab.Algorithms.DataAnalysis-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</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.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
+      <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>
+      <Name>HeuristicLab.Core.Views-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data.Views\3.3\HeuristicLab.Data.Views-3.3.csproj">
+      <Project>{72104A0B-90E7-42F3-9ABE-9BBBADD4B943}</Project>
+      <Name>HeuristicLab.Data.Views-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
+      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
+      <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj">
+      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
+      <Name>HeuristicLab.MainForm-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj">
+      <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project>
+      <Name>HeuristicLab.Optimization.Views-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.3\HeuristicLab.Problems.DataAnalysis-3.3.csproj">
+      <Project>{70DFD984-B1D9-46FE-8EB7-4DE92D71A9FC}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>
+      set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+      set ProjectDir=$(ProjectDir)
+      set SolutionDir=$(SolutionDir)
+      set Outdir=$(Outdir)
+
+      call PreBuildEvent.cmd
+      SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabAlgorithmsDataAnalysisViewsPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabAlgorithmsDataAnalysisViewsPlugin.cs"
+</PreBuildEvent>
+  </PropertyGroup>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/HeuristicLabAlgorithmsDataAnalysisViewsPlugin.cs.frame
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/HeuristicLabAlgorithmsDataAnalysisViewsPlugin.cs.frame	(revision 4569)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/HeuristicLabAlgorithmsDataAnalysisViewsPlugin.cs.frame	(revision 4569)
@@ -0,0 +1,45 @@
+#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 HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.DataAnalysis.Views {
+  /// <summary>
+  /// Plugin class for HeuristicLab.Algorithms.DataAnalysis.Views plugin.
+  /// </summary>
+  [Plugin("HeuristicLab.Algorithms.DataAnalysis.Views", "3.3.1.$WCREV$")]
+  [PluginFile("HeuristicLab.Algorithms.DataAnalysis.Views-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Algorithms.DataAnalysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.3")]
+  public class HeuristicLabAlgorithmsDataAnalysisViewsPlugin : PluginBase {
+  }
+}
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/Properties/AssemblyInfo.frame
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/Properties/AssemblyInfo.frame	(revision 4569)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/Properties/AssemblyInfo.frame	(revision 4569)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Algorithms.DataAnalysis.Views")]
+[assembly: AssemblyDescription("HeuristicLab views for data-analysis algorithms")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2010 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("E32D1796-011F-402c-8E97-8A13DFB6B4DC")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.1.0")]
+[assembly: AssemblyFileVersion("3.3.1.$WCREV$")]
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/CrossValidation.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/CrossValidation.cs	(revision 4569)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/CrossValidation.cs	(revision 4569)
@@ -0,0 +1,607 @@
+﻿#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.Drawing;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Algorithms.DataAnalysis {
+  [Item("Cross Validation", "Cross Validation wrapper for data analysis algorithms.")]
+  [Creatable("Data Analysis")]
+  [StorableClass]
+  public sealed class CrossValidation : ParameterizedNamedItem, IAlgorithm {
+    public CrossValidation()
+      : base() {
+      name = ItemName;
+      description = ItemDescription;
+
+      executionState = ExecutionState.Stopped;
+      runs = new RunCollection();
+      runsCounter = 0;
+
+      algorithm = null;
+      clonedAlgorithms = new ItemCollection<IAlgorithm>();
+      readOnlyClonedAlgorithms = null;
+      results = new ResultCollection();
+
+      folds = new IntValue(2);
+      numberOfWorkers = new IntValue(1);
+      samplesStart = new IntValue(0);
+      samplesEnd = new IntValue(0);
+      storeAlgorithmInEachRun = false;
+
+      RegisterEvents();
+    }
+
+    #region persistence and cloning
+    [StorableConstructor]
+    private CrossValidation(bool deserializing)
+      : base(deserializing) {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      CrossValidation clone = (CrossValidation)base.Clone(cloner);
+      clone.executionState = executionState;
+      clone.storeAlgorithmInEachRun = storeAlgorithmInEachRun;
+      clone.runs = (RunCollection)cloner.Clone(runs);
+      clone.runsCounter = runsCounter;
+      clone.algorithm = (IAlgorithm)cloner.Clone(algorithm);
+      clone.clonedAlgorithms = (ItemCollection<IAlgorithm>)cloner.Clone(clonedAlgorithms);
+      clone.folds = (IntValue)cloner.Clone(folds);
+      clone.numberOfWorkers = (IntValue)cloner.Clone(numberOfWorkers);
+      clone.samplesStart = (IntValue)cloner.Clone(samplesStart);
+      clone.samplesEnd = (IntValue)cloner.Clone(samplesEnd);
+      clone.RegisterEvents();
+      return clone;
+    }
+    #endregion
+
+    #region properties
+    [Storable]
+    private IAlgorithm algorithm;
+    public IAlgorithm Algorithm {
+      get { return algorithm; }
+      set {
+        if (ExecutionState != ExecutionState.Prepared && ExecutionState != ExecutionState.Stopped)
+          throw new InvalidOperationException("Changing the algorithm is only allowed if the CrossValidation is stopped or prepared.");
+        if (algorithm != value) {
+          if (value != null && value.Problem != null && !(value.Problem is IDataAnalysisProblem))
+            throw new ArgumentException("Only algorithms with a DataAnalysisProblem could be used for the cross validation.");
+          if (algorithm != null) DeregisterAlgorithmEvents();
+          algorithm = value;
+          Parameters.Clear();
+
+          if (algorithm != null) {
+            algorithm.StoreAlgorithmInEachRun = false;
+            RegisterAlgorithmEvents();
+            algorithm.Prepare(true);
+            Parameters.AddRange(algorithm.Parameters);
+          }
+          OnAlgorithmChanged();
+          if (algorithm != null) OnProblemChanged();
+          Prepare();
+        }
+      }
+    }
+
+
+    [Storable]
+    private ISingleObjectiveDataAnalysisProblem problem;
+    public ISingleObjectiveDataAnalysisProblem Problem {
+      get {
+        if (algorithm == null)
+          return null;
+        return (ISingleObjectiveDataAnalysisProblem)algorithm.Problem;
+      }
+      set {
+        if (ExecutionState != ExecutionState.Prepared && ExecutionState != ExecutionState.Stopped)
+          throw new InvalidOperationException("Changing the problem is only allowed if the CrossValidation is stopped or prepared.");
+        if (algorithm == null) throw new ArgumentNullException("Could not set a problem before an algorithm was set.");
+        algorithm.Problem = value;
+        problem = value;
+      }
+    }
+
+    IProblem IAlgorithm.Problem {
+      get { return Problem; }
+      set {
+        if (value != null && !ProblemType.IsInstanceOfType(value))
+          throw new ArgumentException("Only DataAnalysisProblems could be used for the cross validation.");
+        Problem = (ISingleObjectiveDataAnalysisProblem)value;
+      }
+    }
+    public Type ProblemType {
+      get { return typeof(ISingleObjectiveDataAnalysisProblem); }
+    }
+
+    [Storable]
+    private ItemCollection<IAlgorithm> clonedAlgorithms;
+    private ReadOnlyItemCollection<IAlgorithm> readOnlyClonedAlgorithms;
+    public IItemCollection<IAlgorithm> ClonedAlgorithms {
+      get {
+        if (readOnlyClonedAlgorithms == null) readOnlyClonedAlgorithms = clonedAlgorithms.AsReadOnly();
+        return readOnlyClonedAlgorithms;
+      }
+    }
+
+    [Storable]
+    private ResultCollection results;
+    public ResultCollection Results {
+      get { return results; }
+    }
+
+    [Storable]
+    private IntValue folds;
+    public IntValue Folds {
+      get { return folds; }
+    }
+    [Storable]
+    private IntValue samplesStart;
+    public IntValue SamplesStart {
+      get { return samplesStart; }
+    }
+    [Storable]
+    private IntValue samplesEnd;
+    public IntValue SamplesEnd {
+      get { return samplesEnd; }
+    }
+    [Storable]
+    private IntValue numberOfWorkers;
+    public IntValue NumberOfWorkers {
+      get { return numberOfWorkers; }
+    }
+
+    [Storable]
+    private bool storeAlgorithmInEachRun;
+    public bool StoreAlgorithmInEachRun {
+      get { return storeAlgorithmInEachRun; }
+      set {
+        if (storeAlgorithmInEachRun != value) {
+          storeAlgorithmInEachRun = value;
+          OnStoreAlgorithmInEachRunChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private int runsCounter;
+    [Storable]
+    private RunCollection runs;
+    public RunCollection Runs {
+      get { return runs; }
+    }
+
+    [Storable]
+    private ExecutionState executionState;
+    public ExecutionState ExecutionState {
+      get { return executionState; }
+      private set {
+        if (executionState != value) {
+          executionState = value;
+          OnExecutionStateChanged();
+          OnItemImageChanged();
+        }
+      }
+    }
+    public override Image ItemImage {
+      get {
+        if (ExecutionState == ExecutionState.Prepared) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;
+        else if (ExecutionState == ExecutionState.Started) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStarted;
+        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePaused;
+        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;
+        else return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event;
+      }
+    }
+
+    public TimeSpan ExecutionTime {
+      get {
+        if (ExecutionState != ExecutionState.Prepared)
+          return TimeSpan.FromMilliseconds(clonedAlgorithms.Select(x => x.ExecutionTime.TotalMilliseconds).Sum());
+        return TimeSpan.Zero;
+      }
+    }
+    #endregion
+
+    public void Prepare() {
+      if (ExecutionState == ExecutionState.Started)
+        throw new InvalidOperationException(string.Format("Prepare not allowed in execution state \"{0}\".", ExecutionState));
+      results.Clear();
+      clonedAlgorithms.Clear();
+      if (Algorithm != null) {
+        Algorithm.Prepare();
+        if (Algorithm.ExecutionState == ExecutionState.Prepared) OnPrepared();
+      }
+    }
+    public void Prepare(bool clearRuns) {
+      if (clearRuns) runs.Clear();
+      Prepare();
+    }
+
+    private bool startPending;
+    public void Start() {
+      if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused))
+        throw new InvalidOperationException(string.Format("Start not allowed in execution state \"{0}\".", ExecutionState));
+
+      if (Algorithm != null && !startPending) {
+        startPending = true;
+        //create cloned algorithms
+        if (clonedAlgorithms.Count == 0) {
+          int testSamplesCount = (SamplesEnd.Value - SamplesStart.Value) / Folds.Value;
+          for (int i = 0; i < Folds.Value; i++) {
+            IAlgorithm clonedAlgorithm = (IAlgorithm)algorithm.Clone();
+            clonedAlgorithm.Name = algorithm.Name + " Fold " + i;
+            IDataAnalysisProblem problem = clonedAlgorithm.Problem as IDataAnalysisProblem;
+            problem.DataAnalysisProblemData.TestSamplesEnd.Value = (i + 1) == Folds.Value ? SamplesEnd.Value : (i + 1) * testSamplesCount + SamplesStart.Value;
+            problem.DataAnalysisProblemData.TestSamplesStart.Value = (i * testSamplesCount) + SamplesStart.Value;
+            clonedAlgorithms.Add(clonedAlgorithm);
+          }
+        }
+
+        //start prepared or paused cloned algorithms
+        int startedAlgorithms = 0;
+        foreach (IAlgorithm clonedAlgorithm in clonedAlgorithms) {
+          if (startedAlgorithms < NumberOfWorkers.Value) {
+            if (clonedAlgorithm.ExecutionState == ExecutionState.Prepared ||
+                clonedAlgorithm.ExecutionState == ExecutionState.Paused) {
+              clonedAlgorithm.Start();
+              startedAlgorithms++;
+            }
+          }
+        }
+        OnStarted();
+      }
+    }
+
+    private bool pausePending;
+    public void Pause() {
+      if (ExecutionState != ExecutionState.Started)
+        throw new InvalidOperationException(string.Format("Pause not allowed in execution state \"{0}\".", ExecutionState));
+      if (!pausePending) {
+        pausePending = true;
+        if (!startPending) PauseAllClonedAlgorithms();
+      }
+    }
+    private void PauseAllClonedAlgorithms() {
+      foreach (IAlgorithm clonedAlgorithm in ClonedAlgorithms) {
+        if (clonedAlgorithm.ExecutionState == ExecutionState.Started)
+          clonedAlgorithm.Pause();
+      }
+    }
+
+    private bool stopPending;
+    public void Stop() {
+      if ((ExecutionState != ExecutionState.Started) && (ExecutionState != ExecutionState.Paused))
+        throw new InvalidOperationException(string.Format("Stop not allowed in execution state \"{0}\".",
+                                                          ExecutionState));
+      if (!stopPending) {
+        stopPending = true;
+        if (!startPending) StopAllClonedAlgorithms();
+      }
+    }
+    private void StopAllClonedAlgorithms() {
+      foreach (IAlgorithm clonedAlgorithm in ClonedAlgorithms) {
+        if (clonedAlgorithm.ExecutionState == ExecutionState.Started ||
+            clonedAlgorithm.ExecutionState == ExecutionState.Paused)
+          clonedAlgorithm.Stop();
+      }
+    }
+
+    #region collect parameters and results
+    public override void CollectParameterValues(IDictionary<string, IItem> values) {
+      values.Add("Algorithm Name", new StringValue(Name));
+      values.Add("Algorithm Type", new StringValue(GetType().GetPrettyName()));
+      values.Add("Folds", new IntValue(Folds.Value));
+
+      if (algorithm != null) {
+        values.Add("CrossValidation Algorithm Name", new StringValue(Algorithm.Name));
+        values.Add("CrossValidation Algorithm Type", new StringValue(Algorithm.GetType().GetPrettyName()));
+        base.CollectParameterValues(values);
+      }
+      if (Problem != null) {
+        values.Add("Problem Name", new StringValue(Problem.Name));
+        values.Add("Problem Type", new StringValue(Problem.GetType().GetPrettyName()));
+        Problem.CollectParameterValues(values);
+      }
+    }
+
+    public void CollectResultValues(IDictionary<string, IItem> results) {
+      Dictionary<string, List<double>> resultValues = new Dictionary<string, List<double>>();
+      IEnumerable<IRun> runs = ClonedAlgorithms.Select(alg => alg.Runs.FirstOrDefault()).Where(run => run != null);
+      IEnumerable<KeyValuePair<string, IItem>> resultCollections = runs.Where(x => x != null).SelectMany(x => x.Results).ToList();
+
+      foreach (IResult result in ExtractAndAggregateResults<IntValue>(resultCollections))
+        results.Add(result.Name, result.Value);
+      foreach (IResult result in ExtractAndAggregateResults<DoubleValue>(resultCollections))
+        results.Add(result.Name, result.Value);
+      foreach (IResult result in ExtractAndAggregateResults<PercentValue>(resultCollections))
+        results.Add(result.Name, result.Value);
+
+      results.Add("Execution Time", new TimeSpanValue(this.ExecutionTime));
+      results.Add("CrossValidation Folds", new RunCollection(runs));
+    }
+
+    private static IEnumerable<IResult> ExtractAndAggregateResults<T>(IEnumerable<KeyValuePair<string, IItem>> results)
+  where T : class, IItem, new() {
+      Dictionary<string, List<double>> resultValues = new Dictionary<string, List<double>>();
+      foreach (var resultValue in results.Where(r => r.Value.GetType() == typeof(T))) {
+        if (!resultValues.ContainsKey(resultValue.Key))
+          resultValues[resultValue.Key] = new List<double>();
+        resultValues[resultValue.Key].Add(ConvertToDouble(resultValue.Value));
+      }
+
+      DoubleValue doubleValue;
+      if (typeof(T) == typeof(PercentValue))
+        doubleValue = new PercentValue();
+      else if (typeof(T) == typeof(DoubleValue))
+        doubleValue = new DoubleValue();
+      else if (typeof(T) == typeof(IntValue))
+        doubleValue = new DoubleValue();
+      else
+        throw new NotSupportedException();
+
+      List<IResult> aggregatedResults = new List<IResult>();
+      foreach (KeyValuePair<string, List<double>> resultValue in resultValues) {
+        doubleValue.Value = resultValue.Value.Average();
+        aggregatedResults.Add(new Result(resultValue.Key, (IItem)doubleValue.Clone()));
+        doubleValue.Value = resultValue.Value.StandardDeviation();
+        aggregatedResults.Add(new Result(resultValue.Key + " StdDev", (IItem)doubleValue.Clone()));
+      }
+      return aggregatedResults;
+    }
+
+    private static double ConvertToDouble(IItem item) {
+      if (item is DoubleValue) return ((DoubleValue)item).Value;
+      else if (item is IntValue) return ((IntValue)item).Value;
+      else throw new NotSupportedException("Could not convert any item type to double");
+    }
+    #endregion
+
+    #region events
+    private void RegisterEvents() {
+      Folds.ValueChanged += new EventHandler(Folds_ValueChanged);
+      SamplesStart.ValueChanged += new EventHandler(SamplesStart_ValueChanged);
+      SamplesEnd.ValueChanged += new EventHandler(SamplesEnd_ValueChanged);
+      RegisterClonedAlgorithmsEvents();
+    }
+    private void Folds_ValueChanged(object sender, EventArgs e) {
+      if (ExecutionState != ExecutionState.Prepared)
+        throw new InvalidOperationException("Can not change number of folds if the execution state is not prepared.");
+    }
+    private void SamplesStart_ValueChanged(object sender, EventArgs e) {
+      if (Problem != null) Problem.DataAnalysisProblemData.TrainingSamplesStart.Value = SamplesStart.Value;
+    }
+    private void SamplesEnd_ValueChanged(object sender, EventArgs e) {
+      if (Problem != null) Problem.DataAnalysisProblemData.TrainingSamplesEnd.Value = SamplesEnd.Value;
+    }
+
+    #region template algorithms events
+    public event EventHandler AlgorithmChanged;
+    private void OnAlgorithmChanged() {
+      EventHandler handler = AlgorithmChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnProblemChanged();
+      if (Problem == null) ExecutionState = ExecutionState.Stopped;
+    }
+    private void RegisterAlgorithmEvents() {
+      algorithm.ProblemChanged += new EventHandler(Algorithm_ProblemChanged);
+      algorithm.ExecutionStateChanged += new EventHandler(Algorithm_ExecutionStateChanged);
+    }
+    private void DeregisterAlgorithmEvents() {
+      algorithm.ProblemChanged -= new EventHandler(Algorithm_ProblemChanged);
+      algorithm.ExecutionStateChanged -= new EventHandler(Algorithm_ExecutionStateChanged);
+    }
+    private void Algorithm_ProblemChanged(object sender, EventArgs e) {
+      if (algorithm.Problem != null && !(algorithm.Problem is ISingleObjectiveDataAnalysisProblem)) {
+        algorithm.Problem = problem;
+        throw new ArgumentException("A cross validation algorithm can only contain DataAnalysisProblems.");
+      }
+      problem = (ISingleObjectiveDataAnalysisProblem)algorithm.Problem;
+      OnProblemChanged();
+    }
+    public event EventHandler ProblemChanged;
+    private void OnProblemChanged() {
+      EventHandler handler = ProblemChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+
+      SamplesStart.Value = 0;
+      if (Problem != null)
+        SamplesEnd.Value = Problem.DataAnalysisProblemData.Dataset.Rows;
+      else
+        SamplesEnd.Value = 0;
+    }
+
+    private void Algorithm_ExecutionStateChanged(object sender, EventArgs e) {
+      switch (Algorithm.ExecutionState) {
+        case ExecutionState.Prepared: OnPrepared();
+          break;
+        case ExecutionState.Started: throw new InvalidOperationException("Algorithm template can not be started.");
+        case ExecutionState.Paused: throw new InvalidOperationException("Algorithm template can not be paused.");
+        case ExecutionState.Stopped: OnStopped();
+          break;
+      }
+    }
+    #endregion
+
+    #region clonedAlgorithms events
+    private void RegisterClonedAlgorithmsEvents() {
+      clonedAlgorithms.ItemsAdded += new CollectionItemsChangedEventHandler<IAlgorithm>(ClonedAlgorithms_ItemsAdded);
+      clonedAlgorithms.ItemsRemoved += new CollectionItemsChangedEventHandler<IAlgorithm>(ClonedAlgorithms_ItemsRemoved);
+      clonedAlgorithms.CollectionReset += new CollectionItemsChangedEventHandler<IAlgorithm>(ClonedAlgorithms_CollectionReset);
+      foreach (IAlgorithm algorithm in clonedAlgorithms)
+        RegisterClonedAlgorithmEvents(algorithm);
+    }
+    private void DeregisterClonedAlgorithmsEvents() {
+      clonedAlgorithms.ItemsAdded -= new CollectionItemsChangedEventHandler<IAlgorithm>(ClonedAlgorithms_ItemsAdded);
+      clonedAlgorithms.ItemsRemoved -= new CollectionItemsChangedEventHandler<IAlgorithm>(ClonedAlgorithms_ItemsRemoved);
+      clonedAlgorithms.CollectionReset -= new CollectionItemsChangedEventHandler<IAlgorithm>(ClonedAlgorithms_CollectionReset);
+      foreach (IAlgorithm algorithm in clonedAlgorithms)
+        DeregisterClonedAlgorithmEvents(algorithm);
+    }
+    private void ClonedAlgorithms_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IAlgorithm> e) {
+      foreach (IAlgorithm algorithm in e.Items)
+        RegisterClonedAlgorithmEvents(algorithm);
+    }
+    private void ClonedAlgorithms_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IAlgorithm> e) {
+      foreach (IAlgorithm algorithm in e.Items)
+        DeregisterClonedAlgorithmEvents(algorithm);
+    }
+    private void ClonedAlgorithms_CollectionReset(object sender, CollectionItemsChangedEventArgs<IAlgorithm> e) {
+      foreach (IAlgorithm algorithm in e.OldItems)
+        DeregisterClonedAlgorithmEvents(algorithm);
+      foreach (IAlgorithm algorithm in e.Items)
+        RegisterClonedAlgorithmEvents(algorithm);
+    }
+    private void RegisterClonedAlgorithmEvents(IAlgorithm algorithm) {
+      algorithm.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(ClonedAlgorithm_ExceptionOccurred);
+      algorithm.ExecutionTimeChanged += new EventHandler(ClonedAlgorithm_ExecutionTimeChanged);
+      algorithm.Started += new EventHandler(ClonedAlgorithm_Started);
+      algorithm.Paused += new EventHandler(ClonedAlgorithm_Paused);
+      algorithm.Stopped += new EventHandler(ClonedAlgorithm_Stopped);
+    }
+    private void DeregisterClonedAlgorithmEvents(IAlgorithm algorithm) {
+      algorithm.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(ClonedAlgorithm_ExceptionOccurred);
+      algorithm.ExecutionTimeChanged -= new EventHandler(ClonedAlgorithm_ExecutionTimeChanged);
+      algorithm.Started -= new EventHandler(ClonedAlgorithm_Started);
+      algorithm.Paused -= new EventHandler(ClonedAlgorithm_Paused);
+      algorithm.Stopped -= new EventHandler(ClonedAlgorithm_Stopped);
+    }
+    private void ClonedAlgorithm_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      OnExceptionOccurred(e.Value);
+    }
+    private void ClonedAlgorithm_ExecutionTimeChanged(object sender, EventArgs e) {
+      OnExecutionTimeChanged();
+    }
+
+    private readonly object locker = new object();
+    private void ClonedAlgorithm_Started(object sender, EventArgs e) {
+      lock (locker) {
+        IAlgorithm algorithm = sender as IAlgorithm;
+        if (algorithm != null && !results.ContainsKey(algorithm.Name))
+          results.Add(new Result(algorithm.Name, "Contains results for the specific fold.", algorithm.Results));
+
+        if (startPending) {
+          int startedAlgorithms = clonedAlgorithms.Count(alg => alg.ExecutionState == ExecutionState.Started);
+          if (startedAlgorithms == NumberOfWorkers.Value ||
+             clonedAlgorithms.All(alg => alg.ExecutionState != ExecutionState.Prepared))
+            startPending = false;
+
+          if (pausePending) PauseAllClonedAlgorithms();
+          if (stopPending) StopAllClonedAlgorithms();
+        }
+      }
+    }
+
+    private void ClonedAlgorithm_Paused(object sender, EventArgs e) {
+      lock (locker) {
+        if (pausePending && clonedAlgorithms.All(alg => alg.ExecutionState != ExecutionState.Started))
+          OnPaused();
+      }
+    }
+
+    private void ClonedAlgorithm_Stopped(object sender, EventArgs e) {
+      lock (locker) {
+        if (!stopPending && ExecutionState == ExecutionState.Started) {
+          IAlgorithm preparedAlgorithm = clonedAlgorithms.Where(alg => alg.ExecutionState == ExecutionState.Prepared ||
+                                                                       alg.ExecutionState == ExecutionState.Paused).FirstOrDefault();
+          if (preparedAlgorithm != null) preparedAlgorithm.Start();
+        }
+        if (ExecutionState != ExecutionState.Stopped) {
+          if (clonedAlgorithms.All(alg => alg.ExecutionState == ExecutionState.Stopped))
+            OnStopped();
+          else if (stopPending &&
+                   clonedAlgorithms.All(
+                     alg => alg.ExecutionState == ExecutionState.Prepared || alg.ExecutionState == ExecutionState.Stopped))
+            OnStopped();
+        }
+      }
+    }
+    #endregion
+    #endregion
+
+    #region event firing
+    public event EventHandler ExecutionStateChanged;
+    private void OnExecutionStateChanged() {
+      EventHandler handler = ExecutionStateChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ExecutionTimeChanged;
+    private void OnExecutionTimeChanged() {
+      EventHandler handler = ExecutionTimeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Prepared;
+    private void OnPrepared() {
+      ExecutionState = ExecutionState.Prepared;
+      EventHandler handler = Prepared;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnExecutionTimeChanged();
+    }
+    public event EventHandler Started;
+    private void OnStarted() {
+      startPending = false;
+      ExecutionState = ExecutionState.Started;
+      EventHandler handler = Started;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Paused;
+    private void OnPaused() {
+      pausePending = false;
+      ExecutionState = ExecutionState.Paused;
+      EventHandler handler = Paused;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Stopped;
+    private void OnStopped() {
+      stopPending = false;
+      Dictionary<string, IItem> collectedResults = new Dictionary<string, IItem>();
+      CollectResultValues(collectedResults);
+      results.AddRange(collectedResults.Select(x => new Result(x.Key, x.Value)).Cast<IResult>().ToArray());
+      runsCounter++;
+      runs.Add(new Run(string.Format("{0} Run {1}", Name, runsCounter), this));
+      ExecutionState = ExecutionState.Stopped;
+      EventHandler handler = Stopped;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
+    private void OnExceptionOccurred(Exception exception) {
+      EventHandler<EventArgs<Exception>> handler = ExceptionOccurred;
+      if (handler != null) handler(this, new EventArgs<Exception>(exception));
+    }
+    public event EventHandler StoreAlgorithmInEachRunChanged;
+    private void OnStoreAlgorithmInEachRunChanged() {
+      EventHandler handler = StoreAlgorithmInEachRunChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/HeuristicLab.Algorithms.DataAnalysis-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/HeuristicLab.Algorithms.DataAnalysis-3.3.csproj	(revision 4565)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/HeuristicLab.Algorithms.DataAnalysis-3.3.csproj	(revision 4569)
@@ -101,7 +101,9 @@
     </Reference>
     <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="CrossValidation.cs" />
     <Compile Include="SupportVectorMachine.cs" />
     <Compile Include="HeuristicLabAlgorithmsDataAnalysisPlugin.cs" />
@@ -113,4 +115,8 @@
       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
       <Name>HeuristicLab.Collections-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
Index: trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/HeuristicLabAlgorithmsDataAnalysisPlugin.cs.frame
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/HeuristicLabAlgorithmsDataAnalysisPlugin.cs.frame	(revision 4565)
+++ trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/HeuristicLabAlgorithmsDataAnalysisPlugin.cs.frame	(revision 4569)
@@ -30,4 +30,5 @@
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
Index: trunk/sources/HeuristicLab/3.3/Files.txt
===================================================================
--- trunk/sources/HeuristicLab/3.3/Files.txt	(revision 4565)
+++ trunk/sources/HeuristicLab/3.3/Files.txt	(revision 4569)
@@ -5,4 +5,5 @@
 HeuristicLab.PluginInfrastructure\3.3:ICSharpCode.SharpZipLib License.txt
 HeuristicLab.Algorithms.DataAnalysis\3.3:HeuristicLab.Algorithms.DataAnalysis-3.3.dll
+HeuristicLab.Algorithms.DataAnalysis.Views\3.3:HeuristicLab.Algorithms.DataAnalysis.Views-3.3.dll
 HeuristicLab.Algorithms.EvolutionStrategy\3.3:HeuristicLab.Algorithms.EvolutionStrategy-3.3.dll
 HeuristicLab.Algorithms.GeneticAlgorithm\3.3:HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll
