Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/25/12 16:16:23 (12 years ago)
Author:
sforsten
Message:

#1942:

  • add combo boxes to DataAnalysisImportTypeDialog to select csv settings
  • get branch ready
Location:
branches/DataAnalysisCSVImport
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysisCSVImport

    • Property svn:ignore set to
      *.suo
  • branches/DataAnalysisCSVImport/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.Designer.cs

    r8693 r8701  
    1 namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
     1
     2using HeuristicLab.Common.Resources;
     3namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    24  partial class DataAnalysisImportTypeDialog {
    35    /// <summary>
     
    2729      this.OkButton = new System.Windows.Forms.Button();
    2830      this.TrainingTestTrackBar = new System.Windows.Forms.TrackBar();
    29       this.TrainingTestGroupBox = new System.Windows.Forms.GroupBox();
    3031      this.TestLabel = new System.Windows.Forms.Label();
    3132      this.TrainingLabel = new System.Windows.Forms.Label();
    3233      this.CancelButton = new System.Windows.Forms.Button();
    33       this.openFileButton = new System.Windows.Forms.Button();
     34      this.OpenFileButton = new System.Windows.Forms.Button();
    3435      this.ProblemFileLabel = new System.Windows.Forms.Label();
    3536      this.ProblemTextBox = new System.Windows.Forms.TextBox();
    3637      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
     38      this.DateTimeFormatComboBox = new System.Windows.Forms.ComboBox();
     39      this.DecimalSeparatorComboBox = new System.Windows.Forms.ComboBox();
     40      this.DateTimeFormatLabel = new System.Windows.Forms.Label();
     41      this.DecimalSeperatorLabel = new System.Windows.Forms.Label();
     42      this.SeparatorLabel = new System.Windows.Forms.Label();
     43      this.SeparatorComboBox = new System.Windows.Forms.ComboBox();
     44      this.CSVSettingsGroupBox = new System.Windows.Forms.GroupBox();
     45      this.SeparatorInfoButton = new System.Windows.Forms.Button();
     46      this.ProblemDataSettingsGroupBox = new System.Windows.Forms.GroupBox();
     47      this.PreviewLabel = new System.Windows.Forms.Label();
     48      this.ErrorTextBox = new System.Windows.Forms.TextBox();
     49      this.PreviewDatasetMatrix = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
     50      this.DecimalSeparatorInfoButton = new System.Windows.Forms.Button();
     51      this.DateTimeFormatInfoButton = new System.Windows.Forms.Button();
     52      this.ShuffleDataInfoButton = new System.Windows.Forms.Button();
    3753      ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).BeginInit();
    38       this.TrainingTestGroupBox.SuspendLayout();
     54      this.CSVSettingsGroupBox.SuspendLayout();
     55      this.ProblemDataSettingsGroupBox.SuspendLayout();
    3956      this.SuspendLayout();
    4057      //
     
    4259      //
    4360      this.ShuffleDataCheckbox.AutoSize = true;
    44       this.ShuffleDataCheckbox.Location = new System.Drawing.Point(12, 38);
     61      this.ShuffleDataCheckbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     62      this.ShuffleDataCheckbox.Location = new System.Drawing.Point(9, 20);
    4563      this.ShuffleDataCheckbox.Name = "ShuffleDataCheckbox";
    4664      this.ShuffleDataCheckbox.Size = new System.Drawing.Size(91, 17);
     
    5169      // OkButton
    5270      //
     71      this.OkButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    5372      this.OkButton.DialogResult = System.Windows.Forms.DialogResult.OK;
    5473      this.OkButton.Enabled = false;
    55       this.OkButton.Location = new System.Drawing.Point(61, 147);
     74      this.OkButton.Location = new System.Drawing.Point(87, 407);
    5675      this.OkButton.Name = "OkButton";
    5776      this.OkButton.Size = new System.Drawing.Size(75, 23);
     
    6483      this.TrainingTestTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    6584                  | System.Windows.Forms.AnchorStyles.Right)));
    66       this.TrainingTestTrackBar.Location = new System.Drawing.Point(6, 19);
     85      this.TrainingTestTrackBar.Location = new System.Drawing.Point(6, 43);
    6786      this.TrainingTestTrackBar.Maximum = 100;
    6887      this.TrainingTestTrackBar.Minimum = 1;
    6988      this.TrainingTestTrackBar.Name = "TrainingTestTrackBar";
    70       this.TrainingTestTrackBar.Size = new System.Drawing.Size(303, 45);
     89      this.TrainingTestTrackBar.Size = new System.Drawing.Size(435, 45);
    7190      this.TrainingTestTrackBar.TabIndex = 4;
    7291      this.TrainingTestTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
     
    7493      this.TrainingTestTrackBar.ValueChanged += new System.EventHandler(this.TrainingTestTrackBar_ValueChanged);
    7594      //
    76       // TrainingTestGroupBox
    77       //
    78       this.TrainingTestGroupBox.Controls.Add(this.TestLabel);
    79       this.TrainingTestGroupBox.Controls.Add(this.TrainingLabel);
    80       this.TrainingTestGroupBox.Controls.Add(this.TrainingTestTrackBar);
    81       this.TrainingTestGroupBox.Location = new System.Drawing.Point(12, 61);
    82       this.TrainingTestGroupBox.Name = "TrainingTestGroupBox";
    83       this.TrainingTestGroupBox.Size = new System.Drawing.Size(315, 80);
    84       this.TrainingTestGroupBox.TabIndex = 5;
    85       this.TrainingTestGroupBox.TabStop = false;
    86       this.TrainingTestGroupBox.Text = "Training/Test";
    87       //
    8895      // TestLabel
    8996      //
     97      this.TestLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    9098      this.TestLabel.AutoSize = true;
    91       this.TestLabel.Location = new System.Drawing.Point(188, 51);
     99      this.TestLabel.Location = new System.Drawing.Point(303, 68);
    92100      this.TestLabel.Name = "TestLabel";
    93101      this.TestLabel.Size = new System.Drawing.Size(57, 13);
     
    98106      //
    99107      this.TrainingLabel.AutoSize = true;
    100       this.TrainingLabel.Location = new System.Drawing.Point(50, 51);
     108      this.TrainingLabel.Location = new System.Drawing.Point(76, 68);
    101109      this.TrainingLabel.Name = "TrainingLabel";
    102110      this.TrainingLabel.Size = new System.Drawing.Size(74, 13);
     
    106114      // CancelButton
    107115      //
     116      this.CancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    108117      this.CancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
    109       this.CancelButton.Location = new System.Drawing.Point(182, 147);
     118      this.CancelButton.Location = new System.Drawing.Point(318, 407);
    110119      this.CancelButton.Name = "CancelButton";
    111120      this.CancelButton.Size = new System.Drawing.Size(75, 23);
     
    116125      // openFileButton
    117126      //
    118       this.openFileButton.Location = new System.Drawing.Point(303, 12);
    119       this.openFileButton.Name = "openFileButton";
    120       this.openFileButton.Size = new System.Drawing.Size(24, 24);
    121       this.openFileButton.TabIndex = 8;
    122       this.openFileButton.UseVisualStyleBackColor = true;
    123       this.openFileButton.Click += new System.EventHandler(this.openFileButton_Click);
     127      this.OpenFileButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     128      this.OpenFileButton.Location = new System.Drawing.Point(429, 3);
     129      this.OpenFileButton.Name = "openFileButton";
     130      this.OpenFileButton.Size = new System.Drawing.Size(24, 24);
     131      this.OpenFileButton.TabIndex = 8;
     132      this.OpenFileButton.Text = "Open";
     133      this.OpenFileButton.UseVisualStyleBackColor = true;
     134      this.OpenFileButton.Click += new System.EventHandler(this.openFileButton_Click);
    124135      //
    125136      // ProblemFileLabel
    126137      //
    127138      this.ProblemFileLabel.AutoSize = true;
    128       this.ProblemFileLabel.Location = new System.Drawing.Point(12, 15);
     139      this.ProblemFileLabel.Location = new System.Drawing.Point(18, 9);
    129140      this.ProblemFileLabel.Name = "ProblemFileLabel";
    130141      this.ProblemFileLabel.Size = new System.Drawing.Size(67, 13);
     
    134145      // ProblemTextBox
    135146      //
    136       this.ProblemTextBox.Location = new System.Drawing.Point(85, 12);
     147      this.ProblemTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     148                  | System.Windows.Forms.AnchorStyles.Right)));
     149      this.ProblemTextBox.Location = new System.Drawing.Point(91, 6);
    137150      this.ProblemTextBox.Name = "ProblemTextBox";
    138151      this.ProblemTextBox.ReadOnly = true;
    139       this.ProblemTextBox.Size = new System.Drawing.Size(212, 20);
     152      this.ProblemTextBox.Size = new System.Drawing.Size(332, 20);
    140153      this.ProblemTextBox.TabIndex = 9;
    141154      //
     
    143156      //
    144157      this.openFileDialog.Filter = "CSV files (*.csv)|*.csv|Text files (*.txt)|*.txt|All files (*.*)|*.*";
     158      //
     159      // DateTimeFormatComboBox
     160      //
     161      this.DateTimeFormatComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     162                  | System.Windows.Forms.AnchorStyles.Right)));
     163      this.DateTimeFormatComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     164      this.DateTimeFormatComboBox.FormattingEnabled = true;
     165      this.DateTimeFormatComboBox.Location = new System.Drawing.Point(111, 73);
     166      this.DateTimeFormatComboBox.Name = "DateTimeFormatComboBox";
     167      this.DateTimeFormatComboBox.Size = new System.Drawing.Size(300, 21);
     168      this.DateTimeFormatComboBox.TabIndex = 15;
     169      this.DateTimeFormatComboBox.SelectionChangeCommitted += new System.EventHandler(this.CSVFormatComboBoxSelectionChangeCommitted);
     170      //
     171      // DecimalSeparatorComboBox
     172      //
     173      this.DecimalSeparatorComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     174                  | System.Windows.Forms.AnchorStyles.Right)));
     175      this.DecimalSeparatorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     176      this.DecimalSeparatorComboBox.FormattingEnabled = true;
     177      this.DecimalSeparatorComboBox.Location = new System.Drawing.Point(111, 46);
     178      this.DecimalSeparatorComboBox.Name = "DecimalSeparatorComboBox";
     179      this.DecimalSeparatorComboBox.Size = new System.Drawing.Size(300, 21);
     180      this.DecimalSeparatorComboBox.TabIndex = 14;
     181      this.DecimalSeparatorComboBox.SelectionChangeCommitted += new System.EventHandler(this.CSVFormatComboBoxSelectionChangeCommitted);
     182      //
     183      // DateTimeFormatLabel
     184      //
     185      this.DateTimeFormatLabel.AutoSize = true;
     186      this.DateTimeFormatLabel.Location = new System.Drawing.Point(6, 76);
     187      this.DateTimeFormatLabel.Name = "DateTimeFormatLabel";
     188      this.DateTimeFormatLabel.Size = new System.Drawing.Size(91, 13);
     189      this.DateTimeFormatLabel.TabIndex = 13;
     190      this.DateTimeFormatLabel.Text = "DateTime Format:";
     191      //
     192      // DecimalSeperatorLabel
     193      //
     194      this.DecimalSeperatorLabel.AutoSize = true;
     195      this.DecimalSeperatorLabel.Location = new System.Drawing.Point(6, 49);
     196      this.DecimalSeperatorLabel.Name = "DecimalSeperatorLabel";
     197      this.DecimalSeperatorLabel.Size = new System.Drawing.Size(97, 13);
     198      this.DecimalSeperatorLabel.TabIndex = 12;
     199      this.DecimalSeperatorLabel.Text = "Decimal Separator:";
     200      //
     201      // SeparatorLabel
     202      //
     203      this.SeparatorLabel.AutoSize = true;
     204      this.SeparatorLabel.Location = new System.Drawing.Point(6, 22);
     205      this.SeparatorLabel.Name = "SeparatorLabel";
     206      this.SeparatorLabel.Size = new System.Drawing.Size(56, 13);
     207      this.SeparatorLabel.TabIndex = 11;
     208      this.SeparatorLabel.Text = "Separator:";
     209      //
     210      // SeparatorComboBox
     211      //
     212      this.SeparatorComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     213                  | System.Windows.Forms.AnchorStyles.Right)));
     214      this.SeparatorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     215      this.SeparatorComboBox.FormattingEnabled = true;
     216      this.SeparatorComboBox.Location = new System.Drawing.Point(111, 19);
     217      this.SeparatorComboBox.Name = "SeparatorComboBox";
     218      this.SeparatorComboBox.Size = new System.Drawing.Size(300, 21);
     219      this.SeparatorComboBox.TabIndex = 10;
     220      this.SeparatorComboBox.SelectionChangeCommitted += new System.EventHandler(this.CSVFormatComboBoxSelectionChangeCommitted);
     221      //
     222      // CSVSettingsGroupBox
     223      //
     224      this.CSVSettingsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     225                  | System.Windows.Forms.AnchorStyles.Right)));
     226      this.CSVSettingsGroupBox.Controls.Add(this.DateTimeFormatInfoButton);
     227      this.CSVSettingsGroupBox.Controls.Add(this.DecimalSeparatorInfoButton);
     228      this.CSVSettingsGroupBox.Controls.Add(this.SeparatorInfoButton);
     229      this.CSVSettingsGroupBox.Controls.Add(this.SeparatorComboBox);
     230      this.CSVSettingsGroupBox.Controls.Add(this.DateTimeFormatComboBox);
     231      this.CSVSettingsGroupBox.Controls.Add(this.SeparatorLabel);
     232      this.CSVSettingsGroupBox.Controls.Add(this.DecimalSeparatorComboBox);
     233      this.CSVSettingsGroupBox.Controls.Add(this.DecimalSeperatorLabel);
     234      this.CSVSettingsGroupBox.Controls.Add(this.DateTimeFormatLabel);
     235      this.CSVSettingsGroupBox.Location = new System.Drawing.Point(12, 32);
     236      this.CSVSettingsGroupBox.Name = "CSVSettingsGroupBox";
     237      this.CSVSettingsGroupBox.Size = new System.Drawing.Size(447, 105);
     238      this.CSVSettingsGroupBox.TabIndex = 16;
     239      this.CSVSettingsGroupBox.TabStop = false;
     240      this.CSVSettingsGroupBox.Text = "CSV Settings";
     241      //
     242      // SeparatorInfoButton
     243      //
     244      this.SeparatorInfoButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     245      this.SeparatorInfoButton.Location = new System.Drawing.Point(417, 17);
     246      this.SeparatorInfoButton.Name = "SeparatorInfoButton";
     247      this.SeparatorInfoButton.Size = new System.Drawing.Size(24, 24);
     248      this.SeparatorInfoButton.TabIndex = 18;
     249      this.SeparatorInfoButton.Text = "SeparatorInfo";
     250      this.SeparatorInfoButton.UseVisualStyleBackColor = true;
     251      //
     252      // ProblemDataSettingsGroupBox
     253      //
     254      this.ProblemDataSettingsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     255                  | System.Windows.Forms.AnchorStyles.Left)
     256                  | System.Windows.Forms.AnchorStyles.Right)));
     257      this.ProblemDataSettingsGroupBox.Controls.Add(this.ShuffleDataInfoButton);
     258      this.ProblemDataSettingsGroupBox.Controls.Add(this.PreviewLabel);
     259      this.ProblemDataSettingsGroupBox.Controls.Add(this.ErrorTextBox);
     260      this.ProblemDataSettingsGroupBox.Controls.Add(this.TestLabel);
     261      this.ProblemDataSettingsGroupBox.Controls.Add(this.PreviewDatasetMatrix);
     262      this.ProblemDataSettingsGroupBox.Controls.Add(this.TrainingLabel);
     263      this.ProblemDataSettingsGroupBox.Controls.Add(this.TrainingTestTrackBar);
     264      this.ProblemDataSettingsGroupBox.Controls.Add(this.ShuffleDataCheckbox);
     265      this.ProblemDataSettingsGroupBox.Location = new System.Drawing.Point(12, 143);
     266      this.ProblemDataSettingsGroupBox.Name = "ProblemDataSettingsGroupBox";
     267      this.ProblemDataSettingsGroupBox.Size = new System.Drawing.Size(447, 258);
     268      this.ProblemDataSettingsGroupBox.TabIndex = 17;
     269      this.ProblemDataSettingsGroupBox.TabStop = false;
     270      this.ProblemDataSettingsGroupBox.Text = "ProblemData Settings";
     271      //
     272      // PreviewLabel
     273      //
     274      this.PreviewLabel.AutoSize = true;
     275      this.PreviewLabel.Location = new System.Drawing.Point(9, 89);
     276      this.PreviewLabel.Name = "PreviewLabel";
     277      this.PreviewLabel.Size = new System.Drawing.Size(45, 13);
     278      this.PreviewLabel.TabIndex = 7;
     279      this.PreviewLabel.Text = "Preview";
     280      //
     281      // ErrorTextBox
     282      //
     283      this.ErrorTextBox.Location = new System.Drawing.Point(111, 164);
     284      this.ErrorTextBox.Multiline = true;
     285      this.ErrorTextBox.Name = "ErrorTextBox";
     286      this.ErrorTextBox.Size = new System.Drawing.Size(193, 32);
     287      this.ErrorTextBox.TabIndex = 0;
     288      this.ErrorTextBox.Visible = false;
     289      //
     290      // PreviewDatasetMatrix
     291      //
     292      this.PreviewDatasetMatrix.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     293                  | System.Windows.Forms.AnchorStyles.Left)
     294                  | System.Windows.Forms.AnchorStyles.Right)));
     295      this.PreviewDatasetMatrix.Caption = "Dataset Preview";
     296      this.PreviewDatasetMatrix.Content = null;
     297      this.PreviewDatasetMatrix.Location = new System.Drawing.Point(6, 108);
     298      this.PreviewDatasetMatrix.Name = "PreviewDatasetMatrix";
     299      this.PreviewDatasetMatrix.ReadOnly = true;
     300      this.PreviewDatasetMatrix.ShowRowsAndColumnsTextBox = false;
     301      this.PreviewDatasetMatrix.ShowStatisticalInformation = false;
     302      this.PreviewDatasetMatrix.Size = new System.Drawing.Size(435, 144);
     303      this.PreviewDatasetMatrix.TabIndex = 0;
     304      //
     305      // DecimalSeparatorInfoButtin
     306      //
     307      this.DecimalSeparatorInfoButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     308      this.DecimalSeparatorInfoButton.Location = new System.Drawing.Point(417, 44);
     309      this.DecimalSeparatorInfoButton.Name = "DecimalSeparatorInfoButtin";
     310      this.DecimalSeparatorInfoButton.Size = new System.Drawing.Size(24, 24);
     311      this.DecimalSeparatorInfoButton.TabIndex = 19;
     312      this.DecimalSeparatorInfoButton.Text = "DecimalSeparatorInfo";
     313      this.DecimalSeparatorInfoButton.UseVisualStyleBackColor = true;
     314      //
     315      // DateTimeFormatInfoButton
     316      //
     317      this.DateTimeFormatInfoButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     318      this.DateTimeFormatInfoButton.Location = new System.Drawing.Point(417, 71);
     319      this.DateTimeFormatInfoButton.Name = "DateTimeFormatInfoButton";
     320      this.DateTimeFormatInfoButton.Size = new System.Drawing.Size(24, 24);
     321      this.DateTimeFormatInfoButton.TabIndex = 20;
     322      this.DateTimeFormatInfoButton.Text = "DateTimeFormatInfo";
     323      this.DateTimeFormatInfoButton.UseVisualStyleBackColor = true;
     324      //
     325      // ShuffleDataInfoButton
     326      //
     327      this.ShuffleDataInfoButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     328      this.ShuffleDataInfoButton.Location = new System.Drawing.Point(111, 15);
     329      this.ShuffleDataInfoButton.Name = "ShuffleDataInfoButton";
     330      this.ShuffleDataInfoButton.Size = new System.Drawing.Size(24, 24);
     331      this.ShuffleDataInfoButton.TabIndex = 19;
     332      this.ShuffleDataInfoButton.Text = "ShuffleDataInfo";
     333      this.ShuffleDataInfoButton.UseVisualStyleBackColor = true;
    145334      //
    146335      // DataAnalysisImportTypeDialog
     
    149338      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    150339      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    151       this.ClientSize = new System.Drawing.Size(339, 179);
     340      this.ClientSize = new System.Drawing.Size(471, 442);
    152341      this.ControlBox = false;
     342      this.Controls.Add(this.ProblemDataSettingsGroupBox);
     343      this.Controls.Add(this.CSVSettingsGroupBox);
    153344      this.Controls.Add(this.ProblemTextBox);
    154       this.Controls.Add(this.openFileButton);
     345      this.Controls.Add(this.OpenFileButton);
    155346      this.Controls.Add(this.ProblemFileLabel);
    156347      this.Controls.Add(this.CancelButton);
    157348      this.Controls.Add(this.OkButton);
    158       this.Controls.Add(this.ShuffleDataCheckbox);
    159       this.Controls.Add(this.TrainingTestGroupBox);
    160       this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
    161349      this.MaximizeBox = false;
    162350      this.MinimizeBox = false;
     
    166354      this.Text = "CSV Import";
    167355      ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).EndInit();
    168       this.TrainingTestGroupBox.ResumeLayout(false);
    169       this.TrainingTestGroupBox.PerformLayout();
     356      this.CSVSettingsGroupBox.ResumeLayout(false);
     357      this.CSVSettingsGroupBox.PerformLayout();
     358      this.ProblemDataSettingsGroupBox.ResumeLayout(false);
     359      this.ProblemDataSettingsGroupBox.PerformLayout();
    170360      this.ResumeLayout(false);
    171361      this.PerformLayout();
     
    178368    protected System.Windows.Forms.Button OkButton;
    179369    protected System.Windows.Forms.TrackBar TrainingTestTrackBar;
    180     protected System.Windows.Forms.GroupBox TrainingTestGroupBox;
    181370    protected System.Windows.Forms.Label TestLabel;
    182371    protected System.Windows.Forms.Label TrainingLabel;
     
    184373    protected System.Windows.Forms.OpenFileDialog openFileDialog;
    185374    protected System.Windows.Forms.Label ProblemFileLabel;
    186     protected System.Windows.Forms.Button openFileButton;
     375    protected System.Windows.Forms.Button OpenFileButton;
    187376    protected System.Windows.Forms.TextBox ProblemTextBox;
     377    protected System.Windows.Forms.ComboBox DateTimeFormatComboBox;
     378    protected System.Windows.Forms.ComboBox DecimalSeparatorComboBox;
     379    protected System.Windows.Forms.Label DateTimeFormatLabel;
     380    protected System.Windows.Forms.Label DecimalSeperatorLabel;
     381    protected System.Windows.Forms.Label SeparatorLabel;
     382    protected System.Windows.Forms.ComboBox SeparatorComboBox;
     383    protected System.Windows.Forms.GroupBox CSVSettingsGroupBox;
     384    protected System.Windows.Forms.GroupBox ProblemDataSettingsGroupBox;
     385    protected System.Windows.Forms.TextBox ErrorTextBox;
     386    protected HeuristicLab.Data.Views.StringConvertibleMatrixView PreviewDatasetMatrix;
     387    private System.Windows.Forms.Label PreviewLabel;
     388    protected System.Windows.Forms.Button SeparatorInfoButton;
     389    protected System.Windows.Forms.Button DateTimeFormatInfoButton;
     390    protected System.Windows.Forms.Button DecimalSeparatorInfoButton;
     391    protected System.Windows.Forms.Button ShuffleDataInfoButton;
    188392
    189393  }
  • branches/DataAnalysisCSVImport/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.cs

    r8693 r8701  
    2020#endregion
    2121
     22using System;
     23using System.Collections.Generic;
     24using System.ComponentModel;
     25using System.Globalization;
     26using System.Linq;
    2227using System.Windows.Forms;
     28using HeuristicLab.Common.Resources;
     29using HeuristicLab.Problems.DataAnalysis;
    2330
    2431namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
    2532  public partial class DataAnalysisImportTypeDialog : Form {
     33
     34    public static readonly BindingList<KeyValuePair<DateTimeFormatInfo, string>> dateTimeFormats = new BindingList<KeyValuePair<DateTimeFormatInfo, string>>{
     35      new KeyValuePair<DateTimeFormatInfo, string>(DateTimeFormatInfo.GetInstance(new CultureInfo("de-DE")), "dd/mm/yyyy hh:MM:ss" ),
     36      new KeyValuePair<DateTimeFormatInfo, string>(DateTimeFormatInfo.InvariantInfo, "mm/dd/yyyy hh:MM:ss" ),
     37      new KeyValuePair<DateTimeFormatInfo, string>(DateTimeFormatInfo.InvariantInfo, "yyyy/mm/dd hh:MM:ss" ),
     38      new KeyValuePair<DateTimeFormatInfo, string>(DateTimeFormatInfo.InvariantInfo, "mm/yyyy/dd hh:MM:ss" )
     39    };
     40
     41    public static readonly BindingList<KeyValuePair<char, string>> POSSIBLE_SEPARATORS = new BindingList<KeyValuePair<char, string>>{
     42      new KeyValuePair<char, string>(',', ", (Comma)" ),
     43      new KeyValuePair<char, string>(';', "; (Semicolon)" ),
     44      new KeyValuePair<char, string>('\t', "\\t (Tab)")
     45    };
     46
     47    public static readonly BindingList<KeyValuePair<NumberFormatInfo, string>> POSSIBLE_DECIMAL_SEPARATORS = new BindingList<KeyValuePair<NumberFormatInfo, string>>{
     48      new KeyValuePair<NumberFormatInfo, string>(NumberFormatInfo.InvariantInfo, ". (Period)" ),
     49      new KeyValuePair<NumberFormatInfo, string>(NumberFormatInfo.GetInstance(new CultureInfo("de-DE")), ", (Comma)" )     
     50    };
    2651
    2752    public string Path {
     
    3863    }
    3964
     65    public DataAnalysisCSVFormat CSVFormat {
     66      get {
     67        return new DataAnalysisCSVFormat() {
     68          Separator = (char)SeparatorComboBox.SelectedValue,
     69          NumberFormatInfo = (NumberFormatInfo)DecimalSeparatorComboBox.SelectedValue,
     70          DateTimeFormatInfo = (DateTimeFormatInfo)DateTimeFormatComboBox.SelectedValue
     71        };
     72      }
     73    }
     74
    4075    public DataAnalysisImportTypeDialog() {
    4176      InitializeComponent();
     77      OpenFileButton.Text = String.Empty;
     78      OpenFileButton.Image = VSImageLibrary.Open;
     79      SeparatorInfoButton.Text = String.Empty;
     80      SeparatorInfoButton.Image = VSImageLibrary.Information;
     81      DecimalSeparatorInfoButton.Text = String.Empty;
     82      DecimalSeparatorInfoButton.Image = VSImageLibrary.Information;
     83      DateTimeFormatInfoButton.Text = String.Empty;
     84      DateTimeFormatInfoButton.Image = VSImageLibrary.Information;
     85      ShuffleDataInfoButton.Text = String.Empty;
     86      ShuffleDataInfoButton.Image = VSImageLibrary.Information;
     87
     88      SeparatorComboBox.DataSource = POSSIBLE_SEPARATORS;
     89      SeparatorComboBox.ValueMember = "Key";
     90      SeparatorComboBox.DisplayMember = "Value";
     91      DecimalSeparatorComboBox.DataSource = POSSIBLE_DECIMAL_SEPARATORS;
     92      DecimalSeparatorComboBox.ValueMember = "Key";
     93      DecimalSeparatorComboBox.DisplayMember = "Value";
     94      DateTimeFormatComboBox.DataSource = dateTimeFormats;
     95      DateTimeFormatComboBox.ValueMember = "Key";
     96      DateTimeFormatComboBox.DisplayMember = "Value";
    4297    }
    4398
     
    50105      if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
    51106        ProblemTextBox.Text = openFileDialog.FileName;
     107        ParseCSVFile();
     108      }
     109    }
     110
     111    protected void CSVFormatComboBoxSelectionChangeCommitted(object sender, EventArgs e) {
     112      if (!ProblemTextBox.Text.Equals(String.Empty)) {
     113        ParseCSVFile();
     114      }
     115    }
     116
     117    protected void ParseCSVFile() {
     118      PreviewDatasetMatrix.Content = null;
     119      try {
     120        TableFileParser csvParser = new TableFileParser();
     121        csvParser.Parse(ProblemTextBox.Text,
     122                        (NumberFormatInfo)DecimalSeparatorComboBox.SelectedValue,
     123                        (DateTimeFormatInfo)DateTimeFormatComboBox.SelectedValue,
     124                        (char)SeparatorComboBox.SelectedValue);
    52125        OkButton.Enabled = true;
     126        IEnumerable<string> variableNamesWithType = GetVariableNamesWithType(csvParser);
     127        PreviewDatasetMatrix.Content = new Dataset(variableNamesWithType, csvParser.Values);
     128        var bla = new Dataset(csvParser.VariableNames, csvParser.Values);
     129
     130        if (!csvParser.Values.Any(x => x is List<double>)) {
     131          throw new ArgumentException("No double column could be found!");
     132        }
     133        ErrorTextBox.Text = String.Empty;
     134        ErrorTextBox.Visible = false;
    53135      }
     136      catch (Exception ex) {
     137        OkButton.Enabled = false;
     138        ErrorTextBox.Text = ex.Message;
     139        ErrorTextBox.Visible = true;
     140      }
     141    }
     142
     143    private IEnumerable<string> GetVariableNamesWithType(TableFileParser csvParser) {
     144      IList<string> variableNamesWithType = csvParser.VariableNames.ToList();
     145      for (int i = 0; i < csvParser.Values.Count; i++) {
     146        if (csvParser.Values[i] is List<double>) {
     147          variableNamesWithType[i] += " (Double)";
     148        } else if (csvParser.Values[i] is List<string>) {
     149          variableNamesWithType[i] += " (String)";
     150        } else if (csvParser.Values[i] is List<DateTime>) {
     151          variableNamesWithType[i] += " (DateTime)";
     152        } else {
     153          throw new ArgumentException("The variable values must be of type List<double>, List<string> or List<DateTime>");
     154        }
     155      }
     156      return variableNamesWithType;
    54157    }
    55158  }
  • branches/DataAnalysisCSVImport/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceConsumerView.cs

    r8693 r8701  
    3030  [View("DataAnalysis InstanceProvider View")]
    3131  [Content(typeof(IProblemInstanceConsumer<IDataAnalysisProblemData>), IsDefaultView = true)]
    32   [Content(typeof(IProblemInstanceConsumer<IClassificationProblemData>), IsDefaultView = true)]
    3332  [Content(typeof(IProblemInstanceConsumer<IRegressionProblemData>), IsDefaultView = true)]
    3433  [Content(typeof(IProblemInstanceConsumer<IClusteringProblemData>), IsDefaultView = true)]
     
    4241    public DataAnalysisInstanceConsumerView() {
    4342      InitializeComponent();
     43
    4444    }
    4545
    4646    protected override void importButton_Click(object sender, EventArgs e) {
    47       var provider = SelectedProvider as DataAnalysisInstanceProvider<T>;
     47      var provider = SelectedProvider as DataAnalysisInstanceProvider<T, DataAnalysisImportType>;
    4848      if (provider != null) {
    4949        DataAnalysisImportTypeDialog importTypeDialog = new DataAnalysisImportTypeDialog();
     
    5151          T instance = default(T);
    5252          try {
    53             instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType);
     53            instance = provider.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat);
    5454
    5555          }
  • branches/DataAnalysisCSVImport/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj

    r8693 r8701  
    1818    <DebugType>full</DebugType>
    1919    <Optimize>false</Optimize>
    20     <OutputPath>bin\Debug\</OutputPath>
     20    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    2121    <DefineConstants>DEBUG;TRACE</DefineConstants>
    2222    <ErrorReport>prompt</ErrorReport>
     
    2626    <DebugType>pdbonly</DebugType>
    2727    <Optimize>true</Optimize>
    28     <OutputPath>..\..\bin\</OutputPath>
     28    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    2929    <DefineConstants>TRACE</DefineConstants>
    3030    <ErrorReport>prompt</ErrorReport>
     
    3838  </PropertyGroup>
    3939  <ItemGroup>
    40     <Reference Include="System" />
    41     <Reference Include="System.Core" />
    42     <Reference Include="System.Drawing" />
    43     <Reference Include="System.Windows.Forms" />
    44     <Reference Include="System.Xml.Linq" />
    45     <Reference Include="System.Data.DataSetExtensions" />
    46     <Reference Include="Microsoft.CSharp" />
    47     <Reference Include="System.Data" />
    48     <Reference Include="System.Xml" />
     40    <Reference Include="HeuristicLab.Common-3.3">
     41      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     42    </Reference>
     43    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     44      <Private>False</Private>
     45    </Reference>
     46    <Reference Include="HeuristicLab.Core-3.3">
     47      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     48    </Reference>
     49    <Reference Include="HeuristicLab.Data-3.3">
     50      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     51    </Reference>
     52    <Reference Include="HeuristicLab.Data.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     53      <Private>False</Private>
     54    </Reference>
     55    <Reference Include="HeuristicLab.MainForm-3.3">
     56      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
     57    </Reference>
     58    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
     59      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
     60    </Reference>
     61    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
     62      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     63    </Reference>
     64    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4">
     65      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
     66    </Reference>
     67    <Reference Include="HeuristicLab.Problems.Instances-3.3">
     68      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
     69    </Reference>
     70    <Reference Include="HeuristicLab.Problems.Instances.Views-3.3">
     71      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.Views-3.3.dll</HintPath>
     72    </Reference>
     73    <Reference Include="System">
     74      <Private>True</Private>
     75    </Reference>
     76    <Reference Include="System.Core">
     77      <Private>True</Private>
     78    </Reference>
     79    <Reference Include="System.Drawing">
     80      <Private>True</Private>
     81    </Reference>
     82    <Reference Include="System.Windows.Forms">
     83      <Private>True</Private>
     84    </Reference>
     85    <Reference Include="System.Xml.Linq">
     86      <Private>True</Private>
     87    </Reference>
     88    <Reference Include="System.Data.DataSetExtensions">
     89      <Private>True</Private>
     90    </Reference>
     91    <Reference Include="Microsoft.CSharp">
     92      <Private>True</Private>
     93    </Reference>
     94    <Reference Include="System.Data">
     95      <Private>True</Private>
     96    </Reference>
     97    <Reference Include="System.Xml">
     98      <Private>True</Private>
     99    </Reference>
    49100  </ItemGroup>
    50101  <ItemGroup>
     102    <Compile Include="ClassificationImportTypeDialog.cs">
     103      <SubType>Form</SubType>
     104    </Compile>
     105    <Compile Include="ClassificationImportTypeDialog.Designer.cs">
     106      <DependentUpon>ClassificationImportTypeDialog.cs</DependentUpon>
     107    </Compile>
     108    <Compile Include="ClassificationInstanceConsumerView.cs">
     109      <SubType>UserControl</SubType>
     110    </Compile>
     111    <Compile Include="ClassificationInstanceConsumerView.Designer.cs">
     112      <DependentUpon>ClassificationInstanceConsumerView.cs</DependentUpon>
     113    </Compile>
    51114    <Compile Include="DataAnalysisImportTypeDialog.cs">
    52115      <SubType>Form</SubType>
     
    68131  </ItemGroup>
    69132  <ItemGroup>
    70     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    71       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
    72       <Name>HeuristicLab.Common-3.3</Name>
    73     </ProjectReference>
    74     <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    75       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    76       <Name>HeuristicLab.Core-3.3</Name>
    77     </ProjectReference>
    78     <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    79       <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    80       <Name>HeuristicLab.Data-3.3</Name>
    81     </ProjectReference>
    82     <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
    83       <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
    84       <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name>
    85     </ProjectReference>
    86     <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj">
    87       <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
    88       <Name>HeuristicLab.MainForm-3.3</Name>
    89     </ProjectReference>
    90     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    91       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    92       <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    93       <Private>False</Private>
    94     </ProjectReference>
    95     <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
    96       <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
    97       <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
    98       <Private>False</Private>
    99     </ProjectReference>
    100133    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.DataAnalysis\3.3\HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj">
    101134      <Project>{94C7714E-29D4-4D6D-B213-2C18D627AB75}</Project>
    102135      <Name>HeuristicLab.Problems.Instances.DataAnalysis-3.3</Name>
    103       <Private>False</Private>
    104     </ProjectReference>
    105     <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.Views\3.3\HeuristicLab.Problems.Instances.Views-3.3.csproj">
    106       <Project>{B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}</Project>
    107       <Name>HeuristicLab.Problems.Instances.Views-3.3</Name>
    108       <Private>False</Private>
    109     </ProjectReference>
    110     <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
    111       <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
    112       <Name>HeuristicLab.Problems.Instances-3.3</Name>
    113136      <Private>False</Private>
    114137    </ProjectReference>
Note: See TracChangeset for help on using the changeset viewer.