Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9449 for trunk/sources


Ignore:
Timestamp:
05/06/13 15:34:17 (12 years ago)
Author:
sforsten
Message:

#2045: fixed described problems

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs

    r8877 r9449  
    311311                                    .Distinct()
    312312                                    .Count()
    313                                   where distinctValues < MaximumNumberOfClasses
     313                                  where distinctValues <= MaximumNumberOfClasses
    314314                                  select v).ToArray();
    315315
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.Designer.cs

    r9024 r9449  
    9090      // OkButton
    9191      //
    92       this.OkButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     92      this.OkButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    9393      this.OkButton.DialogResult = System.Windows.Forms.DialogResult.OK;
    9494      this.OkButton.Enabled = false;
     
    102102      // TrainingTestTrackBar
    103103      //
    104       this.TrainingTestTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     104      this.TrainingTestTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    105105            | System.Windows.Forms.AnchorStyles.Right)));
    106106      this.TrainingTestTrackBar.Location = new System.Drawing.Point(6, 43);
     
    166166      // ProblemTextBox
    167167      //
    168       this.ProblemTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     168      this.ProblemTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    169169            | System.Windows.Forms.AnchorStyles.Right)));
    170170      this.ProblemTextBox.Location = new System.Drawing.Point(91, 6);
     
    180180      // DateTimeFormatComboBox
    181181      //
    182       this.DateTimeFormatComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     182      this.DateTimeFormatComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    183183            | System.Windows.Forms.AnchorStyles.Right)));
    184184      this.DateTimeFormatComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     185      this.DateTimeFormatComboBox.Enabled = false;
    185186      this.DateTimeFormatComboBox.FormattingEnabled = true;
    186187      this.DateTimeFormatComboBox.Location = new System.Drawing.Point(111, 73);
     
    192193      // DecimalSeparatorComboBox
    193194      //
    194       this.DecimalSeparatorComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     195      this.DecimalSeparatorComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    195196            | System.Windows.Forms.AnchorStyles.Right)));
    196197      this.DecimalSeparatorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     198      this.DecimalSeparatorComboBox.Enabled = false;
    197199      this.DecimalSeparatorComboBox.FormattingEnabled = true;
    198200      this.DecimalSeparatorComboBox.Location = new System.Drawing.Point(111, 46);
     
    231233      // SeparatorComboBox
    232234      //
    233       this.SeparatorComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     235      this.SeparatorComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    234236            | System.Windows.Forms.AnchorStyles.Right)));
    235237      this.SeparatorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     238      this.SeparatorComboBox.Enabled = false;
    236239      this.SeparatorComboBox.FormattingEnabled = true;
    237240      this.SeparatorComboBox.Location = new System.Drawing.Point(111, 19);
     
    243246      // CSVSettingsGroupBox
    244247      //
    245       this.CSVSettingsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     248      this.CSVSettingsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    246249            | System.Windows.Forms.AnchorStyles.Right)));
    247250      this.CSVSettingsGroupBox.Controls.Add(this.DateTimeFormatInfoLabel);
     
    299302      // ProblemDataSettingsGroupBox
    300303      //
    301       this.ProblemDataSettingsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    302             | System.Windows.Forms.AnchorStyles.Left)
     304      this.ProblemDataSettingsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     305            | System.Windows.Forms.AnchorStyles.Left) 
    303306            | System.Windows.Forms.AnchorStyles.Right)));
    304307      this.ProblemDataSettingsGroupBox.Controls.Add(this.ErrorTextBox);
     
    324327      this.ErrorTextBox.Size = new System.Drawing.Size(435, 73);
    325328      this.ErrorTextBox.TabIndex = 0;
     329      this.ErrorTextBox.Text = "Open a CSV File";
    326330      this.ErrorTextBox.Visible = false;
    327331      //
     
    348352      // PreviewDatasetMatrix
    349353      //
    350       this.PreviewDatasetMatrix.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    351             | System.Windows.Forms.AnchorStyles.Left)
     354      this.PreviewDatasetMatrix.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     355            | System.Windows.Forms.AnchorStyles.Left) 
    352356            | System.Windows.Forms.AnchorStyles.Right)));
    353357      this.PreviewDatasetMatrix.Caption = "Dataset Preview";
     
    367371      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    368372      this.ClientSize = new System.Drawing.Size(471, 442);
    369       this.ControlBox = false;
    370373      this.Controls.Add(this.ProblemDataSettingsGroupBox);
    371374      this.Controls.Add(this.CSVSettingsGroupBox);
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.cs

    r9021 r9449  
    2323using System.Collections.Generic;
    2424using System.Globalization;
     25using System.IO;
    2526using System.Linq;
    2627using System.Windows.Forms;
     
    3839    };
    3940
    40     public static readonly List<KeyValuePair<char, string>> POSSIBLE_SEPARATORS = new List<KeyValuePair<char, string>>{
    41       new KeyValuePair<char, string>(',', ", (Comma)" ),
     41    public static readonly List<KeyValuePair<char, string>> POSSIBLE_SEPARATORS = new List<KeyValuePair<char, string>>{ 
    4242      new KeyValuePair<char, string>(';', "; (Semicolon)" ),
    43       new KeyValuePair<char, string>('\t', "\\t (Tab)")
     43      new KeyValuePair<char, string>(',', ", (Comma)" ),   
     44      new KeyValuePair<char, string>('\t', "\\t (Tab)"),
     45      new KeyValuePair<char, string>(' ', "' ' (Space)" )
    4446    };
    4547
    4648    public static readonly List<KeyValuePair<NumberFormatInfo, string>> POSSIBLE_DECIMAL_SEPARATORS = new List<KeyValuePair<NumberFormatInfo, string>>{
    47       new KeyValuePair<NumberFormatInfo, string>(NumberFormatInfo.InvariantInfo, ". (Period)" ),
    48       new KeyValuePair<NumberFormatInfo, string>(NumberFormatInfo.GetInstance(new CultureInfo("de-DE")), ", (Comma)" )     
     49      new KeyValuePair<NumberFormatInfo, string>(NumberFormatInfo.GetInstance(new CultureInfo("de-DE")), ", (Comma)"),
     50      new KeyValuePair<NumberFormatInfo, string>(NumberFormatInfo.InvariantInfo, ". (Period)" )   
    4951    };
    5052
     
    9496      if (openFileDialog.ShowDialog(this) != DialogResult.OK) return;
    9597
     98      SeparatorComboBox.Enabled = true;
     99      DecimalSeparatorComboBox.Enabled = true;
     100      DateTimeFormatComboBox.Enabled = true;
    96101      ProblemTextBox.Text = openFileDialog.FileName;
    97102      ParseCSVFile();
     
    122127      }
    123128      catch (Exception ex) {
    124         OkButton.Enabled = false;
    125         ErrorTextBox.Text = ex.Message;
    126         ErrorTextBox.Visible = true;
     129        if (ex is IOException || ex is InvalidOperationException || ex is ArgumentException || ex is TableFileParser.DataFormatException) {
     130          OkButton.Enabled = false;
     131          ErrorTextBox.Text = ex.Message;
     132          ErrorTextBox.Visible = true;
     133        } else {
     134          throw;
     135        }
    127136      }
    128137    }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/TableFileParser.cs

    r8885 r9449  
    3333  public class TableFileParser {
    3434    private const int BUFFER_SIZE = 65536;
    35     private static readonly char[] POSSIBLE_SEPARATORS = new char[] { ',', ';', '\t' };
     35    private static readonly char[] POSSIBLE_SEPARATORS = new char[] { ',', ';', '\t', ' ' };
    3636    private Tokenizer tokenizer;
    3737    private List<List<object>> rowValues;
     
    457457
    458458    [Serializable]
    459     private class DataFormatException : Exception {
     459    public class DataFormatException : Exception {
    460460      private int line;
    461461      public int Line {
  • trunk/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceConsumerViewGeneric.cs

    r8211 r9449  
    3333namespace HeuristicLab.Problems.Instances.Views {
    3434  [View("ProblemInstanceConsumerView")]
    35   [Content(typeof(IProblemInstanceConsumer<>), IsDefaultView = true)]
     35  [Content(typeof(IProblemInstanceConsumer<>), IsDefaultView = false)]
    3636  public partial class ProblemInstanceConsumerViewGeneric<T> : ProblemInstanceConsumerView {
    3737
Note: See TracChangeset for help on using the changeset viewer.