Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/23/13 23:00:30 (11 years ago)
Author:
mkommend
Message:

#2070: Merged r9608, r9610, r9611, r9623, and r9624 in the stable branch.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.Instances.DataAnalysis.Views

  • stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.cs

    r9458 r9651  
    6868          Separator = (char)SeparatorComboBox.SelectedValue,
    6969          NumberFormatInfo = (NumberFormatInfo)DecimalSeparatorComboBox.SelectedValue,
    70           DateTimeFormatInfo = (DateTimeFormatInfo)DateTimeFormatComboBox.SelectedValue
     70          DateTimeFormatInfo = (DateTimeFormatInfo)DateTimeFormatComboBox.SelectedValue,
     71          VariableNamesAvailable = CheckboxColumnNames.Checked
    7172        };
    7273      }
     
    99100      DateTimeFormatComboBox.Enabled = true;
    100101      ProblemTextBox.Text = openFileDialog.FileName;
     102      TableFileParser csvParser = new TableFileParser();
     103      CheckboxColumnNames.Checked = csvParser.AreColumnNamesInFirstLine(ProblemTextBox.Text,
     104                                                                      (NumberFormatInfo)DecimalSeparatorComboBox.SelectedValue,
     105                                                                      (DateTimeFormatInfo)DateTimeFormatComboBox.SelectedValue,
     106                                                                      (char)SeparatorComboBox.SelectedValue);
    101107      ParseCSVFile();
    102108    }
    103109
    104110    protected virtual void CSVFormatComboBoxSelectionChangeCommitted(object sender, EventArgs e) {
     111      if (string.IsNullOrEmpty(ProblemTextBox.Text)) return;
     112
     113      ParseCSVFile();
     114    }
     115
     116    protected virtual void CheckboxColumnNames_CheckedChanged(object sender, EventArgs e) {
    105117      if (string.IsNullOrEmpty(ProblemTextBox.Text)) return;
    106118
     
    115127                        (NumberFormatInfo)DecimalSeparatorComboBox.SelectedValue,
    116128                        (DateTimeFormatInfo)DateTimeFormatComboBox.SelectedValue,
    117                         (char)SeparatorComboBox.SelectedValue);
     129                        (char)SeparatorComboBox.SelectedValue,
     130                        CheckboxColumnNames.Checked);
    118131        IEnumerable<string> variableNamesWithType = GetVariableNamesWithType(csvParser);
    119132        PreviewDatasetMatrix.Content = new Dataset(variableNamesWithType, csvParser.Values);
Note: See TracChangeset for help on using the changeset viewer.