Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8880


Ignore:
Timestamp:
11/08/12 12:10:38 (12 years ago)
Author:
sforsten
Message:

#1292: implemented changes suggested by mkommend in comment:49:ticket:1292

Location:
trunk/sources
Files:
1 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixColumnVisibilityDialog.Designer.cs

    r8870 r8880  
    1 namespace HeuristicLab.Data.Views {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.Data.Views {
    223  partial class StringConvertibleMatrixColumnVisibilityDialog {
    324    /// <summary>
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixRowVisibilityDialog.Designer.cs

    r8870 r8880  
    1 namespace HeuristicLab.Data.Views {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.Data.Views {
    223  partial class StringConvertibleMatrixRowVisibilityDialog {
    324    /// <summary>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationFeatureCorrelationView.Designer.cs

    r8689 r8880  
    1 namespace HeuristicLab.Problems.DataAnalysis.Views {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.Problems.DataAnalysis.Views {
    223  partial class ClassificationFeatureCorrelationView {
    324    /// <summary>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.Designer.cs

    r8689 r8880  
    1 namespace HeuristicLab.Problems.DataAnalysis.Views {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.Problems.DataAnalysis.Views {
    223  partial class ClassificationTimeframeFeatureCorrelationView {
    324    /// <summary>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.cs

    r8833 r8880  
    3737    }
    3838
     39    protected override void SetVariableSelectionComboBox() {
     40      base.SetVariableSelectionComboBox();
     41      variableSelectionComboBox.SelectedItem = Content.TargetVariable;
     42    }
     43
    3944    protected override bool[] SetInitialVariableVisibility() {
    4045      int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.Designer.cs

    r8833 r8880  
    4949      this.components = new System.ComponentModel.Container();
    5050      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AbstractFeatureCorrelationView));
    51       this.HeatMapProgressBar = new System.Windows.Forms.ProgressBar();
    52       this.PartitionComboBox = new System.Windows.Forms.ComboBox();
    53       this.CorrelationCalcLabel = new System.Windows.Forms.Label();
    54       this.CorrelationCalcComboBox = new System.Windows.Forms.ComboBox();
    55       this.PartitionLabel = new System.Windows.Forms.Label();
     51      this.heatMapProgressBar = new System.Windows.Forms.ProgressBar();
     52      this.partitionComboBox = new System.Windows.Forms.ComboBox();
     53      this.correlationCalcLabel = new System.Windows.Forms.Label();
     54      this.correlationCalcComboBox = new System.Windows.Forms.ComboBox();
     55      this.partitionLabel = new System.Windows.Forms.Label();
    5656      this.minimumLabel = new System.Windows.Forms.Label();
    5757      this.maximumLabel = new System.Windows.Forms.Label();
    58       this.PictureBox = new System.Windows.Forms.PictureBox();
    59       this.SplitContainer = new System.Windows.Forms.SplitContainer();
    60       this.CalculatingPanel = new System.Windows.Forms.Panel();
    61       this.CalculatingLabel = new System.Windows.Forms.Label();
     58      this.pictureBox = new System.Windows.Forms.PictureBox();
     59      this.splitContainer = new System.Windows.Forms.SplitContainer();
     60      this.calculatingPanel = new System.Windows.Forms.Panel();
     61      this.calculatingLabel = new System.Windows.Forms.Label();
    6262      this.dataView = new HeuristicLab.Problems.DataAnalysis.Views.EnhancedStringConvertibleMatrixView();
    63       ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
    64       ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
    65       this.SplitContainer.Panel1.SuspendLayout();
    66       this.SplitContainer.Panel2.SuspendLayout();
    67       this.SplitContainer.SuspendLayout();
    68       this.CalculatingPanel.SuspendLayout();
     63      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
     64      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     65      this.splitContainer.Panel1.SuspendLayout();
     66      this.splitContainer.Panel2.SuspendLayout();
     67      this.splitContainer.SuspendLayout();
     68      this.calculatingPanel.SuspendLayout();
    6969      this.SuspendLayout();
    7070      //
    7171      // HeatMapProgressBar
    7272      //
    73       this.HeatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
    74       this.HeatMapProgressBar.Location = new System.Drawing.Point(25, 46);
    75       this.HeatMapProgressBar.Name = "HeatMapProgressBar";
    76       this.HeatMapProgressBar.RightToLeft = System.Windows.Forms.RightToLeft.No;
    77       this.HeatMapProgressBar.Size = new System.Drawing.Size(154, 21);
    78       this.HeatMapProgressBar.TabIndex = 9;
     73      this.heatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
     74      this.heatMapProgressBar.Location = new System.Drawing.Point(25, 46);
     75      this.heatMapProgressBar.Name = "HeatMapProgressBar";
     76      this.heatMapProgressBar.RightToLeft = System.Windows.Forms.RightToLeft.No;
     77      this.heatMapProgressBar.Size = new System.Drawing.Size(154, 21);
     78      this.heatMapProgressBar.TabIndex = 9;
    7979      //
    8080      // PartitionComboBox
    8181      //
    82       this.PartitionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    83       this.PartitionComboBox.FormattingEnabled = true;
    84       this.PartitionComboBox.Location = new System.Drawing.Point(333, 3);
    85       this.PartitionComboBox.Name = "PartitionComboBox";
    86       this.PartitionComboBox.Size = new System.Drawing.Size(142, 21);
    87       this.PartitionComboBox.TabIndex = 8;
    88       this.PartitionComboBox.SelectionChangeCommitted += new System.EventHandler(this.PartitionComboBox_SelectedChangeCommitted);
     82      this.partitionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     83      this.partitionComboBox.FormattingEnabled = true;
     84      this.partitionComboBox.Location = new System.Drawing.Point(333, 3);
     85      this.partitionComboBox.Name = "PartitionComboBox";
     86      this.partitionComboBox.Size = new System.Drawing.Size(142, 21);
     87      this.partitionComboBox.TabIndex = 8;
     88      this.partitionComboBox.SelectionChangeCommitted += new System.EventHandler(this.PartitionComboBox_SelectedChangeCommitted);
    8989      //
    9090      // CorrelationCalcLabel
    9191      //
    92       this.CorrelationCalcLabel.AutoSize = true;
    93       this.CorrelationCalcLabel.Location = new System.Drawing.Point(0, 6);
    94       this.CorrelationCalcLabel.Name = "CorrelationCalcLabel";
    95       this.CorrelationCalcLabel.Size = new System.Drawing.Size(104, 13);
    96       this.CorrelationCalcLabel.TabIndex = 7;
    97       this.CorrelationCalcLabel.Text = "Correlation Measure:";
     92      this.correlationCalcLabel.AutoSize = true;
     93      this.correlationCalcLabel.Location = new System.Drawing.Point(0, 6);
     94      this.correlationCalcLabel.Name = "CorrelationCalcLabel";
     95      this.correlationCalcLabel.Size = new System.Drawing.Size(104, 13);
     96      this.correlationCalcLabel.TabIndex = 7;
     97      this.correlationCalcLabel.Text = "Correlation Measure:";
    9898      //
    9999      // CorrelationCalcComboBox
    100100      //
    101       this.CorrelationCalcComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    102       this.CorrelationCalcComboBox.FormattingEnabled = true;
    103       this.CorrelationCalcComboBox.Location = new System.Drawing.Point(110, 3);
    104       this.CorrelationCalcComboBox.Name = "CorrelationCalcComboBox";
    105       this.CorrelationCalcComboBox.Size = new System.Drawing.Size(163, 21);
    106       this.CorrelationCalcComboBox.TabIndex = 6;
    107       this.CorrelationCalcComboBox.SelectionChangeCommitted += new System.EventHandler(this.CorrelationMeasureComboBox_SelectedChangeCommitted);
     101      this.correlationCalcComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     102      this.correlationCalcComboBox.FormattingEnabled = true;
     103      this.correlationCalcComboBox.Location = new System.Drawing.Point(110, 3);
     104      this.correlationCalcComboBox.Name = "CorrelationCalcComboBox";
     105      this.correlationCalcComboBox.Size = new System.Drawing.Size(163, 21);
     106      this.correlationCalcComboBox.TabIndex = 6;
     107      this.correlationCalcComboBox.SelectionChangeCommitted += new System.EventHandler(this.CorrelationMeasureComboBox_SelectedChangeCommitted);
    108108      //
    109109      // PartitionLabel
    110110      //
    111       this.PartitionLabel.AutoSize = true;
    112       this.PartitionLabel.Location = new System.Drawing.Point(279, 6);
    113       this.PartitionLabel.Name = "PartitionLabel";
    114       this.PartitionLabel.Size = new System.Drawing.Size(48, 13);
    115       this.PartitionLabel.TabIndex = 10;
    116       this.PartitionLabel.Text = "Partition:";
     111      this.partitionLabel.AutoSize = true;
     112      this.partitionLabel.Location = new System.Drawing.Point(279, 6);
     113      this.partitionLabel.Name = "PartitionLabel";
     114      this.partitionLabel.Size = new System.Drawing.Size(48, 13);
     115      this.partitionLabel.TabIndex = 10;
     116      this.partitionLabel.Text = "Partition:";
    117117      //
    118118      // minimumLabel
     
    140140      // PictureBox
    141141      //
    142       this.PictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     142      this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    143143            | System.Windows.Forms.AnchorStyles.Right)));
    144       this.PictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
    145       this.PictureBox.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox.Image")));
    146       this.PictureBox.Location = new System.Drawing.Point(507, 30);
    147       this.PictureBox.Name = "PictureBox";
    148       this.PictureBox.Size = new System.Drawing.Size(35, 281);
    149       this.PictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
    150       this.PictureBox.TabIndex = 15;
    151       this.PictureBox.TabStop = false;
     144      this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     145      this.pictureBox.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox.Image")));
     146      this.pictureBox.Location = new System.Drawing.Point(507, 30);
     147      this.pictureBox.Name = "PictureBox";
     148      this.pictureBox.Size = new System.Drawing.Size(35, 281);
     149      this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     150      this.pictureBox.TabIndex = 15;
     151      this.pictureBox.TabStop = false;
    152152      //
    153153      // SplitContainer
    154154      //
    155       this.SplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     155      this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    156156            | System.Windows.Forms.AnchorStyles.Left)
    157157            | System.Windows.Forms.AnchorStyles.Right)));
    158       this.SplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
    159       this.SplitContainer.IsSplitterFixed = true;
    160       this.SplitContainer.Location = new System.Drawing.Point(3, 3);
    161       this.SplitContainer.Name = "SplitContainer";
    162       this.SplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
     158      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
     159      this.splitContainer.IsSplitterFixed = true;
     160      this.splitContainer.Location = new System.Drawing.Point(3, 3);
     161      this.splitContainer.Name = "SplitContainer";
     162      this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
    163163      //
    164164      // SplitContainer.Panel1
    165165      //
    166       this.SplitContainer.Panel1.Controls.Add(this.CorrelationCalcLabel);
    167       this.SplitContainer.Panel1.Controls.Add(this.CorrelationCalcComboBox);
    168       this.SplitContainer.Panel1.Controls.Add(this.PartitionComboBox);
    169       this.SplitContainer.Panel1.Controls.Add(this.PartitionLabel);
     166      this.splitContainer.Panel1.Controls.Add(this.correlationCalcLabel);
     167      this.splitContainer.Panel1.Controls.Add(this.correlationCalcComboBox);
     168      this.splitContainer.Panel1.Controls.Add(this.partitionComboBox);
     169      this.splitContainer.Panel1.Controls.Add(this.partitionLabel);
    170170      //
    171171      // SplitContainer.Panel2
    172172      //
    173       this.SplitContainer.Panel2.Controls.Add(this.CalculatingPanel);
    174       this.SplitContainer.Panel2.Controls.Add(this.dataView);
    175       this.SplitContainer.Size = new System.Drawing.Size(475, 330);
    176       this.SplitContainer.SplitterDistance = 25;
    177       this.SplitContainer.TabIndex = 16;
     173      this.splitContainer.Panel2.Controls.Add(this.calculatingPanel);
     174      this.splitContainer.Panel2.Controls.Add(this.dataView);
     175      this.splitContainer.Size = new System.Drawing.Size(475, 330);
     176      this.splitContainer.SplitterDistance = 25;
     177      this.splitContainer.TabIndex = 16;
    178178      //
    179179      // CalculatingPanel
    180180      //
    181       this.CalculatingPanel.Anchor = System.Windows.Forms.AnchorStyles.None;
    182       this.CalculatingPanel.Controls.Add(this.CalculatingLabel);
    183       this.CalculatingPanel.Controls.Add(this.HeatMapProgressBar);
    184       this.CalculatingPanel.Location = new System.Drawing.Point(138, 95);
    185       this.CalculatingPanel.Name = "CalculatingPanel";
    186       this.CalculatingPanel.Size = new System.Drawing.Size(200, 81);
    187       this.CalculatingPanel.TabIndex = 10;
     181      this.calculatingPanel.Anchor = System.Windows.Forms.AnchorStyles.None;
     182      this.calculatingPanel.Controls.Add(this.calculatingLabel);
     183      this.calculatingPanel.Controls.Add(this.heatMapProgressBar);
     184      this.calculatingPanel.Location = new System.Drawing.Point(138, 95);
     185      this.calculatingPanel.Name = "CalculatingPanel";
     186      this.calculatingPanel.Size = new System.Drawing.Size(200, 81);
     187      this.calculatingPanel.TabIndex = 10;
    188188      //
    189189      // CalculatingLabel
    190190      //
    191       this.CalculatingLabel.AutoSize = true;
    192       this.CalculatingLabel.Location = new System.Drawing.Point(42, 19);
    193       this.CalculatingLabel.Name = "CalculatingLabel";
    194       this.CalculatingLabel.Size = new System.Drawing.Size(120, 13);
    195       this.CalculatingLabel.TabIndex = 10;
    196       this.CalculatingLabel.Text = "Calculating correlation...";
     191      this.calculatingLabel.AutoSize = true;
     192      this.calculatingLabel.Location = new System.Drawing.Point(42, 19);
     193      this.calculatingLabel.Name = "CalculatingLabel";
     194      this.calculatingLabel.Size = new System.Drawing.Size(120, 13);
     195      this.calculatingLabel.TabIndex = 10;
     196      this.calculatingLabel.Text = "Calculating correlation...";
    197197      //
    198198      // DataGridView
     
    209209      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    210210      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    211       this.Controls.Add(this.SplitContainer);
     211      this.Controls.Add(this.splitContainer);
    212212      this.Controls.Add(this.minimumLabel);
    213       this.Controls.Add(this.PictureBox);
     213      this.Controls.Add(this.pictureBox);
    214214      this.Controls.Add(this.maximumLabel);
    215215      this.Name = "AbstractFeatureCorrelationView";
    216216      this.Size = new System.Drawing.Size(569, 336);
    217       ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).EndInit();
    218       this.SplitContainer.Panel1.ResumeLayout(false);
    219       this.SplitContainer.Panel1.PerformLayout();
    220       this.SplitContainer.Panel2.ResumeLayout(false);
    221       ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit();
    222       this.SplitContainer.ResumeLayout(false);
    223       this.CalculatingPanel.ResumeLayout(false);
    224       this.CalculatingPanel.PerformLayout();
     217      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
     218      this.splitContainer.Panel1.ResumeLayout(false);
     219      this.splitContainer.Panel1.PerformLayout();
     220      this.splitContainer.Panel2.ResumeLayout(false);
     221      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
     222      this.splitContainer.ResumeLayout(false);
     223      this.calculatingPanel.ResumeLayout(false);
     224      this.calculatingPanel.PerformLayout();
    225225      this.ResumeLayout(false);
    226226
     
    229229    #endregion
    230230
    231     protected System.Windows.Forms.ProgressBar HeatMapProgressBar;
    232     protected System.Windows.Forms.ComboBox PartitionComboBox;
    233     protected System.Windows.Forms.Label CorrelationCalcLabel;
    234     protected System.Windows.Forms.ComboBox CorrelationCalcComboBox;
    235     protected System.Windows.Forms.Label PartitionLabel;
     231    protected System.Windows.Forms.ProgressBar heatMapProgressBar;
     232    protected System.Windows.Forms.ComboBox partitionComboBox;
     233    protected System.Windows.Forms.Label correlationCalcLabel;
     234    protected System.Windows.Forms.ComboBox correlationCalcComboBox;
     235    protected System.Windows.Forms.Label partitionLabel;
    236236    protected System.Windows.Forms.Label minimumLabel;
    237237    protected System.Windows.Forms.Label maximumLabel;
    238     protected System.Windows.Forms.PictureBox PictureBox;
    239     protected System.Windows.Forms.SplitContainer SplitContainer;
    240     protected System.Windows.Forms.Panel CalculatingPanel;
    241     protected System.Windows.Forms.Label CalculatingLabel;
     238    protected System.Windows.Forms.PictureBox pictureBox;
     239    protected System.Windows.Forms.SplitContainer splitContainer;
     240    protected System.Windows.Forms.Panel calculatingPanel;
     241    protected System.Windows.Forms.Label calculatingLabel;
    242242    protected HeuristicLab.Problems.DataAnalysis.Views.EnhancedStringConvertibleMatrixView dataView;
    243243
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs

    r8874 r8880  
    2020#endregion
    2121
     22using System.Collections.Generic;
    2223using System.ComponentModel;
    2324using System.Linq;
     
    3233  [Content(typeof(DataAnalysisProblemData), false)]
    3334  public abstract partial class AbstractFeatureCorrelationView : AsynchronousContentView {
     35    public const string ALLSAMPLES = "All Samples";
     36    public const string TRAININGSAMPLES = "Training Samples";
     37    public const string TESTSAMPLES = "Test Samples";
     38
     39    public static readonly IList<string> Partitions = new List<string>() { ALLSAMPLES, TRAININGSAMPLES, TESTSAMPLES };
     40
    3441    protected FeatureCorrelationCalculator fcc;
    3542
     
    4451      var calculators = ApplicationManager.Manager.GetInstances<IDependencyCalculator>();
    4552      var calcList = calculators.OrderBy(c => c.Name).Select(c => new { Name = c.Name, Calculator = c }).ToList();
    46       CorrelationCalcComboBox.ValueMember = "Calculator";
    47       CorrelationCalcComboBox.DisplayMember = "Name";
    48       CorrelationCalcComboBox.DataSource = calcList;
    49       CorrelationCalcComboBox.SelectedItem = calcList.First(c => c.Calculator.GetType().Equals(typeof(PearsonsRDependenceCalculator)));
    50       PartitionComboBox.DataSource = FeatureCorrelationPartitions.Partitions;
    51       PartitionComboBox.SelectedItem = FeatureCorrelationPartitions.TRAININGSAMPLES;
     53      correlationCalcComboBox.ValueMember = "Calculator";
     54      correlationCalcComboBox.DisplayMember = "Name";
     55      correlationCalcComboBox.DataSource = calcList;
     56      correlationCalcComboBox.SelectedItem = calcList.First(c => c.Calculator.GetType().Equals(typeof(PearsonsRDependenceCalculator)));
     57      partitionComboBox.DataSource = Partitions;
     58      partitionComboBox.SelectedItem = TRAININGSAMPLES;
    5259    }
    5360
     
    5966
    6067    protected override void DeregisterContentEvents() {
    61       fcc.CorrelationCalculationFinished += new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
    62       fcc.ProgressCalculation += new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
     68      fcc.CorrelationCalculationFinished -= new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
     69      fcc.ProgressCalculation -= new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
    6370      base.DeregisterContentEvents();
    6471    }
     
    99106
    100107    protected void UpdateDataView(DoubleMatrix correlation) {
    101       IDependencyCalculator calc = (IDependencyCalculator)CorrelationCalcComboBox.SelectedValue;
     108      IDependencyCalculator calc = (IDependencyCalculator)correlationCalcComboBox.SelectedValue;
    102109      maximumLabel.Text = calc.Maximum.ToString();
    103110      minimumLabel.Text = calc.Minimum.ToString();
     
    111118
    112119    protected void Content_ProgressCalculation(object sender, ProgressChangedEventArgs e) {
    113       if (!CalculatingPanel.Visible && e.ProgressPercentage != HeatMapProgressBar.Maximum) {
    114         CalculatingPanel.Show();
    115       } else if (e.ProgressPercentage == HeatMapProgressBar.Maximum) {
    116         CalculatingPanel.Hide();
     120      if (!calculatingPanel.Visible && e.ProgressPercentage != heatMapProgressBar.Maximum) {
     121        calculatingPanel.Show();
     122      } else if (e.ProgressPercentage == heatMapProgressBar.Maximum) {
     123        calculatingPanel.Hide();
    117124      }
    118       HeatMapProgressBar.Value = e.ProgressPercentage;
     125      heatMapProgressBar.Value = e.ProgressPercentage;
    119126    }
    120127  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.Designer.cs

    r8833 r8880  
    1 namespace HeuristicLab.Problems.DataAnalysis.Views {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.Problems.DataAnalysis.Views {
    223  partial class EnhancedStringConvertibleMatrixView {
    324    /// <summary>
     
    2445    /// </summary>
    2546    private void InitializeComponent() {
    26       this.ShowHideRows = new System.Windows.Forms.ToolStripMenuItem();
     47      this.showHideRows = new System.Windows.Forms.ToolStripMenuItem();
    2748      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    2849      this.SuspendLayout();
     
    4061      //
    4162      this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    42             this.ShowHideRows});
     63            this.showHideRows});
    4364      //
    4465      // ShowHideRows
    4566      //
    46       this.ShowHideRows.Name = "ShowHideRows";
    47       this.ShowHideRows.Size = new System.Drawing.Size(190, 22);
    48       this.ShowHideRows.Text = "Show / Hide Rows";
    49       this.ShowHideRows.Click += new System.EventHandler(this.ShowHideRows_Click);
     67      this.showHideRows.Name = "ShowHideRows";
     68      this.showHideRows.Size = new System.Drawing.Size(190, 22);
     69      this.showHideRows.Text = "Show / Hide Rows";
     70      this.showHideRows.Click += new System.EventHandler(this.ShowHideRows_Click);
    5071      //
    5172      // ColoredStringConvertibleMatrixView
     
    6889    #endregion
    6990
    70     protected System.Windows.Forms.ToolStripMenuItem ShowHideRows;
     91    protected System.Windows.Forms.ToolStripMenuItem showHideRows;
    7192  }
    7293}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.cs

    r8874 r8880  
    7272    }
    7373    protected override void UpdateRowHeaders() {
    74       if (rowVisibility != null && Content != null && rowVisibility.Count() == dataGridView.RowCount) {
    75         int[] realRowIndex = Enumerable.Range(0, Content.Rows).ToArray();
    76         int[] helper = new int[virtualRowIndices.Length];
    77         Array.Copy(virtualRowIndices, helper, virtualRowIndices.Length);
    78         Array.Sort(helper, realRowIndex);
    79         for (int i = 0; i < dataGridView.RowCount; i++) {
    80           dataGridView.Rows[realRowIndex[i]].Visible = rowVisibility.ElementAt(i);
    81         }
     74      if (rowVisibility == null) return;
     75      if (Content == null) return;
     76      if (rowVisibility.Count() != dataGridView.RowCount) return;
     77
     78      for (int index = 0; index < dataGridView.RowCount; index++) {
     79        dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndices[index]);
     80        dataGridView.Rows[index].Visible = rowVisibility.ElementAt(virtualRowIndices[index]);
    8281      }
    83       base.UpdateRowHeaders();
    8482    }
    8583
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs

    r8874 r8880  
    7373
    7474    private void CalculateElements(Dataset dataset, IDependencyCalculator calc, string partition, string variable = null, int frames = 0, double[,] alreadyCalculated = null) {
    75       bwInfo = new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition, Variable = variable, Frames = frames, AlreadyCalculated = alreadyCalculated };
     75      var indices = GetRelevantIndices(problemData, partition);
     76      bwInfo = new BackgroundWorkerInfo {
     77        Dataset = dataset, Calculator = calc, Partition = partition, Indices = indices,
     78        Variable = variable, Frames = frames, AlreadyCalculated = alreadyCalculated
     79      };
    7680      if (bw == null) {
    7781        bw = new BackgroundWorker();
     
    8993    }
    9094
     95    private IEnumerable<int> GetRelevantIndices(IDataAnalysisProblemData problemData, string partition) {
     96      IEnumerable<int> var;
     97      if (partition.Equals(AbstractFeatureCorrelationView.TRAININGSAMPLES))
     98        var = problemData.TrainingIndices;
     99      else if (partition.Equals(AbstractFeatureCorrelationView.TESTSAMPLES))
     100        var = problemData.TestIndices;
     101      else var = Enumerable.Range(0, problemData.Dataset.Rows);
     102      return var;
     103    }
     104
    91105    #region backgroundworker
    92106    private void BwDoWork(object sender, DoWorkEventArgs e) {
     
    104118      BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
    105119      Dataset dataset = bwInfo.Dataset;
    106       string partition = bwInfo.Partition;
     120      IEnumerable<int> indices = bwInfo.Indices;
    107121      IDependencyCalculator calc = bwInfo.Calculator;
    108122
     
    122136            return;
    123137          }
    124           IEnumerable<double> var1 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
    125           IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[j]);
     138          IEnumerable<double> var1 = problemData.Dataset.GetDoubleValues(doubleVariableNames[i], indices);
     139          IEnumerable<double> var2 = problemData.Dataset.GetDoubleValues(doubleVariableNames[j], indices);
    126140
    127141          elements[i, j] = calc.Calculate(var1, var2, out error);
     
    143157      BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
    144158      Dataset dataset = bwInfo.Dataset;
    145       string partition = bwInfo.Partition;
     159      IEnumerable<int> indices = bwInfo.Indices;
    146160      IDependencyCalculator calc = bwInfo.Calculator;
    147161      string variable = bwInfo.Variable;
     
    173187          }
    174188
    175           IEnumerable<double> var1 = GetRelevantValues(problemData, partition, variable);
    176           IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
     189          IEnumerable<double> var1 = problemData.Dataset.GetDoubleValues(variable, indices);
     190          IEnumerable<double> var2 = problemData.Dataset.GetDoubleValues(doubleVariableNames[i], indices);
    177191
    178192          var valuesInFrame = var1.Take(j);
     
    191205      e.Result = elements;
    192206      worker.ReportProgress(100);
    193     }
    194 
    195     private IEnumerable<double> GetRelevantValues(IDataAnalysisProblemData problemData, string partition, string variable) {
    196       IEnumerable<double> var;
    197       if (partition.Equals(FeatureCorrelationPartitions.TRAININGSAMPLES))
    198         var = problemData.Dataset.GetDoubleValues(variable, problemData.TrainingIndices);
    199       else if (partition.Equals(FeatureCorrelationPartitions.TESTSAMPLES))
    200         var = problemData.Dataset.GetDoubleValues(variable, problemData.TestIndices);
    201       else var = problemData.Dataset.GetDoubleValues(variable);
    202       return var;
    203207    }
    204208
     
    254258      public IDependencyCalculator Calculator { get; set; }
    255259      public string Partition { get; set; }
     260      public IEnumerable<int> Indices { get; set; }
    256261      public string Variable { get; set; }
    257262      public int Frames { get; set; }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.Designer.cs

    r8578 r8880  
    2121
    2222#endregion
     23
    2324namespace HeuristicLab.Problems.DataAnalysis.Views {
    2425  partial class FeatureCorrelationView {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs

    r8874 r8880  
    5050
    5151    protected override void CalculateCorrelation() {
    52       if (CorrelationCalcComboBox.SelectedItem == null) return;
    53       if (PartitionComboBox.SelectedItem == null) return;
     52      if (correlationCalcComboBox.SelectedItem == null) return;
     53      if (partitionComboBox.SelectedItem == null) return;
    5454
    55       IDependencyCalculator calc = (IDependencyCalculator)CorrelationCalcComboBox.SelectedValue;
    56       string partition = (string)PartitionComboBox.SelectedValue;
     55      IDependencyCalculator calc = (IDependencyCalculator)correlationCalcComboBox.SelectedValue;
     56      string partition = (string)partitionComboBox.SelectedValue;
    5757      dataView.Enabled = false;
    5858      double[,] corr = correlationCache.GetCorrelation(calc, partition);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.Designer.cs

    r8833 r8880  
    2121
    2222#endregion
     23
    2324namespace HeuristicLab.Problems.DataAnalysis.Views {
    2425  partial class TimeframeFeatureCorrelationView {
     
    4647    /// </summary>
    4748    private void InitializeComponent() {
    48       this.VariableSelectionLabel = new System.Windows.Forms.Label();
    49       this.VariableSelectionComboBox = new System.Windows.Forms.ComboBox();
    50       this.TimeFrameLabel = new System.Windows.Forms.Label();
    51       this.TimeframeTextbox = new System.Windows.Forms.TextBox();
    52       ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
    53       ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
    54       this.SplitContainer.Panel1.SuspendLayout();
    55       this.SplitContainer.Panel2.SuspendLayout();
    56       this.SplitContainer.SuspendLayout();
    57       this.CalculatingPanel.SuspendLayout();
     49      this.components = new System.ComponentModel.Container();
     50      this.variableSelectionLabel = new System.Windows.Forms.Label();
     51      this.variableSelectionComboBox = new System.Windows.Forms.ComboBox();
     52      this.timeFrameLabel = new System.Windows.Forms.Label();
     53      this.timeframeTextbox = new System.Windows.Forms.TextBox();
     54      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     55      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     56      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
     57      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     58      this.splitContainer.Panel1.SuspendLayout();
     59      this.splitContainer.Panel2.SuspendLayout();
     60      this.splitContainer.SuspendLayout();
     61      this.calculatingPanel.SuspendLayout();
    5862      this.SuspendLayout();
     63      //
     64      // errorProvider
     65      //
     66      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     67      this.errorProvider.ContainerControl = this;
    5968      //
    6069      // PartitionComboBox
    6170      //
    62       this.PartitionComboBox.Location = new System.Drawing.Point(344, 3);
    63       this.PartitionComboBox.Size = new System.Drawing.Size(131, 21);
     71      this.partitionComboBox.Location = new System.Drawing.Point(344, 3);
     72      this.partitionComboBox.Size = new System.Drawing.Size(131, 21);
    6473      //
    6574      // maximumLabel
     
    6978      // PictureBox
    7079      //
    71       this.PictureBox.Location = new System.Drawing.Point(506, 31);
    72       this.PictureBox.Size = new System.Drawing.Size(35, 280);
     80      this.pictureBox.Location = new System.Drawing.Point(506, 31);
     81      this.pictureBox.Size = new System.Drawing.Size(35, 280);
    7382      //
    7483      // SplitContainer
     
    7786      // SplitContainer.Panel1
    7887      //
    79       this.SplitContainer.Panel1.Controls.Add(this.VariableSelectionComboBox);
    80       this.SplitContainer.Panel1.Controls.Add(this.TimeframeTextbox);
    81       this.SplitContainer.Panel1.Controls.Add(this.TimeFrameLabel);
    82       this.SplitContainer.Panel1.Controls.Add(this.VariableSelectionLabel);
    83       this.SplitContainer.SplitterDistance = 52;
     88      this.splitContainer.Panel1.Controls.Add(this.variableSelectionComboBox);
     89      this.splitContainer.Panel1.Controls.Add(this.timeframeTextbox);
     90      this.splitContainer.Panel1.Controls.Add(this.timeFrameLabel);
     91      this.splitContainer.Panel1.Controls.Add(this.variableSelectionLabel);
     92      this.splitContainer.SplitterDistance = 52;
    8493      //
    8594      // CalculatingPanel
    8695      //
    87       this.CalculatingPanel.Location = new System.Drawing.Point(138, 82);
     96      this.calculatingPanel.Location = new System.Drawing.Point(138, 82);
    8897      //
    8998      // VariableSelectionLabel
    9099      //
    91       this.VariableSelectionLabel.AutoSize = true;
    92       this.VariableSelectionLabel.Location = new System.Drawing.Point(0, 33);
    93       this.VariableSelectionLabel.Name = "VariableSelectionLabel";
    94       this.VariableSelectionLabel.Size = new System.Drawing.Size(81, 13);
    95       this.VariableSelectionLabel.TabIndex = 16;
    96       this.VariableSelectionLabel.Text = "Select Variable:";
     100      this.variableSelectionLabel.AutoSize = true;
     101      this.variableSelectionLabel.Location = new System.Drawing.Point(0, 33);
     102      this.variableSelectionLabel.Name = "VariableSelectionLabel";
     103      this.variableSelectionLabel.Size = new System.Drawing.Size(81, 13);
     104      this.variableSelectionLabel.TabIndex = 16;
     105      this.variableSelectionLabel.Text = "Select Variable:";
    97106      //
    98107      // VariableSelectionComboBox
    99108      //
    100       this.VariableSelectionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    101       this.VariableSelectionComboBox.FormattingEnabled = true;
    102       this.VariableSelectionComboBox.Location = new System.Drawing.Point(110, 30);
    103       this.VariableSelectionComboBox.Name = "VariableSelectionComboBox";
    104       this.VariableSelectionComboBox.Size = new System.Drawing.Size(163, 21);
    105       this.VariableSelectionComboBox.TabIndex = 17;
    106       this.VariableSelectionComboBox.SelectionChangeCommitted += new System.EventHandler(this.VariableSelectionComboBox_SelectedChangeCommitted);
     109      this.variableSelectionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     110      this.variableSelectionComboBox.FormattingEnabled = true;
     111      this.variableSelectionComboBox.Location = new System.Drawing.Point(110, 30);
     112      this.variableSelectionComboBox.Name = "VariableSelectionComboBox";
     113      this.variableSelectionComboBox.Size = new System.Drawing.Size(163, 21);
     114      this.variableSelectionComboBox.TabIndex = 17;
     115      this.variableSelectionComboBox.SelectionChangeCommitted += new System.EventHandler(this.VariableSelectionComboBox_SelectedChangeCommitted);
    107116      //
    108117      // TimeFrameLabel
    109118      //
    110       this.TimeFrameLabel.AutoSize = true;
    111       this.TimeFrameLabel.Location = new System.Drawing.Point(279, 33);
    112       this.TimeFrameLabel.Name = "TimeFrameLabel";
    113       this.TimeFrameLabel.Size = new System.Drawing.Size(59, 13);
    114       this.TimeFrameLabel.TabIndex = 18;
    115       this.TimeFrameLabel.Text = "Timeframe:";
     119      this.timeFrameLabel.AutoSize = true;
     120      this.timeFrameLabel.Location = new System.Drawing.Point(279, 33);
     121      this.timeFrameLabel.Name = "TimeFrameLabel";
     122      this.timeFrameLabel.Size = new System.Drawing.Size(59, 13);
     123      this.timeFrameLabel.TabIndex = 18;
     124      this.timeFrameLabel.Text = "Timeframe:";
    116125      //
    117126      // TimeframeComboBox
    118127      //
    119       this.TimeframeTextbox.Location = new System.Drawing.Point(344, 30);
    120       this.TimeframeTextbox.Name = "TimeframeTextbox";
    121       this.TimeframeTextbox.Size = new System.Drawing.Size(131, 21);
    122       this.TimeframeTextbox.TabIndex = 19;
    123       this.TimeframeTextbox.Text = "5";
    124       this.TimeframeTextbox.KeyDown += new System.Windows.Forms.KeyEventHandler(TimeframeTextbox_KeyDown);
     128      this.timeframeTextbox.Location = new System.Drawing.Point(344, 30);
     129      this.timeframeTextbox.Name = "TimeframeTextbox";
     130      this.timeframeTextbox.Size = new System.Drawing.Size(131, 21);
     131      this.timeframeTextbox.TabIndex = 19;
     132      this.timeframeTextbox.Text = "5";
     133      this.timeframeTextbox.KeyDown += new System.Windows.Forms.KeyEventHandler(TimeframeTextbox_KeyDown);
     134      this.timeframeTextbox.Validating += new System.ComponentModel.CancelEventHandler(TimeframeTextbox_Validating);
     135      this.timeframeTextbox.Validated += new System.EventHandler(TimeframeTextbox_Validated);
    125136      //
    126137      // TimeframeFeatureCorrelationView
     
    129140      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    130141      this.Name = "TimeframeFeatureCorrelationView";
    131       ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).EndInit();
    132       this.SplitContainer.Panel1.ResumeLayout(false);
    133       this.SplitContainer.Panel1.PerformLayout();
    134       this.SplitContainer.Panel2.ResumeLayout(false);
    135       ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit();
    136       this.SplitContainer.ResumeLayout(false);
    137       this.CalculatingPanel.ResumeLayout(false);
    138       this.CalculatingPanel.PerformLayout();
     142      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     143      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
     144      this.splitContainer.Panel1.ResumeLayout(false);
     145      this.splitContainer.Panel1.PerformLayout();
     146      this.splitContainer.Panel2.ResumeLayout(false);
     147      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
     148      this.splitContainer.ResumeLayout(false);
     149      this.calculatingPanel.ResumeLayout(false);
     150      this.calculatingPanel.PerformLayout();
    139151      this.ResumeLayout(false);
    140152
     
    142154    #endregion
    143155
    144     protected System.Windows.Forms.Label VariableSelectionLabel;
    145     protected System.Windows.Forms.ComboBox VariableSelectionComboBox;
    146     protected System.Windows.Forms.Label TimeFrameLabel;
    147     protected System.Windows.Forms.TextBox TimeframeTextbox;
     156    protected System.Windows.Forms.Label variableSelectionLabel;
     157    protected System.Windows.Forms.ComboBox variableSelectionComboBox;
     158    protected System.Windows.Forms.Label timeFrameLabel;
     159    protected System.Windows.Forms.TextBox timeframeTextbox;
     160    protected System.Windows.Forms.ErrorProvider errorProvider;
    148161  }
    149162}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs

    r8874 r8880  
    3434
    3535    private FeatureCorrelationTimeframeCache correlationTimeframCache;
     36    private string lastFramesValue;
    3637
    3738    public TimeframeFeatureCorrelationView() {
    3839      InitializeComponent();
    3940      correlationTimeframCache = new FeatureCorrelationTimeframeCache();
     41      errorProvider.SetIconAlignment(timeframeTextbox, ErrorIconAlignment.MiddleRight);
     42      errorProvider.SetIconPadding(timeframeTextbox, 2);
     43      lastFramesValue = timeframeTextbox.Text;
    4044    }
    4145
     
    4448      if (Content != null) {
    4549        dataView.RowVisibility = SetInitialVariableVisibility();
    46         VariableSelectionComboBox.DataSource = Content.Dataset.DoubleVariables.ToList();
     50        SetVariableSelectionComboBox();
    4751      }
    4852      base.OnContentChanged();
     53    }
     54
     55    protected virtual void SetVariableSelectionComboBox() {
     56      variableSelectionComboBox.DataSource = Content.Dataset.DoubleVariables.ToList();
    4957    }
    5058
     
    5260      CalculateCorrelation();
    5361    }
     62    private void TimeframeTextbox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {
     63      if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) {
     64        timeFrameLabel.Select();  // select label to validate data
     65      }
    5466
    55     private void TimeframeTextbox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {
    56       if (e.KeyCode == Keys.Enter) {
    57         CalculateCorrelation();
     67      if (e.KeyCode == Keys.Escape) {
     68        timeframeTextbox.Text = lastFramesValue;
     69        timeFrameLabel.Select();  // select label to validate data
     70      }
     71    }
     72    private void TimeframeTextbox_Validated(object sender, System.EventArgs e) {
     73      lastFramesValue = timeframeTextbox.Text;
     74      errorProvider.SetError(timeframeTextbox, string.Empty);
     75      CalculateCorrelation();
     76    }
     77    private void TimeframeTextbox_Validating(object sender, System.ComponentModel.CancelEventArgs e) {
     78      int help;
     79      if (!int.TryParse(timeframeTextbox.Text, out help)) {
     80        errorProvider.SetError(timeframeTextbox, "Timeframe couldn't be parsed. Enter a valid integer value.");
     81        e.Cancel = true;
     82      } else {
     83        if (help > 50) {
     84          DialogResult dr = MessageBox.Show("The entered value is bigger than 50. Are you sure you want to calculate? " +
     85                                            "The calculation could take some time.", "Huge Value Warning", MessageBoxButtons.YesNo);
     86          e.Cancel = !dr.Equals(DialogResult.Yes);
     87        } else if (help < 0) {
     88          errorProvider.SetError(timeframeTextbox, "The entered value can't be negative!");
     89          e.Cancel = true;
     90        }
    5891      }
    5992    }
    6093
    6194    protected override void CalculateCorrelation() {
    62       if (CorrelationCalcComboBox.SelectedItem != null && PartitionComboBox.SelectedItem != null
    63         && VariableSelectionComboBox.SelectedItem != null && ValidateTimeframeTextbox()) {
    64         string variable = (string)VariableSelectionComboBox.SelectedItem;
    65         IDependencyCalculator calc = (IDependencyCalculator)CorrelationCalcComboBox.SelectedValue;
    66         string partition = (string)PartitionComboBox.SelectedValue;
     95      if (correlationCalcComboBox.SelectedItem != null && partitionComboBox.SelectedItem != null
     96        && variableSelectionComboBox.SelectedItem != null) {
     97        string variable = (string)variableSelectionComboBox.SelectedItem;
     98        IDependencyCalculator calc = (IDependencyCalculator)correlationCalcComboBox.SelectedValue;
     99        string partition = (string)partitionComboBox.SelectedValue;
    67100        int frames;
    68         int.TryParse(TimeframeTextbox.Text, out frames);
     101        int.TryParse(timeframeTextbox.Text, out frames);
    69102        dataView.Enabled = false;
    70103        double[,] corr = correlationTimeframCache.GetTimeframeCorrelation(calc, partition, variable);
     
    82115      }
    83116    }
    84 
    85     private bool ValidateTimeframeTextbox() {
    86       int help;
    87       if (!int.TryParse(TimeframeTextbox.Text, out help)) {
    88         MessageBox.Show("Timeframe couldn't be parsed. Enter a valid integer value.", "Parse Error", MessageBoxButtons.OK);
    89         return false;
    90       } else {
    91         if (help > 50) {
    92           DialogResult dr = MessageBox.Show("The entered value is bigger than 50. Are you sure you want to calculate? " +
    93                                             "The calculation could take some time.", "Huge Value Warning", MessageBoxButtons.YesNo);
    94           return dr.Equals(DialogResult.Yes);
    95         }
    96       }
    97       return true;
    98     }
    99 
    100117
    101118    protected override void Content_CorrelationCalculationFinished(object sender, FeatureCorrelationCalculator.CorrelationCalculationFinishedArgs e) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r8833 r8880  
    169169    </Compile>
    170170    <Compile Include="FeatureCorrelation\FeatureCorrelationCalculator.cs" />
    171     <Compile Include="FeatureCorrelation\FeatureCorrelationHelpers.cs" />
    172171    <Compile Include="FeatureCorrelation\FeatureCorrelationView.cs">
    173172      <SubType>UserControl</SubType>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionFeatureCorrelationView.Designer.cs

    r8689 r8880  
    1 namespace HeuristicLab.Problems.DataAnalysis.Views {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.Problems.DataAnalysis.Views {
    223  partial class RegressionFeatureCorrelationView {
    324    /// <summary>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.Designer.cs

    r8689 r8880  
    1 namespace HeuristicLab.Problems.DataAnalysis.Views {
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22namespace HeuristicLab.Problems.DataAnalysis.Views {
    223  partial class RegressionTimeframeFeatureCorrelationView {
    324    /// <summary>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.cs

    r8833 r8880  
    3737    }
    3838
     39    protected override void SetVariableSelectionComboBox() {
     40      base.SetVariableSelectionComboBox();
     41      variableSelectionComboBox.SelectedItem = Content.TargetVariable;
     42    }
     43
    3944    protected override bool[] SetInitialVariableVisibility() {
    4045      int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable);
Note: See TracChangeset for help on using the changeset viewer.