Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj	(revision 7467)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj	(revision 7469)
@@ -143,8 +143,8 @@
       <DependentUpon>RunCollectionModifierListView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionContentConstraintView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionContentConstraintView.Designer.cs">
+    <Compile Include="RunCollectionConstraintViews\RunCollectionContentConstraintView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionConstraintViews\RunCollectionContentConstraintView.Designer.cs">
       <DependentUpon>RunCollectionContentConstraintView.cs</DependentUpon>
     </Compile>
@@ -167,32 +167,32 @@
       <DependentUpon>ResultValueView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionBoxPlotView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionBoxPlotView.Designer.cs">
+    <Compile Include="RunCollectionViews\RunCollectionBoxPlotView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionViews\RunCollectionBoxPlotView.Designer.cs">
       <DependentUpon>RunCollectionBoxPlotView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionComparisonConstraintView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionComparisonConstraintView.Designer.cs">
+    <Compile Include="RunCollectionConstraintViews\RunCollectionComparisonConstraintView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionConstraintViews\RunCollectionComparisonConstraintView.Designer.cs">
       <DependentUpon>RunCollectionComparisonConstraintView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionTypeCompatibilityConstraintView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionTypeCompatibilityConstraintView.Designer.cs">
+    <Compile Include="RunCollectionConstraintViews\RunCollectionTypeCompatibilityConstraintView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionConstraintViews\RunCollectionTypeCompatibilityConstraintView.Designer.cs">
       <DependentUpon>RunCollectionTypeCompatibilityConstraintView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionConstraintCollectionView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionConstraintCollectionView.Designer.cs">
+    <Compile Include="RunCollectionConstraintViews\RunCollectionConstraintCollectionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionConstraintViews\RunCollectionConstraintCollectionView.Designer.cs">
       <DependentUpon>RunCollectionConstraintCollectionView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionColumnConstraintView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionColumnConstraintView.Designer.cs">
+    <Compile Include="RunCollectionConstraintViews\RunCollectionColumnConstraintView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionConstraintViews\RunCollectionColumnConstraintView.Designer.cs">
       <DependentUpon>RunCollectionColumnConstraintView.cs</DependentUpon>
     </Compile>
@@ -209,26 +209,26 @@
       <DependentUpon>ExperimentView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionBubbleChartView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionBubbleChartView.Designer.cs">
+    <Compile Include="RunCollectionViews\RunCollectionBubbleChartView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionViews\RunCollectionBubbleChartView.Designer.cs">
       <DependentUpon>RunCollectionBubbleChartView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionEqualityConstraintView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionEqualityConstraintView.Designer.cs">
+    <Compile Include="RunCollectionConstraintViews\RunCollectionEqualityConstraintView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionConstraintViews\RunCollectionEqualityConstraintView.Designer.cs">
       <DependentUpon>RunCollectionEqualityConstraintView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionTabularView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionTabularView.Designer.cs">
+    <Compile Include="RunCollectionViews\RunCollectionTabularView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionViews\RunCollectionTabularView.Designer.cs">
       <DependentUpon>RunCollectionTabularView.cs</DependentUpon>
     </Compile>
-    <Compile Include="RunCollectionView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionView.Designer.cs">
+    <Compile Include="RunCollectionViews\RunCollectionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionViews\RunCollectionView.Designer.cs">
       <DependentUpon>RunCollectionView.cs</DependentUpon>
     </Compile>
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBoxPlotView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBoxPlotView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,241 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Optimization.Views {
-  partial class RunCollectionBoxPlotView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-      System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RunCollectionBoxPlotView));
-      this.xAxisLabel = new System.Windows.Forms.Label();
-      this.xAxisComboBox = new System.Windows.Forms.ComboBox();
-      this.yAxisLabel = new System.Windows.Forms.Label();
-      this.yAxisComboBox = new System.Windows.Forms.ComboBox();
-      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
-      this.noRunsLabel = new System.Windows.Forms.Label();
-      this.splitContainer = new System.Windows.Forms.SplitContainer();
-      this.showStatisticsCheckBox = new System.Windows.Forms.CheckBox();
-      this.statisticsGroupBox = new System.Windows.Forms.GroupBox();
-      this.statisticsMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
-      this.tooltip = new System.Windows.Forms.ToolTip(this.components);
-      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
-      this.splitContainer.Panel1.SuspendLayout();
-      this.splitContainer.Panel2.SuspendLayout();
-      this.splitContainer.SuspendLayout();
-      this.statisticsGroupBox.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // xAxisLabel
-      // 
-      this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.xAxisLabel.AutoSize = true;
-      this.xAxisLabel.Location = new System.Drawing.Point(298, 256);
-      this.xAxisLabel.Name = "xAxisLabel";
-      this.xAxisLabel.Size = new System.Drawing.Size(15, 13);
-      this.xAxisLabel.TabIndex = 12;
-      this.xAxisLabel.Text = "x:";
-      // 
-      // xAxisComboBox
-      // 
-      this.xAxisComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.xAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
-      this.xAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.xAxisComboBox.FormattingEnabled = true;
-      this.xAxisComboBox.Location = new System.Drawing.Point(319, 253);
-      this.xAxisComboBox.Name = "xAxisComboBox";
-      this.xAxisComboBox.Size = new System.Drawing.Size(221, 21);
-      this.xAxisComboBox.TabIndex = 11;
-      this.xAxisComboBox.SelectedIndexChanged += new System.EventHandler(this.AxisComboBox_SelectedIndexChanged);
-      // 
-      // yAxisLabel
-      // 
-      this.yAxisLabel.AutoSize = true;
-      this.yAxisLabel.Location = new System.Drawing.Point(3, 6);
-      this.yAxisLabel.Name = "yAxisLabel";
-      this.yAxisLabel.Size = new System.Drawing.Size(15, 13);
-      this.yAxisLabel.TabIndex = 10;
-      this.yAxisLabel.Text = "y:";
-      // 
-      // yAxisComboBox
-      // 
-      this.yAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
-      this.yAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.yAxisComboBox.FormattingEnabled = true;
-      this.yAxisComboBox.Location = new System.Drawing.Point(24, 3);
-      this.yAxisComboBox.Name = "yAxisComboBox";
-      this.yAxisComboBox.Size = new System.Drawing.Size(221, 21);
-      this.yAxisComboBox.TabIndex = 9;
-      this.yAxisComboBox.SelectedIndexChanged += new System.EventHandler(this.AxisComboBox_SelectedIndexChanged);
-      // 
-      // chart
-      // 
-      this.chart.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)));
-      chartArea1.Name = "ChartArea1";
-      this.chart.ChartAreas.Add(chartArea1);
-      this.chart.Location = new System.Drawing.Point(6, 30);
-      this.chart.Name = "chart";
-      series1.ChartArea = "ChartArea1";
-      series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.BoxPlot;
-      series1.IsVisibleInLegend = false;
-      series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
-      series1.Name = "DataSeries";
-      series1.YValuesPerPoint = 6;
-      this.chart.Series.Add(series1);
-      this.chart.Size = new System.Drawing.Size(534, 217);
-      this.chart.TabIndex = 17;
-      this.chart.Text = "chart";
-      this.chart.AxisViewChanged += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>(this.chart_AxisViewChanged);
-      this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
-      // 
-      // noRunsLabel
-      // 
-      this.noRunsLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
-      this.noRunsLabel.AutoSize = true;
-      this.noRunsLabel.Location = new System.Drawing.Point(212, 122);
-      this.noRunsLabel.Name = "noRunsLabel";
-      this.noRunsLabel.Size = new System.Drawing.Size(138, 13);
-      this.noRunsLabel.TabIndex = 22;
-      this.noRunsLabel.Text = "No runs could be displayed.";
-      // 
-      // splitContainer
-      // 
-      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.splitContainer.Location = new System.Drawing.Point(0, 0);
-      this.splitContainer.Name = "splitContainer";
-      this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
-      // 
-      // splitContainer.Panel1
-      // 
-      this.splitContainer.Panel1.Controls.Add(this.showStatisticsCheckBox);
-      this.splitContainer.Panel1.Controls.Add(this.xAxisLabel);
-      this.splitContainer.Panel1.Controls.Add(this.noRunsLabel);
-      this.splitContainer.Panel1.Controls.Add(this.yAxisLabel);
-      this.splitContainer.Panel1.Controls.Add(this.xAxisComboBox);
-      this.splitContainer.Panel1.Controls.Add(this.yAxisComboBox);
-      this.splitContainer.Panel1.Controls.Add(this.chart);
-      // 
-      // splitContainer.Panel2
-      // 
-      this.splitContainer.Panel2.Controls.Add(this.statisticsGroupBox);
-      this.splitContainer.Size = new System.Drawing.Size(543, 416);
-      this.splitContainer.SplitterDistance = 277;
-      this.splitContainer.TabIndex = 23;
-      // 
-      // showStatisticsCheckBox
-      // 
-      this.showStatisticsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.showStatisticsCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
-      this.showStatisticsCheckBox.Checked = true;
-      this.showStatisticsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
-      this.showStatisticsCheckBox.Image = HeuristicLab.Common.Resources.VSImageLibrary.Properties;
-      this.showStatisticsCheckBox.Location = new System.Drawing.Point(6, 245);
-      this.showStatisticsCheckBox.Name = "showStatisticsCheckBox";
-      this.showStatisticsCheckBox.Size = new System.Drawing.Size(24, 24);
-      this.showStatisticsCheckBox.TabIndex = 23;
-      this.tooltip.SetToolTip(this.showStatisticsCheckBox, "Show/Hide Statistics");
-      this.showStatisticsCheckBox.UseVisualStyleBackColor = true;
-      this.showStatisticsCheckBox.CheckedChanged += new System.EventHandler(this.showStatisticsCheckBox_CheckedChanged);
-      // 
-      // statisticsGroupBox
-      // 
-      this.statisticsGroupBox.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.statisticsGroupBox.Controls.Add(this.statisticsMatrixView);
-      this.statisticsGroupBox.Location = new System.Drawing.Point(3, 3);
-      this.statisticsGroupBox.Name = "statisticsGroupBox";
-      this.statisticsGroupBox.Size = new System.Drawing.Size(534, 129);
-      this.statisticsGroupBox.TabIndex = 1;
-      this.statisticsGroupBox.TabStop = false;
-      this.statisticsGroupBox.Text = "Statistics";
-      // 
-      // statisticsMatrixView
-      // 
-      this.statisticsMatrixView.Caption = "StringConvertibleMatrix View";
-      this.statisticsMatrixView.Content = null;
-      this.statisticsMatrixView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.statisticsMatrixView.Location = new System.Drawing.Point(3, 16);
-      this.statisticsMatrixView.Name = "statisticsMatrixView";
-      this.statisticsMatrixView.ReadOnly = true;
-      this.statisticsMatrixView.ShowRowsAndColumnsTextBox = false;
-      this.statisticsMatrixView.ShowStatisticalInformation = false;
-      this.statisticsMatrixView.Size = new System.Drawing.Size(528, 110);
-      this.statisticsMatrixView.TabIndex = 0;
-      // 
-      // RunCollectionBoxPlotView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.BackColor = System.Drawing.SystemColors.Window;
-      this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-      this.Controls.Add(this.splitContainer);
-      this.Name = "RunCollectionBoxPlotView";
-      this.Size = new System.Drawing.Size(543, 416);
-      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
-      this.splitContainer.Panel1.ResumeLayout(false);
-      this.splitContainer.Panel1.PerformLayout();
-      this.splitContainer.Panel2.ResumeLayout(false);
-      this.splitContainer.ResumeLayout(false);
-      this.statisticsGroupBox.ResumeLayout(false);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.Label xAxisLabel;
-    internal System.Windows.Forms.ComboBox xAxisComboBox;
-    private System.Windows.Forms.Label yAxisLabel;
-    internal System.Windows.Forms.ComboBox yAxisComboBox;
-    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
-    private System.Windows.Forms.Label noRunsLabel;
-    private System.Windows.Forms.SplitContainer splitContainer;
-    private Data.Views.StringConvertibleMatrixView statisticsMatrixView;
-    private System.Windows.Forms.GroupBox statisticsGroupBox;
-    private System.Windows.Forms.ToolTip tooltip;
-    protected System.Windows.Forms.CheckBox showStatisticsCheckBox;
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBoxPlotView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBoxPlotView.cs	(revision 7467)
+++ 	(revision )
@@ -1,433 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows.Forms;
-using System.Windows.Forms.DataVisualization.Charting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Optimization.Views {
-  [View("RunCollection BoxPlots")]
-  [Content(typeof(RunCollection), false)]
-  public partial class RunCollectionBoxPlotView : AsynchronousContentView {
-    private enum AxisDimension { Color = 0 }
-    private const string BoxPlotSeriesName = "BoxPlotSeries";
-    private const string BoxPlotChartAreaName = "BoxPlotChartArea";
-
-    private bool suppressUpdates = false;
-    private string xAxisValue;
-    private string yAxisValue;
-    private Dictionary<int, Dictionary<object, double>> categoricalMapping;
-    private SortedDictionary<double, Series> seriesCache;
-
-    public RunCollectionBoxPlotView() {
-      InitializeComponent();
-      categoricalMapping = new Dictionary<int, Dictionary<object, double>>();
-      seriesCache = new SortedDictionary<double, Series>();
-      chart.ChartAreas[0].Visible = false;
-      chart.Series.Clear();
-      chart.ChartAreas.Add(BoxPlotChartAreaName);
-      chart.CustomizeAllChartAreas();
-      chart.ChartAreas[BoxPlotChartAreaName].Axes.ToList().ForEach(x => { x.ScaleView.Zoomable = true; x.ScaleView.MinSize = 0; });
-      chart.ChartAreas[BoxPlotChartAreaName].CursorX.Interval = 0.5;
-      chart.ChartAreas[BoxPlotChartAreaName].CursorY.Interval = 1e-5;
-    }
-
-    public new RunCollection Content {
-      get { return (RunCollection)base.Content; }
-      set { base.Content = value; }
-    }
-    public IStringConvertibleMatrix Matrix {
-      get { return this.Content; }
-    }
-
-    #region RunCollection and Run events
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.Reset += new EventHandler(Content_Reset);
-      Content.ColumnNamesChanged += new EventHandler(Content_ColumnNamesChanged);
-      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-      Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged);
-      RegisterRunEvents(Content);
-    }
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      Content.Reset -= new EventHandler(Content_Reset);
-      Content.ColumnNamesChanged -= new EventHandler(Content_ColumnNamesChanged);
-      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-      Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged);
-      DeregisterRunEvents(Content);
-    }
-
-    protected virtual void RegisterRunEvents(IEnumerable<IRun> runs) {
-      foreach (IRun run in runs)
-        run.Changed += new EventHandler(run_Changed);
-    }
-    protected virtual void DeregisterRunEvents(IEnumerable<IRun> runs) {
-      foreach (IRun run in runs)
-        run.Changed -= new EventHandler(run_Changed);
-    }
-
-    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      DeregisterRunEvents(e.OldItems);
-      RegisterRunEvents(e.Items);
-    }
-    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      DeregisterRunEvents(e.Items);
-    }
-    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      RegisterRunEvents(e.Items);
-    }
-    private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_UpdateOfRunsInProgressChanged), sender, e);
-      else {
-        suppressUpdates = Content.UpdateOfRunsInProgress;
-        if (!suppressUpdates) UpdateDataPoints();
-      }
-    }
-
-    private void Content_Reset(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Reset), sender, e);
-      else {
-        this.categoricalMapping.Clear();
-        UpdateDataPoints();
-      }
-    }
-    private void Content_ColumnNamesChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_ColumnNamesChanged), sender, e);
-      else {
-        UpdateComboBoxes();
-      }
-    }
-    private void run_Changed(object sender, EventArgs e) {
-      if (InvokeRequired)
-        this.Invoke(new EventHandler(run_Changed), sender, e);
-      else if (!suppressUpdates) {
-        IRun run = (IRun)sender;
-        UpdateDataPoints();
-      }
-    }
-    #endregion
-
-    #region update comboboxes, datapoints, runs
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      this.categoricalMapping.Clear();
-      UpdateComboBoxes();
-      UpdateDataPoints();
-    }
-
-    private void UpdateComboBoxes() {
-      string selectedXAxis = (string)this.xAxisComboBox.SelectedItem;
-      string selectedYAxis = (string)this.yAxisComboBox.SelectedItem;
-      this.xAxisComboBox.Items.Clear();
-      this.yAxisComboBox.Items.Clear();
-      if (Content != null) {
-        string[] additionalAxisDimension = Enum.GetNames(typeof(AxisDimension));
-        this.xAxisComboBox.Items.AddRange(additionalAxisDimension);
-        this.xAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
-        this.yAxisComboBox.Items.AddRange(additionalAxisDimension);
-        this.yAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
-
-        bool changed = false;
-        if (selectedXAxis != null && xAxisComboBox.Items.Contains(selectedXAxis)) {
-          xAxisComboBox.SelectedItem = selectedXAxis;
-          changed = true;
-        }
-        if (selectedYAxis != null && yAxisComboBox.Items.Contains(selectedYAxis)) {
-          yAxisComboBox.SelectedItem = selectedYAxis;
-          changed = true;
-        }
-        if (changed)
-          UpdateDataPoints();
-      }
-    }
-
-    private void UpdateDataPoints() {
-      this.chart.Series.Clear();
-      this.seriesCache.Clear();
-      if (Content != null) {
-        foreach (IRun run in this.Content.Where(r => r.Visible))
-          this.AddDataPoint(run);
-        foreach (Series s in this.seriesCache.Values)
-          this.chart.Series.Add(s);
-
-        UpdateStatistics();
-        if (seriesCache.Count > 0) {
-          Series boxPlotSeries = CreateBoxPlotSeries();
-          this.chart.Series.Add(boxPlotSeries);
-        }
-
-        UpdateAxisLabels();
-      }
-      UpdateNoRunsVisibleLabel();
-    }
-
-    private void UpdateStatistics() {
-      DoubleMatrix matrix = new DoubleMatrix(9, seriesCache.Count);
-      matrix.SortableView = false;
-      List<string> columnNames = new List<string>();
-      foreach (Series series in seriesCache.Values) {
-        DataPoint datapoint = series.Points.FirstOrDefault();
-        if (datapoint != null) {
-          IRun run = (IRun)datapoint.Tag;
-          string selectedAxis = (string)xAxisComboBox.SelectedItem;
-          IItem value = null;
-
-          if (Enum.IsDefined(typeof(AxisDimension), selectedAxis)) {
-            AxisDimension axisDimension = (AxisDimension)Enum.Parse(typeof(AxisDimension), selectedAxis);
-            switch (axisDimension) {
-              case AxisDimension.Color: value = new StringValue(run.Color.ToString());
-                break;
-            }
-          } else value = Content.GetValue(run, selectedAxis);
-          string columnName = string.Empty;
-          if (value is DoubleValue || value is IntValue)
-            columnName = selectedAxis + ": ";
-          columnName += value.ToString();
-          columnNames.Add(columnName);
-        }
-      }
-      matrix.ColumnNames = columnNames;
-      matrix.RowNames = new string[] { "Count", "Minimum", "Maximum", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile" };
-
-      for (int i = 0; i < seriesCache.Count; i++) {
-        Series series = seriesCache.ElementAt(i).Value;
-        double[] seriesValues = series.Points.Select(p => p.YValues[0]).OrderBy(d => d).ToArray();
-        matrix[0, i] = seriesValues.Length;
-        matrix[1, i] = seriesValues.Min();
-        matrix[2, i] = seriesValues.Max();
-        matrix[3, i] = seriesValues.Average();
-        matrix[4, i] = seriesValues.Median();
-        matrix[5, i] = seriesValues.StandardDeviation();
-        matrix[6, i] = seriesValues.Variance();
-        matrix[7, i] = seriesValues.Percentile(0.25);
-        matrix[8, i] = seriesValues.Percentile(0.75);
-      }
-      statisticsMatrixView.Content = matrix;
-    }
-
-    private Series CreateBoxPlotSeries() {
-      Series boxPlotSeries = new Series(BoxPlotSeriesName);
-      string seriesNames = string.Concat(seriesCache.Keys.Select(x => x.ToString() + ";").ToArray());
-      seriesNames = seriesNames.Remove(seriesNames.Length - 1); //delete last ; from string
-
-      boxPlotSeries.ChartArea = BoxPlotChartAreaName;
-      boxPlotSeries.ChartType = SeriesChartType.BoxPlot;
-      boxPlotSeries["BoxPlotSeries"] = seriesNames;
-      boxPlotSeries["BoxPlotShowUnusualValues"] = "true";
-      boxPlotSeries["PointWidth"] = "0.4";
-      boxPlotSeries.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.VerticalCenter;
-      boxPlotSeries.BackSecondaryColor = System.Drawing.Color.FromArgb(130, 224, 64, 10);
-      boxPlotSeries.BorderColor = System.Drawing.Color.FromArgb(64, 64, 64);
-      boxPlotSeries.Color = System.Drawing.Color.FromArgb(224, 64, 10);
-
-      return boxPlotSeries;
-    }
-
-    private void AddDataPoint(IRun run) {
-      double? xValue;
-      double? yValue;
-
-      if (!xAxisComboBox.DroppedDown)
-        this.xAxisValue = (string)xAxisComboBox.SelectedItem;
-      if (!yAxisComboBox.DroppedDown)
-        this.yAxisValue = (string)yAxisComboBox.SelectedItem;
-
-      xValue = GetValue(run, this.xAxisValue);
-      yValue = GetValue(run, this.yAxisValue);
-
-      if (xValue.HasValue && yValue.HasValue) {
-        if (!this.seriesCache.ContainsKey(xValue.Value))
-          seriesCache[xValue.Value] = new Series(xValue.Value.ToString());
-
-        Series series = seriesCache[xValue.Value];
-        DataPoint point = new DataPoint(xValue.Value, yValue.Value);
-        point.Tag = run;
-        series.Points.Add(point);
-      }
-    }
-    #endregion
-
-    #region get values from run
-    private double? GetValue(IRun run, string columnName) {
-      if (run == null || string.IsNullOrEmpty(columnName))
-        return null;
-
-      if (Enum.IsDefined(typeof(AxisDimension), columnName)) {
-        AxisDimension axisDimension = (AxisDimension)Enum.Parse(typeof(AxisDimension), columnName);
-        return GetValue(run, axisDimension);
-      } else {
-        int columnIndex = Matrix.ColumnNames.ToList().IndexOf(columnName);
-        IItem value = Content.GetValue(run, columnIndex);
-        if (value == null)
-          return null;
-
-        DoubleValue doubleValue = value as DoubleValue;
-        IntValue intValue = value as IntValue;
-        TimeSpanValue timeSpanValue = value as TimeSpanValue;
-        double? ret = null;
-        if (doubleValue != null) {
-          if (!double.IsNaN(doubleValue.Value) && !double.IsInfinity(doubleValue.Value))
-            ret = doubleValue.Value;
-        } else if (intValue != null)
-          ret = intValue.Value;
-        else if (timeSpanValue != null) {
-          ret = timeSpanValue.Value.TotalSeconds;
-        } else
-          ret = GetCategoricalValue(columnIndex, value.ToString());
-
-        return ret;
-      }
-    }
-    private double GetCategoricalValue(int dimension, string value) {
-      if (!this.categoricalMapping.ContainsKey(dimension))
-        this.categoricalMapping[dimension] = new Dictionary<object, double>();
-      if (!this.categoricalMapping[dimension].ContainsKey(value)) {
-        if (this.categoricalMapping[dimension].Values.Count == 0)
-          this.categoricalMapping[dimension][value] = 1.0;
-        else
-          this.categoricalMapping[dimension][value] = this.categoricalMapping[dimension].Values.Max() + 1.0;
-      }
-      return this.categoricalMapping[dimension][value];
-    }
-    private double GetValue(IRun run, AxisDimension axisDimension) {
-      double value = double.NaN;
-      switch (axisDimension) {
-        case AxisDimension.Color: {
-            value = GetCategoricalValue(-1, run.Color.ToString());
-            break;
-          }
-        default: {
-            throw new ArgumentException("No handling strategy for " + axisDimension.ToString() + " is defined.");
-          }
-      }
-      return value;
-    }
-    #endregion
-
-    #region GUI events
-    private void UpdateNoRunsVisibleLabel() {
-      if (this.chart.Series.Count > 0) {
-        noRunsLabel.Visible = false;
-        showStatisticsCheckBox.Enabled = true;
-        splitContainer.Panel2Collapsed = !showStatisticsCheckBox.Checked;
-      } else {
-        noRunsLabel.Visible = true;
-        showStatisticsCheckBox.Enabled = false;
-        splitContainer.Panel2Collapsed = true;
-      }
-    }
-
-    private void AxisComboBox_SelectedIndexChanged(object sender, EventArgs e) {
-      UpdateDataPoints();
-    }
-    private void UpdateAxisLabels() {
-      Axis xAxis = this.chart.ChartAreas[BoxPlotChartAreaName].AxisX;
-      Axis yAxis = this.chart.ChartAreas[BoxPlotChartAreaName].AxisY;
-      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
-      SetCustomAxisLabels(xAxis, xAxisComboBox.SelectedIndex - axisDimensionCount);
-      SetCustomAxisLabels(yAxis, yAxisComboBox.SelectedIndex - axisDimensionCount);
-      if (xAxisComboBox.SelectedItem != null)
-        xAxis.Title = xAxisComboBox.SelectedItem.ToString();
-      if (yAxisComboBox.SelectedItem != null)
-        yAxis.Title = yAxisComboBox.SelectedItem.ToString();
-    }
-
-    private void chart_AxisViewChanged(object sender, System.Windows.Forms.DataVisualization.Charting.ViewEventArgs e) {
-      this.UpdateAxisLabels();
-    }
-
-    private void SetCustomAxisLabels(Axis axis, int dimension) {
-      axis.CustomLabels.Clear();
-      if (categoricalMapping.ContainsKey(dimension)) {
-        foreach (var pair in categoricalMapping[dimension]) {
-          string labelText = pair.Key.ToString();
-          CustomLabel label = new CustomLabel();
-          label.ToolTip = labelText;
-          if (labelText.Length > 25)
-            labelText = labelText.Substring(0, 25) + " ... ";
-          label.Text = labelText;
-          label.GridTicks = GridTickTypes.TickMark;
-          label.FromPosition = pair.Value - 0.5;
-          label.ToPosition = pair.Value + 0.5;
-          axis.CustomLabels.Add(label);
-        }
-      } else if (dimension > 0 && Content.GetValue(0, dimension) is TimeSpanValue) {
-        this.chart.ChartAreas[0].RecalculateAxesScale();
-        Axis correspondingAxis = this.chart.ChartAreas[0].Axes.Where(x => x.Name == axis.Name).SingleOrDefault();
-        if (correspondingAxis == null)
-          correspondingAxis = axis;
-        for (double i = correspondingAxis.Minimum; i <= correspondingAxis.Maximum; i += correspondingAxis.LabelStyle.Interval) {
-          TimeSpan time = TimeSpan.FromSeconds(i);
-          string x = string.Format("{0:00}:{1:00}:{2:00}", (int)time.Hours, time.Minutes, time.Seconds);
-          axis.CustomLabels.Add(i - correspondingAxis.LabelStyle.Interval / 2, i + correspondingAxis.LabelStyle.Interval / 2, x);
-        }
-      } else if (chart.ChartAreas[BoxPlotChartAreaName].AxisX == axis) {
-        double position = 1.0;
-        foreach (Series series in chart.Series) {
-          if (series.Name != BoxPlotSeriesName) {
-            string labelText = series.Points[0].XValue.ToString();
-            CustomLabel label = new CustomLabel();
-            label.FromPosition = position - 0.5;
-            label.ToPosition = position + 0.5;
-            label.GridTicks = GridTickTypes.TickMark;
-            label.Text = labelText;
-            axis.CustomLabels.Add(label);
-            position++;
-          }
-        }
-      }
-    }
-
-    private void chart_MouseMove(object sender, MouseEventArgs e) {
-      string newTooltipText = string.Empty;
-      string oldTooltipText;
-      HitTestResult h = this.chart.HitTest(e.X, e.Y);
-      if (h.ChartElementType == ChartElementType.AxisLabels) {
-        newTooltipText = ((CustomLabel)h.Object).ToolTip;
-      }
-
-      oldTooltipText = this.tooltip.GetToolTip(chart);
-      if (newTooltipText != oldTooltipText)
-        this.tooltip.SetToolTip(chart, newTooltipText);
-    }
-    #endregion
-
-    private void showStatisticsCheckBox_CheckedChanged(object sender, EventArgs e) {
-      splitContainer.Panel2Collapsed = !showStatisticsCheckBox.Checked;
-    }
-
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,389 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Optimization.Views {
-  partial class RunCollectionBubbleChartView {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary>
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-      System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RunCollectionBubbleChartView));
-      this.yJitterLabel = new System.Windows.Forms.Label();
-      this.xJitterlabel = new System.Windows.Forms.Label();
-      this.xTrackBar = new System.Windows.Forms.TrackBar();
-      this.xAxisLabel = new System.Windows.Forms.Label();
-      this.xAxisComboBox = new System.Windows.Forms.ComboBox();
-      this.yAxisLabel = new System.Windows.Forms.Label();
-      this.yAxisComboBox = new System.Windows.Forms.ComboBox();
-      this.yTrackBar = new System.Windows.Forms.TrackBar();
-      this.sizeComboBox = new System.Windows.Forms.ComboBox();
-      this.sizeLabel = new System.Windows.Forms.Label();
-      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
-      this.openBoxPlotViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-      this.hideRunToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-      this.zoomButton = new System.Windows.Forms.RadioButton();
-      this.selectButton = new System.Windows.Forms.RadioButton();
-      this.radioButtonGroup = new System.Windows.Forms.GroupBox();
-      this.colorButton = new System.Windows.Forms.Button();
-      this.colorDialog = new System.Windows.Forms.ColorDialog();
-      this.tooltip = new System.Windows.Forms.ToolTip(this.components);
-      this.colorXAxisButton = new System.Windows.Forms.Button();
-      this.colorYAxisButton = new System.Windows.Forms.Button();
-      this.noRunsLabel = new System.Windows.Forms.Label();
-      this.sizeTrackBar = new System.Windows.Forms.TrackBar();
-      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).BeginInit();
-      ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).BeginInit();
-      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
-      this.radioButtonGroup.SuspendLayout();
-      ((System.ComponentModel.ISupportInitialize)(this.sizeTrackBar)).BeginInit();
-      this.SuspendLayout();
-      // 
-      // yJitterLabel
-      // 
-      this.yJitterLabel.AutoSize = true;
-      this.yJitterLabel.Location = new System.Drawing.Point(278, 6);
-      this.yJitterLabel.Name = "yJitterLabel";
-      this.yJitterLabel.Size = new System.Drawing.Size(32, 13);
-      this.yJitterLabel.TabIndex = 13;
-      this.yJitterLabel.Text = "Jitter:";
-      // 
-      // xJitterlabel
-      // 
-      this.xJitterlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.xJitterlabel.AutoSize = true;
-      this.xJitterlabel.Location = new System.Drawing.Point(749, 472);
-      this.xJitterlabel.Name = "xJitterlabel";
-      this.xJitterlabel.Size = new System.Drawing.Size(32, 13);
-      this.xJitterlabel.TabIndex = 12;
-      this.xJitterlabel.Text = "Jitter:";
-      // 
-      // xTrackBar
-      // 
-      this.xTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.xTrackBar.Enabled = false;
-      this.xTrackBar.Location = new System.Drawing.Point(787, 469);
-      this.xTrackBar.Maximum = 100;
-      this.xTrackBar.Name = "xTrackBar";
-      this.xTrackBar.Size = new System.Drawing.Size(64, 45);
-      this.xTrackBar.TabIndex = 11;
-      this.xTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
-      this.xTrackBar.ValueChanged += new System.EventHandler(this.jitterTrackBar_ValueChanged);
-      // 
-      // xAxisLabel
-      // 
-      this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.xAxisLabel.AutoSize = true;
-      this.xAxisLabel.Location = new System.Drawing.Point(471, 472);
-      this.xAxisLabel.Name = "xAxisLabel";
-      this.xAxisLabel.Size = new System.Drawing.Size(15, 13);
-      this.xAxisLabel.TabIndex = 8;
-      this.xAxisLabel.Text = "x:";
-      // 
-      // xAxisComboBox
-      // 
-      this.xAxisComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.xAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
-      this.xAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.xAxisComboBox.FormattingEnabled = true;
-      this.xAxisComboBox.Location = new System.Drawing.Point(492, 469);
-      this.xAxisComboBox.Name = "xAxisComboBox";
-      this.xAxisComboBox.Size = new System.Drawing.Size(221, 21);
-      this.xAxisComboBox.TabIndex = 7;
-      this.xAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
-      // 
-      // yAxisLabel
-      // 
-      this.yAxisLabel.AutoSize = true;
-      this.yAxisLabel.Location = new System.Drawing.Point(3, 6);
-      this.yAxisLabel.Name = "yAxisLabel";
-      this.yAxisLabel.Size = new System.Drawing.Size(15, 13);
-      this.yAxisLabel.TabIndex = 6;
-      this.yAxisLabel.Text = "y:";
-      // 
-      // yAxisComboBox
-      // 
-      this.yAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
-      this.yAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.yAxisComboBox.FormattingEnabled = true;
-      this.yAxisComboBox.Location = new System.Drawing.Point(24, 3);
-      this.yAxisComboBox.Name = "yAxisComboBox";
-      this.yAxisComboBox.Size = new System.Drawing.Size(221, 21);
-      this.yAxisComboBox.TabIndex = 5;
-      this.yAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
-      // 
-      // yTrackBar
-      // 
-      this.yTrackBar.Enabled = false;
-      this.yTrackBar.Location = new System.Drawing.Point(312, 3);
-      this.yTrackBar.Maximum = 100;
-      this.yTrackBar.Name = "yTrackBar";
-      this.yTrackBar.Size = new System.Drawing.Size(59, 45);
-      this.yTrackBar.TabIndex = 10;
-      this.yTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
-      this.yTrackBar.ValueChanged += new System.EventHandler(this.jitterTrackBar_ValueChanged);
-      // 
-      // sizeComboBox
-      // 
-      this.sizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.sizeComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
-      this.sizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.sizeComboBox.FormattingEnabled = true;
-      this.sizeComboBox.Location = new System.Drawing.Point(560, 4);
-      this.sizeComboBox.Name = "sizeComboBox";
-      this.sizeComboBox.Size = new System.Drawing.Size(221, 21);
-      this.sizeComboBox.TabIndex = 14;
-      this.sizeComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
-      // 
-      // sizeLabel
-      // 
-      this.sizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.sizeLabel.AutoSize = true;
-      this.sizeLabel.Location = new System.Drawing.Point(489, 7);
-      this.sizeLabel.Name = "sizeLabel";
-      this.sizeLabel.Size = new System.Drawing.Size(66, 13);
-      this.sizeLabel.TabIndex = 15;
-      this.sizeLabel.Text = "Bubble Size:";
-      // 
-      // chart
-      // 
-      this.chart.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)));
-      chartArea2.Name = "ChartArea1";
-      this.chart.ChartAreas.Add(chartArea2);
-      this.chart.Location = new System.Drawing.Point(6, 30);
-      this.chart.Name = "chart";
-      series2.ChartArea = "ChartArea1";
-      series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
-      series2.IsVisibleInLegend = false;
-      series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
-      series2.Name = "Bubbles";
-      series2.YValuesPerPoint = 2;
-      this.chart.Series.Add(series2);
-      this.chart.Size = new System.Drawing.Size(843, 425);
-      this.chart.TabIndex = 16;
-      this.chart.Text = "chart";
-      this.chart.AxisViewChanged += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>(this.chart_AxisViewChanged);
-      this.chart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDoubleClick);
-      this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
-      this.chart.MouseUp += new System.Windows.Forms.MouseEventHandler(this.chart_MouseUp);
-      // 
-      // openBoxPlotViewToolStripMenuItem
-      // 
-      this.openBoxPlotViewToolStripMenuItem.Name = "openBoxPlotViewToolStripMenuItem";
-      this.openBoxPlotViewToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
-      this.openBoxPlotViewToolStripMenuItem.Text = "Open BoxPlot View";
-      this.openBoxPlotViewToolStripMenuItem.Click += new System.EventHandler(this.openBoxPlotViewToolStripMenuItem_Click);
-      //
-      // hideRunToolStripMenuItem
-      //
-      this.hideRunToolStripMenuItem.Name = "hideRunToolStripMenuItem";
-      this.hideRunToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
-      this.hideRunToolStripMenuItem.Text = "Hide Run";
-      this.hideRunToolStripMenuItem.Click += new System.EventHandler(hideRunToolStripMenuItem_Click);
-      // 
-      // zoomButton
-      // 
-      this.zoomButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.zoomButton.AutoSize = true;
-      this.zoomButton.Checked = true;
-      this.zoomButton.Location = new System.Drawing.Point(6, 10);
-      this.zoomButton.Name = "zoomButton";
-      this.zoomButton.Size = new System.Drawing.Size(52, 17);
-      this.zoomButton.TabIndex = 17;
-      this.zoomButton.TabStop = true;
-      this.zoomButton.Text = "Zoom";
-      this.zoomButton.UseVisualStyleBackColor = true;
-      this.zoomButton.CheckedChanged += new System.EventHandler(this.zoomButton_CheckedChanged);
-      // 
-      // selectButton
-      // 
-      this.selectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.selectButton.AutoSize = true;
-      this.selectButton.Location = new System.Drawing.Point(64, 9);
-      this.selectButton.Name = "selectButton";
-      this.selectButton.Size = new System.Drawing.Size(55, 17);
-      this.selectButton.TabIndex = 18;
-      this.selectButton.Text = "Select";
-      this.selectButton.UseVisualStyleBackColor = true;
-      // 
-      // radioButtonGroup
-      // 
-      this.radioButtonGroup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.radioButtonGroup.Controls.Add(this.zoomButton);
-      this.radioButtonGroup.Controls.Add(this.selectButton);
-      this.radioButtonGroup.Location = new System.Drawing.Point(3, 461);
-      this.radioButtonGroup.Name = "radioButtonGroup";
-      this.radioButtonGroup.Size = new System.Drawing.Size(135, 32);
-      this.radioButtonGroup.TabIndex = 19;
-      this.radioButtonGroup.TabStop = false;
-      // 
-      // colorButton
-      // 
-      this.colorButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.colorButton.Enabled = false;
-      this.colorButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
-      this.colorButton.Location = new System.Drawing.Point(144, 469);
-      this.colorButton.Name = "colorButton";
-      this.colorButton.Size = new System.Drawing.Size(64, 21);
-      this.colorButton.TabIndex = 20;
-      this.colorButton.Text = "Color";
-      this.colorButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-      this.colorButton.UseVisualStyleBackColor = true;
-      this.colorButton.Click += new System.EventHandler(this.colorButton_Click);
-      // 
-      // colorDialog
-      // 
-      this.colorDialog.AllowFullOpen = false;
-      this.colorDialog.FullOpen = true;
-      // 
-      // colorXAxisButton
-      // 
-      this.colorXAxisButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.colorXAxisButton.Enabled = false;
-      this.colorXAxisButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.DisplayInColorVertical;
-      this.colorXAxisButton.Location = new System.Drawing.Point(719, 469);
-      this.colorXAxisButton.Name = "colorXAxisButton";
-      this.colorXAxisButton.Size = new System.Drawing.Size(21, 21);
-      this.colorXAxisButton.TabIndex = 22;
-      this.tooltip.SetToolTip(this.colorXAxisButton, "Color all runs according to their x-values");
-      this.colorXAxisButton.UseVisualStyleBackColor = true;
-      this.colorXAxisButton.Click += new System.EventHandler(this.colorXAxisButton_Click);
-      // 
-      // colorYAxisButton
-      // 
-      this.colorYAxisButton.Enabled = false;
-      this.colorYAxisButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.DisplayInColor;
-      this.colorYAxisButton.Location = new System.Drawing.Point(251, 3);
-      this.colorYAxisButton.Name = "colorYAxisButton";
-      this.colorYAxisButton.Size = new System.Drawing.Size(21, 21);
-      this.colorYAxisButton.TabIndex = 23;
-      this.tooltip.SetToolTip(this.colorYAxisButton, "Color all runs according to their y-values");
-      this.colorYAxisButton.UseVisualStyleBackColor = true;
-      this.colorYAxisButton.Click += new System.EventHandler(this.colorYAxisButton_Click);
-      // 
-      // noRunsLabel
-      // 
-      this.noRunsLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
-      this.noRunsLabel.AutoSize = true;
-      this.noRunsLabel.Location = new System.Drawing.Point(366, 228);
-      this.noRunsLabel.Name = "noRunsLabel";
-      this.noRunsLabel.Size = new System.Drawing.Size(138, 13);
-      this.noRunsLabel.TabIndex = 21;
-      this.noRunsLabel.Text = "No runs could be displayed.";
-      // 
-      // sizeTrackBar
-      // 
-      this.sizeTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.sizeTrackBar.Location = new System.Drawing.Point(787, 3);
-      this.sizeTrackBar.Maximum = 50;
-      this.sizeTrackBar.Minimum = 5;
-      this.sizeTrackBar.Name = "sizeTrackBar";
-      this.sizeTrackBar.Size = new System.Drawing.Size(64, 45);
-      this.sizeTrackBar.TabIndex = 24;
-      this.sizeTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
-      this.sizeTrackBar.Value = 10;
-      this.sizeTrackBar.ValueChanged += new System.EventHandler(this.sizeTrackBar_ValueChanged);
-      // 
-      // RunCollectionBubbleChartView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.BackColor = System.Drawing.SystemColors.Window;
-      this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-      this.Controls.Add(this.sizeTrackBar);
-      this.Controls.Add(this.colorYAxisButton);
-      this.Controls.Add(this.colorXAxisButton);
-      this.Controls.Add(this.noRunsLabel);
-      this.Controls.Add(this.colorButton);
-      this.Controls.Add(this.radioButtonGroup);
-      this.Controls.Add(this.chart);
-      this.Controls.Add(this.sizeLabel);
-      this.Controls.Add(this.sizeComboBox);
-      this.Controls.Add(this.yJitterLabel);
-      this.Controls.Add(this.xJitterlabel);
-      this.Controls.Add(this.xTrackBar);
-      this.Controls.Add(this.xAxisLabel);
-      this.Controls.Add(this.xAxisComboBox);
-      this.Controls.Add(this.yAxisLabel);
-      this.Controls.Add(this.yAxisComboBox);
-      this.Controls.Add(this.yTrackBar);
-      this.Name = "RunCollectionBubbleChartView";
-      this.Size = new System.Drawing.Size(854, 496);
-      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).EndInit();
-      ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).EndInit();
-      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
-      this.radioButtonGroup.ResumeLayout(false);
-      this.radioButtonGroup.PerformLayout();
-      ((System.ComponentModel.ISupportInitialize)(this.sizeTrackBar)).EndInit();
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-    #endregion
-
-    private System.Windows.Forms.Label xAxisLabel;
-    private System.Windows.Forms.ComboBox xAxisComboBox;
-    private System.Windows.Forms.Label yAxisLabel;
-    private System.Windows.Forms.ComboBox yAxisComboBox;
-    private System.Windows.Forms.TrackBar yTrackBar;
-    private System.Windows.Forms.TrackBar xTrackBar;
-    private System.Windows.Forms.Label xJitterlabel;
-    private System.Windows.Forms.Label yJitterLabel;
-    private System.Windows.Forms.ComboBox sizeComboBox;
-    private System.Windows.Forms.Label sizeLabel;
-    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
-    private System.Windows.Forms.RadioButton zoomButton;
-    private System.Windows.Forms.RadioButton selectButton;
-    private System.Windows.Forms.GroupBox radioButtonGroup;
-    private System.Windows.Forms.Button colorButton;
-    private System.Windows.Forms.ColorDialog colorDialog;
-    private System.Windows.Forms.ToolTip tooltip;
-    private System.Windows.Forms.Label noRunsLabel;
-    private System.Windows.Forms.ToolStripMenuItem openBoxPlotViewToolStripMenuItem;
-    private System.Windows.Forms.ToolStripMenuItem hideRunToolStripMenuItem;
-    private System.Windows.Forms.Button colorXAxisButton;
-    private System.Windows.Forms.Button colorYAxisButton;
-    private System.Windows.Forms.TrackBar sizeTrackBar;
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs	(revision 7467)
+++ 	(revision )
@@ -1,693 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Windows.Forms;
-using System.Windows.Forms.DataVisualization.Charting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Optimization.Views {
-  [View("RunCollection BubbleChart")]
-  [Content(typeof(RunCollection), false)]
-  public partial class RunCollectionBubbleChartView : AsynchronousContentView {
-    private enum SizeDimension { Constant = 0 }
-    private enum AxisDimension { Index = 0 }
-
-    private string xAxisValue;
-    private string yAxisValue;
-    private string sizeAxisValue;
-
-    private Dictionary<IRun, List<DataPoint>> runToDataPointMapping;
-    private Dictionary<int, Dictionary<object, double>> categoricalMapping;
-    private Dictionary<IRun, double> xJitter;
-    private Dictionary<IRun, double> yJitter;
-    private double xJitterFactor = 0.0;
-    private double yJitterFactor = 0.0;
-    private Random random;
-    private bool isSelecting = false;
-    private bool suppressUpdates = false;
-
-    public RunCollectionBubbleChartView() {
-      InitializeComponent();
-
-      chart.ContextMenuStrip.Items.Insert(0, hideRunToolStripMenuItem);
-      chart.ContextMenuStrip.Items.Insert(1, openBoxPlotViewToolStripMenuItem);
-      chart.ContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(ContextMenuStrip_Opening);
-
-      runToDataPointMapping = new Dictionary<IRun, List<DataPoint>>();
-      categoricalMapping = new Dictionary<int, Dictionary<object, double>>();
-      xJitter = new Dictionary<IRun, double>();
-      yJitter = new Dictionary<IRun, double>();
-      random = new Random();
-
-      colorDialog.Color = Color.Black;
-      colorButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color);
-      isSelecting = false;
-
-      chart.CustomizeAllChartAreas();
-      chart.ChartAreas[0].CursorX.Interval = 1;
-      chart.ChartAreas[0].CursorY.Interval = 1;
-      chart.ChartAreas[0].AxisX.ScaleView.Zoomable = !this.isSelecting;
-      chart.ChartAreas[0].AxisY.ScaleView.Zoomable = !this.isSelecting;
-    }
-
-    public new RunCollection Content {
-      get { return (RunCollection)base.Content; }
-      set { base.Content = value; }
-    }
-    public IStringConvertibleMatrix Matrix {
-      get { return this.Content; }
-    }
-
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.Reset += new EventHandler(Content_Reset);
-      Content.ColumnNamesChanged += new EventHandler(Content_ColumnNamesChanged);
-      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-      Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged);
-      RegisterRunEvents(Content);
-    }
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      Content.Reset -= new EventHandler(Content_Reset);
-      Content.ColumnNamesChanged -= new EventHandler(Content_ColumnNamesChanged);
-      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-      Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged);
-      DeregisterRunEvents(Content);
-    }
-    protected virtual void RegisterRunEvents(IEnumerable<IRun> runs) {
-      foreach (IRun run in runs)
-        run.Changed += new EventHandler(run_Changed);
-    }
-    protected virtual void DeregisterRunEvents(IEnumerable<IRun> runs) {
-      foreach (IRun run in runs)
-        run.Changed -= new EventHandler(run_Changed);
-    }
-
-    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      DeregisterRunEvents(e.OldItems);
-      RegisterRunEvents(e.Items);
-    }
-    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      DeregisterRunEvents(e.Items);
-    }
-    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      RegisterRunEvents(e.Items);
-    }
-    private void run_Changed(object sender, EventArgs e) {
-      if (InvokeRequired)
-        this.Invoke(new EventHandler(run_Changed), sender, e);
-      else {
-        IRun run = (IRun)sender;
-        UpdateRun(run);
-      }
-    }
-
-    private void UpdateRun(IRun run) {
-      if (!suppressUpdates) {
-        if (runToDataPointMapping.ContainsKey(run)) {
-          foreach (DataPoint point in runToDataPointMapping[run]) {
-            point.Color = run.Color;
-            if (!run.Visible) {
-              this.chart.Series[0].Points.Remove(point);
-              UpdateCursorInterval();
-              chart.ChartAreas[0].RecalculateAxesScale();
-            }
-          }
-          if (!run.Visible) runToDataPointMapping.Remove(run);
-        } else {
-          AddDataPoint(run);
-          UpdateCursorInterval();
-          chart.ChartAreas[0].RecalculateAxesScale();
-        }
-
-        if (this.chart.Series[0].Points.Count == 0)
-          noRunsLabel.Visible = true;
-        else
-          noRunsLabel.Visible = false;
-      }
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      this.categoricalMapping.Clear();
-      UpdateComboBoxes();
-      UpdateDataPoints();
-    }
-    private void Content_ColumnNamesChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_ColumnNamesChanged), sender, e);
-      else
-        UpdateComboBoxes();
-    }
-
-    private void UpdateComboBoxes() {
-      string selectedXAxis = (string)this.xAxisComboBox.SelectedItem;
-      string selectedYAxis = (string)this.yAxisComboBox.SelectedItem;
-      string selectedSizeAxis = (string)this.sizeComboBox.SelectedItem;
-      this.xAxisComboBox.Items.Clear();
-      this.yAxisComboBox.Items.Clear();
-      this.sizeComboBox.Items.Clear();
-      if (Content != null) {
-        string[] additionalAxisDimension = Enum.GetNames(typeof(AxisDimension));
-        this.xAxisComboBox.Items.AddRange(additionalAxisDimension);
-        this.xAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
-        this.yAxisComboBox.Items.AddRange(additionalAxisDimension);
-        this.yAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
-        string[] additionalSizeDimension = Enum.GetNames(typeof(SizeDimension));
-        this.sizeComboBox.Items.AddRange(additionalSizeDimension);
-        this.sizeComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
-        this.sizeComboBox.SelectedItem = SizeDimension.Constant.ToString();
-
-        bool changed = false;
-        if (selectedXAxis != null && xAxisComboBox.Items.Contains(selectedXAxis)) {
-          xAxisComboBox.SelectedItem = selectedXAxis;
-          changed = true;
-        }
-        if (selectedYAxis != null && yAxisComboBox.Items.Contains(selectedYAxis)) {
-          yAxisComboBox.SelectedItem = selectedYAxis;
-          changed = true;
-        }
-        if (selectedSizeAxis != null && sizeComboBox.Items.Contains(selectedSizeAxis)) {
-          sizeComboBox.SelectedItem = selectedSizeAxis;
-          changed = true;
-        }
-        if (changed)
-          UpdateDataPoints();
-      }
-    }
-
-
-    private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_UpdateOfRunsInProgressChanged), sender, e);
-      else {
-        suppressUpdates = Content.UpdateOfRunsInProgress;
-        if (!suppressUpdates) UpdateDataPoints();
-      }
-    }
-
-    private void Content_Reset(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Reset), sender, e);
-      else {
-        this.categoricalMapping.Clear();
-        UpdateDataPoints();
-      }
-    }
-
-    private void UpdateDataPoints() {
-      Series series = this.chart.Series[0];
-      series.Points.Clear();
-      runToDataPointMapping.Clear();
-
-      chart.ChartAreas[0].AxisX.IsMarginVisible = xAxisValue != AxisDimension.Index.ToString();
-      chart.ChartAreas[0].AxisY.IsMarginVisible = yAxisValue != AxisDimension.Index.ToString();
-
-      if (Content != null) {
-        foreach (IRun run in this.Content)
-          this.AddDataPoint(run);
-
-        if (this.chart.Series[0].Points.Count == 0)
-          noRunsLabel.Visible = true;
-        else {
-          noRunsLabel.Visible = false;
-          UpdateMarkerSizes();
-          UpdateCursorInterval();
-        }
-      }
-      var xAxis = chart.ChartAreas[0].AxisX;
-      var yAxis = chart.ChartAreas[0].AxisY;
-      xTrackBar.Value = 0;
-      yTrackBar.Value = 0;
-      SetAutomaticUpdateOfAxis(xAxis, true);
-      SetAutomaticUpdateOfAxis(yAxis, true);
-    }
-
-    private void UpdateMarkerSizes() {
-      double[] sizeValues = this.chart.Series[0].Points.Select(p => p.YValues[1]).ToArray();
-      double minSizeValue = sizeValues.Min();
-      double maxSizeValue = sizeValues.Max();
-
-      for (int i = 0; i < sizeValues.Length; i++) {
-        DataPoint point = this.chart.Series[0].Points[i];
-        double sizeRange = maxSizeValue - minSizeValue;
-        double relativeSize = (point.YValues[1] - minSizeValue);
-
-        if (sizeRange > double.Epsilon) relativeSize /= sizeRange;
-        else relativeSize = 1;
-
-        point.MarkerSize = (int)Math.Round((sizeTrackBar.Value - sizeTrackBar.Minimum) * relativeSize + sizeTrackBar.Minimum);
-      }
-    }
-
-    private void UpdateDataPointJitter() {
-      var xAxis = this.chart.ChartAreas[0].AxisX;
-      var yAxis = this.chart.ChartAreas[0].AxisY;
-      SetAutomaticUpdateOfAxis(xAxis, false);
-      SetAutomaticUpdateOfAxis(yAxis, false);
-
-      foreach (DataPoint point in chart.Series[0].Points) {
-        IRun run = (IRun)point.Tag;
-        double xValue = GetValue(run, xAxisValue).Value;
-        double yValue = GetValue(run, yAxisValue).Value;
-
-        if (!xJitterFactor.IsAlmost(0.0))
-          xValue += 0.1 * GetXJitter(run) * xJitterFactor * (xAxis.Maximum - xAxis.Minimum);
-        if (!yJitterFactor.IsAlmost(0.0))
-          yValue += 0.1 * GetYJitter(run) * yJitterFactor * (yAxis.Maximum - yAxis.Minimum);
-
-        point.XValue = xValue;
-        point.YValues[0] = yValue;
-      }
-    }
-
-    private void SetAutomaticUpdateOfAxis(Axis axis, bool enabled) {
-      if (enabled) {
-        axis.Maximum = double.NaN;
-        axis.Minimum = double.NaN;
-        axis.MajorGrid.Interval = double.NaN;
-        axis.MajorTickMark.Interval = double.NaN;
-        axis.LabelStyle.Interval = double.NaN;
-      } else {
-        axis.Minimum = axis.Minimum;
-        axis.Maximum = axis.Maximum;
-        axis.MajorGrid.Interval = axis.MajorGrid.Interval;
-        axis.MajorTickMark.Interval = axis.MajorTickMark.Interval;
-        axis.LabelStyle.Interval = axis.LabelStyle.Interval;
-      }
-
-    }
-
-    private void AddDataPoint(IRun run) {
-      double? xValue;
-      double? yValue;
-      double? sizeValue;
-      Series series = this.chart.Series[0];
-
-      xValue = GetValue(run, xAxisValue);
-      yValue = GetValue(run, yAxisValue);
-      sizeValue = GetValue(run, sizeAxisValue);
-
-      if (xValue.HasValue && yValue.HasValue && sizeValue.HasValue) {
-        xValue = xValue.Value;
-
-        yValue = yValue.Value;
-
-        if (run.Visible) {
-          DataPoint point = new DataPoint(xValue.Value, new double[] { yValue.Value, sizeValue.Value });
-          point.Tag = run;
-          point.Color = run.Color;
-          series.Points.Add(point);
-          if (!runToDataPointMapping.ContainsKey(run)) runToDataPointMapping.Add(run, new List<DataPoint>());
-          runToDataPointMapping[run].Add(point);
-        }
-      }
-    }
-    private double? GetValue(IRun run, string columnName) {
-      if (run == null || string.IsNullOrEmpty(columnName))
-        return null;
-
-      if (Enum.IsDefined(typeof(AxisDimension), columnName)) {
-        AxisDimension axisDimension = (AxisDimension)Enum.Parse(typeof(AxisDimension), columnName);
-        return GetValue(run, axisDimension);
-      } else if (Enum.IsDefined(typeof(SizeDimension), columnName)) {
-        SizeDimension sizeDimension = (SizeDimension)Enum.Parse(typeof(SizeDimension), columnName);
-        return GetValue(run, sizeDimension);
-      } else {
-        int columnIndex = Matrix.ColumnNames.ToList().IndexOf(columnName);
-        IItem value = Content.GetValue(run, columnIndex);
-        if (value == null)
-          return null;
-
-        DoubleValue doubleValue = value as DoubleValue;
-        IntValue intValue = value as IntValue;
-        TimeSpanValue timeSpanValue = value as TimeSpanValue;
-        double? ret = null;
-        if (doubleValue != null) {
-          if (!double.IsNaN(doubleValue.Value) && !double.IsInfinity(doubleValue.Value))
-            ret = doubleValue.Value;
-        } else if (intValue != null)
-          ret = intValue.Value;
-        else if (timeSpanValue != null) {
-          ret = timeSpanValue.Value.TotalSeconds;
-        } else
-          ret = GetCategoricalValue(columnIndex, value.ToString());
-
-        return ret;
-      }
-    }
-    private double GetCategoricalValue(int dimension, string value) {
-      if (!this.categoricalMapping.ContainsKey(dimension))
-        this.categoricalMapping[dimension] = new Dictionary<object, double>();
-      if (!this.categoricalMapping[dimension].ContainsKey(value)) {
-        if (this.categoricalMapping[dimension].Values.Count == 0)
-          this.categoricalMapping[dimension][value] = 1.0;
-        else
-          this.categoricalMapping[dimension][value] = this.categoricalMapping[dimension].Values.Max() + 1.0;
-      }
-      return this.categoricalMapping[dimension][value];
-    }
-    private double GetValue(IRun run, AxisDimension axisDimension) {
-      double value = double.NaN;
-      switch (axisDimension) {
-        case AxisDimension.Index: {
-            value = Content.ToList().IndexOf(run);
-            break;
-          }
-        default: {
-            throw new ArgumentException("No handling strategy for " + axisDimension.ToString() + " is defined.");
-          }
-      }
-      return value;
-    }
-    private double GetValue(IRun run, SizeDimension sizeDimension) {
-      double value = double.NaN;
-      switch (sizeDimension) {
-        case SizeDimension.Constant: {
-            value = 2;
-            break;
-          }
-        default: {
-            throw new ArgumentException("No handling strategy for " + sizeDimension.ToString() + " is defined.");
-          }
-      }
-      return value;
-    }
-    private void UpdateCursorInterval() {
-      Series series = chart.Series[0];
-      double[] xValues = (from point in series.Points
-                          where !point.IsEmpty
-                          select point.XValue)
-                    .DefaultIfEmpty(1.0)
-                    .ToArray();
-      double[] yValues = (from point in series.Points
-                          where !point.IsEmpty
-                          select point.YValues[0])
-                    .DefaultIfEmpty(1.0)
-                    .ToArray();
-
-      double xRange = xValues.Max() - xValues.Min();
-      double yRange = yValues.Max() - yValues.Min();
-      if (xRange.IsAlmost(0.0)) xRange = 1.0;
-      if (yRange.IsAlmost(0.0)) yRange = 1.0;
-      double xDigits = (int)Math.Log10(xRange) - 3;
-      double yDigits = (int)Math.Log10(yRange) - 3;
-      double xZoomInterval = Math.Pow(10, xDigits);
-      double yZoomInterval = Math.Pow(10, yDigits);
-      this.chart.ChartAreas[0].CursorX.Interval = xZoomInterval;
-      this.chart.ChartAreas[0].CursorY.Interval = yZoomInterval;
-
-      //code to handle TimeSpanValues correct
-      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
-      int columnIndex = xAxisComboBox.SelectedIndex - axisDimensionCount;
-      if (columnIndex >= 0 && Content.GetValue(0, columnIndex) is TimeSpanValue)
-        this.chart.ChartAreas[0].CursorX.Interval = 1;
-      columnIndex = yAxisComboBox.SelectedIndex - axisDimensionCount;
-      if (columnIndex >= 0 && Content.GetValue(0, columnIndex) is TimeSpanValue)
-        this.chart.ChartAreas[0].CursorY.Interval = 1;
-    }
-
-    #region Drag & drop and tooltip
-    private void chart_MouseDoubleClick(object sender, MouseEventArgs e) {
-      HitTestResult h = this.chart.HitTest(e.X, e.Y, ChartElementType.DataPoint);
-      if (h.ChartElementType == ChartElementType.DataPoint) {
-        IRun run = (IRun)((DataPoint)h.Object).Tag;
-        IContentView view = MainFormManager.MainForm.ShowContent(run);
-        if (view != null) {
-          view.ReadOnly = this.ReadOnly;
-          view.Locked = this.Locked;
-        }
-
-        this.chart.ChartAreas[0].CursorX.SelectionStart = this.chart.ChartAreas[0].CursorX.SelectionEnd;
-        this.chart.ChartAreas[0].CursorY.SelectionStart = this.chart.ChartAreas[0].CursorY.SelectionEnd;
-      }
-      UpdateAxisLabels();
-    }
-
-    private void chart_MouseUp(object sender, MouseEventArgs e) {
-      if (isSelecting) {
-        System.Windows.Forms.DataVisualization.Charting.Cursor xCursor = chart.ChartAreas[0].CursorX;
-        System.Windows.Forms.DataVisualization.Charting.Cursor yCursor = chart.ChartAreas[0].CursorY;
-
-        double minX = Math.Min(xCursor.SelectionStart, xCursor.SelectionEnd);
-        double maxX = Math.Max(xCursor.SelectionStart, xCursor.SelectionEnd);
-        double minY = Math.Min(yCursor.SelectionStart, yCursor.SelectionEnd);
-        double maxY = Math.Max(yCursor.SelectionStart, yCursor.SelectionEnd);
-
-        //check for click to select model
-        if (minX == maxX && minY == maxY) {
-          HitTestResult hitTest = chart.HitTest(e.X, e.Y);
-          if (hitTest.ChartElementType == ChartElementType.DataPoint) {
-            int pointIndex = hitTest.PointIndex;
-            IRun run = (IRun)this.chart.Series[0].Points[pointIndex].Tag;
-            run.Color = colorDialog.Color;
-          }
-        } else {
-          List<DataPoint> selectedPoints = new List<DataPoint>();
-          foreach (DataPoint p in this.chart.Series[0].Points) {
-            if (p.XValue >= minX && p.XValue < maxX &&
-              p.YValues[0] >= minY && p.YValues[0] < maxY) {
-              selectedPoints.Add(p);
-            }
-          }
-          foreach (DataPoint p in selectedPoints) {
-            IRun run = (IRun)p.Tag;
-            run.Color = colorDialog.Color;
-          }
-        }
-        this.chart.ChartAreas[0].CursorX.SelectionStart = this.chart.ChartAreas[0].CursorX.SelectionEnd;
-        this.chart.ChartAreas[0].CursorY.SelectionStart = this.chart.ChartAreas[0].CursorY.SelectionEnd;
-      }
-    }
-
-    private void chart_MouseMove(object sender, MouseEventArgs e) {
-      HitTestResult h = this.chart.HitTest(e.X, e.Y);
-      string newTooltipText = string.Empty;
-      string oldTooltipText;
-      if (h.ChartElementType == ChartElementType.DataPoint) {
-        IRun run = (IRun)((DataPoint)h.Object).Tag;
-        newTooltipText = BuildTooltip(run);
-      } else if (h.ChartElementType == ChartElementType.AxisLabels) {
-        newTooltipText = ((CustomLabel)h.Object).ToolTip;
-      }
-
-      oldTooltipText = this.tooltip.GetToolTip(chart);
-      if (newTooltipText != oldTooltipText)
-        this.tooltip.SetToolTip(chart, newTooltipText);
-    }
-
-    private string BuildTooltip(IRun run) {
-      string tooltip;
-      tooltip = run.Name + System.Environment.NewLine;
-
-      double? xValue = this.GetValue(run, (string)xAxisComboBox.SelectedItem);
-      double? yValue = this.GetValue(run, (string)yAxisComboBox.SelectedItem);
-      double? sizeValue = this.GetValue(run, (string)sizeComboBox.SelectedItem);
-
-      string xString = xValue == null ? string.Empty : xValue.Value.ToString();
-      string yString = yValue == null ? string.Empty : yValue.Value.ToString();
-      string sizeString = sizeValue == null ? string.Empty : sizeValue.Value.ToString();
-
-      //code to handle TimeSpanValues correct
-      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
-      int columnIndex = xAxisComboBox.SelectedIndex - axisDimensionCount;
-      if (xValue.HasValue && columnIndex > 0 && Content.GetValue(0, columnIndex) is TimeSpanValue) {
-        TimeSpan time = TimeSpan.FromSeconds(xValue.Value);
-        xString = string.Format("{0:00}:{1:00}:{2:00.00}", (int)time.TotalHours, time.Minutes, time.Seconds);
-      }
-      columnIndex = yAxisComboBox.SelectedIndex - axisDimensionCount;
-      if (yValue.HasValue && columnIndex > 0 && Content.GetValue(0, columnIndex) is TimeSpanValue) {
-        TimeSpan time = TimeSpan.FromSeconds(yValue.Value);
-        yString = string.Format("{0:00}:{1:00}:{2:00.00}", (int)time.TotalHours, time.Minutes, time.Seconds);
-      }
-
-      tooltip += xAxisComboBox.SelectedItem + " : " + xString + Environment.NewLine;
-      tooltip += yAxisComboBox.SelectedItem + " : " + yString + Environment.NewLine;
-      tooltip += sizeComboBox.SelectedItem + " : " + sizeString + Environment.NewLine;
-
-      return tooltip;
-    }
-    #endregion
-
-    #region GUI events and updating
-    private double GetXJitter(IRun run) {
-      if (!this.xJitter.ContainsKey(run))
-        this.xJitter[run] = random.NextDouble() * 2.0 - 1.0;
-      return this.xJitter[run];
-    }
-    private double GetYJitter(IRun run) {
-      if (!this.yJitter.ContainsKey(run))
-        this.yJitter[run] = random.NextDouble() * 2.0 - 1.0;
-      return this.yJitter[run];
-    }
-    private void jitterTrackBar_ValueChanged(object sender, EventArgs e) {
-      this.xJitterFactor = xTrackBar.Value / 100.0;
-      this.yJitterFactor = yTrackBar.Value / 100.0;
-      UpdateDataPointJitter();
-    }
-    private void sizeTrackBar_ValueChanged(object sender, EventArgs e) {
-      UpdateMarkerSizes();
-    }
-
-    private void AxisComboBox_SelectedValueChanged(object sender, EventArgs e) {
-      bool axisSelected = xAxisComboBox.SelectedIndex != -1 && yAxisComboBox.SelectedIndex != -1;
-      xTrackBar.Enabled = yTrackBar.Enabled = axisSelected;
-      colorXAxisButton.Enabled = colorYAxisButton.Enabled = axisSelected;
-
-      xAxisValue = (string)xAxisComboBox.SelectedItem;
-      yAxisValue = (string)yAxisComboBox.SelectedItem;
-      sizeAxisValue = (string)sizeComboBox.SelectedItem;
-
-      UpdateDataPoints();
-      UpdateAxisLabels();
-    }
-    private void UpdateAxisLabels() {
-      Axis xAxis = this.chart.ChartAreas[0].AxisX;
-      Axis yAxis = this.chart.ChartAreas[0].AxisY;
-      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
-      SetCustomAxisLabels(xAxis, xAxisComboBox.SelectedIndex - axisDimensionCount);
-      SetCustomAxisLabels(yAxis, yAxisComboBox.SelectedIndex - axisDimensionCount);
-      if (xAxisComboBox.SelectedItem != null)
-        xAxis.Title = xAxisComboBox.SelectedItem.ToString();
-      if (yAxisComboBox.SelectedItem != null)
-        yAxis.Title = yAxisComboBox.SelectedItem.ToString();
-    }
-
-    private void chart_AxisViewChanged(object sender, System.Windows.Forms.DataVisualization.Charting.ViewEventArgs e) {
-      this.UpdateAxisLabels();
-    }
-
-    private void SetCustomAxisLabels(Axis axis, int dimension) {
-      axis.CustomLabels.Clear();
-      if (categoricalMapping.ContainsKey(dimension)) {
-        foreach (var pair in categoricalMapping[dimension]) {
-          string labelText = pair.Key.ToString();
-          CustomLabel label = new CustomLabel();
-          label.ToolTip = labelText;
-          if (labelText.Length > 25)
-            labelText = labelText.Substring(0, 25) + " ... ";
-          label.Text = labelText;
-          label.GridTicks = GridTickTypes.TickMark;
-          label.FromPosition = pair.Value - 0.5;
-          label.ToPosition = pair.Value + 0.5;
-          axis.CustomLabels.Add(label);
-        }
-      } else if (dimension > 0 && Content.GetValue(0, dimension) is TimeSpanValue) {
-        this.chart.ChartAreas[0].RecalculateAxesScale();
-        for (double i = axis.Minimum; i <= axis.Maximum; i += axis.LabelStyle.Interval) {
-          TimeSpan time = TimeSpan.FromSeconds(i);
-          string x = string.Format("{0:00}:{1:00}:{2:00}", time.Hours, time.Minutes, time.Seconds);
-          axis.CustomLabels.Add(i - axis.LabelStyle.Interval / 2, i + axis.LabelStyle.Interval / 2, x);
-        }
-      }
-    }
-
-    private void zoomButton_CheckedChanged(object sender, EventArgs e) {
-      this.isSelecting = selectButton.Checked;
-      this.colorButton.Enabled = this.isSelecting;
-      this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = !isSelecting;
-      this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = !isSelecting;
-    }
-    private void colorButton_Click(object sender, EventArgs e) {
-      if (colorDialog.ShowDialog(this) == DialogResult.OK) {
-        this.colorButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color);
-      }
-    }
-    private Image GenerateImage(int width, int height, Color fillColor) {
-      Image colorImage = new Bitmap(width, height);
-      using (Graphics gfx = Graphics.FromImage(colorImage)) {
-        using (SolidBrush brush = new SolidBrush(fillColor)) {
-          gfx.FillRectangle(brush, 0, 0, width, height);
-        }
-      }
-      return colorImage;
-    }
-
-    private IRun runToHide = null;
-    private void ContextMenuStrip_Opening(object sender, System.ComponentModel.CancelEventArgs e) {
-      var pos = Control.MousePosition;
-      var chartPos = chart.PointToClient(pos);
-
-      HitTestResult h = this.chart.HitTest(chartPos.X, chartPos.Y);
-      if (h.ChartElementType == ChartElementType.DataPoint) {
-        runToHide = (IRun)((DataPoint)h.Object).Tag;
-        hideRunToolStripMenuItem.Visible = true;
-      } else {
-        runToHide = null;
-        hideRunToolStripMenuItem.Visible = false;
-      }
-
-    }
-    private void hideRunToolStripMenuItem_Click(object sender, EventArgs e) {
-      var constraint = Content.Constraints.OfType<RunCollectionContentConstraint>().Where(c => c.Active).FirstOrDefault();
-      if (constraint == null) {
-        constraint = new RunCollectionContentConstraint();
-        Content.Constraints.Add(constraint);
-        constraint.Active = true;
-      }
-      constraint.ConstraintData.Add(runToHide);
-    }
-
-    private void openBoxPlotViewToolStripMenuItem_Click(object sender, EventArgs e) {
-      RunCollectionBoxPlotView boxplotView = new RunCollectionBoxPlotView();
-      boxplotView.Content = this.Content;
-      boxplotView.xAxisComboBox.SelectedItem = xAxisComboBox.SelectedItem;
-      boxplotView.yAxisComboBox.SelectedItem = yAxisComboBox.SelectedItem;
-      boxplotView.Show();
-    }
-    #endregion
-
-    #region Automatic coloring
-    private void colorXAxisButton_Click(object sender, EventArgs e) {
-      ColorRuns(xAxisValue);
-    }
-
-    private void colorYAxisButton_Click(object sender, EventArgs e) {
-      ColorRuns(yAxisValue);
-    }
-
-    private void ColorRuns(string axisValue) {
-      var runs = Content.Select(r => new { Run = r, Value = GetValue(r, axisValue) }).Where(r => r.Value.HasValue);
-      double minValue = runs.Min(r => r.Value.Value);
-      double maxValue = runs.Max(r => r.Value.Value);
-      double range = maxValue - minValue;
-
-      foreach (var r in runs) {
-        int colorIndex = 0;
-        if (!range.IsAlmost(0)) colorIndex = (int)((ColorGradient.Colors.Count - 1) * (r.Value.Value - minValue) / (range));
-        r.Run.Color = ColorGradient.Colors[colorIndex];
-      }
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionColumnConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionColumnConstraintView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,143 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Optimization.Views {
-  partial class RunCollectionColumnConstraintView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.lblConstrainedMember = new System.Windows.Forms.Label();
-      this.lblComparisonOperation = new System.Windows.Forms.Label();
-      this.lblCompareValue = new System.Windows.Forms.Label();
-      this.cmbConstraintOperation = new System.Windows.Forms.ComboBox();
-      this.chbActive = new System.Windows.Forms.CheckBox();
-      this.cmbConstraintColumn = new System.Windows.Forms.ComboBox();
-      this.SuspendLayout();
-      // 
-      // lblConstrainedMember
-      // 
-      this.lblConstrainedMember.AutoSize = true;
-      this.lblConstrainedMember.Location = new System.Drawing.Point(3, 6);
-      this.lblConstrainedMember.Name = "lblConstrainedMember";
-      this.lblConstrainedMember.Size = new System.Drawing.Size(107, 13);
-      this.lblConstrainedMember.TabIndex = 0;
-      this.lblConstrainedMember.Text = "Constrained Member:";
-      // 
-      // lblComparisonOperation
-      // 
-      this.lblComparisonOperation.AutoSize = true;
-      this.lblComparisonOperation.Location = new System.Drawing.Point(3, 32);
-      this.lblComparisonOperation.Name = "lblComparisonOperation";
-      this.lblComparisonOperation.Size = new System.Drawing.Size(106, 13);
-      this.lblComparisonOperation.TabIndex = 1;
-      this.lblComparisonOperation.Text = "Constraint Operation:";
-      // 
-      // lblCompareValue
-      // 
-      this.lblCompareValue.AutoSize = true;
-      this.lblCompareValue.Location = new System.Drawing.Point(3, 59);
-      this.lblCompareValue.Name = "lblCompareValue";
-      this.lblCompareValue.Size = new System.Drawing.Size(83, 13);
-      this.lblCompareValue.TabIndex = 2;
-      this.lblCompareValue.Text = "Constraint Data:";
-      // 
-      // cmbConstraintOperation
-      // 
-      this.cmbConstraintOperation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.cmbConstraintOperation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.cmbConstraintOperation.FormattingEnabled = true;
-      this.cmbConstraintOperation.Location = new System.Drawing.Point(127, 29);
-      this.cmbConstraintOperation.Name = "cmbConstraintOperation";
-      this.cmbConstraintOperation.Size = new System.Drawing.Size(246, 21);
-      this.cmbConstraintOperation.TabIndex = 4;
-      this.cmbConstraintOperation.SelectedIndexChanged += new System.EventHandler(this.cmbComparisonOperation_SelectedIndexChanged);
-      // 
-      // chbActive
-      // 
-      this.chbActive.AutoSize = true;
-      this.chbActive.Location = new System.Drawing.Point(127, 82);
-      this.chbActive.Name = "chbActive";
-      this.chbActive.Size = new System.Drawing.Size(56, 17);
-      this.chbActive.TabIndex = 7;
-      this.chbActive.Text = "Active";
-      this.chbActive.UseVisualStyleBackColor = true;
-      this.chbActive.CheckedChanged += new System.EventHandler(this.chbActive_CheckedChanged);
-      // 
-      // cmbConstraintColumn
-      // 
-      this.cmbConstraintColumn.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.cmbConstraintColumn.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.cmbConstraintColumn.FormattingEnabled = true;
-      this.cmbConstraintColumn.Location = new System.Drawing.Point(127, 3);
-      this.cmbConstraintColumn.Name = "cmbConstraintColumn";
-      this.cmbConstraintColumn.Size = new System.Drawing.Size(246, 21);
-      this.cmbConstraintColumn.TabIndex = 8;
-      this.cmbConstraintColumn.SelectedIndexChanged += new System.EventHandler(this.cmbConstraintColumn_SelectedIndexChanged);
-      // 
-      // RunCollectionConstraintView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.cmbConstraintColumn);
-      this.Controls.Add(this.chbActive);
-      this.Controls.Add(this.cmbConstraintOperation);
-      this.Controls.Add(this.lblCompareValue);
-      this.Controls.Add(this.lblComparisonOperation);
-      this.Controls.Add(this.lblConstrainedMember);
-      this.Name = "RunCollectionConstraintView";
-      this.Size = new System.Drawing.Size(376, 102);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.Label lblConstrainedMember;
-    private System.Windows.Forms.Label lblComparisonOperation;
-    private System.Windows.Forms.Label lblCompareValue;
-    private System.Windows.Forms.CheckBox chbActive;
-    protected System.Windows.Forms.ComboBox cmbConstraintColumn;
-    protected System.Windows.Forms.ComboBox cmbConstraintOperation;
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionColumnConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionColumnConstraintView.cs	(revision 7467)
+++ 	(revision )
@@ -1,125 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Linq;
-using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
-using HeuristicLab.Data;
-using HeuristicLab.MainForm;
-
-namespace HeuristicLab.Optimization.Views {
-  [Content(typeof(IRunCollectionColumnConstraint))]
-  public partial class RunCollectionColumnConstraintView : ItemView {
-    public RunCollectionColumnConstraintView() {
-      InitializeComponent();
-    }
-
-    public new IRunCollectionColumnConstraint Content {
-      get { return (IRunCollectionColumnConstraint)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      cmbConstraintColumn.Items.Clear();
-      cmbConstraintOperation.Items.Clear();
-
-      if (Content != null) {
-        cmbConstraintOperation.Items.AddRange(Content.AllowedConstraintOperations.ToArray());
-        if (Content.ConstraintOperation != null)
-          cmbConstraintOperation.SelectedItem = Content.ConstraintOperation;
-        else if (cmbConstraintOperation.Items.Count != 0)
-          cmbConstraintOperation.SelectedIndex = 0;
-        UpdateColumnComboBox();
-        chbActive.Checked = Content.Active;
-        ReadOnly = Content.Active;
-      } else
-        chbActive.Checked = false;
-    }
-
-    protected virtual void UpdateColumnComboBox() {
-      this.cmbConstraintColumn.Items.Clear();
-      if (Content.ConstrainedValue != null) {
-        this.cmbConstraintColumn.Items.AddRange(((IStringConvertibleMatrix)Content.ConstrainedValue).ColumnNames.ToArray());
-        if (!string.IsNullOrEmpty(Content.ConstraintColumn))
-          this.cmbConstraintColumn.SelectedItem = Content.ConstraintColumn;
-      }
-    }
-
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      this.Content.ActiveChanged += new EventHandler(Content_ActiveChanged);
-      this.Content.ConstraintOperationChanged += new EventHandler(Content_ComparisonOperationChanged);
-      this.Content.ConstraintColumnChanged += new EventHandler(Content_ConstraintColumnChanged);
-      this.Content.ConstrainedValueChanged += new EventHandler(Content_ConstrainedValueChanged);
-    }
-
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      this.Content.ActiveChanged -= new EventHandler(Content_ActiveChanged);
-      this.Content.ConstraintOperationChanged -= new EventHandler(Content_ComparisonOperationChanged);
-      this.Content.ConstraintColumnChanged -= new EventHandler(Content_ConstraintColumnChanged);
-      this.Content.ConstrainedValueChanged += new EventHandler(Content_ConstrainedValueChanged);
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      cmbConstraintColumn.Enabled = !this.ReadOnly && Content != null;
-      cmbConstraintOperation.Enabled = !this.ReadOnly && Content != null;
-      chbActive.Enabled = !this.Locked && Content != null;
-    }
-
-    protected virtual void Content_ConstrainedValueChanged(object sender, EventArgs e) {
-      this.UpdateColumnComboBox();
-    }
-
-    protected virtual void Content_ConstraintColumnChanged(object sender, EventArgs e) {
-      if (Content.ConstrainedValue != null) {
-        if (cmbConstraintColumn.SelectedItem.ToString() != Content.ConstraintColumn)
-          cmbConstraintColumn.SelectedItem = Content.ConstraintColumn;
-      }
-    }
-    private void cmbConstraintColumn_SelectedIndexChanged(object sender, EventArgs e) {
-      if (Content.ConstrainedValue != null) {
-        Content.ConstraintColumn = (string)cmbConstraintColumn.SelectedItem;
-      }
-    }
-
-    protected virtual void Content_ComparisonOperationChanged(object sender, EventArgs e) {
-      if (Content.ConstraintOperation != (ConstraintOperation)this.cmbConstraintOperation.SelectedItem)
-        this.cmbConstraintOperation.SelectedItem = Content.ConstraintOperation;
-    }
-    protected virtual void cmbComparisonOperation_SelectedIndexChanged(object sender, EventArgs e) {
-      Content.ConstraintOperation = (ConstraintOperation)this.cmbConstraintOperation.SelectedItem;
-    }
-
-    protected virtual void Content_ActiveChanged(object sender, EventArgs e) {
-      if (this.chbActive.Checked != Content.Active)
-        this.chbActive.Checked = Content.Active;
-      this.ReadOnly = Content.Active;
-    }
-    protected virtual void chbActive_CheckedChanged(object sender, EventArgs e) {
-      if (Content != null)
-        Content.Active = chbActive.Checked;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionComparisonConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionComparisonConstraintView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,91 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Optimization.Views {
-  partial class RunCollectionComparisonConstraintView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      this.txtConstraintData = new System.Windows.Forms.TextBox();
-      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
-      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
-      this.SuspendLayout();
-      // 
-      // txtConstraintData
-      // 
-      this.txtConstraintData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.errorProvider.SetIconAlignment(this.txtConstraintData, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
-      this.errorProvider.SetIconPadding(this.txtConstraintData, 2);
-      this.txtConstraintData.Location = new System.Drawing.Point(127, 56);
-      this.txtConstraintData.Name = "txtConstraintData";
-      this.txtConstraintData.Size = new System.Drawing.Size(246, 20);
-      this.txtConstraintData.TabIndex = 9;
-      this.txtConstraintData.Validated += new System.EventHandler(this.txtConstraintData_Validated);
-      this.txtConstraintData.Validating += new System.ComponentModel.CancelEventHandler(this.txtConstraintData_Validating);
-      // 
-      // errorProvider
-      // 
-      this.errorProvider.ContainerControl = this;
-      // 
-      // RunCollectionComparisonConstraintView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.txtConstraintData);
-      this.errorProvider.SetIconAlignment(this, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
-      this.Name = "RunCollectionComparisonConstraintView";
-      this.Controls.SetChildIndex(this.txtConstraintData, 0);
-      this.Controls.SetChildIndex(this.cmbConstraintOperation, 0);
-      this.Controls.SetChildIndex(this.cmbConstraintColumn, 0);
-      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.TextBox txtConstraintData;
-    private System.Windows.Forms.ErrorProvider errorProvider;
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionComparisonConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionComparisonConstraintView.cs	(revision 7467)
+++ 	(revision )
@@ -1,114 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using HeuristicLab.Data;
-using HeuristicLab.MainForm;
-
-namespace HeuristicLab.Optimization.Views {
-  [Content(typeof(RunCollectionComparisonConstraint), true)]
-  public partial class RunCollectionComparisonConstraintView : RunCollectionColumnConstraintView {
-    public RunCollectionComparisonConstraintView() {
-      InitializeComponent();
-    }
-
-    public new RunCollectionComparisonConstraint Content {
-      get { return (RunCollectionComparisonConstraint)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null || Content.ConstraintData == null)
-        this.txtConstraintData.Text = string.Empty;
-      else
-        this.txtConstraintData.Text = Content.ConstraintData.GetValue();
-    }
-
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.ConstraintDataChanged += new EventHandler(Content_ConstraintDataChanged);
-    }
-
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      Content.ConstraintDataChanged -= new EventHandler(Content_ConstraintDataChanged);
-    }
-
-    protected override void UpdateColumnComboBox() {
-      this.cmbConstraintColumn.Items.Clear();
-      if (Content.ConstrainedValue != null) {
-        IStringConvertibleMatrix matrix = (IStringConvertibleMatrix)Content.ConstrainedValue;
-        foreach (string columnName in matrix.ColumnNames) {
-          IEnumerable<Type> dataTypes = Content.ConstrainedValue.GetDataType(columnName);
-          if (dataTypes.Count() == 1) {
-            Type dataType = dataTypes.First();
-            if (typeof(IStringConvertibleValue).IsAssignableFrom(dataType) && typeof(IComparable).IsAssignableFrom(dataType))
-              this.cmbConstraintColumn.Items.Add(columnName);
-          }
-        }
-        if (!string.IsNullOrEmpty(Content.ConstraintColumn)) {
-          this.cmbConstraintColumn.SelectedItem = Content.ConstraintColumn;
-          if (Content.ConstraintData != null)
-            txtConstraintData.Text = Content.ConstraintData.GetValue();
-          else
-            this.Content_ConstraintColumnChanged(cmbConstraintColumn, EventArgs.Empty);
-        }
-      }
-    }
-
-    protected override void Content_ConstraintColumnChanged(object sender, EventArgs e) {
-      base.Content_ConstraintColumnChanged(sender, e);
-      this.Content.ConstraintData = (IStringConvertibleValue)Activator.CreateInstance(Content.ConstrainedValue.GetDataType(cmbConstraintColumn.SelectedItem.ToString()).First());
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      txtConstraintData.Enabled = Content != null;
-      txtConstraintData.ReadOnly = ReadOnly;
-    }
-
-    protected virtual void Content_ConstraintDataChanged(object sender, EventArgs e) {
-      if (Content.ConstraintData != null)
-        txtConstraintData.Text = Content.ConstraintData.GetValue();
-      else
-        txtConstraintData.Text = string.Empty;
-    }
-
-    private void txtConstraintData_Validated(object sender, EventArgs e) {
-      IStringConvertibleValue value = (IStringConvertibleValue)Activator.CreateInstance(Content.ConstrainedValue.GetDataType(cmbConstraintColumn.SelectedItem.ToString()).First());
-      value.SetValue(txtConstraintData.Text);
-      Content.ConstraintData = value;
-    }
-
-    private void txtConstraintData_Validating(object sender, CancelEventArgs e) {
-      string errorMessage = string.Empty;
-      if (!Content.ConstraintData.Validate(txtConstraintData.Text, out errorMessage)) {
-        errorProvider.SetError(txtConstraintData, errorMessage);
-        e.Cancel = true;
-      } else
-        errorProvider.Clear();
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintCollectionView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintCollectionView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,53 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Optimization.Views {
-  partial class RunCollectionConstraintCollectionView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      components = new System.ComponentModel.Container();
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintCollectionView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintCollectionView.cs	(revision 7467)
+++ 	(revision )
@@ -1,87 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Drawing;
-using System.Windows.Forms;
-using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
-using HeuristicLab.PluginInfrastructure;
-
-namespace HeuristicLab.Optimization.Views {
-  [View("ConstraintCollection View")]
-  [Content(typeof(RunCollectionConstraintCollection), true)]
-  [Content(typeof(IItemCollection<IRunCollectionConstraint>), false)]
-  public partial class RunCollectionConstraintCollectionView : ItemCollectionView<IRunCollectionConstraint> {
-    public RunCollectionConstraintCollectionView() {
-      InitializeComponent();
-      itemsGroupBox.Text = "RunCollection Constraints";
-    }
-
-    protected override IRunCollectionConstraint CreateItem() {
-      if (typeSelectorDialog == null) {
-        typeSelectorDialog = new TypeSelectorDialog();
-        typeSelectorDialog.Caption = "Select RunCollection Constraint";
-        typeSelectorDialog.TypeSelector.Caption = "Available Constraints";
-        typeSelectorDialog.TypeSelector.Configure(typeof(IRunCollectionConstraint), false, true);
-      }
-
-      if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
-        try {
-          return (IRunCollectionConstraint)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
-        }
-        catch (Exception ex) {
-          ErrorHandling.ShowErrorDialog(this, ex);
-        }
-      }
-      return null;
-    }
-
-    protected override ListViewItem CreateListViewItem(IRunCollectionConstraint item) {
-      ListViewItem listViewItem = base.CreateListViewItem(item);
-      if (item != null) {
-        listViewItem.Font = item.Active ? new Font(listViewItem.Font, FontStyle.Bold) : new Font(listViewItem.Font, FontStyle.Regular);
-      }
-      return listViewItem;
-    }
-
-    protected override void DeregisterItemEvents(IRunCollectionConstraint item) {
-      item.ActiveChanged -= new EventHandler(Item_ActiveChanged);
-      base.DeregisterItemEvents(item);
-    }
-    protected override void RegisterItemEvents(IRunCollectionConstraint item) {
-      base.RegisterItemEvents(item);
-      item.ActiveChanged += new EventHandler(Item_ActiveChanged);
-    }
-
-    protected virtual void Item_ActiveChanged(object sender, EventArgs e) {
-      IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender;
-      foreach (ListViewItem listViewItem in GetListViewItemsForItem(constraint)) {
-        if (constraint.Active)
-          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Bold);
-        else
-          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Regular);
-      }
-      this.AdjustListViewColumnSizes();
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionColumnConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionColumnConstraintView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionColumnConstraintView.Designer.cs	(revision 7469)
@@ -0,0 +1,143 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization.Views {
+  partial class RunCollectionColumnConstraintView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.lblConstrainedMember = new System.Windows.Forms.Label();
+      this.lblComparisonOperation = new System.Windows.Forms.Label();
+      this.lblCompareValue = new System.Windows.Forms.Label();
+      this.cmbConstraintOperation = new System.Windows.Forms.ComboBox();
+      this.chbActive = new System.Windows.Forms.CheckBox();
+      this.cmbConstraintColumn = new System.Windows.Forms.ComboBox();
+      this.SuspendLayout();
+      // 
+      // lblConstrainedMember
+      // 
+      this.lblConstrainedMember.AutoSize = true;
+      this.lblConstrainedMember.Location = new System.Drawing.Point(3, 6);
+      this.lblConstrainedMember.Name = "lblConstrainedMember";
+      this.lblConstrainedMember.Size = new System.Drawing.Size(107, 13);
+      this.lblConstrainedMember.TabIndex = 0;
+      this.lblConstrainedMember.Text = "Constrained Member:";
+      // 
+      // lblComparisonOperation
+      // 
+      this.lblComparisonOperation.AutoSize = true;
+      this.lblComparisonOperation.Location = new System.Drawing.Point(3, 32);
+      this.lblComparisonOperation.Name = "lblComparisonOperation";
+      this.lblComparisonOperation.Size = new System.Drawing.Size(106, 13);
+      this.lblComparisonOperation.TabIndex = 1;
+      this.lblComparisonOperation.Text = "Constraint Operation:";
+      // 
+      // lblCompareValue
+      // 
+      this.lblCompareValue.AutoSize = true;
+      this.lblCompareValue.Location = new System.Drawing.Point(3, 59);
+      this.lblCompareValue.Name = "lblCompareValue";
+      this.lblCompareValue.Size = new System.Drawing.Size(83, 13);
+      this.lblCompareValue.TabIndex = 2;
+      this.lblCompareValue.Text = "Constraint Data:";
+      // 
+      // cmbConstraintOperation
+      // 
+      this.cmbConstraintOperation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.cmbConstraintOperation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.cmbConstraintOperation.FormattingEnabled = true;
+      this.cmbConstraintOperation.Location = new System.Drawing.Point(127, 29);
+      this.cmbConstraintOperation.Name = "cmbConstraintOperation";
+      this.cmbConstraintOperation.Size = new System.Drawing.Size(246, 21);
+      this.cmbConstraintOperation.TabIndex = 4;
+      this.cmbConstraintOperation.SelectedIndexChanged += new System.EventHandler(this.cmbComparisonOperation_SelectedIndexChanged);
+      // 
+      // chbActive
+      // 
+      this.chbActive.AutoSize = true;
+      this.chbActive.Location = new System.Drawing.Point(127, 82);
+      this.chbActive.Name = "chbActive";
+      this.chbActive.Size = new System.Drawing.Size(56, 17);
+      this.chbActive.TabIndex = 7;
+      this.chbActive.Text = "Active";
+      this.chbActive.UseVisualStyleBackColor = true;
+      this.chbActive.CheckedChanged += new System.EventHandler(this.chbActive_CheckedChanged);
+      // 
+      // cmbConstraintColumn
+      // 
+      this.cmbConstraintColumn.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.cmbConstraintColumn.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.cmbConstraintColumn.FormattingEnabled = true;
+      this.cmbConstraintColumn.Location = new System.Drawing.Point(127, 3);
+      this.cmbConstraintColumn.Name = "cmbConstraintColumn";
+      this.cmbConstraintColumn.Size = new System.Drawing.Size(246, 21);
+      this.cmbConstraintColumn.TabIndex = 8;
+      this.cmbConstraintColumn.SelectedIndexChanged += new System.EventHandler(this.cmbConstraintColumn_SelectedIndexChanged);
+      // 
+      // RunCollectionConstraintView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.cmbConstraintColumn);
+      this.Controls.Add(this.chbActive);
+      this.Controls.Add(this.cmbConstraintOperation);
+      this.Controls.Add(this.lblCompareValue);
+      this.Controls.Add(this.lblComparisonOperation);
+      this.Controls.Add(this.lblConstrainedMember);
+      this.Name = "RunCollectionConstraintView";
+      this.Size = new System.Drawing.Size(376, 102);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label lblConstrainedMember;
+    private System.Windows.Forms.Label lblComparisonOperation;
+    private System.Windows.Forms.Label lblCompareValue;
+    private System.Windows.Forms.CheckBox chbActive;
+    protected System.Windows.Forms.ComboBox cmbConstraintColumn;
+    protected System.Windows.Forms.ComboBox cmbConstraintOperation;
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionColumnConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionColumnConstraintView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionColumnConstraintView.cs	(revision 7469)
@@ -0,0 +1,125 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Optimization.Views {
+  [Content(typeof(IRunCollectionColumnConstraint))]
+  public partial class RunCollectionColumnConstraintView : ItemView {
+    public RunCollectionColumnConstraintView() {
+      InitializeComponent();
+    }
+
+    public new IRunCollectionColumnConstraint Content {
+      get { return (IRunCollectionColumnConstraint)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      cmbConstraintColumn.Items.Clear();
+      cmbConstraintOperation.Items.Clear();
+
+      if (Content != null) {
+        cmbConstraintOperation.Items.AddRange(Content.AllowedConstraintOperations.ToArray());
+        if (Content.ConstraintOperation != null)
+          cmbConstraintOperation.SelectedItem = Content.ConstraintOperation;
+        else if (cmbConstraintOperation.Items.Count != 0)
+          cmbConstraintOperation.SelectedIndex = 0;
+        UpdateColumnComboBox();
+        chbActive.Checked = Content.Active;
+        ReadOnly = Content.Active;
+      } else
+        chbActive.Checked = false;
+    }
+
+    protected virtual void UpdateColumnComboBox() {
+      this.cmbConstraintColumn.Items.Clear();
+      if (Content.ConstrainedValue != null) {
+        this.cmbConstraintColumn.Items.AddRange(((IStringConvertibleMatrix)Content.ConstrainedValue).ColumnNames.ToArray());
+        if (!string.IsNullOrEmpty(Content.ConstraintColumn))
+          this.cmbConstraintColumn.SelectedItem = Content.ConstraintColumn;
+      }
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      this.Content.ActiveChanged += new EventHandler(Content_ActiveChanged);
+      this.Content.ConstraintOperationChanged += new EventHandler(Content_ComparisonOperationChanged);
+      this.Content.ConstraintColumnChanged += new EventHandler(Content_ConstraintColumnChanged);
+      this.Content.ConstrainedValueChanged += new EventHandler(Content_ConstrainedValueChanged);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      this.Content.ActiveChanged -= new EventHandler(Content_ActiveChanged);
+      this.Content.ConstraintOperationChanged -= new EventHandler(Content_ComparisonOperationChanged);
+      this.Content.ConstraintColumnChanged -= new EventHandler(Content_ConstraintColumnChanged);
+      this.Content.ConstrainedValueChanged += new EventHandler(Content_ConstrainedValueChanged);
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      cmbConstraintColumn.Enabled = !this.ReadOnly && Content != null;
+      cmbConstraintOperation.Enabled = !this.ReadOnly && Content != null;
+      chbActive.Enabled = !this.Locked && Content != null;
+    }
+
+    protected virtual void Content_ConstrainedValueChanged(object sender, EventArgs e) {
+      this.UpdateColumnComboBox();
+    }
+
+    protected virtual void Content_ConstraintColumnChanged(object sender, EventArgs e) {
+      if (Content.ConstrainedValue != null) {
+        if (cmbConstraintColumn.SelectedItem.ToString() != Content.ConstraintColumn)
+          cmbConstraintColumn.SelectedItem = Content.ConstraintColumn;
+      }
+    }
+    private void cmbConstraintColumn_SelectedIndexChanged(object sender, EventArgs e) {
+      if (Content.ConstrainedValue != null) {
+        Content.ConstraintColumn = (string)cmbConstraintColumn.SelectedItem;
+      }
+    }
+
+    protected virtual void Content_ComparisonOperationChanged(object sender, EventArgs e) {
+      if (Content.ConstraintOperation != (ConstraintOperation)this.cmbConstraintOperation.SelectedItem)
+        this.cmbConstraintOperation.SelectedItem = Content.ConstraintOperation;
+    }
+    protected virtual void cmbComparisonOperation_SelectedIndexChanged(object sender, EventArgs e) {
+      Content.ConstraintOperation = (ConstraintOperation)this.cmbConstraintOperation.SelectedItem;
+    }
+
+    protected virtual void Content_ActiveChanged(object sender, EventArgs e) {
+      if (this.chbActive.Checked != Content.Active)
+        this.chbActive.Checked = Content.Active;
+      this.ReadOnly = Content.Active;
+    }
+    protected virtual void chbActive_CheckedChanged(object sender, EventArgs e) {
+      if (Content != null)
+        Content.Active = chbActive.Checked;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionComparisonConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionComparisonConstraintView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionComparisonConstraintView.Designer.cs	(revision 7469)
@@ -0,0 +1,91 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization.Views {
+  partial class RunCollectionComparisonConstraintView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.txtConstraintData = new System.Windows.Forms.TextBox();
+      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // txtConstraintData
+      // 
+      this.txtConstraintData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.errorProvider.SetIconAlignment(this.txtConstraintData, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.txtConstraintData, 2);
+      this.txtConstraintData.Location = new System.Drawing.Point(127, 56);
+      this.txtConstraintData.Name = "txtConstraintData";
+      this.txtConstraintData.Size = new System.Drawing.Size(246, 20);
+      this.txtConstraintData.TabIndex = 9;
+      this.txtConstraintData.Validated += new System.EventHandler(this.txtConstraintData_Validated);
+      this.txtConstraintData.Validating += new System.ComponentModel.CancelEventHandler(this.txtConstraintData_Validating);
+      // 
+      // errorProvider
+      // 
+      this.errorProvider.ContainerControl = this;
+      // 
+      // RunCollectionComparisonConstraintView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.txtConstraintData);
+      this.errorProvider.SetIconAlignment(this, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.Name = "RunCollectionComparisonConstraintView";
+      this.Controls.SetChildIndex(this.txtConstraintData, 0);
+      this.Controls.SetChildIndex(this.cmbConstraintOperation, 0);
+      this.Controls.SetChildIndex(this.cmbConstraintColumn, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.TextBox txtConstraintData;
+    private System.Windows.Forms.ErrorProvider errorProvider;
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionComparisonConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionComparisonConstraintView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionComparisonConstraintView.cs	(revision 7469)
@@ -0,0 +1,114 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Optimization.Views {
+  [Content(typeof(RunCollectionComparisonConstraint), true)]
+  public partial class RunCollectionComparisonConstraintView : RunCollectionColumnConstraintView {
+    public RunCollectionComparisonConstraintView() {
+      InitializeComponent();
+    }
+
+    public new RunCollectionComparisonConstraint Content {
+      get { return (RunCollectionComparisonConstraint)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null || Content.ConstraintData == null)
+        this.txtConstraintData.Text = string.Empty;
+      else
+        this.txtConstraintData.Text = Content.ConstraintData.GetValue();
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ConstraintDataChanged += new EventHandler(Content_ConstraintDataChanged);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ConstraintDataChanged -= new EventHandler(Content_ConstraintDataChanged);
+    }
+
+    protected override void UpdateColumnComboBox() {
+      this.cmbConstraintColumn.Items.Clear();
+      if (Content.ConstrainedValue != null) {
+        IStringConvertibleMatrix matrix = (IStringConvertibleMatrix)Content.ConstrainedValue;
+        foreach (string columnName in matrix.ColumnNames) {
+          IEnumerable<Type> dataTypes = Content.ConstrainedValue.GetDataType(columnName);
+          if (dataTypes.Count() == 1) {
+            Type dataType = dataTypes.First();
+            if (typeof(IStringConvertibleValue).IsAssignableFrom(dataType) && typeof(IComparable).IsAssignableFrom(dataType))
+              this.cmbConstraintColumn.Items.Add(columnName);
+          }
+        }
+        if (!string.IsNullOrEmpty(Content.ConstraintColumn)) {
+          this.cmbConstraintColumn.SelectedItem = Content.ConstraintColumn;
+          if (Content.ConstraintData != null)
+            txtConstraintData.Text = Content.ConstraintData.GetValue();
+          else
+            this.Content_ConstraintColumnChanged(cmbConstraintColumn, EventArgs.Empty);
+        }
+      }
+    }
+
+    protected override void Content_ConstraintColumnChanged(object sender, EventArgs e) {
+      base.Content_ConstraintColumnChanged(sender, e);
+      this.Content.ConstraintData = (IStringConvertibleValue)Activator.CreateInstance(Content.ConstrainedValue.GetDataType(cmbConstraintColumn.SelectedItem.ToString()).First());
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      txtConstraintData.Enabled = Content != null;
+      txtConstraintData.ReadOnly = ReadOnly;
+    }
+
+    protected virtual void Content_ConstraintDataChanged(object sender, EventArgs e) {
+      if (Content.ConstraintData != null)
+        txtConstraintData.Text = Content.ConstraintData.GetValue();
+      else
+        txtConstraintData.Text = string.Empty;
+    }
+
+    private void txtConstraintData_Validated(object sender, EventArgs e) {
+      IStringConvertibleValue value = (IStringConvertibleValue)Activator.CreateInstance(Content.ConstrainedValue.GetDataType(cmbConstraintColumn.SelectedItem.ToString()).First());
+      value.SetValue(txtConstraintData.Text);
+      Content.ConstraintData = value;
+    }
+
+    private void txtConstraintData_Validating(object sender, CancelEventArgs e) {
+      string errorMessage = string.Empty;
+      if (!Content.ConstraintData.Validate(txtConstraintData.Text, out errorMessage)) {
+        errorProvider.SetError(txtConstraintData, errorMessage);
+        e.Cancel = true;
+      } else
+        errorProvider.Clear();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionConstraintCollectionView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionConstraintCollectionView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionConstraintCollectionView.Designer.cs	(revision 7469)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization.Views {
+  partial class RunCollectionConstraintCollectionView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      components = new System.ComponentModel.Container();
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionConstraintCollectionView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionConstraintCollectionView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionConstraintCollectionView.cs	(revision 7469)
@@ -0,0 +1,87 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Drawing;
+using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Optimization.Views {
+  [View("ConstraintCollection View")]
+  [Content(typeof(RunCollectionConstraintCollection), true)]
+  [Content(typeof(IItemCollection<IRunCollectionConstraint>), false)]
+  public partial class RunCollectionConstraintCollectionView : ItemCollectionView<IRunCollectionConstraint> {
+    public RunCollectionConstraintCollectionView() {
+      InitializeComponent();
+      itemsGroupBox.Text = "RunCollection Constraints";
+    }
+
+    protected override IRunCollectionConstraint CreateItem() {
+      if (typeSelectorDialog == null) {
+        typeSelectorDialog = new TypeSelectorDialog();
+        typeSelectorDialog.Caption = "Select RunCollection Constraint";
+        typeSelectorDialog.TypeSelector.Caption = "Available Constraints";
+        typeSelectorDialog.TypeSelector.Configure(typeof(IRunCollectionConstraint), false, true);
+      }
+
+      if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
+        try {
+          return (IRunCollectionConstraint)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
+        }
+        catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog(this, ex);
+        }
+      }
+      return null;
+    }
+
+    protected override ListViewItem CreateListViewItem(IRunCollectionConstraint item) {
+      ListViewItem listViewItem = base.CreateListViewItem(item);
+      if (item != null) {
+        listViewItem.Font = item.Active ? new Font(listViewItem.Font, FontStyle.Bold) : new Font(listViewItem.Font, FontStyle.Regular);
+      }
+      return listViewItem;
+    }
+
+    protected override void DeregisterItemEvents(IRunCollectionConstraint item) {
+      item.ActiveChanged -= new EventHandler(Item_ActiveChanged);
+      base.DeregisterItemEvents(item);
+    }
+    protected override void RegisterItemEvents(IRunCollectionConstraint item) {
+      base.RegisterItemEvents(item);
+      item.ActiveChanged += new EventHandler(Item_ActiveChanged);
+    }
+
+    protected virtual void Item_ActiveChanged(object sender, EventArgs e) {
+      IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender;
+      foreach (ListViewItem listViewItem in GetListViewItemsForItem(constraint)) {
+        if (constraint.Active)
+          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Bold);
+        else
+          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Regular);
+      }
+      this.AdjustListViewColumnSizes();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionContentConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionContentConstraintView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionContentConstraintView.Designer.cs	(revision 7469)
@@ -0,0 +1,93 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Windows.Forms;
+
+namespace HeuristicLab.Optimization.Views {
+  partial class RunCollectionContentConstraintView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.chbActive = new System.Windows.Forms.CheckBox();
+      this.runsView = new HeuristicLab.Optimization.Views.RunCollectionContentConstraintView.RunSetView();
+      this.SuspendLayout();
+      // 
+      // chbActive
+      // 
+      this.chbActive.AutoSize = true;
+      this.chbActive.Location = new System.Drawing.Point(3, 3);
+      this.chbActive.Name = "chbActive";
+      this.chbActive.Size = new System.Drawing.Size(56, 17);
+      this.chbActive.TabIndex = 7;
+      this.chbActive.Text = "Active";
+      this.chbActive.UseVisualStyleBackColor = true;
+      this.chbActive.CheckedChanged += new System.EventHandler(this.chbActive_CheckedChanged);
+      // 
+      // operatorSetView1
+      // 
+      this.runsView.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
+      this.runsView.Caption = "Runs View";
+      this.runsView.Content = null;
+      this.runsView.Location = new System.Drawing.Point(3, 26);
+      this.runsView.Name = "runsView";
+      this.runsView.ReadOnly = false;
+      this.runsView.Size = new System.Drawing.Size(309, 323);
+      this.runsView.TabIndex = 8;
+      // 
+      // RunCollectionContentConstraintView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.runsView);
+      this.Controls.Add(this.chbActive);
+      this.Name = "RunCollectionContentConstraintView";
+      this.Size = new System.Drawing.Size(315, 352);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.CheckBox chbActive;
+    private RunSetView runsView;
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionContentConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionContentConstraintView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionContentConstraintView.cs	(revision 7469)
@@ -0,0 +1,111 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Optimization.Views {
+  [Content(typeof(RunCollectionContentConstraint), true)]
+  public partial class RunCollectionContentConstraintView : ItemView {
+    public RunCollectionContentConstraintView() {
+      InitializeComponent();
+      runsView.ShowDetails = false;
+    }
+
+    public new RunCollectionContentConstraint Content {
+      get { return (RunCollectionContentConstraint)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content != null) {
+        chbActive.Checked = Content.Active;
+        ReadOnly = Content.Active;
+        runsView.RunCollection = Content.ConstrainedValue;
+        runsView.Content = Content.ConstraintData;
+      } else {
+        chbActive.Checked = false;
+        runsView.RunCollection = null;
+        runsView.Content = null;
+      }
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ActiveChanged += new EventHandler(Content_ActiveChanged);
+    }
+
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ActiveChanged -= new EventHandler(Content_ActiveChanged);
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      chbActive.Enabled = !Locked && Content != null;
+      runsView.Enabled = !Locked && Content != null;
+    }
+
+    protected virtual void Content_ActiveChanged(object sender, EventArgs e) {
+      chbActive.Checked = Content.Active;
+      ReadOnly = Content.Active;
+    }
+    protected virtual void chbActive_CheckedChanged(object sender, EventArgs e) {
+      if (Content != null)
+        Content.Active = chbActive.Checked;
+    }
+
+    private class RunSetView : ItemSetView<IRun> {
+      public RunCollection RunCollection { get; set; }
+
+      public RunSetView()
+        : base() {
+        addButton.Enabled = false;
+      }
+
+      protected override void SetEnabledStateOfControls() {
+        base.SetEnabledStateOfControls();
+        addButton.Enabled = false;
+      }
+
+      protected override void itemsListView_DragEnter(object sender, DragEventArgs e) {
+        base.itemsListView_DragEnter(sender, e);
+        if (RunCollection != null) {
+          var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+          foreach (var run in dropData.GetObjectGraphObjects().OfType<IRun>())
+            validDragOperation = validDragOperation && RunCollection.Contains(run);
+        }
+      }
+
+      protected override void itemsListView_DragOver(object sender, DragEventArgs e) {
+        e.Effect = DragDropEffects.None;
+        if (validDragOperation && !draggedItemsAlreadyContained) {
+          e.Effect = DragDropEffects.Link;
+        }
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionEqualityConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionEqualityConstraintView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionEqualityConstraintView.Designer.cs	(revision 7469)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization.Views {
+  partial class RunCollectionEqualityConstraintView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.txtConstraintData = new System.Windows.Forms.TextBox();
+      this.SuspendLayout();
+      // 
+      // txtConstraintData
+      // 
+      this.txtConstraintData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.txtConstraintData.Location = new System.Drawing.Point(127, 56);
+      this.txtConstraintData.Name = "txtConstraintData";
+      this.txtConstraintData.Size = new System.Drawing.Size(246, 20);
+      this.txtConstraintData.TabIndex = 9;
+      this.txtConstraintData.TextChanged += new System.EventHandler(this.txtConstraintData_TextChanged);
+      // 
+      // RunCollectionEqualityConstraintView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.txtConstraintData);
+      this.Name = "RunCollectionEqualityConstraintView";
+      this.Controls.SetChildIndex(this.txtConstraintData, 0);
+      this.Controls.SetChildIndex(this.cmbConstraintOperation, 0);
+      this.Controls.SetChildIndex(this.cmbConstraintColumn, 0);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.TextBox txtConstraintData;
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionEqualityConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionEqualityConstraintView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionEqualityConstraintView.cs	(revision 7469)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.MainForm;
+
+namespace HeuristicLab.Optimization.Views {
+  [Content(typeof(RunCollectionEqualityConstraint), true)]
+  public partial class RunCollectionEqualityConstraintView : RunCollectionColumnConstraintView {
+    public RunCollectionEqualityConstraintView() {
+      InitializeComponent();
+    }
+
+    public new RunCollectionEqualityConstraint Content {
+      get { return (RunCollectionEqualityConstraint)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null || Content.ConstraintData == null)
+        this.txtConstraintData.Text = string.Empty;
+      else
+        this.txtConstraintData.Text = Content.ConstraintData.ToString();
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      txtConstraintData.Enabled = Content != null;
+      txtConstraintData.ReadOnly = ReadOnly;
+    }
+
+    private void txtConstraintData_TextChanged(object sender, EventArgs e) {
+      if (Content != null)
+        Content.ConstraintData = txtConstraintData.Text;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionTypeCompatibilityConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionTypeCompatibilityConstraintView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionTypeCompatibilityConstraintView.Designer.cs	(revision 7469)
@@ -0,0 +1,81 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization.Views {
+  partial class RunCollectionTypeCompatibilityConstraintView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.cmbType = new System.Windows.Forms.ComboBox();
+      this.SuspendLayout();
+      // 
+      // cmbType
+      // 
+      this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.cmbType.FormattingEnabled = true;
+      this.cmbType.Location = new System.Drawing.Point(127, 55);
+      this.cmbType.Name = "cmbType";
+      this.cmbType.Size = new System.Drawing.Size(246, 21);
+      this.cmbType.TabIndex = 9;
+      this.cmbType.SelectedIndexChanged += new System.EventHandler(this.cmbType_SelectedIndexChanged);
+      // 
+      // RunCollectionTypeCompatibilityConstraintView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.cmbType);
+      this.Name = "RunCollectionTypeCompatibilityConstraintView";
+      this.Controls.SetChildIndex(this.cmbType, 0);
+      this.Controls.SetChildIndex(this.cmbConstraintOperation, 0);
+      this.Controls.SetChildIndex(this.cmbConstraintColumn, 0);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.ComboBox cmbType;
+
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionTypeCompatibilityConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionTypeCompatibilityConstraintView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintViews/RunCollectionTypeCompatibilityConstraintView.cs	(revision 7469)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.MainForm;
+
+namespace HeuristicLab.Optimization.Views {
+  [Content(typeof(RunCollectionTypeCompatibilityConstraint), true)]
+  public partial class RunCollectionTypeCompatibilityConstraintView : RunCollectionColumnConstraintView {
+    public RunCollectionTypeCompatibilityConstraintView() {
+      InitializeComponent();
+      cmbType.DisplayMember = "Name";
+    }
+
+    public new RunCollectionTypeCompatibilityConstraint Content {
+      get { return (RunCollectionTypeCompatibilityConstraint)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void Content_ConstraintColumnChanged(object sender, EventArgs e) {
+      base.Content_ConstraintColumnChanged(sender, e);
+      UpdateTypeColumn();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateTypeColumn();
+    }
+
+    protected virtual void UpdateTypeColumn() {
+      cmbType.Items.Clear();
+      if (Content != null && Content.ConstrainedValue != null) {
+        foreach (Type t in Content.ConstrainedValue.GetDataType(cmbConstraintColumn.SelectedItem.ToString()))
+          cmbType.Items.Add(t);
+        if (Content.ConstraintData != null)
+          cmbType.SelectedItem = Content.ConstraintData;
+        else if (cmbType.Items.Count > 0)
+          cmbType.SelectedIndex = 0;
+      }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      cmbType.Enabled = Content != null && !this.ReadOnly;
+    }
+
+    private void cmbType_SelectedIndexChanged(object sender, EventArgs e) {
+      if (Content != null)
+        Content.ConstraintData = (Type)cmbType.SelectedItem;
+    }
+
+    private struct ComboBoxItem {
+      public ComboBoxItem(string name, Type type) {
+        this.Name = name;
+        this.Type = type;
+      }
+      public string Name;
+      public Type Type;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionContentConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionContentConstraintView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,93 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Windows.Forms;
-
-namespace HeuristicLab.Optimization.Views {
-  partial class RunCollectionContentConstraintView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.chbActive = new System.Windows.Forms.CheckBox();
-      this.runsView = new HeuristicLab.Optimization.Views.RunCollectionContentConstraintView.RunSetView();
-      this.SuspendLayout();
-      // 
-      // chbActive
-      // 
-      this.chbActive.AutoSize = true;
-      this.chbActive.Location = new System.Drawing.Point(3, 3);
-      this.chbActive.Name = "chbActive";
-      this.chbActive.Size = new System.Drawing.Size(56, 17);
-      this.chbActive.TabIndex = 7;
-      this.chbActive.Text = "Active";
-      this.chbActive.UseVisualStyleBackColor = true;
-      this.chbActive.CheckedChanged += new System.EventHandler(this.chbActive_CheckedChanged);
-      // 
-      // operatorSetView1
-      // 
-      this.runsView.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
-      this.runsView.Caption = "Runs View";
-      this.runsView.Content = null;
-      this.runsView.Location = new System.Drawing.Point(3, 26);
-      this.runsView.Name = "runsView";
-      this.runsView.ReadOnly = false;
-      this.runsView.Size = new System.Drawing.Size(309, 323);
-      this.runsView.TabIndex = 8;
-      // 
-      // RunCollectionContentConstraintView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.runsView);
-      this.Controls.Add(this.chbActive);
-      this.Name = "RunCollectionContentConstraintView";
-      this.Size = new System.Drawing.Size(315, 352);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.CheckBox chbActive;
-    private RunSetView runsView;
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionContentConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionContentConstraintView.cs	(revision 7467)
+++ 	(revision )
@@ -1,111 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Linq;
-using System.Windows.Forms;
-using HeuristicLab.Common;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
-
-namespace HeuristicLab.Optimization.Views {
-  [Content(typeof(RunCollectionContentConstraint), true)]
-  public partial class RunCollectionContentConstraintView : ItemView {
-    public RunCollectionContentConstraintView() {
-      InitializeComponent();
-      runsView.ShowDetails = false;
-    }
-
-    public new RunCollectionContentConstraint Content {
-      get { return (RunCollectionContentConstraint)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content != null) {
-        chbActive.Checked = Content.Active;
-        ReadOnly = Content.Active;
-        runsView.RunCollection = Content.ConstrainedValue;
-        runsView.Content = Content.ConstraintData;
-      } else {
-        chbActive.Checked = false;
-        runsView.RunCollection = null;
-        runsView.Content = null;
-      }
-    }
-
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.ActiveChanged += new EventHandler(Content_ActiveChanged);
-    }
-
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      Content.ActiveChanged -= new EventHandler(Content_ActiveChanged);
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      chbActive.Enabled = !Locked && Content != null;
-      runsView.Enabled = !Locked && Content != null;
-    }
-
-    protected virtual void Content_ActiveChanged(object sender, EventArgs e) {
-      chbActive.Checked = Content.Active;
-      ReadOnly = Content.Active;
-    }
-    protected virtual void chbActive_CheckedChanged(object sender, EventArgs e) {
-      if (Content != null)
-        Content.Active = chbActive.Checked;
-    }
-
-    private class RunSetView : ItemSetView<IRun> {
-      public RunCollection RunCollection { get; set; }
-
-      public RunSetView()
-        : base() {
-        addButton.Enabled = false;
-      }
-
-      protected override void SetEnabledStateOfControls() {
-        base.SetEnabledStateOfControls();
-        addButton.Enabled = false;
-      }
-
-      protected override void itemsListView_DragEnter(object sender, DragEventArgs e) {
-        base.itemsListView_DragEnter(sender, e);
-        if (RunCollection != null) {
-          var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-          foreach (var run in dropData.GetObjectGraphObjects().OfType<IRun>())
-            validDragOperation = validDragOperation && RunCollection.Contains(run);
-        }
-      }
-
-      protected override void itemsListView_DragOver(object sender, DragEventArgs e) {
-        e.Effect = DragDropEffects.None;
-        if (validDragOperation && !draggedItemsAlreadyContained) {
-          e.Effect = DragDropEffects.Link;
-        }
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionEqualityConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionEqualityConstraintView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,78 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Optimization.Views {
-  partial class RunCollectionEqualityConstraintView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.txtConstraintData = new System.Windows.Forms.TextBox();
-      this.SuspendLayout();
-      // 
-      // txtConstraintData
-      // 
-      this.txtConstraintData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.txtConstraintData.Location = new System.Drawing.Point(127, 56);
-      this.txtConstraintData.Name = "txtConstraintData";
-      this.txtConstraintData.Size = new System.Drawing.Size(246, 20);
-      this.txtConstraintData.TabIndex = 9;
-      this.txtConstraintData.TextChanged += new System.EventHandler(this.txtConstraintData_TextChanged);
-      // 
-      // RunCollectionEqualityConstraintView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.txtConstraintData);
-      this.Name = "RunCollectionEqualityConstraintView";
-      this.Controls.SetChildIndex(this.txtConstraintData, 0);
-      this.Controls.SetChildIndex(this.cmbConstraintOperation, 0);
-      this.Controls.SetChildIndex(this.cmbConstraintColumn, 0);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.TextBox txtConstraintData;
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionEqualityConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionEqualityConstraintView.cs	(revision 7467)
+++ 	(revision )
@@ -1,56 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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 HeuristicLab.MainForm;
-
-namespace HeuristicLab.Optimization.Views {
-  [Content(typeof(RunCollectionEqualityConstraint), true)]
-  public partial class RunCollectionEqualityConstraintView : RunCollectionColumnConstraintView {
-    public RunCollectionEqualityConstraintView() {
-      InitializeComponent();
-    }
-
-    public new RunCollectionEqualityConstraint Content {
-      get { return (RunCollectionEqualityConstraint)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null || Content.ConstraintData == null)
-        this.txtConstraintData.Text = string.Empty;
-      else
-        this.txtConstraintData.Text = Content.ConstraintData.ToString();
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      txtConstraintData.Enabled = Content != null;
-      txtConstraintData.ReadOnly = ReadOnly;
-    }
-
-    private void txtConstraintData_TextChanged(object sender, EventArgs e) {
-      if (Content != null)
-        Content.ConstraintData = txtConstraintData.Text;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,72 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Optimization.Views {
-  partial class RunCollectionTabularView {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary>
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
-      this.SuspendLayout();
-      // 
-      // rowsTextBox
-      // 
-      this.errorProvider.SetIconAlignment(this.rowsTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
-      this.errorProvider.SetIconPadding(this.rowsTextBox, 2);
-      // 
-      // RunCollectionTabularView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.Name = "RunCollectionTabularView";
-      this.ShowStatisticalInformation = true;
-      this.Controls.SetChildIndex(this.rowsLabel, 0);
-      this.Controls.SetChildIndex(this.columnsLabel, 0);
-      this.Controls.SetChildIndex(this.rowsTextBox, 0);
-      this.Controls.SetChildIndex(this.columnsTextBox, 0);
-      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs	(revision 7467)
+++ 	(revision )
@@ -1,238 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows.Forms;
-using HeuristicLab.Core;
-using HeuristicLab.Data.Views;
-using HeuristicLab.MainForm;
-
-namespace HeuristicLab.Optimization.Views {
-  [View("RunCollection Tabular View")]
-  [Content(typeof(RunCollection), false)]
-  public sealed partial class RunCollectionTabularView : StringConvertibleMatrixView {
-    private int[] runToRowMapping;
-    private bool suppressUpdates = false;
-    public RunCollectionTabularView() {
-      InitializeComponent();
-      dataGridView.RowHeaderMouseDoubleClick += new DataGridViewCellMouseEventHandler(dataGridView_RowHeaderMouseDoubleClick);
-    }
-
-    public override bool ReadOnly {
-      get { return true; }
-      set { /*not needed because results are always readonly */}
-    }
-
-    public new RunCollection Content {
-      get { return (RunCollection)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content != null) {
-        runToRowMapping = Enumerable.Range(0, Content.Count).ToArray();
-        UpdateRowAttributes();
-      }
-    }
-
-    #region events
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-      Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged);
-      RegisterRunEvents(Content);
-    }
-    private void RegisterRunEvents(IEnumerable<IRun> runs) {
-      foreach (IRun run in runs)
-        run.Changed += new EventHandler(run_Changed);
-    }
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-      Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged);
-      DeregisterRunEvents(Content);
-    }
-    private void DeregisterRunEvents(IEnumerable<IRun> runs) {
-      foreach (IRun run in runs)
-        run.Changed -= new EventHandler(run_Changed);
-    }
-    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      DeregisterRunEvents(e.OldItems);
-      RegisterRunEvents(e.Items);
-    }
-    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      DeregisterRunEvents(e.Items);
-    }
-    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      RegisterRunEvents(e.Items);
-    }
-    private void run_Changed(object sender, EventArgs e) {
-      if (InvokeRequired)
-        this.Invoke(new EventHandler(run_Changed), sender, e);
-      else {
-        IRun run = (IRun)sender;
-        UpdateRun(run);
-      }
-    }
-    #endregion
-
-    protected override void UpdateColumnHeaders() {
-      HashSet<string> visibleColumnNames = new HashSet<string>(dataGridView.Columns.OfType<DataGridViewColumn>()
-       .Where(c => c.Visible && !string.IsNullOrEmpty(c.HeaderText)).Select(c => c.HeaderText));
-
-      for (int i = 0; i < dataGridView.ColumnCount; i++) {
-        if (i < base.Content.ColumnNames.Count())
-          dataGridView.Columns[i].HeaderText = base.Content.ColumnNames.ElementAt(i);
-        else
-          dataGridView.Columns[i].HeaderText = "Column " + (i + 1);
-        dataGridView.Columns[i].Visible = visibleColumnNames.Count == 0 || visibleColumnNames.Contains(dataGridView.Columns[i].HeaderText);
-      }
-    }
-
-    private void UpdateRun(IRun run) {
-      foreach (int runIndex in GetIndexOfRun(run)) {
-        int rowIndex = runToRowMapping[runIndex];
-        this.dataGridView.Rows[rowIndex].Visible = run.Visible;
-        this.dataGridView.Rows[rowIndex].DefaultCellStyle.ForeColor = run.Color;
-      }
-      this.UpdateRowHeaders();
-    }
-
-
-    private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_UpdateOfRunsInProgressChanged), sender, e);
-      else {
-        suppressUpdates = Content.UpdateOfRunsInProgress;
-        if (!suppressUpdates) UpdateRowAttributes();
-      }
-    }
-
-    private IEnumerable<int> GetIndexOfRun(IRun run) {
-      int i = 0;
-      foreach (IRun actualRun in Content) {
-        if (actualRun == run)
-          yield return i;
-        i++;
-      }
-    }
-
-    private void dataGridView_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) {
-      if (e.RowIndex >= 0) {
-        IRun run = Content.ElementAt(runToRowMapping.ToList().IndexOf(e.RowIndex));
-        IContentView view = MainFormManager.MainForm.ShowContent(run);
-        if (view != null) {
-          view.ReadOnly = this.ReadOnly;
-          view.Locked = this.Locked;
-        }
-      }
-    }
-
-    protected override void ClearSorting() {
-      base.ClearSorting();
-      runToRowMapping = Enumerable.Range(0, Content.Count).ToArray();
-      UpdateRowAttributes();
-    }
-
-    protected override int[] Sort(IEnumerable<KeyValuePair<int, SortOrder>> sortedColumns) {
-      int[] newSortedIndex = Enumerable.Range(0, Content.Count).ToArray();
-      RunCollectionRowComparer rowComparer = new RunCollectionRowComparer();
-      if (sortedColumns.Count() != 0) {
-        rowComparer.SortedIndizes = sortedColumns;
-        rowComparer.Matrix = Content;
-        Array.Sort(newSortedIndex, rowComparer);
-      }
-
-      runToRowMapping = new int[newSortedIndex.Length];
-      int i = 0;
-      foreach (int runIndex in newSortedIndex) {
-        runToRowMapping[runIndex] = i;
-        i++;
-      }
-      UpdateRowAttributes();
-      return newSortedIndex;
-    }
-
-    private void UpdateRowAttributes() {
-      int runIndex = 0;
-      foreach (IRun run in Content) {
-        int rowIndex = this.runToRowMapping[runIndex];
-        this.dataGridView.Rows[rowIndex].Visible = run.Visible;
-        this.dataGridView.Rows[rowIndex].DefaultCellStyle.ForeColor = run.Color;
-        runIndex++;
-      }
-      UpdateRowHeaders();
-    }
-
-    public class RunCollectionRowComparer : IComparer<int> {
-      public RunCollectionRowComparer() {
-      }
-
-      private List<KeyValuePair<int, SortOrder>> sortedIndizes;
-      public IEnumerable<KeyValuePair<int, SortOrder>> SortedIndizes {
-        get { return this.sortedIndizes; }
-        set { sortedIndizes = new List<KeyValuePair<int, SortOrder>>(value); }
-      }
-      private RunCollection matrix;
-      public RunCollection Matrix {
-        get { return this.matrix; }
-        set { this.matrix = value; }
-      }
-
-      public int Compare(int x, int y) {
-        int result = 0;
-        IItem value1, value2;
-        IComparable comparable1, comparable2;
-
-        if (matrix == null)
-          throw new InvalidOperationException("Could not sort IStringConvertibleMatrix if the matrix member is null.");
-        if (sortedIndizes == null)
-          return 0;
-
-        foreach (KeyValuePair<int, SortOrder> pair in sortedIndizes.Where(p => p.Value != SortOrder.None)) {
-          value1 = matrix.GetValue(x, pair.Key);
-          value2 = matrix.GetValue(y, pair.Key);
-          comparable1 = value1 as IComparable;
-          comparable2 = value2 as IComparable;
-          if (comparable1 != null)
-            result = comparable1.CompareTo(comparable2);
-          else {
-            string string1 = value1 != null ? value1.ToString() : string.Empty;
-            string string2 = value2 != null ? value2.ToString() : string.Empty;
-            result = string1.CompareTo(string2);
-          }
-          if (pair.Value == SortOrder.Descending)
-            result *= -1;
-          if (result != 0)
-            return result;
-        }
-        return result;
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTypeCompatibilityConstraintView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTypeCompatibilityConstraintView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,81 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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.Optimization.Views {
-  partial class RunCollectionTypeCompatibilityConstraintView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.cmbType = new System.Windows.Forms.ComboBox();
-      this.SuspendLayout();
-      // 
-      // cmbType
-      // 
-      this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.cmbType.FormattingEnabled = true;
-      this.cmbType.Location = new System.Drawing.Point(127, 55);
-      this.cmbType.Name = "cmbType";
-      this.cmbType.Size = new System.Drawing.Size(246, 21);
-      this.cmbType.TabIndex = 9;
-      this.cmbType.SelectedIndexChanged += new System.EventHandler(this.cmbType_SelectedIndexChanged);
-      // 
-      // RunCollectionTypeCompatibilityConstraintView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.cmbType);
-      this.Name = "RunCollectionTypeCompatibilityConstraintView";
-      this.Controls.SetChildIndex(this.cmbType, 0);
-      this.Controls.SetChildIndex(this.cmbConstraintOperation, 0);
-      this.Controls.SetChildIndex(this.cmbConstraintColumn, 0);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.ComboBox cmbType;
-
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTypeCompatibilityConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTypeCompatibilityConstraintView.cs	(revision 7467)
+++ 	(revision )
@@ -1,79 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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 HeuristicLab.MainForm;
-
-namespace HeuristicLab.Optimization.Views {
-  [Content(typeof(RunCollectionTypeCompatibilityConstraint), true)]
-  public partial class RunCollectionTypeCompatibilityConstraintView : RunCollectionColumnConstraintView {
-    public RunCollectionTypeCompatibilityConstraintView() {
-      InitializeComponent();
-      cmbType.DisplayMember = "Name";
-    }
-
-    public new RunCollectionTypeCompatibilityConstraint Content {
-      get { return (RunCollectionTypeCompatibilityConstraint)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void Content_ConstraintColumnChanged(object sender, EventArgs e) {
-      base.Content_ConstraintColumnChanged(sender, e);
-      UpdateTypeColumn();
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      UpdateTypeColumn();
-    }
-
-    protected virtual void UpdateTypeColumn() {
-      cmbType.Items.Clear();
-      if (Content != null && Content.ConstrainedValue != null) {
-        foreach (Type t in Content.ConstrainedValue.GetDataType(cmbConstraintColumn.SelectedItem.ToString()))
-          cmbType.Items.Add(t);
-        if (Content.ConstraintData != null)
-          cmbType.SelectedItem = Content.ConstraintData;
-        else if (cmbType.Items.Count > 0)
-          cmbType.SelectedIndex = 0;
-      }
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      cmbType.Enabled = Content != null && !this.ReadOnly;
-    }
-
-    private void cmbType_SelectedIndexChanged(object sender, EventArgs e) {
-      if (Content != null)
-        Content.ConstraintData = (Type)cmbType.SelectedItem;
-    }
-
-    private struct ComboBoxItem {
-      public ComboBoxItem(string name, Type type) {
-        this.Name = name;
-        this.Type = type;
-      }
-      public string Name;
-      public Type Type;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs	(revision 7467)
+++ 	(revision )
@@ -1,349 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Windows.Forms;
-
-namespace HeuristicLab.Optimization.Views {
-  partial class RunCollectionView {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary>
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      this.splitContainer = new System.Windows.Forms.SplitContainer();
-      this.showDetailsCheckBox = new System.Windows.Forms.CheckBox();
-      this.clearButton = new System.Windows.Forms.Button();
-      this.toolStrip = new System.Windows.Forms.ToolStrip();
-      this.analyzeRunsToolStripDropDownButton = new System.Windows.Forms.ToolStripDropDownButton();
-      this.itemsListView = new System.Windows.Forms.ListView();
-      this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-      this.imageList = new System.Windows.Forms.ImageList(this.components);
-      this.removeButton = new System.Windows.Forms.Button();
-      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
-      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      this.itemsGroupBox = new System.Windows.Forms.GroupBox();
-      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
-      this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
-      this.runPage = new System.Windows.Forms.TabPage();
-      this.constraintPage = new System.Windows.Forms.TabPage();
-      this.runCollectionConstraintCollectionView = new HeuristicLab.Optimization.Views.RunCollectionConstraintCollectionView();
-      this.modifiersPage = new System.Windows.Forms.TabPage();
-      this.runCollectionModifiersListView = new HeuristicLab.Optimization.Views.RunCollectionModifiersListView();
-      this.splitContainer.Panel1.SuspendLayout();
-      this.splitContainer.Panel2.SuspendLayout();
-      this.splitContainer.SuspendLayout();
-      this.toolStrip.SuspendLayout();
-      this.detailsGroupBox.SuspendLayout();
-      this.itemsGroupBox.SuspendLayout();
-      this.tabControl.SuspendLayout();
-      this.runPage.SuspendLayout();
-      this.constraintPage.SuspendLayout();
-      this.modifiersPage.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // splitContainer
-      // 
-      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
-      this.splitContainer.Location = new System.Drawing.Point(3, 16);
-      this.splitContainer.Name = "splitContainer";
-      // 
-      // splitContainer.Panel1
-      // 
-      this.splitContainer.Panel1.Controls.Add(this.showDetailsCheckBox);
-      this.splitContainer.Panel1.Controls.Add(this.clearButton);
-      this.splitContainer.Panel1.Controls.Add(this.toolStrip);
-      this.splitContainer.Panel1.Controls.Add(this.itemsListView);
-      this.splitContainer.Panel1.Controls.Add(this.removeButton);
-      this.splitContainer.Panel1MinSize = 100;
-      // 
-      // splitContainer.Panel2
-      // 
-      this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox);
-      this.splitContainer.Size = new System.Drawing.Size(512, 332);
-      this.splitContainer.SplitterDistance = 250;
-      this.splitContainer.TabIndex = 0;
-      // 
-      // showDetailsCheckBox
-      // 
-      this.showDetailsCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
-      this.showDetailsCheckBox.Checked = true;
-      this.showDetailsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
-      this.showDetailsCheckBox.Image = HeuristicLab.Common.Resources.VSImageLibrary.Properties;
-      this.showDetailsCheckBox.Location = new System.Drawing.Point(87, 3);
-      this.showDetailsCheckBox.Name = "showDetailsCheckBox";
-      this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24);
-      this.showDetailsCheckBox.TabIndex = 2;
-      this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show/Hide Details");
-      this.showDetailsCheckBox.UseVisualStyleBackColor = true;
-      this.showDetailsCheckBox.CheckedChanged += new System.EventHandler(this.showDetailsCheckBox_CheckedChanged);
-      // 
-      // clearButton
-      // 
-      this.clearButton.Enabled = false;
-      this.clearButton.Location = new System.Drawing.Point(33, 3);
-      this.clearButton.Name = "clearButton";
-      this.clearButton.Size = new System.Drawing.Size(48, 24);
-      this.clearButton.TabIndex = 1;
-      this.clearButton.Text = "&Clear";
-      this.toolTip.SetToolTip(this.clearButton, "Remove All Runs");
-      this.clearButton.UseVisualStyleBackColor = true;
-      this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
-      // 
-      // toolStrip
-      // 
-      this.toolStrip.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.toolStrip.AutoSize = false;
-      this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
-      this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
-      this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.analyzeRunsToolStripDropDownButton});
-      this.toolStrip.Location = new System.Drawing.Point(114, 3);
-      this.toolStrip.Name = "toolStrip";
-      this.toolStrip.Size = new System.Drawing.Size(133, 24);
-      this.toolStrip.TabIndex = 3;
-      this.toolStrip.Text = "toolStrip1";
-      // 
-      // analyzeRunsToolStripDropDownButton
-      // 
-      this.analyzeRunsToolStripDropDownButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
-      this.analyzeRunsToolStripDropDownButton.ImageTransparentColor = System.Drawing.Color.Magenta;
-      this.analyzeRunsToolStripDropDownButton.Name = "analyzeRunsToolStripDropDownButton";
-      this.analyzeRunsToolStripDropDownButton.Size = new System.Drawing.Size(99, 21);
-      this.analyzeRunsToolStripDropDownButton.Text = "&Analyze Runs...";
-      this.analyzeRunsToolStripDropDownButton.ToolTipText = "Show Run Analysis Views";
-      // 
-      // itemsListView
-      // 
-      this.itemsListView.AllowDrop = true;
-      this.itemsListView.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.itemsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.columnHeader1});
-      this.itemsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
-      this.itemsListView.HideSelection = false;
-      this.itemsListView.Location = new System.Drawing.Point(3, 33);
-      this.itemsListView.Name = "itemsListView";
-      this.itemsListView.ShowItemToolTips = true;
-      this.itemsListView.Size = new System.Drawing.Size(244, 295);
-      this.itemsListView.SmallImageList = this.imageList;
-      this.itemsListView.TabIndex = 4;
-      this.itemsListView.UseCompatibleStateImageBehavior = false;
-      this.itemsListView.View = System.Windows.Forms.View.Details;
-      this.itemsListView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.itemsListView_ItemDrag);
-      this.itemsListView.SelectedIndexChanged += new System.EventHandler(this.itemsListView_SelectedIndexChanged);
-      this.itemsListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragDrop);
-      this.itemsListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnter);
-      this.itemsListView.DragOver += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragOver);
-      this.itemsListView.DoubleClick += new System.EventHandler(this.itemsListView_DoubleClick);
-      this.itemsListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.itemsListView_KeyDown);
-      // 
-      // imageList
-      // 
-      this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
-      this.imageList.ImageSize = new System.Drawing.Size(16, 16);
-      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
-      // 
-      // removeButton
-      // 
-      this.removeButton.Enabled = false;
-      this.removeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Remove;
-      this.removeButton.Location = new System.Drawing.Point(3, 3);
-      this.removeButton.Name = "removeButton";
-      this.removeButton.Size = new System.Drawing.Size(24, 24);
-      this.removeButton.TabIndex = 0;
-      this.toolTip.SetToolTip(this.removeButton, "Remove");
-      this.removeButton.UseVisualStyleBackColor = true;
-      this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
-      // 
-      // detailsGroupBox
-      // 
-      this.detailsGroupBox.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.detailsGroupBox.Controls.Add(this.viewHost);
-      this.detailsGroupBox.Location = new System.Drawing.Point(3, 27);
-      this.detailsGroupBox.Name = "detailsGroupBox";
-      this.detailsGroupBox.Size = new System.Drawing.Size(252, 303);
-      this.detailsGroupBox.TabIndex = 0;
-      this.detailsGroupBox.TabStop = false;
-      this.detailsGroupBox.Text = "Details";
-      // 
-      // viewHost
-      // 
-      this.viewHost.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.viewHost.Caption = "View";
-      this.viewHost.Content = null;
-      this.viewHost.Location = new System.Drawing.Point(6, 19);
-      this.viewHost.Name = "viewHost";
-      this.viewHost.ReadOnly = false;
-      this.viewHost.Size = new System.Drawing.Size(240, 278);
-      this.viewHost.TabIndex = 0;
-      this.viewHost.ViewType = null;
-      // 
-      // itemsGroupBox
-      // 
-      this.itemsGroupBox.Controls.Add(this.splitContainer);
-      this.itemsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.itemsGroupBox.Location = new System.Drawing.Point(3, 3);
-      this.itemsGroupBox.Name = "itemsGroupBox";
-      this.itemsGroupBox.Size = new System.Drawing.Size(518, 351);
-      this.itemsGroupBox.TabIndex = 0;
-      this.itemsGroupBox.TabStop = false;
-      this.itemsGroupBox.Text = "Items";
-      // 
-      // tabControl
-      // 
-      this.tabControl.Controls.Add(this.runPage);
-      this.tabControl.Controls.Add(this.constraintPage);
-      this.tabControl.Controls.Add(this.modifiersPage);
-      this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.tabControl.Location = new System.Drawing.Point(0, 0);
-      this.tabControl.Name = "tabControl";
-      this.tabControl.SelectedIndex = 0;
-      this.tabControl.Size = new System.Drawing.Size(532, 383);
-      this.tabControl.TabIndex = 0;
-      // 
-      // runPage
-      // 
-      this.runPage.Controls.Add(this.itemsGroupBox);
-      this.runPage.Location = new System.Drawing.Point(4, 22);
-      this.runPage.Name = "runPage";
-      this.runPage.Padding = new System.Windows.Forms.Padding(3);
-      this.runPage.Size = new System.Drawing.Size(524, 357);
-      this.runPage.TabIndex = 0;
-      this.runPage.Text = "Runs";
-      this.runPage.UseVisualStyleBackColor = true;
-      // 
-      // constraintPage
-      // 
-      this.constraintPage.Controls.Add(this.runCollectionConstraintCollectionView);
-      this.constraintPage.Location = new System.Drawing.Point(4, 22);
-      this.constraintPage.Name = "constraintPage";
-      this.constraintPage.Padding = new System.Windows.Forms.Padding(3);
-      this.constraintPage.Size = new System.Drawing.Size(524, 357);
-      this.constraintPage.TabIndex = 1;
-      this.constraintPage.Text = "Filtering";
-      this.constraintPage.UseVisualStyleBackColor = true;
-      // 
-      // runCollectionConstraintCollectionView
-      // 
-      this.runCollectionConstraintCollectionView.Caption = "ConstraintCollection View";
-      this.runCollectionConstraintCollectionView.Content = null;
-      this.runCollectionConstraintCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.runCollectionConstraintCollectionView.Location = new System.Drawing.Point(3, 3);
-      this.runCollectionConstraintCollectionView.Name = "runCollectionConstraintCollectionView";
-      this.runCollectionConstraintCollectionView.ReadOnly = false;
-      this.runCollectionConstraintCollectionView.Size = new System.Drawing.Size(518, 351);
-      this.runCollectionConstraintCollectionView.TabIndex = 0;
-      // 
-      // modifiersPage
-      // 
-      this.modifiersPage.Controls.Add(this.runCollectionModifiersListView);
-      this.modifiersPage.Location = new System.Drawing.Point(4, 22);
-      this.modifiersPage.Name = "modifiersPage";
-      this.modifiersPage.Padding = new System.Windows.Forms.Padding(3);
-      this.modifiersPage.Size = new System.Drawing.Size(524, 357);
-      this.modifiersPage.TabIndex = 2;
-      this.modifiersPage.Text = "Modification";
-      this.modifiersPage.UseVisualStyleBackColor = true;
-      // 
-      // runCollectionModifiersListView
-      // 
-      this.runCollectionModifiersListView.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.runCollectionModifiersListView.Caption = "Modifier View";
-      this.runCollectionModifiersListView.Content = null;
-      this.runCollectionModifiersListView.Evaluator = null;
-      this.runCollectionModifiersListView.Location = new System.Drawing.Point(3, 3);
-      this.runCollectionModifiersListView.Name = "runCollectionModifiersListView";
-      this.runCollectionModifiersListView.ReadOnly = false;
-      this.runCollectionModifiersListView.Size = new System.Drawing.Size(518, 351);
-      this.runCollectionModifiersListView.TabIndex = 0;
-      // 
-      // RunCollectionView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.Controls.Add(this.tabControl);
-      this.Name = "RunCollectionView";
-      this.Size = new System.Drawing.Size(532, 383);
-      this.splitContainer.Panel1.ResumeLayout(false);
-      this.splitContainer.Panel2.ResumeLayout(false);
-      this.splitContainer.ResumeLayout(false);
-      this.toolStrip.ResumeLayout(false);
-      this.toolStrip.PerformLayout();
-      this.detailsGroupBox.ResumeLayout(false);
-      this.itemsGroupBox.ResumeLayout(false);
-      this.tabControl.ResumeLayout(false);
-      this.runPage.ResumeLayout(false);
-      this.constraintPage.ResumeLayout(false);
-      this.modifiersPage.ResumeLayout(false);
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.SplitContainer splitContainer;
-    private System.Windows.Forms.ColumnHeader columnHeader1;
-    private GroupBox itemsGroupBox;
-    private ListView itemsListView;
-    private GroupBox detailsGroupBox;
-    private Button removeButton;
-    private ToolTip toolTip;
-    private ImageList imageList;
-    private HeuristicLab.MainForm.WindowsForms.ViewHost viewHost;
-    private ToolStrip toolStrip;
-    private ToolStripDropDownButton analyzeRunsToolStripDropDownButton;
-    private HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl;
-    private TabPage runPage;
-    private TabPage constraintPage;
-    private RunCollectionConstraintCollectionView runCollectionConstraintCollectionView;
-    private Button clearButton;
-    private CheckBox showDetailsCheckBox;
-    private TabPage modifiersPage;
-    private RunCollectionModifiersListView runCollectionModifiersListView;
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs	(revision 7467)
+++ 	(revision )
@@ -1,495 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Windows.Forms;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Optimization.Views {
-  [View("RunCollection View")]
-  [Content(typeof(RunCollection), true)]
-  [Content(typeof(IItemCollection<IRun>), false)]
-  public sealed partial class RunCollectionView : ItemView {
-    private Dictionary<IRun, List<ListViewItem>> itemListViewItemMapping;
-    private bool validDragOperation;
-
-    public new IItemCollection<IRun> Content {
-      get { return (IItemCollection<IRun>)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public RunCollection RunCollection {
-      get { return Content as RunCollection; }
-    }
-
-    public ListView ItemsListView {
-      get { return itemsListView; }
-    }
-
-    public RunCollectionView() {
-      InitializeComponent();
-      itemsGroupBox.Text = "Runs";
-      itemListViewItemMapping = new Dictionary<IRun, List<ListViewItem>>();
-      runCollectionModifiersListView.Evaluator = EvaluateModifications;
-    }
-
-    protected override void DeregisterContentEvents() {
-      Content.ItemsAdded -= new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-      foreach (IRun run in itemListViewItemMapping.Keys) {
-        DeregisterItemEvents(run);
-      }
-      base.DeregisterContentEvents();
-    }
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.ItemsAdded += new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
-      Content.ItemsRemoved += new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
-      Content.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-    }
-    private void DeregisterItemEvents(IRun item) {
-      item.ItemImageChanged -= new EventHandler(Item_ItemImageChanged);
-      item.ToStringChanged -= new EventHandler(Item_ToStringChanged);
-      item.Changed -= new EventHandler(Item_Changed);
-    }
-    private void RegisterItemEvents(IRun item) {
-      item.ItemImageChanged += new EventHandler(Item_ItemImageChanged);
-      item.ToStringChanged += new EventHandler(Item_ToStringChanged);
-      item.Changed += new EventHandler(Item_Changed);
-    }
-
-    protected override void OnInitialized(EventArgs e) {
-      base.OnInitialized(e);
-      var viewTypes = MainFormManager.GetViewTypes(typeof(RunCollection), true);
-      foreach (Type viewType in viewTypes.OrderBy(x => ViewAttribute.GetViewName(x))) {
-        if ((viewType != typeof(ItemCollectionView<IRun>)) && (viewType != typeof(ViewHost))) {
-          ToolStripMenuItem menuItem = new ToolStripMenuItem();
-          menuItem.Text = ViewAttribute.GetViewName(viewType);
-          menuItem.Tag = viewType;
-          menuItem.Click += new EventHandler(menuItem_Click);
-          analyzeRunsToolStripDropDownButton.DropDownItems.Add(menuItem);
-        }
-      }
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-
-      string selectedName = null;
-      if ((itemsListView.SelectedItems.Count == 1) && (itemsListView.SelectedItems[0].Tag != null))
-        selectedName = ((IRun)itemsListView.SelectedItems[0].Tag).Name;
-
-      itemsListView.Items.Clear();
-      itemListViewItemMapping.Clear();
-      RebuildImageList();
-      viewHost.Content = null;
-
-      if (Content != null) {
-        if (RunCollection != null) {
-          if (!tabControl.TabPages.Contains(constraintPage))
-            tabControl.TabPages.Add(constraintPage);
-          runCollectionConstraintCollectionView.Content = RunCollection.Constraints;
-          runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
-          if (!tabControl.TabPages.Contains(modifiersPage))
-            tabControl.TabPages.Add(modifiersPage);
-          runCollectionModifiersListView.Content = RunCollection.Modifiers;
-        }
-        foreach (IRun item in Content) {
-          ListViewItem listViewItem = CreateListViewItem(item);
-          AddListViewItem(listViewItem);
-          if ((selectedName != null) && item.Name.Equals(selectedName))
-            listViewItem.Selected = true;
-        }
-        AdjustListViewColumnSizes();
-      } else {
-        runCollectionConstraintCollectionView.Content = null;
-        if (tabControl.TabPages.Contains(constraintPage))
-          tabControl.TabPages.Remove(constraintPage);
-        if (tabControl.TabPages.Contains(modifiersPage))
-          tabControl.TabPages.Remove(modifiersPage);
-      }
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      if (Content == null) {
-        analyzeRunsToolStripDropDownButton.Enabled = false;
-        runCollectionConstraintCollectionView.ReadOnly = true;
-        itemsListView.Enabled = false;
-        detailsGroupBox.Enabled = false;
-        viewHost.Enabled = false;
-        removeButton.Enabled = false;
-        clearButton.Enabled = false;
-      } else {
-        analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
-        runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
-        itemsListView.Enabled = true;
-        detailsGroupBox.Enabled = itemsListView.SelectedItems.Count == 1;
-        removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && !Content.IsReadOnly && !ReadOnly;
-        clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
-        viewHost.Enabled = true;
-      }
-    }
-
-    private ListViewItem CreateListViewItem(IRun item) {
-      ListViewItem listViewItem = new ListViewItem();
-      if (item == null) {
-        listViewItem.Text = "null";
-        itemsListView.SmallImageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.Nothing);
-        listViewItem.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
-      } else {
-        listViewItem.Text = item.ToString();
-        listViewItem.ToolTipText = item.ItemName + ": " + item.ItemDescription;
-        itemsListView.SmallImageList.Images.Add(item.ItemImage);
-        listViewItem.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
-        listViewItem.Tag = item;
-
-        if (item.Visible) {
-          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Regular);
-          listViewItem.ForeColor = item.Color;
-        } else {
-          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Italic);
-          listViewItem.ForeColor = Color.LightGray;
-        }
-      }
-      return listViewItem;
-    }
-    private void AddListViewItem(ListViewItem listViewItem) {
-      if (listViewItem == null) throw new ArgumentNullException();
-      itemsListView.Items.Add(listViewItem);
-      IRun run = listViewItem.Tag as IRun;
-      if (run != null) {
-        if (!itemListViewItemMapping.ContainsKey(run)) {
-          itemListViewItemMapping.Add(run, new List<ListViewItem>());
-          RegisterItemEvents(run);
-        }
-        itemListViewItemMapping[run].Add(listViewItem);
-      }
-    }
-    private void RemoveListViewItem(ListViewItem listViewItem) {
-      if (listViewItem == null) throw new ArgumentNullException();
-      IRun run = listViewItem.Tag as IRun;
-      if (run != null) {
-        itemListViewItemMapping[run].Remove(listViewItem);
-        if (itemListViewItemMapping[run].Count == 0) {
-          DeregisterItemEvents(run);
-          itemListViewItemMapping.Remove(run);
-        }
-      }
-      listViewItem.Remove();
-    }
-    private void UpdateListViewItemImage(ListViewItem listViewItem) {
-      if (listViewItem == null) throw new ArgumentNullException();
-      IRun item = listViewItem.Tag as IRun;
-      int i = listViewItem.ImageIndex;
-      itemsListView.SmallImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
-      listViewItem.ImageIndex = -1;
-      listViewItem.ImageIndex = i;
-    }
-    private void UpdateListViewItemText(ListViewItem listViewItem) {
-      if (listViewItem == null) throw new ArgumentNullException();
-      IRun item = listViewItem.Tag as IRun;
-      listViewItem.Text = item == null ? "null" : item.ToString();
-      listViewItem.ToolTipText = item == null ? string.Empty : item.ItemName + ": " + item.ItemDescription;
-    }
-    private IEnumerable<ListViewItem> GetListViewItemsForItem(IRun item) {
-      if (item == null) {
-        List<ListViewItem> listViewItems = new List<ListViewItem>();
-        foreach (ListViewItem listViewItem in itemsListView.Items) {
-          if (listViewItem.Tag == null) listViewItems.Add(listViewItem);
-        }
-        return listViewItems;
-      } else {
-        List<ListViewItem> listViewItems = null;
-        itemListViewItemMapping.TryGetValue(item, out listViewItems);
-        return listViewItems == null ? Enumerable.Empty<ListViewItem>() : listViewItems;
-      }
-    }
-
-    #region ListView Events
-    private void itemsListView_SelectedIndexChanged(object sender, EventArgs e) {
-      removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && (Content != null) && !Content.IsReadOnly && !ReadOnly;
-      // for performance reason (multiple selection fires this handler for every selected item)
-      if (itemsListView.SelectedIndices.Count <= 1)
-        AdjustListViewColumnSizes();
-      if (showDetailsCheckBox.Checked) {
-        if (itemsListView.SelectedItems.Count == 1) {
-          IRun item = (IRun)itemsListView.SelectedItems[0].Tag;
-          detailsGroupBox.Enabled = true;
-          viewHost.Content = item;
-        } else {
-          viewHost.Content = null;
-          detailsGroupBox.Enabled = false;
-        }
-      }
-    }
-    private void itemsListView_KeyDown(object sender, KeyEventArgs e) {
-      if (e.KeyCode == Keys.Delete) {
-        if ((itemsListView.SelectedItems.Count > 0) && !Content.IsReadOnly && !ReadOnly) {
-          foreach (ListViewItem item in itemsListView.SelectedItems)
-            Content.Remove((IRun)item.Tag);
-        }
-      }
-    }
-    private void itemsListView_DoubleClick(object sender, EventArgs e) {
-      if (itemsListView.SelectedItems.Count == 1) {
-        IRun item = itemsListView.SelectedItems[0].Tag as IRun;
-        if (item != null) {
-          IContentView view = MainFormManager.MainForm.ShowContent(item);
-          if (view != null) {
-            view.ReadOnly = ReadOnly;
-            view.Locked = Locked;
-          }
-        }
-      }
-    }
-    private void itemsListView_ItemDrag(object sender, ItemDragEventArgs e) {
-      if (!Locked) {
-        List<IRun> items = new List<IRun>();
-        foreach (ListViewItem listViewItem in itemsListView.SelectedItems) {
-          IRun item = listViewItem.Tag as IRun;
-          if (item != null) items.Add(item);
-        }
-
-        if (items.Count > 0) {
-          DataObject data = new DataObject();
-          if (items.Count == 1) data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items[0]);
-          else data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items);
-          if (Content.IsReadOnly || ReadOnly) {
-            DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link);
-          } else {
-            DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move);
-            if (result.HasFlag(DragDropEffects.Move)) {
-              foreach (IRun item in items) Content.Remove(item);
-            }
-          }
-        }
-      }
-    }
-    private void itemsListView_DragEnter(object sender, DragEventArgs e) {
-      validDragOperation = false;
-      if (!Content.IsReadOnly && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IRun)) {
-        validDragOperation = true;
-      } else if (!Content.IsReadOnly && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable)) {
-        validDragOperation = true;
-        IEnumerable items = (IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-        foreach (object item in items)
-          validDragOperation = validDragOperation && (item is IRun);
-      }
-    }
-    private void itemsListView_DragOver(object sender, DragEventArgs e) {
-      e.Effect = DragDropEffects.None;
-      if (validDragOperation) {
-        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.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy;
-        else if (e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move;
-        else if (e.AllowedEffect.HasFlag(DragDropEffects.Link)) e.Effect = DragDropEffects.Link;
-      }
-    }
-    private void itemsListView_DragDrop(object sender, DragEventArgs e) {
-      if (e.Effect != DragDropEffects.None) {
-        if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IRun) {
-          IRun item = (IRun)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-          Content.Add(e.Effect.HasFlag(DragDropEffects.Copy) ? (IRun)item.Clone() : item);
-        } else if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable) {
-          IEnumerable<IRun> items = ((IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat)).Cast<IRun>();
-          if (e.Effect.HasFlag(DragDropEffects.Copy)) {
-            Cloner cloner = new Cloner();
-            items = items.Select(x => cloner.Clone(x));
-          }
-          if (RunCollection != null) {
-            RunCollection.AddRange(items);
-          } else { // the content is an IItemCollection<IRun>
-            foreach (IRun item in items)
-              Content.Add(item);
-          }
-        }
-      }
-    }
-    #endregion
-
-    #region Button Events
-    private void menuItem_Click(object sender, EventArgs e) {
-      ToolStripMenuItem menuItem = (ToolStripMenuItem)sender;
-      Type viewType = (Type)menuItem.Tag;
-      IContentView view = MainFormManager.MainForm.ShowContent(Content, viewType);
-      if (view != null) {
-        view.Locked = Locked;
-        view.ReadOnly = ReadOnly;
-      }
-    }
-    private void removeButton_Click(object sender, EventArgs e) {
-      if (itemsListView.SelectedItems.Count > 0) {
-        foreach (ListViewItem item in itemsListView.SelectedItems)
-          Content.Remove((IRun)item.Tag);
-        itemsListView.SelectedItems.Clear();
-      }
-    }
-    private void clearButton_Click(object sender, EventArgs e) {
-      Content.Clear();
-    }
-    #endregion
-
-    #region Control Events
-    private void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) {
-      if (showDetailsCheckBox.Checked) {
-        splitContainer.Panel2Collapsed = false;
-        detailsGroupBox.Enabled = itemsListView.SelectedItems.Count == 1;
-        viewHost.Content = itemsListView.SelectedItems.Count == 1 ? (IRun)itemsListView.SelectedItems[0].Tag : null;
-      } else {
-        splitContainer.Panel2Collapsed = true;
-        viewHost.Content = null;
-      }
-    }
-    private void EvaluateModifications() {
-      if (RunCollection == null)
-        return;
-      ReadOnly = true;
-      try {
-        RunCollection.Modify();
-      } finally {
-        ReadOnly = false;
-      }
-    }
-    #endregion
-
-    #region Content Events
-    private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
-      if (InvokeRequired)
-        Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded), sender, e);
-      else {
-        foreach (IRun item in e.Items)
-          AddListViewItem(CreateListViewItem(item));
-
-        AdjustListViewColumnSizes();
-        analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
-        clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
-        runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
-      }
-    }
-    private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
-      if (InvokeRequired)
-        Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved), sender, e);
-      else {
-        foreach (IRun item in e.Items) {
-          //remove only the first matching ListViewItem, because the IRun could be contained multiple times in the ItemCollection
-          ListViewItem listViewItem = GetListViewItemsForItem(item).FirstOrDefault();
-          if (listViewItem != null) RemoveListViewItem(listViewItem);
-        }
-        RebuildImageList();
-        analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
-        clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
-        runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
-      }
-    }
-    private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
-      if (InvokeRequired)
-        Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset), sender, e);
-      else {
-        foreach (IRun item in e.OldItems) {
-          //remove only the first matching ListViewItem, because the IRun could be contained multiple times in the ItemCollection
-          ListViewItem listViewItem = GetListViewItemsForItem(item).FirstOrDefault();
-          if (listViewItem != null) RemoveListViewItem(listViewItem);
-        }
-        RebuildImageList();
-        foreach (IRun item in e.Items)
-          AddListViewItem(CreateListViewItem(item));
-
-        AdjustListViewColumnSizes();
-        analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
-        clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
-        runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
-      }
-    }
-    #endregion
-
-    #region Item Events
-    private void Item_ItemImageChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Item_ItemImageChanged), sender, e);
-      else {
-        IRun item = (IRun)sender;
-        foreach (ListViewItem listViewItem in GetListViewItemsForItem(item))
-          UpdateListViewItemImage(listViewItem);
-      }
-    }
-    private void Item_ToStringChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Item_ToStringChanged), sender, e);
-      else {
-        IRun item = (IRun)sender;
-        foreach (ListViewItem listViewItem in GetListViewItemsForItem(item))
-          UpdateListViewItemText(listViewItem);
-        AdjustListViewColumnSizes();
-      }
-    }
-    private void Item_Changed(object sender, EventArgs e) {
-      if (InvokeRequired)
-        this.Invoke(new EventHandler(Item_Changed), sender, e);
-      else {
-        IRun run = (IRun)sender;
-        UpdateRun(run);
-      }
-    }
-
-    private void UpdateRun(IRun run) {
-      foreach (ListViewItem listViewItem in GetListViewItemsForItem(run)) {
-        if (run.Visible) {
-          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Regular);
-          listViewItem.ForeColor = run.Color;
-        } else {
-          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Italic);
-          listViewItem.ForeColor = Color.LightGray;
-        }
-      }
-    }
-    #endregion
-
-    #region Helpers
-    private void AdjustListViewColumnSizes() {
-      if (itemsListView.Items.Count > 0) {
-        for (int i = 0; i < itemsListView.Columns.Count; i++) {
-          itemsListView.Columns[i].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
-        }
-      }
-    }
-    private void RebuildImageList() {
-      itemsListView.SmallImageList.Images.Clear();
-      foreach (ListViewItem listViewItem in itemsListView.Items) {
-        IRun item = listViewItem.Tag as IRun;
-        itemsListView.SmallImageList.Images.Add(item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage);
-        listViewItem.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
-      }
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.Designer.cs	(revision 7469)
@@ -0,0 +1,241 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization.Views {
+  partial class RunCollectionBoxPlotView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+      System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RunCollectionBoxPlotView));
+      this.xAxisLabel = new System.Windows.Forms.Label();
+      this.xAxisComboBox = new System.Windows.Forms.ComboBox();
+      this.yAxisLabel = new System.Windows.Forms.Label();
+      this.yAxisComboBox = new System.Windows.Forms.ComboBox();
+      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
+      this.noRunsLabel = new System.Windows.Forms.Label();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.showStatisticsCheckBox = new System.Windows.Forms.CheckBox();
+      this.statisticsGroupBox = new System.Windows.Forms.GroupBox();
+      this.statisticsMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
+      this.tooltip = new System.Windows.Forms.ToolTip(this.components);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.statisticsGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // xAxisLabel
+      // 
+      this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.xAxisLabel.AutoSize = true;
+      this.xAxisLabel.Location = new System.Drawing.Point(298, 256);
+      this.xAxisLabel.Name = "xAxisLabel";
+      this.xAxisLabel.Size = new System.Drawing.Size(15, 13);
+      this.xAxisLabel.TabIndex = 12;
+      this.xAxisLabel.Text = "x:";
+      // 
+      // xAxisComboBox
+      // 
+      this.xAxisComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.xAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
+      this.xAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.xAxisComboBox.FormattingEnabled = true;
+      this.xAxisComboBox.Location = new System.Drawing.Point(319, 253);
+      this.xAxisComboBox.Name = "xAxisComboBox";
+      this.xAxisComboBox.Size = new System.Drawing.Size(221, 21);
+      this.xAxisComboBox.TabIndex = 11;
+      this.xAxisComboBox.SelectedIndexChanged += new System.EventHandler(this.AxisComboBox_SelectedIndexChanged);
+      // 
+      // yAxisLabel
+      // 
+      this.yAxisLabel.AutoSize = true;
+      this.yAxisLabel.Location = new System.Drawing.Point(3, 6);
+      this.yAxisLabel.Name = "yAxisLabel";
+      this.yAxisLabel.Size = new System.Drawing.Size(15, 13);
+      this.yAxisLabel.TabIndex = 10;
+      this.yAxisLabel.Text = "y:";
+      // 
+      // yAxisComboBox
+      // 
+      this.yAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
+      this.yAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.yAxisComboBox.FormattingEnabled = true;
+      this.yAxisComboBox.Location = new System.Drawing.Point(24, 3);
+      this.yAxisComboBox.Name = "yAxisComboBox";
+      this.yAxisComboBox.Size = new System.Drawing.Size(221, 21);
+      this.yAxisComboBox.TabIndex = 9;
+      this.yAxisComboBox.SelectedIndexChanged += new System.EventHandler(this.AxisComboBox_SelectedIndexChanged);
+      // 
+      // chart
+      // 
+      this.chart.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)));
+      chartArea1.Name = "ChartArea1";
+      this.chart.ChartAreas.Add(chartArea1);
+      this.chart.Location = new System.Drawing.Point(6, 30);
+      this.chart.Name = "chart";
+      series1.ChartArea = "ChartArea1";
+      series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.BoxPlot;
+      series1.IsVisibleInLegend = false;
+      series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
+      series1.Name = "DataSeries";
+      series1.YValuesPerPoint = 6;
+      this.chart.Series.Add(series1);
+      this.chart.Size = new System.Drawing.Size(534, 217);
+      this.chart.TabIndex = 17;
+      this.chart.Text = "chart";
+      this.chart.AxisViewChanged += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>(this.chart_AxisViewChanged);
+      this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
+      // 
+      // noRunsLabel
+      // 
+      this.noRunsLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.noRunsLabel.AutoSize = true;
+      this.noRunsLabel.Location = new System.Drawing.Point(212, 122);
+      this.noRunsLabel.Name = "noRunsLabel";
+      this.noRunsLabel.Size = new System.Drawing.Size(138, 13);
+      this.noRunsLabel.TabIndex = 22;
+      this.noRunsLabel.Text = "No runs could be displayed.";
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer.Name = "splitContainer";
+      this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.showStatisticsCheckBox);
+      this.splitContainer.Panel1.Controls.Add(this.xAxisLabel);
+      this.splitContainer.Panel1.Controls.Add(this.noRunsLabel);
+      this.splitContainer.Panel1.Controls.Add(this.yAxisLabel);
+      this.splitContainer.Panel1.Controls.Add(this.xAxisComboBox);
+      this.splitContainer.Panel1.Controls.Add(this.yAxisComboBox);
+      this.splitContainer.Panel1.Controls.Add(this.chart);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.statisticsGroupBox);
+      this.splitContainer.Size = new System.Drawing.Size(543, 416);
+      this.splitContainer.SplitterDistance = 277;
+      this.splitContainer.TabIndex = 23;
+      // 
+      // showStatisticsCheckBox
+      // 
+      this.showStatisticsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.showStatisticsCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
+      this.showStatisticsCheckBox.Checked = true;
+      this.showStatisticsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+      this.showStatisticsCheckBox.Image = HeuristicLab.Common.Resources.VSImageLibrary.Properties;
+      this.showStatisticsCheckBox.Location = new System.Drawing.Point(6, 245);
+      this.showStatisticsCheckBox.Name = "showStatisticsCheckBox";
+      this.showStatisticsCheckBox.Size = new System.Drawing.Size(24, 24);
+      this.showStatisticsCheckBox.TabIndex = 23;
+      this.tooltip.SetToolTip(this.showStatisticsCheckBox, "Show/Hide Statistics");
+      this.showStatisticsCheckBox.UseVisualStyleBackColor = true;
+      this.showStatisticsCheckBox.CheckedChanged += new System.EventHandler(this.showStatisticsCheckBox_CheckedChanged);
+      // 
+      // statisticsGroupBox
+      // 
+      this.statisticsGroupBox.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.statisticsGroupBox.Controls.Add(this.statisticsMatrixView);
+      this.statisticsGroupBox.Location = new System.Drawing.Point(3, 3);
+      this.statisticsGroupBox.Name = "statisticsGroupBox";
+      this.statisticsGroupBox.Size = new System.Drawing.Size(534, 129);
+      this.statisticsGroupBox.TabIndex = 1;
+      this.statisticsGroupBox.TabStop = false;
+      this.statisticsGroupBox.Text = "Statistics";
+      // 
+      // statisticsMatrixView
+      // 
+      this.statisticsMatrixView.Caption = "StringConvertibleMatrix View";
+      this.statisticsMatrixView.Content = null;
+      this.statisticsMatrixView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.statisticsMatrixView.Location = new System.Drawing.Point(3, 16);
+      this.statisticsMatrixView.Name = "statisticsMatrixView";
+      this.statisticsMatrixView.ReadOnly = true;
+      this.statisticsMatrixView.ShowRowsAndColumnsTextBox = false;
+      this.statisticsMatrixView.ShowStatisticalInformation = false;
+      this.statisticsMatrixView.Size = new System.Drawing.Size(528, 110);
+      this.statisticsMatrixView.TabIndex = 0;
+      // 
+      // RunCollectionBoxPlotView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.BackColor = System.Drawing.SystemColors.Window;
+      this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+      this.Controls.Add(this.splitContainer);
+      this.Name = "RunCollectionBoxPlotView";
+      this.Size = new System.Drawing.Size(543, 416);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel1.PerformLayout();
+      this.splitContainer.Panel2.ResumeLayout(false);
+      this.splitContainer.ResumeLayout(false);
+      this.statisticsGroupBox.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label xAxisLabel;
+    internal System.Windows.Forms.ComboBox xAxisComboBox;
+    private System.Windows.Forms.Label yAxisLabel;
+    internal System.Windows.Forms.ComboBox yAxisComboBox;
+    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
+    private System.Windows.Forms.Label noRunsLabel;
+    private System.Windows.Forms.SplitContainer splitContainer;
+    private Data.Views.StringConvertibleMatrixView statisticsMatrixView;
+    private System.Windows.Forms.GroupBox statisticsGroupBox;
+    private System.Windows.Forms.ToolTip tooltip;
+    protected System.Windows.Forms.CheckBox showStatisticsCheckBox;
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs	(revision 7469)
@@ -0,0 +1,433 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Optimization.Views {
+  [View("RunCollection BoxPlots")]
+  [Content(typeof(RunCollection), false)]
+  public partial class RunCollectionBoxPlotView : AsynchronousContentView {
+    private enum AxisDimension { Color = 0 }
+    private const string BoxPlotSeriesName = "BoxPlotSeries";
+    private const string BoxPlotChartAreaName = "BoxPlotChartArea";
+
+    private bool suppressUpdates = false;
+    private string xAxisValue;
+    private string yAxisValue;
+    private Dictionary<int, Dictionary<object, double>> categoricalMapping;
+    private SortedDictionary<double, Series> seriesCache;
+
+    public RunCollectionBoxPlotView() {
+      InitializeComponent();
+      categoricalMapping = new Dictionary<int, Dictionary<object, double>>();
+      seriesCache = new SortedDictionary<double, Series>();
+      chart.ChartAreas[0].Visible = false;
+      chart.Series.Clear();
+      chart.ChartAreas.Add(BoxPlotChartAreaName);
+      chart.CustomizeAllChartAreas();
+      chart.ChartAreas[BoxPlotChartAreaName].Axes.ToList().ForEach(x => { x.ScaleView.Zoomable = true; x.ScaleView.MinSize = 0; });
+      chart.ChartAreas[BoxPlotChartAreaName].CursorX.Interval = 0.5;
+      chart.ChartAreas[BoxPlotChartAreaName].CursorY.Interval = 1e-5;
+    }
+
+    public new RunCollection Content {
+      get { return (RunCollection)base.Content; }
+      set { base.Content = value; }
+    }
+    public IStringConvertibleMatrix Matrix {
+      get { return this.Content; }
+    }
+
+    #region RunCollection and Run events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Reset += new EventHandler(Content_Reset);
+      Content.ColumnNamesChanged += new EventHandler(Content_ColumnNamesChanged);
+      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+      Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged);
+      RegisterRunEvents(Content);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.Reset -= new EventHandler(Content_Reset);
+      Content.ColumnNamesChanged -= new EventHandler(Content_ColumnNamesChanged);
+      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+      Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged);
+      DeregisterRunEvents(Content);
+    }
+
+    protected virtual void RegisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed += new EventHandler(run_Changed);
+    }
+    protected virtual void DeregisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed -= new EventHandler(run_Changed);
+    }
+
+    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.OldItems);
+      RegisterRunEvents(e.Items);
+    }
+    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.Items);
+    }
+    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      RegisterRunEvents(e.Items);
+    }
+    private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_UpdateOfRunsInProgressChanged), sender, e);
+      else {
+        suppressUpdates = Content.UpdateOfRunsInProgress;
+        if (!suppressUpdates) UpdateDataPoints();
+      }
+    }
+
+    private void Content_Reset(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_Reset), sender, e);
+      else {
+        this.categoricalMapping.Clear();
+        UpdateDataPoints();
+      }
+    }
+    private void Content_ColumnNamesChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ColumnNamesChanged), sender, e);
+      else {
+        UpdateComboBoxes();
+      }
+    }
+    private void run_Changed(object sender, EventArgs e) {
+      if (InvokeRequired)
+        this.Invoke(new EventHandler(run_Changed), sender, e);
+      else if (!suppressUpdates) {
+        IRun run = (IRun)sender;
+        UpdateDataPoints();
+      }
+    }
+    #endregion
+
+    #region update comboboxes, datapoints, runs
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      this.categoricalMapping.Clear();
+      UpdateComboBoxes();
+      UpdateDataPoints();
+    }
+
+    private void UpdateComboBoxes() {
+      string selectedXAxis = (string)this.xAxisComboBox.SelectedItem;
+      string selectedYAxis = (string)this.yAxisComboBox.SelectedItem;
+      this.xAxisComboBox.Items.Clear();
+      this.yAxisComboBox.Items.Clear();
+      if (Content != null) {
+        string[] additionalAxisDimension = Enum.GetNames(typeof(AxisDimension));
+        this.xAxisComboBox.Items.AddRange(additionalAxisDimension);
+        this.xAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
+        this.yAxisComboBox.Items.AddRange(additionalAxisDimension);
+        this.yAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
+
+        bool changed = false;
+        if (selectedXAxis != null && xAxisComboBox.Items.Contains(selectedXAxis)) {
+          xAxisComboBox.SelectedItem = selectedXAxis;
+          changed = true;
+        }
+        if (selectedYAxis != null && yAxisComboBox.Items.Contains(selectedYAxis)) {
+          yAxisComboBox.SelectedItem = selectedYAxis;
+          changed = true;
+        }
+        if (changed)
+          UpdateDataPoints();
+      }
+    }
+
+    private void UpdateDataPoints() {
+      this.chart.Series.Clear();
+      this.seriesCache.Clear();
+      if (Content != null) {
+        foreach (IRun run in this.Content.Where(r => r.Visible))
+          this.AddDataPoint(run);
+        foreach (Series s in this.seriesCache.Values)
+          this.chart.Series.Add(s);
+
+        UpdateStatistics();
+        if (seriesCache.Count > 0) {
+          Series boxPlotSeries = CreateBoxPlotSeries();
+          this.chart.Series.Add(boxPlotSeries);
+        }
+
+        UpdateAxisLabels();
+      }
+      UpdateNoRunsVisibleLabel();
+    }
+
+    private void UpdateStatistics() {
+      DoubleMatrix matrix = new DoubleMatrix(9, seriesCache.Count);
+      matrix.SortableView = false;
+      List<string> columnNames = new List<string>();
+      foreach (Series series in seriesCache.Values) {
+        DataPoint datapoint = series.Points.FirstOrDefault();
+        if (datapoint != null) {
+          IRun run = (IRun)datapoint.Tag;
+          string selectedAxis = (string)xAxisComboBox.SelectedItem;
+          IItem value = null;
+
+          if (Enum.IsDefined(typeof(AxisDimension), selectedAxis)) {
+            AxisDimension axisDimension = (AxisDimension)Enum.Parse(typeof(AxisDimension), selectedAxis);
+            switch (axisDimension) {
+              case AxisDimension.Color: value = new StringValue(run.Color.ToString());
+                break;
+            }
+          } else value = Content.GetValue(run, selectedAxis);
+          string columnName = string.Empty;
+          if (value is DoubleValue || value is IntValue)
+            columnName = selectedAxis + ": ";
+          columnName += value.ToString();
+          columnNames.Add(columnName);
+        }
+      }
+      matrix.ColumnNames = columnNames;
+      matrix.RowNames = new string[] { "Count", "Minimum", "Maximum", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile" };
+
+      for (int i = 0; i < seriesCache.Count; i++) {
+        Series series = seriesCache.ElementAt(i).Value;
+        double[] seriesValues = series.Points.Select(p => p.YValues[0]).OrderBy(d => d).ToArray();
+        matrix[0, i] = seriesValues.Length;
+        matrix[1, i] = seriesValues.Min();
+        matrix[2, i] = seriesValues.Max();
+        matrix[3, i] = seriesValues.Average();
+        matrix[4, i] = seriesValues.Median();
+        matrix[5, i] = seriesValues.StandardDeviation();
+        matrix[6, i] = seriesValues.Variance();
+        matrix[7, i] = seriesValues.Percentile(0.25);
+        matrix[8, i] = seriesValues.Percentile(0.75);
+      }
+      statisticsMatrixView.Content = matrix;
+    }
+
+    private Series CreateBoxPlotSeries() {
+      Series boxPlotSeries = new Series(BoxPlotSeriesName);
+      string seriesNames = string.Concat(seriesCache.Keys.Select(x => x.ToString() + ";").ToArray());
+      seriesNames = seriesNames.Remove(seriesNames.Length - 1); //delete last ; from string
+
+      boxPlotSeries.ChartArea = BoxPlotChartAreaName;
+      boxPlotSeries.ChartType = SeriesChartType.BoxPlot;
+      boxPlotSeries["BoxPlotSeries"] = seriesNames;
+      boxPlotSeries["BoxPlotShowUnusualValues"] = "true";
+      boxPlotSeries["PointWidth"] = "0.4";
+      boxPlotSeries.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.VerticalCenter;
+      boxPlotSeries.BackSecondaryColor = System.Drawing.Color.FromArgb(130, 224, 64, 10);
+      boxPlotSeries.BorderColor = System.Drawing.Color.FromArgb(64, 64, 64);
+      boxPlotSeries.Color = System.Drawing.Color.FromArgb(224, 64, 10);
+
+      return boxPlotSeries;
+    }
+
+    private void AddDataPoint(IRun run) {
+      double? xValue;
+      double? yValue;
+
+      if (!xAxisComboBox.DroppedDown)
+        this.xAxisValue = (string)xAxisComboBox.SelectedItem;
+      if (!yAxisComboBox.DroppedDown)
+        this.yAxisValue = (string)yAxisComboBox.SelectedItem;
+
+      xValue = GetValue(run, this.xAxisValue);
+      yValue = GetValue(run, this.yAxisValue);
+
+      if (xValue.HasValue && yValue.HasValue) {
+        if (!this.seriesCache.ContainsKey(xValue.Value))
+          seriesCache[xValue.Value] = new Series(xValue.Value.ToString());
+
+        Series series = seriesCache[xValue.Value];
+        DataPoint point = new DataPoint(xValue.Value, yValue.Value);
+        point.Tag = run;
+        series.Points.Add(point);
+      }
+    }
+    #endregion
+
+    #region get values from run
+    private double? GetValue(IRun run, string columnName) {
+      if (run == null || string.IsNullOrEmpty(columnName))
+        return null;
+
+      if (Enum.IsDefined(typeof(AxisDimension), columnName)) {
+        AxisDimension axisDimension = (AxisDimension)Enum.Parse(typeof(AxisDimension), columnName);
+        return GetValue(run, axisDimension);
+      } else {
+        int columnIndex = Matrix.ColumnNames.ToList().IndexOf(columnName);
+        IItem value = Content.GetValue(run, columnIndex);
+        if (value == null)
+          return null;
+
+        DoubleValue doubleValue = value as DoubleValue;
+        IntValue intValue = value as IntValue;
+        TimeSpanValue timeSpanValue = value as TimeSpanValue;
+        double? ret = null;
+        if (doubleValue != null) {
+          if (!double.IsNaN(doubleValue.Value) && !double.IsInfinity(doubleValue.Value))
+            ret = doubleValue.Value;
+        } else if (intValue != null)
+          ret = intValue.Value;
+        else if (timeSpanValue != null) {
+          ret = timeSpanValue.Value.TotalSeconds;
+        } else
+          ret = GetCategoricalValue(columnIndex, value.ToString());
+
+        return ret;
+      }
+    }
+    private double GetCategoricalValue(int dimension, string value) {
+      if (!this.categoricalMapping.ContainsKey(dimension))
+        this.categoricalMapping[dimension] = new Dictionary<object, double>();
+      if (!this.categoricalMapping[dimension].ContainsKey(value)) {
+        if (this.categoricalMapping[dimension].Values.Count == 0)
+          this.categoricalMapping[dimension][value] = 1.0;
+        else
+          this.categoricalMapping[dimension][value] = this.categoricalMapping[dimension].Values.Max() + 1.0;
+      }
+      return this.categoricalMapping[dimension][value];
+    }
+    private double GetValue(IRun run, AxisDimension axisDimension) {
+      double value = double.NaN;
+      switch (axisDimension) {
+        case AxisDimension.Color: {
+            value = GetCategoricalValue(-1, run.Color.ToString());
+            break;
+          }
+        default: {
+            throw new ArgumentException("No handling strategy for " + axisDimension.ToString() + " is defined.");
+          }
+      }
+      return value;
+    }
+    #endregion
+
+    #region GUI events
+    private void UpdateNoRunsVisibleLabel() {
+      if (this.chart.Series.Count > 0) {
+        noRunsLabel.Visible = false;
+        showStatisticsCheckBox.Enabled = true;
+        splitContainer.Panel2Collapsed = !showStatisticsCheckBox.Checked;
+      } else {
+        noRunsLabel.Visible = true;
+        showStatisticsCheckBox.Enabled = false;
+        splitContainer.Panel2Collapsed = true;
+      }
+    }
+
+    private void AxisComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      UpdateDataPoints();
+    }
+    private void UpdateAxisLabels() {
+      Axis xAxis = this.chart.ChartAreas[BoxPlotChartAreaName].AxisX;
+      Axis yAxis = this.chart.ChartAreas[BoxPlotChartAreaName].AxisY;
+      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
+      SetCustomAxisLabels(xAxis, xAxisComboBox.SelectedIndex - axisDimensionCount);
+      SetCustomAxisLabels(yAxis, yAxisComboBox.SelectedIndex - axisDimensionCount);
+      if (xAxisComboBox.SelectedItem != null)
+        xAxis.Title = xAxisComboBox.SelectedItem.ToString();
+      if (yAxisComboBox.SelectedItem != null)
+        yAxis.Title = yAxisComboBox.SelectedItem.ToString();
+    }
+
+    private void chart_AxisViewChanged(object sender, System.Windows.Forms.DataVisualization.Charting.ViewEventArgs e) {
+      this.UpdateAxisLabels();
+    }
+
+    private void SetCustomAxisLabels(Axis axis, int dimension) {
+      axis.CustomLabels.Clear();
+      if (categoricalMapping.ContainsKey(dimension)) {
+        foreach (var pair in categoricalMapping[dimension]) {
+          string labelText = pair.Key.ToString();
+          CustomLabel label = new CustomLabel();
+          label.ToolTip = labelText;
+          if (labelText.Length > 25)
+            labelText = labelText.Substring(0, 25) + " ... ";
+          label.Text = labelText;
+          label.GridTicks = GridTickTypes.TickMark;
+          label.FromPosition = pair.Value - 0.5;
+          label.ToPosition = pair.Value + 0.5;
+          axis.CustomLabels.Add(label);
+        }
+      } else if (dimension > 0 && Content.GetValue(0, dimension) is TimeSpanValue) {
+        this.chart.ChartAreas[0].RecalculateAxesScale();
+        Axis correspondingAxis = this.chart.ChartAreas[0].Axes.Where(x => x.Name == axis.Name).SingleOrDefault();
+        if (correspondingAxis == null)
+          correspondingAxis = axis;
+        for (double i = correspondingAxis.Minimum; i <= correspondingAxis.Maximum; i += correspondingAxis.LabelStyle.Interval) {
+          TimeSpan time = TimeSpan.FromSeconds(i);
+          string x = string.Format("{0:00}:{1:00}:{2:00}", (int)time.Hours, time.Minutes, time.Seconds);
+          axis.CustomLabels.Add(i - correspondingAxis.LabelStyle.Interval / 2, i + correspondingAxis.LabelStyle.Interval / 2, x);
+        }
+      } else if (chart.ChartAreas[BoxPlotChartAreaName].AxisX == axis) {
+        double position = 1.0;
+        foreach (Series series in chart.Series) {
+          if (series.Name != BoxPlotSeriesName) {
+            string labelText = series.Points[0].XValue.ToString();
+            CustomLabel label = new CustomLabel();
+            label.FromPosition = position - 0.5;
+            label.ToPosition = position + 0.5;
+            label.GridTicks = GridTickTypes.TickMark;
+            label.Text = labelText;
+            axis.CustomLabels.Add(label);
+            position++;
+          }
+        }
+      }
+    }
+
+    private void chart_MouseMove(object sender, MouseEventArgs e) {
+      string newTooltipText = string.Empty;
+      string oldTooltipText;
+      HitTestResult h = this.chart.HitTest(e.X, e.Y);
+      if (h.ChartElementType == ChartElementType.AxisLabels) {
+        newTooltipText = ((CustomLabel)h.Object).ToolTip;
+      }
+
+      oldTooltipText = this.tooltip.GetToolTip(chart);
+      if (newTooltipText != oldTooltipText)
+        this.tooltip.SetToolTip(chart, newTooltipText);
+    }
+    #endregion
+
+    private void showStatisticsCheckBox_CheckedChanged(object sender, EventArgs e) {
+      splitContainer.Panel2Collapsed = !showStatisticsCheckBox.Checked;
+    }
+
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.Designer.cs	(revision 7469)
@@ -0,0 +1,389 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization.Views {
+  partial class RunCollectionBubbleChartView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+      System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RunCollectionBubbleChartView));
+      this.yJitterLabel = new System.Windows.Forms.Label();
+      this.xJitterlabel = new System.Windows.Forms.Label();
+      this.xTrackBar = new System.Windows.Forms.TrackBar();
+      this.xAxisLabel = new System.Windows.Forms.Label();
+      this.xAxisComboBox = new System.Windows.Forms.ComboBox();
+      this.yAxisLabel = new System.Windows.Forms.Label();
+      this.yAxisComboBox = new System.Windows.Forms.ComboBox();
+      this.yTrackBar = new System.Windows.Forms.TrackBar();
+      this.sizeComboBox = new System.Windows.Forms.ComboBox();
+      this.sizeLabel = new System.Windows.Forms.Label();
+      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
+      this.openBoxPlotViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.hideRunToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.zoomButton = new System.Windows.Forms.RadioButton();
+      this.selectButton = new System.Windows.Forms.RadioButton();
+      this.radioButtonGroup = new System.Windows.Forms.GroupBox();
+      this.colorButton = new System.Windows.Forms.Button();
+      this.colorDialog = new System.Windows.Forms.ColorDialog();
+      this.tooltip = new System.Windows.Forms.ToolTip(this.components);
+      this.colorXAxisButton = new System.Windows.Forms.Button();
+      this.colorYAxisButton = new System.Windows.Forms.Button();
+      this.noRunsLabel = new System.Windows.Forms.Label();
+      this.sizeTrackBar = new System.Windows.Forms.TrackBar();
+      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      this.radioButtonGroup.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.sizeTrackBar)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // yJitterLabel
+      // 
+      this.yJitterLabel.AutoSize = true;
+      this.yJitterLabel.Location = new System.Drawing.Point(278, 6);
+      this.yJitterLabel.Name = "yJitterLabel";
+      this.yJitterLabel.Size = new System.Drawing.Size(32, 13);
+      this.yJitterLabel.TabIndex = 13;
+      this.yJitterLabel.Text = "Jitter:";
+      // 
+      // xJitterlabel
+      // 
+      this.xJitterlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.xJitterlabel.AutoSize = true;
+      this.xJitterlabel.Location = new System.Drawing.Point(749, 472);
+      this.xJitterlabel.Name = "xJitterlabel";
+      this.xJitterlabel.Size = new System.Drawing.Size(32, 13);
+      this.xJitterlabel.TabIndex = 12;
+      this.xJitterlabel.Text = "Jitter:";
+      // 
+      // xTrackBar
+      // 
+      this.xTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.xTrackBar.Enabled = false;
+      this.xTrackBar.Location = new System.Drawing.Point(787, 469);
+      this.xTrackBar.Maximum = 100;
+      this.xTrackBar.Name = "xTrackBar";
+      this.xTrackBar.Size = new System.Drawing.Size(64, 45);
+      this.xTrackBar.TabIndex = 11;
+      this.xTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
+      this.xTrackBar.ValueChanged += new System.EventHandler(this.jitterTrackBar_ValueChanged);
+      // 
+      // xAxisLabel
+      // 
+      this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.xAxisLabel.AutoSize = true;
+      this.xAxisLabel.Location = new System.Drawing.Point(471, 472);
+      this.xAxisLabel.Name = "xAxisLabel";
+      this.xAxisLabel.Size = new System.Drawing.Size(15, 13);
+      this.xAxisLabel.TabIndex = 8;
+      this.xAxisLabel.Text = "x:";
+      // 
+      // xAxisComboBox
+      // 
+      this.xAxisComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.xAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
+      this.xAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.xAxisComboBox.FormattingEnabled = true;
+      this.xAxisComboBox.Location = new System.Drawing.Point(492, 469);
+      this.xAxisComboBox.Name = "xAxisComboBox";
+      this.xAxisComboBox.Size = new System.Drawing.Size(221, 21);
+      this.xAxisComboBox.TabIndex = 7;
+      this.xAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
+      // 
+      // yAxisLabel
+      // 
+      this.yAxisLabel.AutoSize = true;
+      this.yAxisLabel.Location = new System.Drawing.Point(3, 6);
+      this.yAxisLabel.Name = "yAxisLabel";
+      this.yAxisLabel.Size = new System.Drawing.Size(15, 13);
+      this.yAxisLabel.TabIndex = 6;
+      this.yAxisLabel.Text = "y:";
+      // 
+      // yAxisComboBox
+      // 
+      this.yAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
+      this.yAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.yAxisComboBox.FormattingEnabled = true;
+      this.yAxisComboBox.Location = new System.Drawing.Point(24, 3);
+      this.yAxisComboBox.Name = "yAxisComboBox";
+      this.yAxisComboBox.Size = new System.Drawing.Size(221, 21);
+      this.yAxisComboBox.TabIndex = 5;
+      this.yAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
+      // 
+      // yTrackBar
+      // 
+      this.yTrackBar.Enabled = false;
+      this.yTrackBar.Location = new System.Drawing.Point(312, 3);
+      this.yTrackBar.Maximum = 100;
+      this.yTrackBar.Name = "yTrackBar";
+      this.yTrackBar.Size = new System.Drawing.Size(59, 45);
+      this.yTrackBar.TabIndex = 10;
+      this.yTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
+      this.yTrackBar.ValueChanged += new System.EventHandler(this.jitterTrackBar_ValueChanged);
+      // 
+      // sizeComboBox
+      // 
+      this.sizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.sizeComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
+      this.sizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.sizeComboBox.FormattingEnabled = true;
+      this.sizeComboBox.Location = new System.Drawing.Point(560, 4);
+      this.sizeComboBox.Name = "sizeComboBox";
+      this.sizeComboBox.Size = new System.Drawing.Size(221, 21);
+      this.sizeComboBox.TabIndex = 14;
+      this.sizeComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
+      // 
+      // sizeLabel
+      // 
+      this.sizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.sizeLabel.AutoSize = true;
+      this.sizeLabel.Location = new System.Drawing.Point(489, 7);
+      this.sizeLabel.Name = "sizeLabel";
+      this.sizeLabel.Size = new System.Drawing.Size(66, 13);
+      this.sizeLabel.TabIndex = 15;
+      this.sizeLabel.Text = "Bubble Size:";
+      // 
+      // chart
+      // 
+      this.chart.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)));
+      chartArea2.Name = "ChartArea1";
+      this.chart.ChartAreas.Add(chartArea2);
+      this.chart.Location = new System.Drawing.Point(6, 30);
+      this.chart.Name = "chart";
+      series2.ChartArea = "ChartArea1";
+      series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+      series2.IsVisibleInLegend = false;
+      series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
+      series2.Name = "Bubbles";
+      series2.YValuesPerPoint = 2;
+      this.chart.Series.Add(series2);
+      this.chart.Size = new System.Drawing.Size(843, 425);
+      this.chart.TabIndex = 16;
+      this.chart.Text = "chart";
+      this.chart.AxisViewChanged += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.ViewEventArgs>(this.chart_AxisViewChanged);
+      this.chart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDoubleClick);
+      this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
+      this.chart.MouseUp += new System.Windows.Forms.MouseEventHandler(this.chart_MouseUp);
+      // 
+      // openBoxPlotViewToolStripMenuItem
+      // 
+      this.openBoxPlotViewToolStripMenuItem.Name = "openBoxPlotViewToolStripMenuItem";
+      this.openBoxPlotViewToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
+      this.openBoxPlotViewToolStripMenuItem.Text = "Open BoxPlot View";
+      this.openBoxPlotViewToolStripMenuItem.Click += new System.EventHandler(this.openBoxPlotViewToolStripMenuItem_Click);
+      //
+      // hideRunToolStripMenuItem
+      //
+      this.hideRunToolStripMenuItem.Name = "hideRunToolStripMenuItem";
+      this.hideRunToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
+      this.hideRunToolStripMenuItem.Text = "Hide Run";
+      this.hideRunToolStripMenuItem.Click += new System.EventHandler(hideRunToolStripMenuItem_Click);
+      // 
+      // zoomButton
+      // 
+      this.zoomButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.zoomButton.AutoSize = true;
+      this.zoomButton.Checked = true;
+      this.zoomButton.Location = new System.Drawing.Point(6, 10);
+      this.zoomButton.Name = "zoomButton";
+      this.zoomButton.Size = new System.Drawing.Size(52, 17);
+      this.zoomButton.TabIndex = 17;
+      this.zoomButton.TabStop = true;
+      this.zoomButton.Text = "Zoom";
+      this.zoomButton.UseVisualStyleBackColor = true;
+      this.zoomButton.CheckedChanged += new System.EventHandler(this.zoomButton_CheckedChanged);
+      // 
+      // selectButton
+      // 
+      this.selectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.selectButton.AutoSize = true;
+      this.selectButton.Location = new System.Drawing.Point(64, 9);
+      this.selectButton.Name = "selectButton";
+      this.selectButton.Size = new System.Drawing.Size(55, 17);
+      this.selectButton.TabIndex = 18;
+      this.selectButton.Text = "Select";
+      this.selectButton.UseVisualStyleBackColor = true;
+      // 
+      // radioButtonGroup
+      // 
+      this.radioButtonGroup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.radioButtonGroup.Controls.Add(this.zoomButton);
+      this.radioButtonGroup.Controls.Add(this.selectButton);
+      this.radioButtonGroup.Location = new System.Drawing.Point(3, 461);
+      this.radioButtonGroup.Name = "radioButtonGroup";
+      this.radioButtonGroup.Size = new System.Drawing.Size(135, 32);
+      this.radioButtonGroup.TabIndex = 19;
+      this.radioButtonGroup.TabStop = false;
+      // 
+      // colorButton
+      // 
+      this.colorButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.colorButton.Enabled = false;
+      this.colorButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+      this.colorButton.Location = new System.Drawing.Point(144, 469);
+      this.colorButton.Name = "colorButton";
+      this.colorButton.Size = new System.Drawing.Size(64, 21);
+      this.colorButton.TabIndex = 20;
+      this.colorButton.Text = "Color";
+      this.colorButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+      this.colorButton.UseVisualStyleBackColor = true;
+      this.colorButton.Click += new System.EventHandler(this.colorButton_Click);
+      // 
+      // colorDialog
+      // 
+      this.colorDialog.AllowFullOpen = false;
+      this.colorDialog.FullOpen = true;
+      // 
+      // colorXAxisButton
+      // 
+      this.colorXAxisButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.colorXAxisButton.Enabled = false;
+      this.colorXAxisButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.DisplayInColorVertical;
+      this.colorXAxisButton.Location = new System.Drawing.Point(719, 469);
+      this.colorXAxisButton.Name = "colorXAxisButton";
+      this.colorXAxisButton.Size = new System.Drawing.Size(21, 21);
+      this.colorXAxisButton.TabIndex = 22;
+      this.tooltip.SetToolTip(this.colorXAxisButton, "Color all runs according to their x-values");
+      this.colorXAxisButton.UseVisualStyleBackColor = true;
+      this.colorXAxisButton.Click += new System.EventHandler(this.colorXAxisButton_Click);
+      // 
+      // colorYAxisButton
+      // 
+      this.colorYAxisButton.Enabled = false;
+      this.colorYAxisButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.DisplayInColor;
+      this.colorYAxisButton.Location = new System.Drawing.Point(251, 3);
+      this.colorYAxisButton.Name = "colorYAxisButton";
+      this.colorYAxisButton.Size = new System.Drawing.Size(21, 21);
+      this.colorYAxisButton.TabIndex = 23;
+      this.tooltip.SetToolTip(this.colorYAxisButton, "Color all runs according to their y-values");
+      this.colorYAxisButton.UseVisualStyleBackColor = true;
+      this.colorYAxisButton.Click += new System.EventHandler(this.colorYAxisButton_Click);
+      // 
+      // noRunsLabel
+      // 
+      this.noRunsLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.noRunsLabel.AutoSize = true;
+      this.noRunsLabel.Location = new System.Drawing.Point(366, 228);
+      this.noRunsLabel.Name = "noRunsLabel";
+      this.noRunsLabel.Size = new System.Drawing.Size(138, 13);
+      this.noRunsLabel.TabIndex = 21;
+      this.noRunsLabel.Text = "No runs could be displayed.";
+      // 
+      // sizeTrackBar
+      // 
+      this.sizeTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.sizeTrackBar.Location = new System.Drawing.Point(787, 3);
+      this.sizeTrackBar.Maximum = 50;
+      this.sizeTrackBar.Minimum = 5;
+      this.sizeTrackBar.Name = "sizeTrackBar";
+      this.sizeTrackBar.Size = new System.Drawing.Size(64, 45);
+      this.sizeTrackBar.TabIndex = 24;
+      this.sizeTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
+      this.sizeTrackBar.Value = 10;
+      this.sizeTrackBar.ValueChanged += new System.EventHandler(this.sizeTrackBar_ValueChanged);
+      // 
+      // RunCollectionBubbleChartView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.BackColor = System.Drawing.SystemColors.Window;
+      this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+      this.Controls.Add(this.sizeTrackBar);
+      this.Controls.Add(this.colorYAxisButton);
+      this.Controls.Add(this.colorXAxisButton);
+      this.Controls.Add(this.noRunsLabel);
+      this.Controls.Add(this.colorButton);
+      this.Controls.Add(this.radioButtonGroup);
+      this.Controls.Add(this.chart);
+      this.Controls.Add(this.sizeLabel);
+      this.Controls.Add(this.sizeComboBox);
+      this.Controls.Add(this.yJitterLabel);
+      this.Controls.Add(this.xJitterlabel);
+      this.Controls.Add(this.xTrackBar);
+      this.Controls.Add(this.xAxisLabel);
+      this.Controls.Add(this.xAxisComboBox);
+      this.Controls.Add(this.yAxisLabel);
+      this.Controls.Add(this.yAxisComboBox);
+      this.Controls.Add(this.yTrackBar);
+      this.Name = "RunCollectionBubbleChartView";
+      this.Size = new System.Drawing.Size(854, 496);
+      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).EndInit();
+      ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).EndInit();
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      this.radioButtonGroup.ResumeLayout(false);
+      this.radioButtonGroup.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.sizeTrackBar)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+    #endregion
+
+    private System.Windows.Forms.Label xAxisLabel;
+    private System.Windows.Forms.ComboBox xAxisComboBox;
+    private System.Windows.Forms.Label yAxisLabel;
+    private System.Windows.Forms.ComboBox yAxisComboBox;
+    private System.Windows.Forms.TrackBar yTrackBar;
+    private System.Windows.Forms.TrackBar xTrackBar;
+    private System.Windows.Forms.Label xJitterlabel;
+    private System.Windows.Forms.Label yJitterLabel;
+    private System.Windows.Forms.ComboBox sizeComboBox;
+    private System.Windows.Forms.Label sizeLabel;
+    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
+    private System.Windows.Forms.RadioButton zoomButton;
+    private System.Windows.Forms.RadioButton selectButton;
+    private System.Windows.Forms.GroupBox radioButtonGroup;
+    private System.Windows.Forms.Button colorButton;
+    private System.Windows.Forms.ColorDialog colorDialog;
+    private System.Windows.Forms.ToolTip tooltip;
+    private System.Windows.Forms.Label noRunsLabel;
+    private System.Windows.Forms.ToolStripMenuItem openBoxPlotViewToolStripMenuItem;
+    private System.Windows.Forms.ToolStripMenuItem hideRunToolStripMenuItem;
+    private System.Windows.Forms.Button colorXAxisButton;
+    private System.Windows.Forms.Button colorYAxisButton;
+    private System.Windows.Forms.TrackBar sizeTrackBar;
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs	(revision 7469)
@@ -0,0 +1,693 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Optimization.Views {
+  [View("RunCollection BubbleChart")]
+  [Content(typeof(RunCollection), false)]
+  public partial class RunCollectionBubbleChartView : AsynchronousContentView {
+    private enum SizeDimension { Constant = 0 }
+    private enum AxisDimension { Index = 0 }
+
+    private string xAxisValue;
+    private string yAxisValue;
+    private string sizeAxisValue;
+
+    private Dictionary<IRun, List<DataPoint>> runToDataPointMapping;
+    private Dictionary<int, Dictionary<object, double>> categoricalMapping;
+    private Dictionary<IRun, double> xJitter;
+    private Dictionary<IRun, double> yJitter;
+    private double xJitterFactor = 0.0;
+    private double yJitterFactor = 0.0;
+    private Random random;
+    private bool isSelecting = false;
+    private bool suppressUpdates = false;
+
+    public RunCollectionBubbleChartView() {
+      InitializeComponent();
+
+      chart.ContextMenuStrip.Items.Insert(0, hideRunToolStripMenuItem);
+      chart.ContextMenuStrip.Items.Insert(1, openBoxPlotViewToolStripMenuItem);
+      chart.ContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(ContextMenuStrip_Opening);
+
+      runToDataPointMapping = new Dictionary<IRun, List<DataPoint>>();
+      categoricalMapping = new Dictionary<int, Dictionary<object, double>>();
+      xJitter = new Dictionary<IRun, double>();
+      yJitter = new Dictionary<IRun, double>();
+      random = new Random();
+
+      colorDialog.Color = Color.Black;
+      colorButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color);
+      isSelecting = false;
+
+      chart.CustomizeAllChartAreas();
+      chart.ChartAreas[0].CursorX.Interval = 1;
+      chart.ChartAreas[0].CursorY.Interval = 1;
+      chart.ChartAreas[0].AxisX.ScaleView.Zoomable = !this.isSelecting;
+      chart.ChartAreas[0].AxisY.ScaleView.Zoomable = !this.isSelecting;
+    }
+
+    public new RunCollection Content {
+      get { return (RunCollection)base.Content; }
+      set { base.Content = value; }
+    }
+    public IStringConvertibleMatrix Matrix {
+      get { return this.Content; }
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.Reset += new EventHandler(Content_Reset);
+      Content.ColumnNamesChanged += new EventHandler(Content_ColumnNamesChanged);
+      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+      Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged);
+      RegisterRunEvents(Content);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.Reset -= new EventHandler(Content_Reset);
+      Content.ColumnNamesChanged -= new EventHandler(Content_ColumnNamesChanged);
+      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+      Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged);
+      DeregisterRunEvents(Content);
+    }
+    protected virtual void RegisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed += new EventHandler(run_Changed);
+    }
+    protected virtual void DeregisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed -= new EventHandler(run_Changed);
+    }
+
+    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.OldItems);
+      RegisterRunEvents(e.Items);
+    }
+    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.Items);
+    }
+    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      RegisterRunEvents(e.Items);
+    }
+    private void run_Changed(object sender, EventArgs e) {
+      if (InvokeRequired)
+        this.Invoke(new EventHandler(run_Changed), sender, e);
+      else {
+        IRun run = (IRun)sender;
+        UpdateRun(run);
+      }
+    }
+
+    private void UpdateRun(IRun run) {
+      if (!suppressUpdates) {
+        if (runToDataPointMapping.ContainsKey(run)) {
+          foreach (DataPoint point in runToDataPointMapping[run]) {
+            point.Color = run.Color;
+            if (!run.Visible) {
+              this.chart.Series[0].Points.Remove(point);
+              UpdateCursorInterval();
+              chart.ChartAreas[0].RecalculateAxesScale();
+            }
+          }
+          if (!run.Visible) runToDataPointMapping.Remove(run);
+        } else {
+          AddDataPoint(run);
+          UpdateCursorInterval();
+          chart.ChartAreas[0].RecalculateAxesScale();
+        }
+
+        if (this.chart.Series[0].Points.Count == 0)
+          noRunsLabel.Visible = true;
+        else
+          noRunsLabel.Visible = false;
+      }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      this.categoricalMapping.Clear();
+      UpdateComboBoxes();
+      UpdateDataPoints();
+    }
+    private void Content_ColumnNamesChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ColumnNamesChanged), sender, e);
+      else
+        UpdateComboBoxes();
+    }
+
+    private void UpdateComboBoxes() {
+      string selectedXAxis = (string)this.xAxisComboBox.SelectedItem;
+      string selectedYAxis = (string)this.yAxisComboBox.SelectedItem;
+      string selectedSizeAxis = (string)this.sizeComboBox.SelectedItem;
+      this.xAxisComboBox.Items.Clear();
+      this.yAxisComboBox.Items.Clear();
+      this.sizeComboBox.Items.Clear();
+      if (Content != null) {
+        string[] additionalAxisDimension = Enum.GetNames(typeof(AxisDimension));
+        this.xAxisComboBox.Items.AddRange(additionalAxisDimension);
+        this.xAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
+        this.yAxisComboBox.Items.AddRange(additionalAxisDimension);
+        this.yAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
+        string[] additionalSizeDimension = Enum.GetNames(typeof(SizeDimension));
+        this.sizeComboBox.Items.AddRange(additionalSizeDimension);
+        this.sizeComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
+        this.sizeComboBox.SelectedItem = SizeDimension.Constant.ToString();
+
+        bool changed = false;
+        if (selectedXAxis != null && xAxisComboBox.Items.Contains(selectedXAxis)) {
+          xAxisComboBox.SelectedItem = selectedXAxis;
+          changed = true;
+        }
+        if (selectedYAxis != null && yAxisComboBox.Items.Contains(selectedYAxis)) {
+          yAxisComboBox.SelectedItem = selectedYAxis;
+          changed = true;
+        }
+        if (selectedSizeAxis != null && sizeComboBox.Items.Contains(selectedSizeAxis)) {
+          sizeComboBox.SelectedItem = selectedSizeAxis;
+          changed = true;
+        }
+        if (changed)
+          UpdateDataPoints();
+      }
+    }
+
+
+    private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_UpdateOfRunsInProgressChanged), sender, e);
+      else {
+        suppressUpdates = Content.UpdateOfRunsInProgress;
+        if (!suppressUpdates) UpdateDataPoints();
+      }
+    }
+
+    private void Content_Reset(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_Reset), sender, e);
+      else {
+        this.categoricalMapping.Clear();
+        UpdateDataPoints();
+      }
+    }
+
+    private void UpdateDataPoints() {
+      Series series = this.chart.Series[0];
+      series.Points.Clear();
+      runToDataPointMapping.Clear();
+
+      chart.ChartAreas[0].AxisX.IsMarginVisible = xAxisValue != AxisDimension.Index.ToString();
+      chart.ChartAreas[0].AxisY.IsMarginVisible = yAxisValue != AxisDimension.Index.ToString();
+
+      if (Content != null) {
+        foreach (IRun run in this.Content)
+          this.AddDataPoint(run);
+
+        if (this.chart.Series[0].Points.Count == 0)
+          noRunsLabel.Visible = true;
+        else {
+          noRunsLabel.Visible = false;
+          UpdateMarkerSizes();
+          UpdateCursorInterval();
+        }
+      }
+      var xAxis = chart.ChartAreas[0].AxisX;
+      var yAxis = chart.ChartAreas[0].AxisY;
+      xTrackBar.Value = 0;
+      yTrackBar.Value = 0;
+      SetAutomaticUpdateOfAxis(xAxis, true);
+      SetAutomaticUpdateOfAxis(yAxis, true);
+    }
+
+    private void UpdateMarkerSizes() {
+      double[] sizeValues = this.chart.Series[0].Points.Select(p => p.YValues[1]).ToArray();
+      double minSizeValue = sizeValues.Min();
+      double maxSizeValue = sizeValues.Max();
+
+      for (int i = 0; i < sizeValues.Length; i++) {
+        DataPoint point = this.chart.Series[0].Points[i];
+        double sizeRange = maxSizeValue - minSizeValue;
+        double relativeSize = (point.YValues[1] - minSizeValue);
+
+        if (sizeRange > double.Epsilon) relativeSize /= sizeRange;
+        else relativeSize = 1;
+
+        point.MarkerSize = (int)Math.Round((sizeTrackBar.Value - sizeTrackBar.Minimum) * relativeSize + sizeTrackBar.Minimum);
+      }
+    }
+
+    private void UpdateDataPointJitter() {
+      var xAxis = this.chart.ChartAreas[0].AxisX;
+      var yAxis = this.chart.ChartAreas[0].AxisY;
+      SetAutomaticUpdateOfAxis(xAxis, false);
+      SetAutomaticUpdateOfAxis(yAxis, false);
+
+      foreach (DataPoint point in chart.Series[0].Points) {
+        IRun run = (IRun)point.Tag;
+        double xValue = GetValue(run, xAxisValue).Value;
+        double yValue = GetValue(run, yAxisValue).Value;
+
+        if (!xJitterFactor.IsAlmost(0.0))
+          xValue += 0.1 * GetXJitter(run) * xJitterFactor * (xAxis.Maximum - xAxis.Minimum);
+        if (!yJitterFactor.IsAlmost(0.0))
+          yValue += 0.1 * GetYJitter(run) * yJitterFactor * (yAxis.Maximum - yAxis.Minimum);
+
+        point.XValue = xValue;
+        point.YValues[0] = yValue;
+      }
+    }
+
+    private void SetAutomaticUpdateOfAxis(Axis axis, bool enabled) {
+      if (enabled) {
+        axis.Maximum = double.NaN;
+        axis.Minimum = double.NaN;
+        axis.MajorGrid.Interval = double.NaN;
+        axis.MajorTickMark.Interval = double.NaN;
+        axis.LabelStyle.Interval = double.NaN;
+      } else {
+        axis.Minimum = axis.Minimum;
+        axis.Maximum = axis.Maximum;
+        axis.MajorGrid.Interval = axis.MajorGrid.Interval;
+        axis.MajorTickMark.Interval = axis.MajorTickMark.Interval;
+        axis.LabelStyle.Interval = axis.LabelStyle.Interval;
+      }
+
+    }
+
+    private void AddDataPoint(IRun run) {
+      double? xValue;
+      double? yValue;
+      double? sizeValue;
+      Series series = this.chart.Series[0];
+
+      xValue = GetValue(run, xAxisValue);
+      yValue = GetValue(run, yAxisValue);
+      sizeValue = GetValue(run, sizeAxisValue);
+
+      if (xValue.HasValue && yValue.HasValue && sizeValue.HasValue) {
+        xValue = xValue.Value;
+
+        yValue = yValue.Value;
+
+        if (run.Visible) {
+          DataPoint point = new DataPoint(xValue.Value, new double[] { yValue.Value, sizeValue.Value });
+          point.Tag = run;
+          point.Color = run.Color;
+          series.Points.Add(point);
+          if (!runToDataPointMapping.ContainsKey(run)) runToDataPointMapping.Add(run, new List<DataPoint>());
+          runToDataPointMapping[run].Add(point);
+        }
+      }
+    }
+    private double? GetValue(IRun run, string columnName) {
+      if (run == null || string.IsNullOrEmpty(columnName))
+        return null;
+
+      if (Enum.IsDefined(typeof(AxisDimension), columnName)) {
+        AxisDimension axisDimension = (AxisDimension)Enum.Parse(typeof(AxisDimension), columnName);
+        return GetValue(run, axisDimension);
+      } else if (Enum.IsDefined(typeof(SizeDimension), columnName)) {
+        SizeDimension sizeDimension = (SizeDimension)Enum.Parse(typeof(SizeDimension), columnName);
+        return GetValue(run, sizeDimension);
+      } else {
+        int columnIndex = Matrix.ColumnNames.ToList().IndexOf(columnName);
+        IItem value = Content.GetValue(run, columnIndex);
+        if (value == null)
+          return null;
+
+        DoubleValue doubleValue = value as DoubleValue;
+        IntValue intValue = value as IntValue;
+        TimeSpanValue timeSpanValue = value as TimeSpanValue;
+        double? ret = null;
+        if (doubleValue != null) {
+          if (!double.IsNaN(doubleValue.Value) && !double.IsInfinity(doubleValue.Value))
+            ret = doubleValue.Value;
+        } else if (intValue != null)
+          ret = intValue.Value;
+        else if (timeSpanValue != null) {
+          ret = timeSpanValue.Value.TotalSeconds;
+        } else
+          ret = GetCategoricalValue(columnIndex, value.ToString());
+
+        return ret;
+      }
+    }
+    private double GetCategoricalValue(int dimension, string value) {
+      if (!this.categoricalMapping.ContainsKey(dimension))
+        this.categoricalMapping[dimension] = new Dictionary<object, double>();
+      if (!this.categoricalMapping[dimension].ContainsKey(value)) {
+        if (this.categoricalMapping[dimension].Values.Count == 0)
+          this.categoricalMapping[dimension][value] = 1.0;
+        else
+          this.categoricalMapping[dimension][value] = this.categoricalMapping[dimension].Values.Max() + 1.0;
+      }
+      return this.categoricalMapping[dimension][value];
+    }
+    private double GetValue(IRun run, AxisDimension axisDimension) {
+      double value = double.NaN;
+      switch (axisDimension) {
+        case AxisDimension.Index: {
+            value = Content.ToList().IndexOf(run);
+            break;
+          }
+        default: {
+            throw new ArgumentException("No handling strategy for " + axisDimension.ToString() + " is defined.");
+          }
+      }
+      return value;
+    }
+    private double GetValue(IRun run, SizeDimension sizeDimension) {
+      double value = double.NaN;
+      switch (sizeDimension) {
+        case SizeDimension.Constant: {
+            value = 2;
+            break;
+          }
+        default: {
+            throw new ArgumentException("No handling strategy for " + sizeDimension.ToString() + " is defined.");
+          }
+      }
+      return value;
+    }
+    private void UpdateCursorInterval() {
+      Series series = chart.Series[0];
+      double[] xValues = (from point in series.Points
+                          where !point.IsEmpty
+                          select point.XValue)
+                    .DefaultIfEmpty(1.0)
+                    .ToArray();
+      double[] yValues = (from point in series.Points
+                          where !point.IsEmpty
+                          select point.YValues[0])
+                    .DefaultIfEmpty(1.0)
+                    .ToArray();
+
+      double xRange = xValues.Max() - xValues.Min();
+      double yRange = yValues.Max() - yValues.Min();
+      if (xRange.IsAlmost(0.0)) xRange = 1.0;
+      if (yRange.IsAlmost(0.0)) yRange = 1.0;
+      double xDigits = (int)Math.Log10(xRange) - 3;
+      double yDigits = (int)Math.Log10(yRange) - 3;
+      double xZoomInterval = Math.Pow(10, xDigits);
+      double yZoomInterval = Math.Pow(10, yDigits);
+      this.chart.ChartAreas[0].CursorX.Interval = xZoomInterval;
+      this.chart.ChartAreas[0].CursorY.Interval = yZoomInterval;
+
+      //code to handle TimeSpanValues correct
+      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
+      int columnIndex = xAxisComboBox.SelectedIndex - axisDimensionCount;
+      if (columnIndex >= 0 && Content.GetValue(0, columnIndex) is TimeSpanValue)
+        this.chart.ChartAreas[0].CursorX.Interval = 1;
+      columnIndex = yAxisComboBox.SelectedIndex - axisDimensionCount;
+      if (columnIndex >= 0 && Content.GetValue(0, columnIndex) is TimeSpanValue)
+        this.chart.ChartAreas[0].CursorY.Interval = 1;
+    }
+
+    #region Drag & drop and tooltip
+    private void chart_MouseDoubleClick(object sender, MouseEventArgs e) {
+      HitTestResult h = this.chart.HitTest(e.X, e.Y, ChartElementType.DataPoint);
+      if (h.ChartElementType == ChartElementType.DataPoint) {
+        IRun run = (IRun)((DataPoint)h.Object).Tag;
+        IContentView view = MainFormManager.MainForm.ShowContent(run);
+        if (view != null) {
+          view.ReadOnly = this.ReadOnly;
+          view.Locked = this.Locked;
+        }
+
+        this.chart.ChartAreas[0].CursorX.SelectionStart = this.chart.ChartAreas[0].CursorX.SelectionEnd;
+        this.chart.ChartAreas[0].CursorY.SelectionStart = this.chart.ChartAreas[0].CursorY.SelectionEnd;
+      }
+      UpdateAxisLabels();
+    }
+
+    private void chart_MouseUp(object sender, MouseEventArgs e) {
+      if (isSelecting) {
+        System.Windows.Forms.DataVisualization.Charting.Cursor xCursor = chart.ChartAreas[0].CursorX;
+        System.Windows.Forms.DataVisualization.Charting.Cursor yCursor = chart.ChartAreas[0].CursorY;
+
+        double minX = Math.Min(xCursor.SelectionStart, xCursor.SelectionEnd);
+        double maxX = Math.Max(xCursor.SelectionStart, xCursor.SelectionEnd);
+        double minY = Math.Min(yCursor.SelectionStart, yCursor.SelectionEnd);
+        double maxY = Math.Max(yCursor.SelectionStart, yCursor.SelectionEnd);
+
+        //check for click to select model
+        if (minX == maxX && minY == maxY) {
+          HitTestResult hitTest = chart.HitTest(e.X, e.Y);
+          if (hitTest.ChartElementType == ChartElementType.DataPoint) {
+            int pointIndex = hitTest.PointIndex;
+            IRun run = (IRun)this.chart.Series[0].Points[pointIndex].Tag;
+            run.Color = colorDialog.Color;
+          }
+        } else {
+          List<DataPoint> selectedPoints = new List<DataPoint>();
+          foreach (DataPoint p in this.chart.Series[0].Points) {
+            if (p.XValue >= minX && p.XValue < maxX &&
+              p.YValues[0] >= minY && p.YValues[0] < maxY) {
+              selectedPoints.Add(p);
+            }
+          }
+          foreach (DataPoint p in selectedPoints) {
+            IRun run = (IRun)p.Tag;
+            run.Color = colorDialog.Color;
+          }
+        }
+        this.chart.ChartAreas[0].CursorX.SelectionStart = this.chart.ChartAreas[0].CursorX.SelectionEnd;
+        this.chart.ChartAreas[0].CursorY.SelectionStart = this.chart.ChartAreas[0].CursorY.SelectionEnd;
+      }
+    }
+
+    private void chart_MouseMove(object sender, MouseEventArgs e) {
+      HitTestResult h = this.chart.HitTest(e.X, e.Y);
+      string newTooltipText = string.Empty;
+      string oldTooltipText;
+      if (h.ChartElementType == ChartElementType.DataPoint) {
+        IRun run = (IRun)((DataPoint)h.Object).Tag;
+        newTooltipText = BuildTooltip(run);
+      } else if (h.ChartElementType == ChartElementType.AxisLabels) {
+        newTooltipText = ((CustomLabel)h.Object).ToolTip;
+      }
+
+      oldTooltipText = this.tooltip.GetToolTip(chart);
+      if (newTooltipText != oldTooltipText)
+        this.tooltip.SetToolTip(chart, newTooltipText);
+    }
+
+    private string BuildTooltip(IRun run) {
+      string tooltip;
+      tooltip = run.Name + System.Environment.NewLine;
+
+      double? xValue = this.GetValue(run, (string)xAxisComboBox.SelectedItem);
+      double? yValue = this.GetValue(run, (string)yAxisComboBox.SelectedItem);
+      double? sizeValue = this.GetValue(run, (string)sizeComboBox.SelectedItem);
+
+      string xString = xValue == null ? string.Empty : xValue.Value.ToString();
+      string yString = yValue == null ? string.Empty : yValue.Value.ToString();
+      string sizeString = sizeValue == null ? string.Empty : sizeValue.Value.ToString();
+
+      //code to handle TimeSpanValues correct
+      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
+      int columnIndex = xAxisComboBox.SelectedIndex - axisDimensionCount;
+      if (xValue.HasValue && columnIndex > 0 && Content.GetValue(0, columnIndex) is TimeSpanValue) {
+        TimeSpan time = TimeSpan.FromSeconds(xValue.Value);
+        xString = string.Format("{0:00}:{1:00}:{2:00.00}", (int)time.TotalHours, time.Minutes, time.Seconds);
+      }
+      columnIndex = yAxisComboBox.SelectedIndex - axisDimensionCount;
+      if (yValue.HasValue && columnIndex > 0 && Content.GetValue(0, columnIndex) is TimeSpanValue) {
+        TimeSpan time = TimeSpan.FromSeconds(yValue.Value);
+        yString = string.Format("{0:00}:{1:00}:{2:00.00}", (int)time.TotalHours, time.Minutes, time.Seconds);
+      }
+
+      tooltip += xAxisComboBox.SelectedItem + " : " + xString + Environment.NewLine;
+      tooltip += yAxisComboBox.SelectedItem + " : " + yString + Environment.NewLine;
+      tooltip += sizeComboBox.SelectedItem + " : " + sizeString + Environment.NewLine;
+
+      return tooltip;
+    }
+    #endregion
+
+    #region GUI events and updating
+    private double GetXJitter(IRun run) {
+      if (!this.xJitter.ContainsKey(run))
+        this.xJitter[run] = random.NextDouble() * 2.0 - 1.0;
+      return this.xJitter[run];
+    }
+    private double GetYJitter(IRun run) {
+      if (!this.yJitter.ContainsKey(run))
+        this.yJitter[run] = random.NextDouble() * 2.0 - 1.0;
+      return this.yJitter[run];
+    }
+    private void jitterTrackBar_ValueChanged(object sender, EventArgs e) {
+      this.xJitterFactor = xTrackBar.Value / 100.0;
+      this.yJitterFactor = yTrackBar.Value / 100.0;
+      UpdateDataPointJitter();
+    }
+    private void sizeTrackBar_ValueChanged(object sender, EventArgs e) {
+      UpdateMarkerSizes();
+    }
+
+    private void AxisComboBox_SelectedValueChanged(object sender, EventArgs e) {
+      bool axisSelected = xAxisComboBox.SelectedIndex != -1 && yAxisComboBox.SelectedIndex != -1;
+      xTrackBar.Enabled = yTrackBar.Enabled = axisSelected;
+      colorXAxisButton.Enabled = colorYAxisButton.Enabled = axisSelected;
+
+      xAxisValue = (string)xAxisComboBox.SelectedItem;
+      yAxisValue = (string)yAxisComboBox.SelectedItem;
+      sizeAxisValue = (string)sizeComboBox.SelectedItem;
+
+      UpdateDataPoints();
+      UpdateAxisLabels();
+    }
+    private void UpdateAxisLabels() {
+      Axis xAxis = this.chart.ChartAreas[0].AxisX;
+      Axis yAxis = this.chart.ChartAreas[0].AxisY;
+      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
+      SetCustomAxisLabels(xAxis, xAxisComboBox.SelectedIndex - axisDimensionCount);
+      SetCustomAxisLabels(yAxis, yAxisComboBox.SelectedIndex - axisDimensionCount);
+      if (xAxisComboBox.SelectedItem != null)
+        xAxis.Title = xAxisComboBox.SelectedItem.ToString();
+      if (yAxisComboBox.SelectedItem != null)
+        yAxis.Title = yAxisComboBox.SelectedItem.ToString();
+    }
+
+    private void chart_AxisViewChanged(object sender, System.Windows.Forms.DataVisualization.Charting.ViewEventArgs e) {
+      this.UpdateAxisLabels();
+    }
+
+    private void SetCustomAxisLabels(Axis axis, int dimension) {
+      axis.CustomLabels.Clear();
+      if (categoricalMapping.ContainsKey(dimension)) {
+        foreach (var pair in categoricalMapping[dimension]) {
+          string labelText = pair.Key.ToString();
+          CustomLabel label = new CustomLabel();
+          label.ToolTip = labelText;
+          if (labelText.Length > 25)
+            labelText = labelText.Substring(0, 25) + " ... ";
+          label.Text = labelText;
+          label.GridTicks = GridTickTypes.TickMark;
+          label.FromPosition = pair.Value - 0.5;
+          label.ToPosition = pair.Value + 0.5;
+          axis.CustomLabels.Add(label);
+        }
+      } else if (dimension > 0 && Content.GetValue(0, dimension) is TimeSpanValue) {
+        this.chart.ChartAreas[0].RecalculateAxesScale();
+        for (double i = axis.Minimum; i <= axis.Maximum; i += axis.LabelStyle.Interval) {
+          TimeSpan time = TimeSpan.FromSeconds(i);
+          string x = string.Format("{0:00}:{1:00}:{2:00}", time.Hours, time.Minutes, time.Seconds);
+          axis.CustomLabels.Add(i - axis.LabelStyle.Interval / 2, i + axis.LabelStyle.Interval / 2, x);
+        }
+      }
+    }
+
+    private void zoomButton_CheckedChanged(object sender, EventArgs e) {
+      this.isSelecting = selectButton.Checked;
+      this.colorButton.Enabled = this.isSelecting;
+      this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = !isSelecting;
+      this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = !isSelecting;
+    }
+    private void colorButton_Click(object sender, EventArgs e) {
+      if (colorDialog.ShowDialog(this) == DialogResult.OK) {
+        this.colorButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color);
+      }
+    }
+    private Image GenerateImage(int width, int height, Color fillColor) {
+      Image colorImage = new Bitmap(width, height);
+      using (Graphics gfx = Graphics.FromImage(colorImage)) {
+        using (SolidBrush brush = new SolidBrush(fillColor)) {
+          gfx.FillRectangle(brush, 0, 0, width, height);
+        }
+      }
+      return colorImage;
+    }
+
+    private IRun runToHide = null;
+    private void ContextMenuStrip_Opening(object sender, System.ComponentModel.CancelEventArgs e) {
+      var pos = Control.MousePosition;
+      var chartPos = chart.PointToClient(pos);
+
+      HitTestResult h = this.chart.HitTest(chartPos.X, chartPos.Y);
+      if (h.ChartElementType == ChartElementType.DataPoint) {
+        runToHide = (IRun)((DataPoint)h.Object).Tag;
+        hideRunToolStripMenuItem.Visible = true;
+      } else {
+        runToHide = null;
+        hideRunToolStripMenuItem.Visible = false;
+      }
+
+    }
+    private void hideRunToolStripMenuItem_Click(object sender, EventArgs e) {
+      var constraint = Content.Constraints.OfType<RunCollectionContentConstraint>().Where(c => c.Active).FirstOrDefault();
+      if (constraint == null) {
+        constraint = new RunCollectionContentConstraint();
+        Content.Constraints.Add(constraint);
+        constraint.Active = true;
+      }
+      constraint.ConstraintData.Add(runToHide);
+    }
+
+    private void openBoxPlotViewToolStripMenuItem_Click(object sender, EventArgs e) {
+      RunCollectionBoxPlotView boxplotView = new RunCollectionBoxPlotView();
+      boxplotView.Content = this.Content;
+      boxplotView.xAxisComboBox.SelectedItem = xAxisComboBox.SelectedItem;
+      boxplotView.yAxisComboBox.SelectedItem = yAxisComboBox.SelectedItem;
+      boxplotView.Show();
+    }
+    #endregion
+
+    #region Automatic coloring
+    private void colorXAxisButton_Click(object sender, EventArgs e) {
+      ColorRuns(xAxisValue);
+    }
+
+    private void colorYAxisButton_Click(object sender, EventArgs e) {
+      ColorRuns(yAxisValue);
+    }
+
+    private void ColorRuns(string axisValue) {
+      var runs = Content.Where(r => r.Visible).Select(r => new { Run = r, Value = GetValue(r, axisValue) }).Where(r => r.Value.HasValue);
+      double minValue = runs.Min(r => r.Value.Value);
+      double maxValue = runs.Max(r => r.Value.Value);
+      double range = maxValue - minValue;
+
+      foreach (var r in runs) {
+        int colorIndex = 0;
+        if (!range.IsAlmost(0)) colorIndex = (int)((ColorGradient.Colors.Count - 1) * (r.Value.Value - minValue) / (range));
+        r.Run.Color = ColorGradient.Colors[colorIndex];
+      }
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTabularView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTabularView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTabularView.Designer.cs	(revision 7469)
@@ -0,0 +1,72 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization.Views {
+  partial class RunCollectionTabularView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // rowsTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.rowsTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.rowsTextBox, 2);
+      // 
+      // RunCollectionTabularView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.Name = "RunCollectionTabularView";
+      this.ShowStatisticalInformation = true;
+      this.Controls.SetChildIndex(this.rowsLabel, 0);
+      this.Controls.SetChildIndex(this.columnsLabel, 0);
+      this.Controls.SetChildIndex(this.rowsTextBox, 0);
+      this.Controls.SetChildIndex(this.columnsTextBox, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTabularView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTabularView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTabularView.cs	(revision 7469)
@@ -0,0 +1,238 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.Data.Views;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Optimization.Views {
+  [View("RunCollection Tabular View")]
+  [Content(typeof(RunCollection), false)]
+  public sealed partial class RunCollectionTabularView : StringConvertibleMatrixView {
+    private int[] runToRowMapping;
+    private bool suppressUpdates = false;
+    public RunCollectionTabularView() {
+      InitializeComponent();
+      dataGridView.RowHeaderMouseDoubleClick += new DataGridViewCellMouseEventHandler(dataGridView_RowHeaderMouseDoubleClick);
+    }
+
+    public override bool ReadOnly {
+      get { return true; }
+      set { /*not needed because results are always readonly */}
+    }
+
+    public new RunCollection Content {
+      get { return (RunCollection)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content != null) {
+        runToRowMapping = Enumerable.Range(0, Content.Count).ToArray();
+        UpdateRowAttributes();
+      }
+    }
+
+    #region events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+      Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged);
+      RegisterRunEvents(Content);
+    }
+    private void RegisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed += new EventHandler(run_Changed);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+      Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged);
+      DeregisterRunEvents(Content);
+    }
+    private void DeregisterRunEvents(IEnumerable<IRun> runs) {
+      foreach (IRun run in runs)
+        run.Changed -= new EventHandler(run_Changed);
+    }
+    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.OldItems);
+      RegisterRunEvents(e.Items);
+    }
+    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      DeregisterRunEvents(e.Items);
+    }
+    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
+      RegisterRunEvents(e.Items);
+    }
+    private void run_Changed(object sender, EventArgs e) {
+      if (InvokeRequired)
+        this.Invoke(new EventHandler(run_Changed), sender, e);
+      else {
+        IRun run = (IRun)sender;
+        UpdateRun(run);
+      }
+    }
+    #endregion
+
+    protected override void UpdateColumnHeaders() {
+      HashSet<string> visibleColumnNames = new HashSet<string>(dataGridView.Columns.OfType<DataGridViewColumn>()
+       .Where(c => c.Visible && !string.IsNullOrEmpty(c.HeaderText)).Select(c => c.HeaderText));
+
+      for (int i = 0; i < dataGridView.ColumnCount; i++) {
+        if (i < base.Content.ColumnNames.Count())
+          dataGridView.Columns[i].HeaderText = base.Content.ColumnNames.ElementAt(i);
+        else
+          dataGridView.Columns[i].HeaderText = "Column " + (i + 1);
+        dataGridView.Columns[i].Visible = visibleColumnNames.Count == 0 || visibleColumnNames.Contains(dataGridView.Columns[i].HeaderText);
+      }
+    }
+
+    private void UpdateRun(IRun run) {
+      foreach (int runIndex in GetIndexOfRun(run)) {
+        int rowIndex = runToRowMapping[runIndex];
+        this.dataGridView.Rows[rowIndex].Visible = run.Visible;
+        this.dataGridView.Rows[rowIndex].DefaultCellStyle.ForeColor = run.Color;
+      }
+      this.UpdateRowHeaders();
+    }
+
+
+    private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_UpdateOfRunsInProgressChanged), sender, e);
+      else {
+        suppressUpdates = Content.UpdateOfRunsInProgress;
+        if (!suppressUpdates) UpdateRowAttributes();
+      }
+    }
+
+    private IEnumerable<int> GetIndexOfRun(IRun run) {
+      int i = 0;
+      foreach (IRun actualRun in Content) {
+        if (actualRun == run)
+          yield return i;
+        i++;
+      }
+    }
+
+    private void dataGridView_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) {
+      if (e.RowIndex >= 0) {
+        IRun run = Content.ElementAt(runToRowMapping.ToList().IndexOf(e.RowIndex));
+        IContentView view = MainFormManager.MainForm.ShowContent(run);
+        if (view != null) {
+          view.ReadOnly = this.ReadOnly;
+          view.Locked = this.Locked;
+        }
+      }
+    }
+
+    protected override void ClearSorting() {
+      base.ClearSorting();
+      runToRowMapping = Enumerable.Range(0, Content.Count).ToArray();
+      UpdateRowAttributes();
+    }
+
+    protected override int[] Sort(IEnumerable<KeyValuePair<int, SortOrder>> sortedColumns) {
+      int[] newSortedIndex = Enumerable.Range(0, Content.Count).ToArray();
+      RunCollectionRowComparer rowComparer = new RunCollectionRowComparer();
+      if (sortedColumns.Count() != 0) {
+        rowComparer.SortedIndizes = sortedColumns;
+        rowComparer.Matrix = Content;
+        Array.Sort(newSortedIndex, rowComparer);
+      }
+
+      runToRowMapping = new int[newSortedIndex.Length];
+      int i = 0;
+      foreach (int runIndex in newSortedIndex) {
+        runToRowMapping[runIndex] = i;
+        i++;
+      }
+      UpdateRowAttributes();
+      return newSortedIndex;
+    }
+
+    private void UpdateRowAttributes() {
+      int runIndex = 0;
+      foreach (IRun run in Content) {
+        int rowIndex = this.runToRowMapping[runIndex];
+        this.dataGridView.Rows[rowIndex].Visible = run.Visible;
+        this.dataGridView.Rows[rowIndex].DefaultCellStyle.ForeColor = run.Color;
+        runIndex++;
+      }
+      UpdateRowHeaders();
+    }
+
+    public class RunCollectionRowComparer : IComparer<int> {
+      public RunCollectionRowComparer() {
+      }
+
+      private List<KeyValuePair<int, SortOrder>> sortedIndizes;
+      public IEnumerable<KeyValuePair<int, SortOrder>> SortedIndizes {
+        get { return this.sortedIndizes; }
+        set { sortedIndizes = new List<KeyValuePair<int, SortOrder>>(value); }
+      }
+      private RunCollection matrix;
+      public RunCollection Matrix {
+        get { return this.matrix; }
+        set { this.matrix = value; }
+      }
+
+      public int Compare(int x, int y) {
+        int result = 0;
+        IItem value1, value2;
+        IComparable comparable1, comparable2;
+
+        if (matrix == null)
+          throw new InvalidOperationException("Could not sort IStringConvertibleMatrix if the matrix member is null.");
+        if (sortedIndizes == null)
+          return 0;
+
+        foreach (KeyValuePair<int, SortOrder> pair in sortedIndizes.Where(p => p.Value != SortOrder.None)) {
+          value1 = matrix.GetValue(x, pair.Key);
+          value2 = matrix.GetValue(y, pair.Key);
+          comparable1 = value1 as IComparable;
+          comparable2 = value2 as IComparable;
+          if (comparable1 != null)
+            result = comparable1.CompareTo(comparable2);
+          else {
+            string string1 = value1 != null ? value1.ToString() : string.Empty;
+            string string2 = value2 != null ? value2.ToString() : string.Empty;
+            result = string1.CompareTo(string2);
+          }
+          if (pair.Value == SortOrder.Descending)
+            result *= -1;
+          if (result != 0)
+            return result;
+        }
+        return result;
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.Designer.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.Designer.cs	(revision 7469)
@@ -0,0 +1,349 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Windows.Forms;
+
+namespace HeuristicLab.Optimization.Views {
+  partial class RunCollectionView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.showDetailsCheckBox = new System.Windows.Forms.CheckBox();
+      this.clearButton = new System.Windows.Forms.Button();
+      this.toolStrip = new System.Windows.Forms.ToolStrip();
+      this.analyzeRunsToolStripDropDownButton = new System.Windows.Forms.ToolStripDropDownButton();
+      this.itemsListView = new System.Windows.Forms.ListView();
+      this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+      this.imageList = new System.Windows.Forms.ImageList(this.components);
+      this.removeButton = new System.Windows.Forms.Button();
+      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
+      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.itemsGroupBox = new System.Windows.Forms.GroupBox();
+      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+      this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
+      this.runPage = new System.Windows.Forms.TabPage();
+      this.constraintPage = new System.Windows.Forms.TabPage();
+      this.runCollectionConstraintCollectionView = new HeuristicLab.Optimization.Views.RunCollectionConstraintCollectionView();
+      this.modifiersPage = new System.Windows.Forms.TabPage();
+      this.runCollectionModifiersListView = new HeuristicLab.Optimization.Views.RunCollectionModifiersListView();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.toolStrip.SuspendLayout();
+      this.detailsGroupBox.SuspendLayout();
+      this.itemsGroupBox.SuspendLayout();
+      this.tabControl.SuspendLayout();
+      this.runPage.SuspendLayout();
+      this.constraintPage.SuspendLayout();
+      this.modifiersPage.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+      this.splitContainer.Location = new System.Drawing.Point(3, 16);
+      this.splitContainer.Name = "splitContainer";
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.showDetailsCheckBox);
+      this.splitContainer.Panel1.Controls.Add(this.clearButton);
+      this.splitContainer.Panel1.Controls.Add(this.toolStrip);
+      this.splitContainer.Panel1.Controls.Add(this.itemsListView);
+      this.splitContainer.Panel1.Controls.Add(this.removeButton);
+      this.splitContainer.Panel1MinSize = 100;
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox);
+      this.splitContainer.Size = new System.Drawing.Size(512, 332);
+      this.splitContainer.SplitterDistance = 250;
+      this.splitContainer.TabIndex = 0;
+      // 
+      // showDetailsCheckBox
+      // 
+      this.showDetailsCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
+      this.showDetailsCheckBox.Checked = true;
+      this.showDetailsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+      this.showDetailsCheckBox.Image = HeuristicLab.Common.Resources.VSImageLibrary.Properties;
+      this.showDetailsCheckBox.Location = new System.Drawing.Point(87, 3);
+      this.showDetailsCheckBox.Name = "showDetailsCheckBox";
+      this.showDetailsCheckBox.Size = new System.Drawing.Size(24, 24);
+      this.showDetailsCheckBox.TabIndex = 2;
+      this.toolTip.SetToolTip(this.showDetailsCheckBox, "Show/Hide Details");
+      this.showDetailsCheckBox.UseVisualStyleBackColor = true;
+      this.showDetailsCheckBox.CheckedChanged += new System.EventHandler(this.showDetailsCheckBox_CheckedChanged);
+      // 
+      // clearButton
+      // 
+      this.clearButton.Enabled = false;
+      this.clearButton.Location = new System.Drawing.Point(33, 3);
+      this.clearButton.Name = "clearButton";
+      this.clearButton.Size = new System.Drawing.Size(48, 24);
+      this.clearButton.TabIndex = 1;
+      this.clearButton.Text = "&Clear";
+      this.toolTip.SetToolTip(this.clearButton, "Remove All Runs");
+      this.clearButton.UseVisualStyleBackColor = true;
+      this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
+      // 
+      // toolStrip
+      // 
+      this.toolStrip.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.toolStrip.AutoSize = false;
+      this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
+      this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
+      this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.analyzeRunsToolStripDropDownButton});
+      this.toolStrip.Location = new System.Drawing.Point(114, 3);
+      this.toolStrip.Name = "toolStrip";
+      this.toolStrip.Size = new System.Drawing.Size(133, 24);
+      this.toolStrip.TabIndex = 3;
+      this.toolStrip.Text = "toolStrip1";
+      // 
+      // analyzeRunsToolStripDropDownButton
+      // 
+      this.analyzeRunsToolStripDropDownButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+      this.analyzeRunsToolStripDropDownButton.ImageTransparentColor = System.Drawing.Color.Magenta;
+      this.analyzeRunsToolStripDropDownButton.Name = "analyzeRunsToolStripDropDownButton";
+      this.analyzeRunsToolStripDropDownButton.Size = new System.Drawing.Size(99, 21);
+      this.analyzeRunsToolStripDropDownButton.Text = "&Analyze Runs...";
+      this.analyzeRunsToolStripDropDownButton.ToolTipText = "Show Run Analysis Views";
+      // 
+      // itemsListView
+      // 
+      this.itemsListView.AllowDrop = true;
+      this.itemsListView.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.itemsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader1});
+      this.itemsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+      this.itemsListView.HideSelection = false;
+      this.itemsListView.Location = new System.Drawing.Point(3, 33);
+      this.itemsListView.Name = "itemsListView";
+      this.itemsListView.ShowItemToolTips = true;
+      this.itemsListView.Size = new System.Drawing.Size(244, 295);
+      this.itemsListView.SmallImageList = this.imageList;
+      this.itemsListView.TabIndex = 4;
+      this.itemsListView.UseCompatibleStateImageBehavior = false;
+      this.itemsListView.View = System.Windows.Forms.View.Details;
+      this.itemsListView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.itemsListView_ItemDrag);
+      this.itemsListView.SelectedIndexChanged += new System.EventHandler(this.itemsListView_SelectedIndexChanged);
+      this.itemsListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragDrop);
+      this.itemsListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragEnter);
+      this.itemsListView.DragOver += new System.Windows.Forms.DragEventHandler(this.itemsListView_DragOver);
+      this.itemsListView.DoubleClick += new System.EventHandler(this.itemsListView_DoubleClick);
+      this.itemsListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.itemsListView_KeyDown);
+      // 
+      // imageList
+      // 
+      this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+      this.imageList.ImageSize = new System.Drawing.Size(16, 16);
+      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+      // 
+      // removeButton
+      // 
+      this.removeButton.Enabled = false;
+      this.removeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Remove;
+      this.removeButton.Location = new System.Drawing.Point(3, 3);
+      this.removeButton.Name = "removeButton";
+      this.removeButton.Size = new System.Drawing.Size(24, 24);
+      this.removeButton.TabIndex = 0;
+      this.toolTip.SetToolTip(this.removeButton, "Remove");
+      this.removeButton.UseVisualStyleBackColor = true;
+      this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
+      // 
+      // detailsGroupBox
+      // 
+      this.detailsGroupBox.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.detailsGroupBox.Controls.Add(this.viewHost);
+      this.detailsGroupBox.Location = new System.Drawing.Point(3, 27);
+      this.detailsGroupBox.Name = "detailsGroupBox";
+      this.detailsGroupBox.Size = new System.Drawing.Size(252, 303);
+      this.detailsGroupBox.TabIndex = 0;
+      this.detailsGroupBox.TabStop = false;
+      this.detailsGroupBox.Text = "Details";
+      // 
+      // viewHost
+      // 
+      this.viewHost.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.viewHost.Caption = "View";
+      this.viewHost.Content = null;
+      this.viewHost.Location = new System.Drawing.Point(6, 19);
+      this.viewHost.Name = "viewHost";
+      this.viewHost.ReadOnly = false;
+      this.viewHost.Size = new System.Drawing.Size(240, 278);
+      this.viewHost.TabIndex = 0;
+      this.viewHost.ViewType = null;
+      // 
+      // itemsGroupBox
+      // 
+      this.itemsGroupBox.Controls.Add(this.splitContainer);
+      this.itemsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.itemsGroupBox.Location = new System.Drawing.Point(3, 3);
+      this.itemsGroupBox.Name = "itemsGroupBox";
+      this.itemsGroupBox.Size = new System.Drawing.Size(518, 351);
+      this.itemsGroupBox.TabIndex = 0;
+      this.itemsGroupBox.TabStop = false;
+      this.itemsGroupBox.Text = "Items";
+      // 
+      // tabControl
+      // 
+      this.tabControl.Controls.Add(this.runPage);
+      this.tabControl.Controls.Add(this.constraintPage);
+      this.tabControl.Controls.Add(this.modifiersPage);
+      this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.tabControl.Location = new System.Drawing.Point(0, 0);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(532, 383);
+      this.tabControl.TabIndex = 0;
+      // 
+      // runPage
+      // 
+      this.runPage.Controls.Add(this.itemsGroupBox);
+      this.runPage.Location = new System.Drawing.Point(4, 22);
+      this.runPage.Name = "runPage";
+      this.runPage.Padding = new System.Windows.Forms.Padding(3);
+      this.runPage.Size = new System.Drawing.Size(524, 357);
+      this.runPage.TabIndex = 0;
+      this.runPage.Text = "Runs";
+      this.runPage.UseVisualStyleBackColor = true;
+      // 
+      // constraintPage
+      // 
+      this.constraintPage.Controls.Add(this.runCollectionConstraintCollectionView);
+      this.constraintPage.Location = new System.Drawing.Point(4, 22);
+      this.constraintPage.Name = "constraintPage";
+      this.constraintPage.Padding = new System.Windows.Forms.Padding(3);
+      this.constraintPage.Size = new System.Drawing.Size(524, 357);
+      this.constraintPage.TabIndex = 1;
+      this.constraintPage.Text = "Filtering";
+      this.constraintPage.UseVisualStyleBackColor = true;
+      // 
+      // runCollectionConstraintCollectionView
+      // 
+      this.runCollectionConstraintCollectionView.Caption = "ConstraintCollection View";
+      this.runCollectionConstraintCollectionView.Content = null;
+      this.runCollectionConstraintCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.runCollectionConstraintCollectionView.Location = new System.Drawing.Point(3, 3);
+      this.runCollectionConstraintCollectionView.Name = "runCollectionConstraintCollectionView";
+      this.runCollectionConstraintCollectionView.ReadOnly = false;
+      this.runCollectionConstraintCollectionView.Size = new System.Drawing.Size(518, 351);
+      this.runCollectionConstraintCollectionView.TabIndex = 0;
+      // 
+      // modifiersPage
+      // 
+      this.modifiersPage.Controls.Add(this.runCollectionModifiersListView);
+      this.modifiersPage.Location = new System.Drawing.Point(4, 22);
+      this.modifiersPage.Name = "modifiersPage";
+      this.modifiersPage.Padding = new System.Windows.Forms.Padding(3);
+      this.modifiersPage.Size = new System.Drawing.Size(524, 357);
+      this.modifiersPage.TabIndex = 2;
+      this.modifiersPage.Text = "Modification";
+      this.modifiersPage.UseVisualStyleBackColor = true;
+      // 
+      // runCollectionModifiersListView
+      // 
+      this.runCollectionModifiersListView.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.runCollectionModifiersListView.Caption = "Modifier View";
+      this.runCollectionModifiersListView.Content = null;
+      this.runCollectionModifiersListView.Evaluator = null;
+      this.runCollectionModifiersListView.Location = new System.Drawing.Point(3, 3);
+      this.runCollectionModifiersListView.Name = "runCollectionModifiersListView";
+      this.runCollectionModifiersListView.ReadOnly = false;
+      this.runCollectionModifiersListView.Size = new System.Drawing.Size(518, 351);
+      this.runCollectionModifiersListView.TabIndex = 0;
+      // 
+      // RunCollectionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.Controls.Add(this.tabControl);
+      this.Name = "RunCollectionView";
+      this.Size = new System.Drawing.Size(532, 383);
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel2.ResumeLayout(false);
+      this.splitContainer.ResumeLayout(false);
+      this.toolStrip.ResumeLayout(false);
+      this.toolStrip.PerformLayout();
+      this.detailsGroupBox.ResumeLayout(false);
+      this.itemsGroupBox.ResumeLayout(false);
+      this.tabControl.ResumeLayout(false);
+      this.runPage.ResumeLayout(false);
+      this.constraintPage.ResumeLayout(false);
+      this.modifiersPage.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.SplitContainer splitContainer;
+    private System.Windows.Forms.ColumnHeader columnHeader1;
+    private GroupBox itemsGroupBox;
+    private ListView itemsListView;
+    private GroupBox detailsGroupBox;
+    private Button removeButton;
+    private ToolTip toolTip;
+    private ImageList imageList;
+    private HeuristicLab.MainForm.WindowsForms.ViewHost viewHost;
+    private ToolStrip toolStrip;
+    private ToolStripDropDownButton analyzeRunsToolStripDropDownButton;
+    private HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl;
+    private TabPage runPage;
+    private TabPage constraintPage;
+    private RunCollectionConstraintCollectionView runCollectionConstraintCollectionView;
+    private Button clearButton;
+    private CheckBox showDetailsCheckBox;
+    private TabPage modifiersPage;
+    private RunCollectionModifiersListView runCollectionModifiersListView;
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.cs	(revision 7469)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.cs	(revision 7469)
@@ -0,0 +1,495 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Optimization.Views {
+  [View("RunCollection View")]
+  [Content(typeof(RunCollection), true)]
+  [Content(typeof(IItemCollection<IRun>), false)]
+  public sealed partial class RunCollectionView : ItemView {
+    private Dictionary<IRun, List<ListViewItem>> itemListViewItemMapping;
+    private bool validDragOperation;
+
+    public new IItemCollection<IRun> Content {
+      get { return (IItemCollection<IRun>)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public RunCollection RunCollection {
+      get { return Content as RunCollection; }
+    }
+
+    public ListView ItemsListView {
+      get { return itemsListView; }
+    }
+
+    public RunCollectionView() {
+      InitializeComponent();
+      itemsGroupBox.Text = "Runs";
+      itemListViewItemMapping = new Dictionary<IRun, List<ListViewItem>>();
+      runCollectionModifiersListView.Evaluator = EvaluateModifications;
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.ItemsAdded -= new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved -= new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+      foreach (IRun run in itemListViewItemMapping.Keys) {
+        DeregisterItemEvents(run);
+      }
+      base.DeregisterContentEvents();
+    }
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ItemsAdded += new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
+      Content.ItemsRemoved += new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
+      Content.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
+    }
+    private void DeregisterItemEvents(IRun item) {
+      item.ItemImageChanged -= new EventHandler(Item_ItemImageChanged);
+      item.ToStringChanged -= new EventHandler(Item_ToStringChanged);
+      item.Changed -= new EventHandler(Item_Changed);
+    }
+    private void RegisterItemEvents(IRun item) {
+      item.ItemImageChanged += new EventHandler(Item_ItemImageChanged);
+      item.ToStringChanged += new EventHandler(Item_ToStringChanged);
+      item.Changed += new EventHandler(Item_Changed);
+    }
+
+    protected override void OnInitialized(EventArgs e) {
+      base.OnInitialized(e);
+      var viewTypes = MainFormManager.GetViewTypes(typeof(RunCollection), true);
+      foreach (Type viewType in viewTypes.OrderBy(x => ViewAttribute.GetViewName(x))) {
+        if ((viewType != typeof(ItemCollectionView<IRun>)) && (viewType != typeof(ViewHost))) {
+          ToolStripMenuItem menuItem = new ToolStripMenuItem();
+          menuItem.Text = ViewAttribute.GetViewName(viewType);
+          menuItem.Tag = viewType;
+          menuItem.Click += new EventHandler(menuItem_Click);
+          analyzeRunsToolStripDropDownButton.DropDownItems.Add(menuItem);
+        }
+      }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+
+      string selectedName = null;
+      if ((itemsListView.SelectedItems.Count == 1) && (itemsListView.SelectedItems[0].Tag != null))
+        selectedName = ((IRun)itemsListView.SelectedItems[0].Tag).Name;
+
+      itemsListView.Items.Clear();
+      itemListViewItemMapping.Clear();
+      RebuildImageList();
+      viewHost.Content = null;
+
+      if (Content != null) {
+        if (RunCollection != null) {
+          if (!tabControl.TabPages.Contains(constraintPage))
+            tabControl.TabPages.Add(constraintPage);
+          runCollectionConstraintCollectionView.Content = RunCollection.Constraints;
+          runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
+          if (!tabControl.TabPages.Contains(modifiersPage))
+            tabControl.TabPages.Add(modifiersPage);
+          runCollectionModifiersListView.Content = RunCollection.Modifiers;
+        }
+        foreach (IRun item in Content) {
+          ListViewItem listViewItem = CreateListViewItem(item);
+          AddListViewItem(listViewItem);
+          if ((selectedName != null) && item.Name.Equals(selectedName))
+            listViewItem.Selected = true;
+        }
+        AdjustListViewColumnSizes();
+      } else {
+        runCollectionConstraintCollectionView.Content = null;
+        if (tabControl.TabPages.Contains(constraintPage))
+          tabControl.TabPages.Remove(constraintPage);
+        if (tabControl.TabPages.Contains(modifiersPage))
+          tabControl.TabPages.Remove(modifiersPage);
+      }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      if (Content == null) {
+        analyzeRunsToolStripDropDownButton.Enabled = false;
+        runCollectionConstraintCollectionView.ReadOnly = true;
+        itemsListView.Enabled = false;
+        detailsGroupBox.Enabled = false;
+        viewHost.Enabled = false;
+        removeButton.Enabled = false;
+        clearButton.Enabled = false;
+      } else {
+        analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
+        runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
+        itemsListView.Enabled = true;
+        detailsGroupBox.Enabled = itemsListView.SelectedItems.Count == 1;
+        removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && !Content.IsReadOnly && !ReadOnly;
+        clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
+        viewHost.Enabled = true;
+      }
+    }
+
+    private ListViewItem CreateListViewItem(IRun item) {
+      ListViewItem listViewItem = new ListViewItem();
+      if (item == null) {
+        listViewItem.Text = "null";
+        itemsListView.SmallImageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.Nothing);
+        listViewItem.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
+      } else {
+        listViewItem.Text = item.ToString();
+        listViewItem.ToolTipText = item.ItemName + ": " + item.ItemDescription;
+        itemsListView.SmallImageList.Images.Add(item.ItemImage);
+        listViewItem.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
+        listViewItem.Tag = item;
+
+        if (item.Visible) {
+          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Regular);
+          listViewItem.ForeColor = item.Color;
+        } else {
+          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Italic);
+          listViewItem.ForeColor = Color.LightGray;
+        }
+      }
+      return listViewItem;
+    }
+    private void AddListViewItem(ListViewItem listViewItem) {
+      if (listViewItem == null) throw new ArgumentNullException();
+      itemsListView.Items.Add(listViewItem);
+      IRun run = listViewItem.Tag as IRun;
+      if (run != null) {
+        if (!itemListViewItemMapping.ContainsKey(run)) {
+          itemListViewItemMapping.Add(run, new List<ListViewItem>());
+          RegisterItemEvents(run);
+        }
+        itemListViewItemMapping[run].Add(listViewItem);
+      }
+    }
+    private void RemoveListViewItem(ListViewItem listViewItem) {
+      if (listViewItem == null) throw new ArgumentNullException();
+      IRun run = listViewItem.Tag as IRun;
+      if (run != null) {
+        itemListViewItemMapping[run].Remove(listViewItem);
+        if (itemListViewItemMapping[run].Count == 0) {
+          DeregisterItemEvents(run);
+          itemListViewItemMapping.Remove(run);
+        }
+      }
+      listViewItem.Remove();
+    }
+    private void UpdateListViewItemImage(ListViewItem listViewItem) {
+      if (listViewItem == null) throw new ArgumentNullException();
+      IRun item = listViewItem.Tag as IRun;
+      int i = listViewItem.ImageIndex;
+      itemsListView.SmallImageList.Images[i] = item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage;
+      listViewItem.ImageIndex = -1;
+      listViewItem.ImageIndex = i;
+    }
+    private void UpdateListViewItemText(ListViewItem listViewItem) {
+      if (listViewItem == null) throw new ArgumentNullException();
+      IRun item = listViewItem.Tag as IRun;
+      listViewItem.Text = item == null ? "null" : item.ToString();
+      listViewItem.ToolTipText = item == null ? string.Empty : item.ItemName + ": " + item.ItemDescription;
+    }
+    private IEnumerable<ListViewItem> GetListViewItemsForItem(IRun item) {
+      if (item == null) {
+        List<ListViewItem> listViewItems = new List<ListViewItem>();
+        foreach (ListViewItem listViewItem in itemsListView.Items) {
+          if (listViewItem.Tag == null) listViewItems.Add(listViewItem);
+        }
+        return listViewItems;
+      } else {
+        List<ListViewItem> listViewItems = null;
+        itemListViewItemMapping.TryGetValue(item, out listViewItems);
+        return listViewItems == null ? Enumerable.Empty<ListViewItem>() : listViewItems;
+      }
+    }
+
+    #region ListView Events
+    private void itemsListView_SelectedIndexChanged(object sender, EventArgs e) {
+      removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && (Content != null) && !Content.IsReadOnly && !ReadOnly;
+      // for performance reason (multiple selection fires this handler for every selected item)
+      if (itemsListView.SelectedIndices.Count <= 1)
+        AdjustListViewColumnSizes();
+      if (showDetailsCheckBox.Checked) {
+        if (itemsListView.SelectedItems.Count == 1) {
+          IRun item = (IRun)itemsListView.SelectedItems[0].Tag;
+          detailsGroupBox.Enabled = true;
+          viewHost.Content = item;
+        } else {
+          viewHost.Content = null;
+          detailsGroupBox.Enabled = false;
+        }
+      }
+    }
+    private void itemsListView_KeyDown(object sender, KeyEventArgs e) {
+      if (e.KeyCode == Keys.Delete) {
+        if ((itemsListView.SelectedItems.Count > 0) && !Content.IsReadOnly && !ReadOnly) {
+          foreach (ListViewItem item in itemsListView.SelectedItems)
+            Content.Remove((IRun)item.Tag);
+        }
+      }
+    }
+    private void itemsListView_DoubleClick(object sender, EventArgs e) {
+      if (itemsListView.SelectedItems.Count == 1) {
+        IRun item = itemsListView.SelectedItems[0].Tag as IRun;
+        if (item != null) {
+          IContentView view = MainFormManager.MainForm.ShowContent(item);
+          if (view != null) {
+            view.ReadOnly = ReadOnly;
+            view.Locked = Locked;
+          }
+        }
+      }
+    }
+    private void itemsListView_ItemDrag(object sender, ItemDragEventArgs e) {
+      if (!Locked) {
+        List<IRun> items = new List<IRun>();
+        foreach (ListViewItem listViewItem in itemsListView.SelectedItems) {
+          IRun item = listViewItem.Tag as IRun;
+          if (item != null) items.Add(item);
+        }
+
+        if (items.Count > 0) {
+          DataObject data = new DataObject();
+          if (items.Count == 1) data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items[0]);
+          else data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items);
+          if (Content.IsReadOnly || ReadOnly) {
+            DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link);
+          } else {
+            DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move);
+            if (result.HasFlag(DragDropEffects.Move)) {
+              foreach (IRun item in items) Content.Remove(item);
+            }
+          }
+        }
+      }
+    }
+    private void itemsListView_DragEnter(object sender, DragEventArgs e) {
+      validDragOperation = false;
+      if (!Content.IsReadOnly && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IRun)) {
+        validDragOperation = true;
+      } else if (!Content.IsReadOnly && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable)) {
+        validDragOperation = true;
+        IEnumerable items = (IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+        foreach (object item in items)
+          validDragOperation = validDragOperation && (item is IRun);
+      }
+    }
+    private void itemsListView_DragOver(object sender, DragEventArgs e) {
+      e.Effect = DragDropEffects.None;
+      if (validDragOperation) {
+        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.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy;
+        else if (e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move;
+        else if (e.AllowedEffect.HasFlag(DragDropEffects.Link)) e.Effect = DragDropEffects.Link;
+      }
+    }
+    private void itemsListView_DragDrop(object sender, DragEventArgs e) {
+      if (e.Effect != DragDropEffects.None) {
+        if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IRun) {
+          IRun item = (IRun)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+          Content.Add(e.Effect.HasFlag(DragDropEffects.Copy) ? (IRun)item.Clone() : item);
+        } else if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable) {
+          IEnumerable<IRun> items = ((IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat)).Cast<IRun>();
+          if (e.Effect.HasFlag(DragDropEffects.Copy)) {
+            Cloner cloner = new Cloner();
+            items = items.Select(x => cloner.Clone(x));
+          }
+          if (RunCollection != null) {
+            RunCollection.AddRange(items);
+          } else { // the content is an IItemCollection<IRun>
+            foreach (IRun item in items)
+              Content.Add(item);
+          }
+        }
+      }
+    }
+    #endregion
+
+    #region Button Events
+    private void menuItem_Click(object sender, EventArgs e) {
+      ToolStripMenuItem menuItem = (ToolStripMenuItem)sender;
+      Type viewType = (Type)menuItem.Tag;
+      IContentView view = MainFormManager.MainForm.ShowContent(Content, viewType);
+      if (view != null) {
+        view.Locked = Locked;
+        view.ReadOnly = ReadOnly;
+      }
+    }
+    private void removeButton_Click(object sender, EventArgs e) {
+      if (itemsListView.SelectedItems.Count > 0) {
+        foreach (ListViewItem item in itemsListView.SelectedItems)
+          Content.Remove((IRun)item.Tag);
+        itemsListView.SelectedItems.Clear();
+      }
+    }
+    private void clearButton_Click(object sender, EventArgs e) {
+      Content.Clear();
+    }
+    #endregion
+
+    #region Control Events
+    private void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) {
+      if (showDetailsCheckBox.Checked) {
+        splitContainer.Panel2Collapsed = false;
+        detailsGroupBox.Enabled = itemsListView.SelectedItems.Count == 1;
+        viewHost.Content = itemsListView.SelectedItems.Count == 1 ? (IRun)itemsListView.SelectedItems[0].Tag : null;
+      } else {
+        splitContainer.Panel2Collapsed = true;
+        viewHost.Content = null;
+      }
+    }
+    private void EvaluateModifications() {
+      if (RunCollection == null)
+        return;
+      ReadOnly = true;
+      try {
+        RunCollection.Modify();
+      } finally {
+        ReadOnly = false;
+      }
+    }
+    #endregion
+
+    #region Content Events
+    private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      if (InvokeRequired)
+        Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded), sender, e);
+      else {
+        foreach (IRun item in e.Items)
+          AddListViewItem(CreateListViewItem(item));
+
+        AdjustListViewColumnSizes();
+        analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
+        clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
+        runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
+      }
+    }
+    private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      if (InvokeRequired)
+        Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved), sender, e);
+      else {
+        foreach (IRun item in e.Items) {
+          //remove only the first matching ListViewItem, because the IRun could be contained multiple times in the ItemCollection
+          ListViewItem listViewItem = GetListViewItemsForItem(item).FirstOrDefault();
+          if (listViewItem != null) RemoveListViewItem(listViewItem);
+        }
+        RebuildImageList();
+        analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
+        clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
+        runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
+      }
+    }
+    private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      if (InvokeRequired)
+        Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset), sender, e);
+      else {
+        foreach (IRun item in e.OldItems) {
+          //remove only the first matching ListViewItem, because the IRun could be contained multiple times in the ItemCollection
+          ListViewItem listViewItem = GetListViewItemsForItem(item).FirstOrDefault();
+          if (listViewItem != null) RemoveListViewItem(listViewItem);
+        }
+        RebuildImageList();
+        foreach (IRun item in e.Items)
+          AddListViewItem(CreateListViewItem(item));
+
+        AdjustListViewColumnSizes();
+        analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0;
+        clearButton.Enabled = itemsListView.Items.Count > 0 && !Content.IsReadOnly && !ReadOnly;
+        runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
+      }
+    }
+    #endregion
+
+    #region Item Events
+    private void Item_ItemImageChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Item_ItemImageChanged), sender, e);
+      else {
+        IRun item = (IRun)sender;
+        foreach (ListViewItem listViewItem in GetListViewItemsForItem(item))
+          UpdateListViewItemImage(listViewItem);
+      }
+    }
+    private void Item_ToStringChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Item_ToStringChanged), sender, e);
+      else {
+        IRun item = (IRun)sender;
+        foreach (ListViewItem listViewItem in GetListViewItemsForItem(item))
+          UpdateListViewItemText(listViewItem);
+        AdjustListViewColumnSizes();
+      }
+    }
+    private void Item_Changed(object sender, EventArgs e) {
+      if (InvokeRequired)
+        this.Invoke(new EventHandler(Item_Changed), sender, e);
+      else {
+        IRun run = (IRun)sender;
+        UpdateRun(run);
+      }
+    }
+
+    private void UpdateRun(IRun run) {
+      foreach (ListViewItem listViewItem in GetListViewItemsForItem(run)) {
+        if (run.Visible) {
+          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Regular);
+          listViewItem.ForeColor = run.Color;
+        } else {
+          listViewItem.Font = new Font(listViewItem.Font, FontStyle.Italic);
+          listViewItem.ForeColor = Color.LightGray;
+        }
+      }
+    }
+    #endregion
+
+    #region Helpers
+    private void AdjustListViewColumnSizes() {
+      if (itemsListView.Items.Count > 0) {
+        for (int i = 0; i < itemsListView.Columns.Count; i++) {
+          itemsListView.Columns[i].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
+        }
+      }
+    }
+    private void RebuildImageList() {
+      itemsListView.SmallImageList.Images.Clear();
+      foreach (ListViewItem listViewItem in itemsListView.Items) {
+        IRun item = listViewItem.Tag as IRun;
+        itemsListView.SmallImageList.Images.Add(item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : item.ItemImage);
+        listViewItem.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
+      }
+    }
+    #endregion
+  }
+}
