Changeset 9449 for trunk/sources
- Timestamp:
- 05/06/13 15:34:17 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r8877 r9449 311 311 .Distinct() 312 312 .Count() 313 where distinctValues < MaximumNumberOfClasses313 where distinctValues <= MaximumNumberOfClasses 314 314 select v).ToArray(); 315 315 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.Designer.cs
r9024 r9449 90 90 // OkButton 91 91 // 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))); 93 93 this.OkButton.DialogResult = System.Windows.Forms.DialogResult.OK; 94 94 this.OkButton.Enabled = false; … … 102 102 // TrainingTestTrackBar 103 103 // 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) 105 105 | System.Windows.Forms.AnchorStyles.Right))); 106 106 this.TrainingTestTrackBar.Location = new System.Drawing.Point(6, 43); … … 166 166 // ProblemTextBox 167 167 // 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) 169 169 | System.Windows.Forms.AnchorStyles.Right))); 170 170 this.ProblemTextBox.Location = new System.Drawing.Point(91, 6); … … 180 180 // DateTimeFormatComboBox 181 181 // 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) 183 183 | System.Windows.Forms.AnchorStyles.Right))); 184 184 this.DateTimeFormatComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 185 this.DateTimeFormatComboBox.Enabled = false; 185 186 this.DateTimeFormatComboBox.FormattingEnabled = true; 186 187 this.DateTimeFormatComboBox.Location = new System.Drawing.Point(111, 73); … … 192 193 // DecimalSeparatorComboBox 193 194 // 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) 195 196 | System.Windows.Forms.AnchorStyles.Right))); 196 197 this.DecimalSeparatorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 198 this.DecimalSeparatorComboBox.Enabled = false; 197 199 this.DecimalSeparatorComboBox.FormattingEnabled = true; 198 200 this.DecimalSeparatorComboBox.Location = new System.Drawing.Point(111, 46); … … 231 233 // SeparatorComboBox 232 234 // 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) 234 236 | System.Windows.Forms.AnchorStyles.Right))); 235 237 this.SeparatorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 238 this.SeparatorComboBox.Enabled = false; 236 239 this.SeparatorComboBox.FormattingEnabled = true; 237 240 this.SeparatorComboBox.Location = new System.Drawing.Point(111, 19); … … 243 246 // CSVSettingsGroupBox 244 247 // 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) 246 249 | System.Windows.Forms.AnchorStyles.Right))); 247 250 this.CSVSettingsGroupBox.Controls.Add(this.DateTimeFormatInfoLabel); … … 299 302 // ProblemDataSettingsGroupBox 300 303 // 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) 303 306 | System.Windows.Forms.AnchorStyles.Right))); 304 307 this.ProblemDataSettingsGroupBox.Controls.Add(this.ErrorTextBox); … … 324 327 this.ErrorTextBox.Size = new System.Drawing.Size(435, 73); 325 328 this.ErrorTextBox.TabIndex = 0; 329 this.ErrorTextBox.Text = "Open a CSV File"; 326 330 this.ErrorTextBox.Visible = false; 327 331 // … … 348 352 // PreviewDatasetMatrix 349 353 // 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) 352 356 | System.Windows.Forms.AnchorStyles.Right))); 353 357 this.PreviewDatasetMatrix.Caption = "Dataset Preview"; … … 367 371 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 368 372 this.ClientSize = new System.Drawing.Size(471, 442); 369 this.ControlBox = false;370 373 this.Controls.Add(this.ProblemDataSettingsGroupBox); 371 374 this.Controls.Add(this.CSVSettingsGroupBox); -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.cs
r9021 r9449 23 23 using System.Collections.Generic; 24 24 using System.Globalization; 25 using System.IO; 25 26 using System.Linq; 26 27 using System.Windows.Forms; … … 38 39 }; 39 40 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>>{ 42 42 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)" ) 44 46 }; 45 47 46 48 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)" ) 49 51 }; 50 52 … … 94 96 if (openFileDialog.ShowDialog(this) != DialogResult.OK) return; 95 97 98 SeparatorComboBox.Enabled = true; 99 DecimalSeparatorComboBox.Enabled = true; 100 DateTimeFormatComboBox.Enabled = true; 96 101 ProblemTextBox.Text = openFileDialog.FileName; 97 102 ParseCSVFile(); … … 122 127 } 123 128 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 } 127 136 } 128 137 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/TableFileParser.cs
r8885 r9449 33 33 public class TableFileParser { 34 34 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', ' ' }; 36 36 private Tokenizer tokenizer; 37 37 private List<List<object>> rowValues; … … 457 457 458 458 [Serializable] 459 p rivateclass DataFormatException : Exception {459 public class DataFormatException : Exception { 460 460 private int line; 461 461 public int Line { -
trunk/sources/HeuristicLab.Problems.Instances.Views/3.3/ProblemInstanceConsumerViewGeneric.cs
r8211 r9449 33 33 namespace HeuristicLab.Problems.Instances.Views { 34 34 [View("ProblemInstanceConsumerView")] 35 [Content(typeof(IProblemInstanceConsumer<>), IsDefaultView = true)]35 [Content(typeof(IProblemInstanceConsumer<>), IsDefaultView = false)] 36 36 public partial class ProblemInstanceConsumerViewGeneric<T> : ProblemInstanceConsumerView { 37 37
Note: See TracChangeset
for help on using the changeset viewer.