Index: /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
===================================================================
--- /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 10721)
+++ /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 10722)
@@ -217,4 +217,10 @@
     </Compile>
     <Compile Include="Plugin.cs" />
+    <Compile Include="SlidingWindowBestSolutionsCollectionHeatMapControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SlidingWindowBestSolutionsCollectionHeatMapControl.Designer.cs">
+      <DependentUpon>SlidingWindowBestSolutionsCollectionHeatMapControl.cs</DependentUpon>
+    </Compile>
     <Compile Include="SlidingWindowBestSolutionsCollectionHeatMapView.cs">
       <SubType>UserControl</SubType>
@@ -343,4 +349,9 @@
   <ItemGroup>
     <Folder Include="Exporters\" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="SlidingWindowBestSolutionsCollectionView.resx">
+      <DependentUpon>SlidingWindowBestSolutionsCollectionView.cs</DependentUpon>
+    </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapControl.Designer.cs
===================================================================
--- /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapControl.Designer.cs	(revision 10722)
+++ /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapControl.Designer.cs	(revision 10722)
@@ -0,0 +1,111 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Problems.DataAnalysis.Symbolic.Views {
+
+  public partial class SlidingWindowBestSolutionsCollectionHeatMapControl {
+    /// <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.heatMapView = new SlidingWindowBestSolutionsCollectionHeatMapView();
+      this.comboBox1 = new System.Windows.Forms.ComboBox();
+      this.label1 = new System.Windows.Forms.Label();
+      this.SuspendLayout();
+      // 
+      // heatMapView
+      // 
+      this.heatMapView.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.heatMapView.Caption = "HeatMap View";
+      this.heatMapView.Content = null;
+      this.heatMapView.Location = new System.Drawing.Point(3, 53);
+      this.heatMapView.Name = "heatMapView";
+      this.heatMapView.ReadOnly = false;
+      this.heatMapView.Size = new System.Drawing.Size(812, 537);
+      this.heatMapView.TabIndex = 0;
+      // 
+      // comboBox1
+      // 
+      this.comboBox1.FormattingEnabled = true;
+      this.comboBox1.Items.AddRange(new object[] {
+            "Pearson R2",
+            "Mean Squared Error"});
+      this.comboBox1.Location = new System.Drawing.Point(3, 26);
+      this.comboBox1.Name = "comboBox1";
+      this.comboBox1.Size = new System.Drawing.Size(153, 21);
+      this.comboBox1.TabIndex = 1;
+      this.comboBox1.Text = "Pearson R2";
+      this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
+      this.comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(3, 8);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(85, 13);
+      this.label1.TabIndex = 2;
+      this.label1.Text = "Quality measure:";
+      // 
+      // SlidingWindowBestSolutionsCollectionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.comboBox1);
+      this.Controls.Add(this.heatMapView);
+      this.Name = "SlidingWindowBestSolutionsCollectionView";
+      this.Size = new System.Drawing.Size(818, 593);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private SlidingWindowBestSolutionsCollectionHeatMapView heatMapView;
+    private System.Windows.Forms.ComboBox comboBox1;
+    private System.Windows.Forms.Label label1;
+  }
+}
Index: /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapControl.cs
===================================================================
--- /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapControl.cs	(revision 10722)
+++ /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapControl.cs	(revision 10722)
@@ -0,0 +1,165 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.ComponentModel;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Analysis;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Views;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
+  [View("Sliding Window Best Solutions HeatMap View")]
+  [Content(typeof(SlidingWindowBestSolutionsCollection), false)]
+  public partial class SlidingWindowBestSolutionsCollectionHeatMapControl : ItemView {
+    public new SlidingWindowBestSolutionsCollection Content {
+      get { return (SlidingWindowBestSolutionsCollection)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content != null) {
+        // set the dropdown value to the correct value
+        switch (Content.QualityMeasure) {
+          case SlidingWindowBestSolutionsCollection.QualityMeasures.PEARSON:
+            comboBox1.SelectedIndex = comboBox1.Items.IndexOf("Pearson R2");
+            break;
+          case SlidingWindowBestSolutionsCollection.QualityMeasures.MSE:
+            comboBox1.SelectedIndex = comboBox1.Items.IndexOf("Mean Squared Error");
+            break;
+        }
+        if (Content.SlidingWindowQualities != null) {
+          SetHeatmapContent(Content.SlidingWindowQualities);
+        } else if (!Content.QualitiesCalculationInProgress) {
+          Content.CalculateQualities();
+        }
+      }
+    }
+
+    private readonly IProgress progress; // use this to show some progress when the sliding window qualities are calculated for each model
+
+    public SlidingWindowBestSolutionsCollectionHeatMapControl() {
+      InitializeComponent();
+      progress = new Progress();
+      MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, progress);
+    }
+
+    protected override void DeregisterContentEvents() {
+      // TODO: Deregister your event handlers here
+      Content.QualitiesCalculationCompleted -= bestSolutionsCollectionQualitiesCalculated;
+      Content.QualitiesCalculationProgress -= bestSolutionCollectionQualitiesCalculationProgress;
+      Content.QualitiesUpdated -= bestSolutionCollectionQualitiesUpdated;
+      Content.QualitiesCalculationStarted -= bestSolutionsCollectionQualtiesCalculationStarted;
+      base.DeregisterContentEvents();
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      // TODO: Register your event handlers here
+      Content.QualitiesCalculationCompleted += bestSolutionsCollectionQualitiesCalculated;
+      Content.QualitiesCalculationProgress += bestSolutionCollectionQualitiesCalculationProgress;
+      Content.QualitiesUpdated += bestSolutionCollectionQualitiesUpdated;
+      Content.QualitiesCalculationStarted += bestSolutionsCollectionQualtiesCalculationStarted;
+    }
+
+    private void bestSolutionsCollectionQualitiesCalculated(object sender, RunWorkerCompletedEventArgs e) {
+      if (e.Cancelled || e.Error != null) {
+        progress.Cancel();
+        return;
+      }
+      SetHeatmapContent(Content.SlidingWindowQualities);
+      progress.Finish();
+    }
+
+    private void bestSolutionCollectionQualitiesUpdated(object sender, EventArgs e) {
+      SetHeatmapContent(Content.SlidingWindowQualities);
+    }
+
+    private void SetHeatmapContent(double[,] values) {
+      double min = 0, max = 0;
+      if (Content.QualityMeasure == SlidingWindowBestSolutionsCollection.QualityMeasures.PEARSON) {
+        max = 1.0;
+      } else {
+        foreach (var q in values) {
+          if (min > q) min = q;
+          if (max < q) max = q;
+        }
+      }
+      int rows = values.GetLength(0);
+      int cols = values.GetLength(1);
+      var flipped = new double[rows, cols];
+      for (int i = 0; i < rows; ++i) {
+        for (int j = 0; j < cols; ++j) {
+          flipped[i, j] = values[rows - i - 1, j];
+        }
+      }
+      heatMapView.Content = new HeatMap(flipped, "Best Sliding Window Solutions", min, max);
+    }
+
+    private void bestSolutionsCollectionQualtiesCalculationStarted(object sender, EventArgs e) {
+      progress.Start("Calculating best solutions qualities...");
+    }
+
+    private void bestSolutionCollectionQualitiesCalculationProgress(object sender, ProgressChangedEventArgs e) {
+      progress.ProgressValue = e.ProgressPercentage / 100.0;
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      // TODO: Enable or disable controls based on whether the content is null or the view is set readonly
+    }
+
+    #region Event Handlers (child controls)
+    public void heatMapView_cellDoubleClick(object sender, DataGridViewCellEventArgs e) {
+      var dataGridView = (DataGridView)sender;
+      var cell = dataGridView.SelectedCells[0];
+      var bestSolutions = Content.SlidingWindowBestSolutions.Values.ToList();
+      var tree = bestSolutions[cell.RowIndex];
+      var model = Content.CreateModel(tree, Content.Interpreter);
+      var solution = Content.CreateSolution(model, Content.ProblemData);
+      var result = new Result("Sliding Window Solution", solution);
+      var view = MainFormManager.MainForm.ShowContent(result, typeof(ResultView));
+      if (view != null) {
+        view.ReadOnly = ReadOnly;
+        view.Locked = Locked;
+      }
+    }
+
+    private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e) {
+      var combobox = (ComboBox)sender;
+      switch ((string)combobox.SelectedItem) {
+        case "Pearson R2": {
+            Content.QualityMeasure = SlidingWindowBestSolutionsCollection.QualityMeasures.PEARSON;
+            break;
+          }
+        case "Mean Squared Error": {
+            Content.QualityMeasure = SlidingWindowBestSolutionsCollection.QualityMeasures.MSE;
+            break;
+          }
+      }
+    }
+    #endregion
+  }
+}
Index: anches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapView.Designer.cs
===================================================================
--- /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapView.Designer.cs	(revision 10721)
+++ 	(revision )
@@ -1,111 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 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.Problems.DataAnalysis.Symbolic.Views {
-
-  public partial class SlidingWindowBestSolutionsCollectionHeatMapView {
-    /// <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.heatMapView = new HeuristicLab.Analysis.Views.HeatMapView();
-      this.comboBox1 = new System.Windows.Forms.ComboBox();
-      this.label1 = new System.Windows.Forms.Label();
-      this.SuspendLayout();
-      // 
-      // heatMapView
-      // 
-      this.heatMapView.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.heatMapView.Caption = "HeatMap View";
-      this.heatMapView.Content = null;
-      this.heatMapView.Location = new System.Drawing.Point(3, 53);
-      this.heatMapView.Name = "heatMapView";
-      this.heatMapView.ReadOnly = false;
-      this.heatMapView.Size = new System.Drawing.Size(812, 537);
-      this.heatMapView.TabIndex = 0;
-      // 
-      // comboBox1
-      // 
-      this.comboBox1.FormattingEnabled = true;
-      this.comboBox1.Items.AddRange(new object[] {
-            "Pearson R2",
-            "Mean Squared Error"});
-      this.comboBox1.Location = new System.Drawing.Point(3, 26);
-      this.comboBox1.Name = "comboBox1";
-      this.comboBox1.Size = new System.Drawing.Size(153, 21);
-      this.comboBox1.TabIndex = 1;
-      this.comboBox1.Text = "Pearson R2";
-      this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
-      this.comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
-      // 
-      // label1
-      // 
-      this.label1.AutoSize = true;
-      this.label1.Location = new System.Drawing.Point(3, 8);
-      this.label1.Name = "label1";
-      this.label1.Size = new System.Drawing.Size(85, 13);
-      this.label1.TabIndex = 2;
-      this.label1.Text = "Quality measure:";
-      // 
-      // SlidingWindowBestSolutionsCollectionView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.label1);
-      this.Controls.Add(this.comboBox1);
-      this.Controls.Add(this.heatMapView);
-      this.Name = "SlidingWindowBestSolutionsCollectionView";
-      this.Size = new System.Drawing.Size(818, 593);
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private HeuristicLab.Analysis.Views.HeatMapView heatMapView;
-    private System.Windows.Forms.ComboBox comboBox1;
-    private System.Windows.Forms.Label label1;
-  }
-}
Index: anches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapView.cs
===================================================================
--- /branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowBestSolutionsCollectionHeatMapView.cs	(revision 10721)
+++ 	(revision )
@@ -1,165 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2014 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.ComponentModel;
-using System.Linq;
-using System.Windows.Forms;
-using HeuristicLab.Analysis;
-using HeuristicLab.Core.Views;
-using HeuristicLab.MainForm;
-using HeuristicLab.Optimization;
-using HeuristicLab.Optimization.Views;
-
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
-  [View("Sliding Window Best Solutions HeatMap View")]
-  [Content(typeof(SlidingWindowBestSolutionsCollection), false)]
-  public partial class SlidingWindowBestSolutionsCollectionHeatMapView : ItemView {
-    public new SlidingWindowBestSolutionsCollection Content {
-      get { return (SlidingWindowBestSolutionsCollection)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content != null) {
-        // set the dropdown value to the correct value
-        switch (Content.QualityMeasure) {
-          case SlidingWindowBestSolutionsCollection.QualityMeasures.PEARSON:
-            comboBox1.SelectedIndex = comboBox1.Items.IndexOf("Pearson R2");
-            break;
-          case SlidingWindowBestSolutionsCollection.QualityMeasures.MSE:
-            comboBox1.SelectedIndex = comboBox1.Items.IndexOf("Mean Squared Error");
-            break;
-        }
-        if (Content.SlidingWindowQualities != null) {
-          SetHeatmapContent(Content.SlidingWindowQualities);
-        } else if (!Content.QualitiesCalculationInProgress) {
-          Content.CalculateQualities();
-        }
-      }
-    }
-
-    private readonly IProgress progress; // use this to show some progress when the sliding window qualities are calculated for each model
-
-    public SlidingWindowBestSolutionsCollectionHeatMapView() {
-      InitializeComponent();
-      progress = new Progress();
-      MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, progress);
-    }
-
-    protected override void DeregisterContentEvents() {
-      // TODO: Deregister your event handlers here
-      Content.QualitiesCalculationCompleted -= bestSolutionsCollectionQualitiesCalculated;
-      Content.QualitiesCalculationProgress -= bestSolutionCollectionQualitiesCalculationProgress;
-      Content.QualitiesUpdated -= bestSolutionCollectionQualitiesUpdated;
-      Content.QualitiesCalculationStarted -= bestSolutionsCollectionQualtiesCalculationStarted;
-      base.DeregisterContentEvents();
-    }
-
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      // TODO: Register your event handlers here
-      Content.QualitiesCalculationCompleted += bestSolutionsCollectionQualitiesCalculated;
-      Content.QualitiesCalculationProgress += bestSolutionCollectionQualitiesCalculationProgress;
-      Content.QualitiesUpdated += bestSolutionCollectionQualitiesUpdated;
-      Content.QualitiesCalculationStarted += bestSolutionsCollectionQualtiesCalculationStarted;
-    }
-
-    private void bestSolutionsCollectionQualitiesCalculated(object sender, RunWorkerCompletedEventArgs e) {
-      if (e.Cancelled || e.Error != null) {
-        progress.Cancel();
-        return;
-      }
-      SetHeatmapContent(Content.SlidingWindowQualities);
-      progress.Finish();
-    }
-
-    private void bestSolutionCollectionQualitiesUpdated(object sender, EventArgs e) {
-      SetHeatmapContent(Content.SlidingWindowQualities);
-    }
-
-    private void SetHeatmapContent(double[,] values) {
-      double min = 0, max = 0;
-      if (Content.QualityMeasure == SlidingWindowBestSolutionsCollection.QualityMeasures.PEARSON) {
-        max = 1.0;
-      } else {
-        foreach (var q in values) {
-          if (min > q) min = q;
-          if (max < q) max = q;
-        }
-      }
-      int rows = values.GetLength(0);
-      int cols = values.GetLength(1);
-      var flipped = new double[rows, cols];
-      for (int i = 0; i < rows; ++i) {
-        for (int j = 0; j < cols; ++j) {
-          flipped[i, j] = values[rows - i - 1, j];
-        }
-      }
-      heatMapView.Content = new HeatMap(flipped, "Best Sliding Window Solutions", min, max);
-    }
-
-    private void bestSolutionsCollectionQualtiesCalculationStarted(object sender, EventArgs e) {
-      progress.Start("Calculating best solutions qualities...");
-    }
-
-    private void bestSolutionCollectionQualitiesCalculationProgress(object sender, ProgressChangedEventArgs e) {
-      progress.ProgressValue = e.ProgressPercentage / 100.0;
-    }
-
-    protected override void SetEnabledStateOfControls() {
-      base.SetEnabledStateOfControls();
-      // TODO: Enable or disable controls based on whether the content is null or the view is set readonly
-    }
-
-    #region Event Handlers (child controls)
-    public void heatMapView_cellDoubleClick(object sender, DataGridViewCellEventArgs e) {
-      var dataGridView = (DataGridView)sender;
-      var cell = dataGridView.SelectedCells[0];
-      var bestSolutions = Content.SlidingWindowBestSolutions.Values.ToList();
-      var tree = bestSolutions[cell.RowIndex];
-      var model = Content.CreateModel(tree, Content.Interpreter);
-      var solution = Content.CreateSolution(model, Content.ProblemData);
-      var result = new Result("Sliding Window Solution", solution);
-      var view = MainFormManager.MainForm.ShowContent(result, typeof(ResultView));
-      if (view != null) {
-        view.ReadOnly = ReadOnly;
-        view.Locked = Locked;
-      }
-    }
-
-    private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e) {
-      var combobox = (ComboBox)sender;
-      switch ((string)combobox.SelectedItem) {
-        case "Pearson R2": {
-            Content.QualityMeasure = SlidingWindowBestSolutionsCollection.QualityMeasures.PEARSON;
-            break;
-          }
-        case "Mean Squared Error": {
-            Content.QualityMeasure = SlidingWindowBestSolutionsCollection.QualityMeasures.MSE;
-            break;
-          }
-      }
-    }
-    #endregion
-  }
-}
