Changeset 15280 for branches/Async/HeuristicLab.DataPreprocessing.Views/3.4
- Timestamp:
- 07/23/17 00:52:14 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 38 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.DataPreprocessing.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.DataPreprocessing.Views (added) merged: 13502,13504,13507-13508,13512,13514,13517,13796,13838,13935
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.Designer.cs
r10785 r15280 1 using HeuristicLab.Core.Views; 2 using HeuristicLab.DataPreprocessing.Filter; 3 namespace HeuristicLab.DataPreprocessing.Views 4 { 5 partial class CheckedFilterCollectionView 6 { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 namespace HeuristicLab.DataPreprocessing.Views { 23 partial class CheckedFilterCollectionView { 7 24 /// <summary> 8 25 /// Required designer variable. … … 14 31 /// </summary> 15 32 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 16 protected override void Dispose(bool disposing) 17 { 18 if (disposing && (components != null)) 19 { 33 protected override void Dispose(bool disposing) { 34 if (disposing && (components != null)) { 20 35 components.Dispose(); 21 36 } … … 29 44 /// the contents of this method with the code editor. 30 45 /// </summary> 31 private void InitializeComponent() 32 { 46 private void InitializeComponent() { 33 47 components = new System.ComponentModel.Container(); 34 48 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.cs
r11114 r15280 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Drawing; 5 using System.Linq; 6 using System.Text; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 using System; 7 23 using System.Windows.Forms; 24 using HeuristicLab.Core; 8 25 using HeuristicLab.Core.Views; 9 using HeuristicLab. Collections;26 using HeuristicLab.DataPreprocessing.Filter; 10 27 using HeuristicLab.MainForm; 11 using HeuristicLab.Core;12 using HeuristicLab.DataPreprocessing.Filter;13 28 14 namespace HeuristicLab.DataPreprocessing.Views 15 { 29 namespace HeuristicLab.DataPreprocessing.Views { 16 30 [View("CheckedFilterCollection View")] 17 31 [Content(typeof(ICheckedItemCollection<>), false)] 18 32 [Content(typeof(CheckedItemCollection<>), false)] 19 public partial class CheckedFilterCollectionView : CheckedItemCollectionView<IFilter> 20 { 21 public CheckedFilterCollectionView() 22 { 33 public partial class CheckedFilterCollectionView : CheckedItemCollectionView<IFilter> { 34 public CheckedFilterCollectionView() { 23 35 InitializeComponent(); 24 36 } 25 37 26 protected override void addButton_Click(object sender, EventArgs e) 27 { 38 protected override void addButton_Click(object sender, EventArgs e) { 28 39 IFilter filter = new ComparisonFilter(); 29 40 Content.Add(filter); -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.Designer.cs
r10979 r15280 1 namespace HeuristicLab.DataPreprocessing.Views { 2 partial class DataCompletenessView 3 { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 namespace HeuristicLab.DataPreprocessing.Views { 23 partial class DataCompletenessView { 4 24 /// <summary> 5 25 /// Required designer variable. … … 34 54 // chart 35 55 // 36 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 37 | System.Windows.Forms.AnchorStyles.Left) 56 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 57 | System.Windows.Forms.AnchorStyles.Left) 38 58 | System.Windows.Forms.AnchorStyles.Right))); 39 59 chartArea1.Name = "ChartArea1"; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs
r11002 r15280 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 using System; 23 using System.Collections.Generic; 24 using System.Drawing; 25 using System.Linq; 2 26 using System.Windows.Forms; 3 using HeuristicLab.Analysis; 27 using System.Windows.Forms.DataVisualization.Charting; 28 using HeuristicLab.Core.Views; 4 29 using HeuristicLab.MainForm; 5 using HeuristicLab.Core.Views;6 using System.Collections.Generic;7 using HeuristicLab.DataPreprocessing.Implementations;8 using System.Drawing;9 using System.Windows.Forms.DataVisualization.Charting;10 30 11 31 namespace HeuristicLab.DataPreprocessing.Views { … … 13 33 [View("Histogram View")] 14 34 [Content(typeof(DataCompletenessChartContent), true)] 15 public partial class DataCompletenessView : ItemView 16 { 35 public partial class DataCompletenessView : ItemView { 36 //series colors 37 private static readonly Color colorNonMissingValue = Color.CornflowerBlue; 38 private static readonly Color colorMissingValue = Color.Orange; 17 39 18 //list of columns, bool indicates wether the cell is a missing value or not 19 private List<List<bool>> matrix = new List<List<bool>>(); 20 //series colors 21 private static Color colorNonMissingVal = Color.CornflowerBlue; 22 private static Color colorMissingVal = Color.Orange; 23 24 public new DataCompletenessChartContent Content 25 { 40 public new DataCompletenessChartContent Content { 26 41 get { return (DataCompletenessChartContent)base.Content; } 27 42 set { base.Content = value; } 28 43 } 29 44 30 31 public DataCompletenessView() 32 { 45 public DataCompletenessView() { 33 46 InitializeComponent(); 34 47 } 35 48 36 protected override void OnContentChanged() 37 { 49 protected override void OnContentChanged() { 38 50 base.OnContentChanged(); 39 if (Content != null) 40 { 41 InitData(); 42 } 51 if (Content == null) return; 52 InitData(); 43 53 } 44 54 45 private void InitData() 46 { 55 private void InitData() { 47 56 IDictionary<int, IList<int>> missingValueIndices = Content.SearchLogic.GetMissingValueIndices(); 48 for (int i = 0; i < Content.SearchLogic.Columns; i++) 49 { 50 //append column 51 List<bool> column = new List<bool>(); 52 for (int j = 0; j < Content.SearchLogic.Rows; j++) { 53 column.Add(missingValueIndices[i].Contains(j)); 54 } 55 matrix.Add(column); 57 58 bool[,] valueMissing = new bool[Content.SearchLogic.Rows, Content.SearchLogic.Columns]; 59 foreach (var columnMissingValues in missingValueIndices) { 60 var column = columnMissingValues.Key; 61 foreach (var missingValueIndex in columnMissingValues.Value) 62 valueMissing[missingValueIndex, column] = true; 56 63 } 57 List<List<int>> yValuesPerColumn = ProcessMatrixForCharting(matrix, missingValueIndices); 64 65 var yValuesPerColumn = ProcessMatrixForCharting(valueMissing); 58 66 PrepareChart(); 59 67 CreateSeries(yValuesPerColumn); 60 68 } 61 69 62 private void PrepareChart() 63 { 70 private void PrepareChart() { 64 71 chart.Titles.Add("DataCompletenessChart"); 65 72 chart.EnableDoubleClickResetsZoom = true; … … 74 81 //custom x axis label 75 82 double from = 0.5; 76 foreach (String columnName in Content.SearchLogic.VariableNames) 77 { 83 foreach (String columnName in Content.SearchLogic.VariableNames) { 78 84 double to = from + 1; 79 85 chart.ChartAreas[0].AxisX.CustomLabels.Add(from, to, columnName); … … 84 90 } 85 91 86 private void CreateSeries(List<List<int>> yValuesPerColumn) 87 {92 private void CreateSeries(List<List<int>> yValuesPerColumn) { 93 chart.Series.SuspendUpdates(); 88 94 //prepare series 89 95 int seriesCount = DetermineSeriesCount(yValuesPerColumn); 90 for (int i = 0; i < seriesCount; i++) 91 { 92 chart.Series.Add(CreateSeriesName(i)); 93 Series series = chart.Series[CreateSeriesName(i)]; 96 for (int i = 0; i < seriesCount; i++) { 97 Series series = new Series(CreateSeriesName(i)); 94 98 series.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.StackedColumn; 95 99 series.IsVisibleInLegend = false; 96 100 series["PointWidth"] = "1.0"; 97 if (i % 2 == 0) 98 { 99 if (i == 0) //show legend for non missing values only once 100 series.IsVisibleInLegend = true; 101 series.Color = colorNonMissingVal; 102 } 103 else 104 { 105 if (i == 1) //show legend for missing values only once 106 series.IsVisibleInLegend = true; 107 series.Color = colorMissingVal; 108 } 101 series.IsVisibleInLegend = i < 2; //only first two series are visible, non-missing and missing values 102 series.Color = i % 2 == 0 ? colorNonMissingValue : colorMissingValue; 103 104 var values = yValuesPerColumn.Select(y => i < y.Count ? y[i] : 0).ToArray(); 105 series.Points.DataBindY(values); 106 chart.Series.Add(series); 109 107 } 110 //fill series 111 for (int i = 0; i < yValuesPerColumn.Count; i++) 112 { 113 List<int> column = yValuesPerColumn[i]; 114 for (int j = 0; j < seriesCount; j++) { 115 if (column.Count - 1 < j) { 116 chart.Series[CreateSeriesName(j)].Points.AddY(0); 117 } else { 118 chart.Series[CreateSeriesName(j)].Points.AddY(column[j]); 119 } 120 } 121 } 108 chart.Series.ResumeUpdates(); 122 109 } 123 110 124 private String CreateSeriesName(int index) 125 { 111 private String CreateSeriesName(int index) { 126 112 if (index == 0) 127 113 return "non-missing value"; … … 132 118 133 119 #region data_preparation_for_chartseries 134 private int DetermineSeriesCount(List<List<int>> yValuesPerColumn) 135 { 136 int highest = 0; 137 foreach (List<int> values in yValuesPerColumn) { 138 highest = Math.Max(values.Count, highest); 139 } 140 return highest; 120 private int DetermineSeriesCount(List<List<int>> yValuesPerColumn) { 121 return yValuesPerColumn.Max(values => values.Count); 141 122 } 142 123 143 private List<List<int>> ProcessMatrixForCharting(List<List<bool>> matrix, IDictionary<int, IList<int>> missingValueIndices) 144 { 145 List<List<int>> columnsYValues = new List<List<int>>(); 146 for (int i=0; i < matrix.Count; i++) //column 147 { 148 List<int> yValues = new List<int>(); 149 List<bool> column = matrix[i]; 124 private List<List<int>> ProcessMatrixForCharting(bool[,] matrix) { 125 var columnsYValues = new List<List<int>>(); 126 for (int column = 0; column < matrix.GetLength(1); column++) { 127 var yValues = new List<int>(); 150 128 bool missingState = false; 151 129 int valueCount = 0; 152 for (int j = 0; j < column.Count; j++ ) { 153 if (missingState == missingValueIndices[i].Contains(j))154 {130 131 for (int row = 0; row < matrix.GetLength(0); row++) { 132 if (missingState == matrix[row, column]) { 155 133 valueCount++; 156 } 157 else 158 { 134 } else { 159 135 yValues.Add(valueCount); 160 136 valueCount = 1; … … 167 143 yValues.Add(0); 168 144 } 169 //yValues.Reverse();170 145 columnsYValues.Add(yValues); 171 146 } -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
r13252 r15280 31 31 namespace HeuristicLab.DataPreprocessing.Views { 32 32 [View("Data Grid Content View")] 33 [Content(typeof( IDataGridContent), true)]33 [Content(typeof(DataGridContent), true)] 34 34 public partial class DataGridContentView : StringConvertibleMatrixView { 35 35 … … 42 42 private Tuple<int, int> currentCell; 43 43 44 public new IDataGridContent Content {45 get { return ( IDataGridContent)base.Content; }44 public new DataGridContent Content { 45 get { return (DataGridContent)base.Content; } 46 46 set { base.Content = value; } 47 47 } … … 145 145 protected override void PasteValuesToDataGridView() { 146 146 string[,] values = SplitClipboardString(Clipboard.GetText()); 147 if (values.Length == 0) return; 147 148 int rowIndex = 0; 148 149 int columnIndex = 0; … … 151 152 columnIndex = dataGridView.CurrentCell.ColumnIndex; 152 153 } 153 if (Content.Rows < values.GetLength(1) + rowIndex) Content.Rows = values.GetLength(1) + rowIndex; 154 if (Content.Columns < values.GetLength(0) + columnIndex) Content.Columns = values.GetLength(0) + columnIndex; 154 155 bool containsHeader = false; 156 var firstRow = Enumerable.Range(0, values.GetLength(0)).Select(col => values[col, 0]).ToList(); 157 if ((Content.Selection.Values.Sum(s => s.Count) == Content.Rows * Content.Columns) 158 || (rowIndex == 0 && columnIndex == 0 && Content.Rows <= values.GetLength(1) && Content.Columns <= values.GetLength(0))) { 159 // All is selected -or- top left selected and everything will be replaced 160 double temp; 161 containsHeader = !firstRow.All(string.IsNullOrEmpty) && firstRow.Any(r => !double.TryParse(r, out temp)); 162 if (containsHeader) 163 rowIndex = columnIndex = 0; 164 } 165 166 int newRows = values.GetLength(1) + rowIndex - (containsHeader ? 1 : 0); 167 int newColumns = values.GetLength(0) + columnIndex; 168 if (Content.Rows < newRows) Content.Rows = newRows; 169 if (Content.Columns < newColumns) Content.Columns = newColumns; 155 170 156 171 ReplaceTransaction(() => { 157 172 Content.PreProcessingData.InTransaction(() => { 158 for (int row = 0; row < values.GetLength(1); row++) {173 for (int row = containsHeader ? 1 : 0; row < values.GetLength(1); row++) { 159 174 for (int col = 0; col < values.GetLength(0); col++) { 160 Content.SetValue(values[col, row], row + rowIndex , col + columnIndex);175 Content.SetValue(values[col, row], row + rowIndex - (containsHeader ? 1 : 0), col + columnIndex); 161 176 } 177 } 178 if (containsHeader) { 179 for (int i = 0; i < firstRow.Count; i++) 180 if (string.IsNullOrWhiteSpace(firstRow[i])) 181 firstRow[i] = string.Format("<{0}>", i); 182 Content.PreProcessingData.RenameColumns(firstRow); 162 183 } 163 184 }); -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
r12676 r15280 21 21 22 22 using System; 23 using System.IO; 24 using System.Threading.Tasks; 23 25 using System.Windows.Forms; 24 26 using HeuristicLab.Common; … … 26 28 using HeuristicLab.Core.Views; 27 29 using HeuristicLab.MainForm; 30 using HeuristicLab.Problems.DataAnalysis; 31 using HeuristicLab.Problems.Instances.DataAnalysis; 32 using HeuristicLab.Problems.Instances.DataAnalysis.Views; 28 33 29 34 namespace HeuristicLab.DataPreprocessing.Views { 30 35 [View("DataPreprocessing View")] 31 36 [Content(typeof(PreprocessingContext), true)] 32 [Content(typeof(IPreprocessingContext), false)] 33 public partial class DataPreprocessingView : ItemView { 37 public partial class DataPreprocessingView : NamedItemView { 34 38 35 39 public DataPreprocessingView() { … … 37 41 } 38 42 39 public new IPreprocessingContext Content {40 get { return ( IPreprocessingContext)base.Content; }43 public new PreprocessingContext Content { 44 get { return (PreprocessingContext)base.Content; } 41 45 set { base.Content = value; } 42 46 } … … 60 64 new CorrelationMatrixContent(Content), 61 65 new DataCompletenessChartContent(searchLogic), 62 66 63 67 new FilterContent(filterLogic), 64 68 new ManipulationContent(manipulationLogic, searchLogic, filterLogic), … … 67 71 68 72 viewShortcutListView.Content = viewShortcuts.AsReadOnly(); 69 70 73 viewShortcutListView.ItemsListView.Items[0].Selected = true; 71 74 viewShortcutListView.Select(); 72 75 76 applyTypeContextMenuStrip.Items.Clear(); 77 exportTypeContextMenuStrip.Items.Clear(); 78 foreach (var exportOption in Content.GetSourceExportOptions()) { 79 var applyMenuItem = new ToolStripMenuItem(exportOption.Key) { Tag = exportOption.Value }; 80 applyMenuItem.Click += applyToolStripMenuItem_Click; 81 applyTypeContextMenuStrip.Items.Add(applyMenuItem); 82 83 var exportMenuItem = new ToolStripMenuItem(exportOption.Key) { Tag = exportOption.Value }; 84 exportMenuItem.Click += exportToolStripMenuItem_Click; 85 exportTypeContextMenuStrip.Items.Add(exportMenuItem); 86 } 87 var exportCsvMenuItem = new ToolStripMenuItem(".csv"); 88 exportCsvMenuItem.Click += exportCsvMenuItem_Click; 89 exportTypeContextMenuStrip.Items.Add(exportCsvMenuItem); 73 90 } else { 74 91 viewShortcutListView.Content = null; 75 92 } 76 93 } 77 78 94 protected override void RegisterContentEvents() { 79 95 base.RegisterContentEvents(); 96 Content.Reset += Content_Reset; 80 97 Content.Data.FilterChanged += Data_FilterChanged; 81 98 } … … 83 100 protected override void DeregisterContentEvents() { 84 101 base.DeregisterContentEvents(); 102 Content.Reset -= Content_Reset; 85 103 Content.Data.FilterChanged -= Data_FilterChanged; 104 } 105 106 void Content_Reset(object sender, EventArgs e) { 107 OnContentChanged(); // Reset by setting new content 86 108 } 87 109 … … 94 116 viewShortcutListView.Enabled = Content != null; 95 117 applyInNewTabButton.Enabled = Content != null; 96 exportProblemButton.Enabled = Content != null && Content. Problem != null;118 exportProblemButton.Enabled = Content != null && Content.CanExport; 97 119 undoButton.Enabled = Content != null; 98 120 } 99 121 122 #region New 123 private void newButton_Click(object sender, EventArgs e) { 124 newProblemDataTypeContextMenuStrip.Show(Cursor.Position); 125 } 126 private void newRegressionToolStripMenuItem_Click(object sender, EventArgs e) { 127 Content.Import(new RegressionProblemData()); 128 } 129 private void newClassificationToolStripMenuItem_Click(object sender, EventArgs e) { 130 Content.Import(new ClassificationProblemData()); 131 } 132 private void newTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) { 133 Content.Import(new TimeSeriesPrognosisProblemData()); 134 } 135 #endregion 136 137 #region Import 138 private void importButton_Click(object sender, EventArgs e) { 139 importProblemDataTypeContextMenuStrip.Show(Cursor.Position); 140 } 141 private void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) { 142 Import(new RegressionCSVInstanceProvider(), new RegressionImportTypeDialog(), 143 (dialog => ((RegressionImportTypeDialog)dialog).ImportType)); 144 } 145 private void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) { 146 Import(new ClassificationCSVInstanceProvider(), new ClassificationImportTypeDialog(), 147 (dialog => ((ClassificationImportTypeDialog)dialog).ImportType)); 148 } 149 private void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) { 150 Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportTypeDialog(), 151 (dialog => ((TimeSeriesPrognosisImportTypeDialog)dialog).ImportType)); 152 } 153 private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportTypeDialog importTypeDialog, 154 Func<DataAnalysisImportTypeDialog, TImportType> getImportType) 155 where TProblemData : class, IDataAnalysisProblemData 156 where TImportType : DataAnalysisImportType { 157 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 158 Task.Run(() => { 159 TProblemData instance; 160 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 161 // lock active view and show progress bar 162 var activeView = (IContentView)MainFormManager.MainForm.ActiveView; 163 164 try { 165 var progress = mainForm.AddOperationProgressToContent(activeView.Content, "Loading problem instance."); 166 167 instanceProvider.ProgressChanged += (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; }; 168 169 instance = instanceProvider.ImportData(importTypeDialog.Path, getImportType(importTypeDialog), importTypeDialog.CSVFormat); 170 } catch (IOException ex) { 171 MessageBox.Show(string.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error); 172 mainForm.RemoveOperationProgressFromContent(activeView.Content); 173 return; 174 } 175 try { 176 Content.Import(instance); 177 } catch (IOException ex) { 178 MessageBox.Show(string.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(importTypeDialog.Path), Environment.NewLine + ex.Message), "Cannot load instance"); 179 } finally { 180 mainForm.RemoveOperationProgressFromContent(activeView.Content); 181 } 182 }); 183 } 184 } 185 #endregion 186 187 #region Apply 188 private void applyInNewTabButton_Click(object sender, EventArgs e) { 189 applyTypeContextMenuStrip.Show(Cursor.Position); 190 } 191 private void applyToolStripMenuItem_Click(object sender, EventArgs e) { 192 var menuItem = (ToolStripMenuItem)sender; 193 var itemCreator = (Func<IItem>)menuItem.Tag; 194 MainFormManager.MainForm.ShowContent(itemCreator()); 195 } 196 #endregion 197 198 #region Export 100 199 private void exportProblemButton_Click(object sender, EventArgs e) { 101 var problem = Content.ExportProblem(); 102 200 exportTypeContextMenuStrip.Show(Cursor.Position); 201 } 202 private void exportToolStripMenuItem_Click(object sender, EventArgs e) { 203 var menuItem = (ToolStripMenuItem)sender; 204 var itemCreator = (Func<IItem>)menuItem.Tag; 103 205 var saveFileDialog = new SaveFileDialog { 104 206 Title = "Save Item", … … 108 210 }; 109 211 110 var content = problem as IStorableContent;111 212 if (saveFileDialog.ShowDialog() == DialogResult.OK) { 112 bool compressed = saveFileDialog.FilterIndex != 1; 113 ContentManager.Save(content, saveFileDialog.FileName, compressed); 114 } 115 } 116 117 private void applyInNewTabButton_Click(object sender, EventArgs e) { 118 var item = Content.Export(); 119 120 MainFormManager.MainForm.ShowContent(item); 121 } 122 213 Task.Run(() => { 214 bool compressed = saveFileDialog.FilterIndex != 1; 215 var storable = itemCreator() as IStorableContent; 216 if (storable != null) { 217 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 218 var activeView = (IContentView)MainFormManager.MainForm.ActiveView; 219 try { 220 mainForm.AddOperationProgressToContent(activeView.Content, "Exporting data."); 221 ContentManager.Save(storable, saveFileDialog.FileName, compressed); 222 } finally { 223 mainForm.RemoveOperationProgressFromContent(activeView.Content); 224 } 225 } 226 }); 227 } 228 } 229 private void exportCsvMenuItem_Click(object sender, EventArgs e) { 230 var saveFileDialog = new SaveFileDialog { 231 Title = "Save Data", 232 DefaultExt = "csv", 233 Filter = "CSV files|*.csv|All files|*.*", 234 FilterIndex = 1 235 }; 236 237 if (saveFileDialog.ShowDialog() == DialogResult.OK) { 238 Task.Run(() => { 239 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; 240 var activeView = (IContentView)MainFormManager.MainForm.ActiveView; 241 try { 242 var problemData = Content.CreateNewProblemData(); 243 mainForm.AddOperationProgressToContent(activeView.Content, "Exporting data."); 244 if (problemData is TimeSeriesPrognosisProblemData) 245 Export(new TimeSeriesPrognosisCSVInstanceProvider(), problemData, saveFileDialog.FileName); 246 else if (problemData is RegressionProblemData) 247 Export(new RegressionCSVInstanceProvider(), problemData, saveFileDialog.FileName); 248 else if (problemData is ClassificationProblemData) 249 Export(new ClassificationCSVInstanceProvider(), problemData, saveFileDialog.FileName); 250 } finally { 251 mainForm.RemoveOperationProgressFromContent(activeView.Content); 252 } 253 }); 254 } 255 } 256 private void Export<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, 257 IDataAnalysisProblemData problemData, string path) 258 where TProblemData : class, IDataAnalysisProblemData where TImportType : DataAnalysisImportType { 259 instanceProvider.ExportData((TProblemData)problemData, path); 260 } 261 #endregion 262 263 #region Undo / Redo 123 264 private void undoButton_Click(object sender, EventArgs e) { 124 265 Content.Data.Undo(); 125 266 } 267 #endregion 126 268 } 127 269 } -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.designer.cs
r12012 r15280 50 50 this.applyInNewTabButton = new System.Windows.Forms.Button(); 51 51 this.exportProblemButton = new System.Windows.Forms.Button(); 52 this.toolTip = new System.Windows.Forms.ToolTip(this.components);53 52 this.lblFilterActive = new System.Windows.Forms.Label(); 53 this.redoButton = new System.Windows.Forms.Button(); 54 this.newButton = new System.Windows.Forms.Button(); 55 this.importButton = new System.Windows.Forms.Button(); 56 this.newProblemDataTypeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 57 this.newRegressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 58 this.newClassificationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 59 this.newTimeSeriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 60 this.importProblemDataTypeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 61 this.importRegressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 62 this.importClassificationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 63 this.importTimeSeriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 54 64 this.viewShortcutListView = new HeuristicLab.DataPreprocessing.Views.ViewShortcutListView(); 65 this.applyTypeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 66 this.exportTypeContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 67 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 68 this.newProblemDataTypeContextMenuStrip.SuspendLayout(); 69 this.importProblemDataTypeContextMenuStrip.SuspendLayout(); 55 70 this.SuspendLayout(); 56 71 // 72 // nameTextBox 73 // 74 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 75 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 76 this.nameTextBox.Size = new System.Drawing.Size(755, 20); 77 // 78 // infoLabel 79 // 80 this.infoLabel.Location = new System.Drawing.Point(819, 3); 81 // 57 82 // undoButton 58 83 // 59 84 this.undoButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Undo; 60 this.undoButton.Location = new System.Drawing.Point( 64, 3);85 this.undoButton.Location = new System.Drawing.Point(131, 26); 61 86 this.undoButton.Name = "undoButton"; 62 87 this.undoButton.Size = new System.Drawing.Size(24, 24); 63 this.undoButton.TabIndex = 3;88 this.undoButton.TabIndex = 5; 64 89 this.toolTip.SetToolTip(this.undoButton, "Undo"); 65 90 this.undoButton.UseVisualStyleBackColor = true; … … 69 94 // 70 95 this.applyInNewTabButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play; 71 this.applyInNewTabButton.Location = new System.Drawing.Point( 34, 3);96 this.applyInNewTabButton.Location = new System.Drawing.Point(69, 26); 72 97 this.applyInNewTabButton.Name = "applyInNewTabButton"; 73 98 this.applyInNewTabButton.Size = new System.Drawing.Size(24, 24); 74 99 this.applyInNewTabButton.TabIndex = 2; 75 this.toolTip.SetToolTip(this.applyInNewTabButton, "Apply in new tab");100 this.toolTip.SetToolTip(this.applyInNewTabButton, "Apply in new Tab"); 76 101 this.applyInNewTabButton.UseVisualStyleBackColor = true; 77 102 this.applyInNewTabButton.Click += new System.EventHandler(this.applyInNewTabButton_Click); … … 79 104 // exportProblemButton 80 105 // 81 this.exportProblemButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Save ;82 this.exportProblemButton.Location = new System.Drawing.Point( 4, 3);106 this.exportProblemButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.SaveAs; 107 this.exportProblemButton.Location = new System.Drawing.Point(99, 26); 83 108 this.exportProblemButton.Name = "exportProblemButton"; 84 109 this.exportProblemButton.Size = new System.Drawing.Size(24, 24); 85 this.exportProblemButton.TabIndex = 1;86 this.toolTip.SetToolTip(this.exportProblemButton, "Export problem");110 this.exportProblemButton.TabIndex = 3; 111 this.toolTip.SetToolTip(this.exportProblemButton, "Export to File"); 87 112 this.exportProblemButton.UseVisualStyleBackColor = true; 88 113 this.exportProblemButton.Click += new System.EventHandler(this.exportProblemButton_Click); … … 91 116 // 92 117 this.lblFilterActive.AutoSize = true; 93 this.lblFilterActive.Location = new System.Drawing.Point(2 20, 12);118 this.lblFilterActive.Location = new System.Drawing.Point(203, 31); 94 119 this.lblFilterActive.Name = "lblFilterActive"; 95 120 this.lblFilterActive.Size = new System.Drawing.Size(277, 13); … … 98 123 this.lblFilterActive.Visible = false; 99 124 // 125 // redoButton 126 // 127 this.redoButton.Enabled = false; 128 this.redoButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Redo; 129 this.redoButton.Location = new System.Drawing.Point(161, 26); 130 this.redoButton.Name = "redoButton"; 131 this.redoButton.Size = new System.Drawing.Size(24, 24); 132 this.redoButton.TabIndex = 6; 133 this.toolTip.SetToolTip(this.redoButton, "Redo (not implemented yet)"); 134 this.redoButton.UseVisualStyleBackColor = true; 135 // 136 // newButton 137 // 138 this.newButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.NewDocument; 139 this.newButton.Location = new System.Drawing.Point(6, 26); 140 this.newButton.Name = "newButton"; 141 this.newButton.Size = new System.Drawing.Size(24, 24); 142 this.newButton.TabIndex = 3; 143 this.newButton.UseVisualStyleBackColor = true; 144 this.newButton.Click += new System.EventHandler(this.newButton_Click); 145 // 146 // importButton 147 // 148 this.importButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Open; 149 this.importButton.Location = new System.Drawing.Point(36, 26); 150 this.importButton.Name = "importButton"; 151 this.importButton.Size = new System.Drawing.Size(24, 24); 152 this.importButton.TabIndex = 3; 153 this.importButton.UseVisualStyleBackColor = true; 154 this.importButton.Click += new System.EventHandler(this.importButton_Click); 155 // 156 // newProblemDataTypeContextMenuStrip 157 // 158 this.newProblemDataTypeContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 159 this.newRegressionToolStripMenuItem, 160 this.newClassificationToolStripMenuItem, 161 this.newTimeSeriesToolStripMenuItem}); 162 this.newProblemDataTypeContextMenuStrip.Name = "newProblemDataTypeContextMenuStrip"; 163 this.newProblemDataTypeContextMenuStrip.Size = new System.Drawing.Size(190, 70); 164 // 165 // newRegressionToolStripMenuItem 166 // 167 this.newRegressionToolStripMenuItem.Name = "newRegressionToolStripMenuItem"; 168 this.newRegressionToolStripMenuItem.Size = new System.Drawing.Size(189, 22); 169 this.newRegressionToolStripMenuItem.Text = "Regression"; 170 this.newRegressionToolStripMenuItem.Click += new System.EventHandler(this.newRegressionToolStripMenuItem_Click); 171 // 172 // newClassificationToolStripMenuItem 173 // 174 this.newClassificationToolStripMenuItem.Name = "newClassificationToolStripMenuItem"; 175 this.newClassificationToolStripMenuItem.Size = new System.Drawing.Size(189, 22); 176 this.newClassificationToolStripMenuItem.Text = "Classification"; 177 this.newClassificationToolStripMenuItem.Click += new System.EventHandler(this.newClassificationToolStripMenuItem_Click); 178 // 179 // newTimeSeriesToolStripMenuItem 180 // 181 this.newTimeSeriesToolStripMenuItem.Name = "newTimeSeriesToolStripMenuItem"; 182 this.newTimeSeriesToolStripMenuItem.Size = new System.Drawing.Size(189, 22); 183 this.newTimeSeriesToolStripMenuItem.Text = "Time Series Prognosis"; 184 this.newTimeSeriesToolStripMenuItem.Click += new System.EventHandler(this.newTimeSeriesToolStripMenuItem_Click); 185 // 186 // importProblemDataTypeContextMenuStrip 187 // 188 this.importProblemDataTypeContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 189 this.importRegressionToolStripMenuItem, 190 this.importClassificationToolStripMenuItem, 191 this.importTimeSeriesToolStripMenuItem}); 192 this.importProblemDataTypeContextMenuStrip.Name = "newProblemDataTypeContextMenuStrip"; 193 this.importProblemDataTypeContextMenuStrip.Size = new System.Drawing.Size(190, 92); 194 // 195 // importRegressionToolStripMenuItem 196 // 197 this.importRegressionToolStripMenuItem.Name = "importRegressionToolStripMenuItem"; 198 this.importRegressionToolStripMenuItem.Size = new System.Drawing.Size(189, 22); 199 this.importRegressionToolStripMenuItem.Text = "Regression"; 200 this.importRegressionToolStripMenuItem.Click += new System.EventHandler(this.importRegressionToolStripMenuItem_Click); 201 // 202 // importClassificationToolStripMenuItem 203 // 204 this.importClassificationToolStripMenuItem.Name = "importClassificationToolStripMenuItem"; 205 this.importClassificationToolStripMenuItem.Size = new System.Drawing.Size(189, 22); 206 this.importClassificationToolStripMenuItem.Text = "Classification"; 207 this.importClassificationToolStripMenuItem.Click += new System.EventHandler(this.importClassificationToolStripMenuItem_Click); 208 // 209 // importTimeSeriesToolStripMenuItem 210 // 211 this.importTimeSeriesToolStripMenuItem.Name = "importTimeSeriesToolStripMenuItem"; 212 this.importTimeSeriesToolStripMenuItem.Size = new System.Drawing.Size(189, 22); 213 this.importTimeSeriesToolStripMenuItem.Text = "Time Series Prognosis"; 214 this.importTimeSeriesToolStripMenuItem.Click += new System.EventHandler(this.importTimeSeriesToolStripMenuItem_Click); 215 // 100 216 // viewShortcutListView 101 217 // 102 this.viewShortcutListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 103 | System.Windows.Forms.AnchorStyles.Left) 218 this.viewShortcutListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 219 | System.Windows.Forms.AnchorStyles.Left) 104 220 | System.Windows.Forms.AnchorStyles.Right))); 105 221 this.viewShortcutListView.Caption = "ViewShortcutCollection View"; 106 222 this.viewShortcutListView.Content = null; 107 this.viewShortcutListView.Location = new System.Drawing.Point(4, 33);223 this.viewShortcutListView.Location = new System.Drawing.Point(4, 56); 108 224 this.viewShortcutListView.Name = "viewShortcutListView"; 109 225 this.viewShortcutListView.ReadOnly = false; 110 this.viewShortcutListView.Size = new System.Drawing.Size(831, 413); 111 this.viewShortcutListView.TabIndex = 4; 226 this.viewShortcutListView.Size = new System.Drawing.Size(831, 390); 227 this.viewShortcutListView.TabIndex = 7; 228 // 229 // applyTypeContextMenuStrip 230 // 231 this.applyTypeContextMenuStrip.Name = "newProblemDataTypeContextMenuStrip"; 232 this.applyTypeContextMenuStrip.Size = new System.Drawing.Size(61, 4); 233 // 234 // exportTypeContextMenuStrip 235 // 236 this.exportTypeContextMenuStrip.Name = "newProblemDataTypeContextMenuStrip"; 237 this.exportTypeContextMenuStrip.Size = new System.Drawing.Size(61, 4); 112 238 // 113 239 // DataPreprocessingView … … 115 241 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 116 242 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 243 this.Controls.Add(this.newButton); 244 this.Controls.Add(this.importButton); 245 this.Controls.Add(this.applyInNewTabButton); 246 this.Controls.Add(this.exportProblemButton); 247 this.Controls.Add(this.undoButton); 248 this.Controls.Add(this.redoButton); 117 249 this.Controls.Add(this.lblFilterActive); 118 250 this.Controls.Add(this.viewShortcutListView); 119 this.Controls.Add(this.undoButton);120 this.Controls.Add(this.applyInNewTabButton);121 this.Controls.Add(this.exportProblemButton);122 251 this.Name = "DataPreprocessingView"; 123 252 this.Size = new System.Drawing.Size(838, 449); 253 this.Controls.SetChildIndex(this.viewShortcutListView, 0); 254 this.Controls.SetChildIndex(this.lblFilterActive, 0); 255 this.Controls.SetChildIndex(this.redoButton, 0); 256 this.Controls.SetChildIndex(this.undoButton, 0); 257 this.Controls.SetChildIndex(this.exportProblemButton, 0); 258 this.Controls.SetChildIndex(this.applyInNewTabButton, 0); 259 this.Controls.SetChildIndex(this.importButton, 0); 260 this.Controls.SetChildIndex(this.newButton, 0); 261 this.Controls.SetChildIndex(this.infoLabel, 0); 262 this.Controls.SetChildIndex(this.nameTextBox, 0); 263 this.Controls.SetChildIndex(this.nameLabel, 0); 264 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 265 this.newProblemDataTypeContextMenuStrip.ResumeLayout(false); 266 this.importProblemDataTypeContextMenuStrip.ResumeLayout(false); 124 267 this.ResumeLayout(false); 125 268 this.PerformLayout(); … … 132 275 private System.Windows.Forms.Button applyInNewTabButton; 133 276 private System.Windows.Forms.Button undoButton; 134 private System.Windows.Forms.ToolTip toolTip;135 277 private ViewShortcutListView viewShortcutListView; 136 278 private System.Windows.Forms.Label lblFilterActive; 137 279 private System.Windows.Forms.Button redoButton; 280 private System.Windows.Forms.Button newButton; 281 private System.Windows.Forms.Button importButton; 282 private System.Windows.Forms.ContextMenuStrip newProblemDataTypeContextMenuStrip; 283 private System.Windows.Forms.ToolStripMenuItem newRegressionToolStripMenuItem; 284 private System.Windows.Forms.ToolStripMenuItem newClassificationToolStripMenuItem; 285 private System.Windows.Forms.ToolStripMenuItem newTimeSeriesToolStripMenuItem; 286 private System.Windows.Forms.ContextMenuStrip importProblemDataTypeContextMenuStrip; 287 private System.Windows.Forms.ToolStripMenuItem importRegressionToolStripMenuItem; 288 private System.Windows.Forms.ToolStripMenuItem importClassificationToolStripMenuItem; 289 private System.Windows.Forms.ToolStripMenuItem importTimeSeriesToolStripMenuItem; 290 private System.Windows.Forms.ContextMenuStrip applyTypeContextMenuStrip; 291 private System.Windows.Forms.ContextMenuStrip exportTypeContextMenuStrip; 138 292 } 139 293 } -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs
r12676 r15280 21 21 22 22 using System.Windows.Forms; 23 using HeuristicLab.Core; 23 24 using HeuristicLab.MainForm; 24 25 using HeuristicLab.Optimization; … … 33 34 IDataAnalysisProblem problem; 34 35 GetMostOuterContent(currentView as Control, out algorithm, out problem); 35 var context = new PreprocessingContext(problemData, algorithm , problem);36 var context = new PreprocessingContext(problemData, algorithm ?? problem ?? problemData as IItem); 36 37 MainFormManager.MainForm.ShowContent(context); 37 38 } … … 42 43 43 44 while (control != null) { 44 IContentViewcontentView = control as IContentView;45 var contentView = control as IContentView; 45 46 if (contentView != null) { 46 47 var newAlgorithm = contentView.Content as IAlgorithm; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.Designer.cs
r11044 r15280 1 namespace HeuristicLab.DataPreprocessing.Views 2 { 3 partial class FilterView 4 { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 namespace HeuristicLab.DataPreprocessing.Views { 23 partial class FilterView { 5 24 /// <summary> 6 25 /// Required designer variable. … … 12 31 /// </summary> 13 32 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 14 protected override void Dispose(bool disposing) 15 { 16 if (disposing && (components != null)) 17 { 33 protected override void Dispose(bool disposing) { 34 if (disposing && (components != null)) { 18 35 components.Dispose(); 19 36 } … … 27 44 /// the contents of this method with the code editor. 28 45 /// </summary> 29 private void InitializeComponent() 30 { 46 private void InitializeComponent() { 31 47 this.groupBoxFilter = new System.Windows.Forms.GroupBox(); 32 48 this.checkedFilterView = new HeuristicLab.DataPreprocessing.Views.CheckedFilterCollectionView(); … … 53 69 // groupBoxFilter 54 70 // 55 this.groupBoxFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 71 this.groupBoxFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 56 72 | System.Windows.Forms.AnchorStyles.Right))); 57 73 this.groupBoxFilter.Controls.Add(this.checkedFilterView); … … 77 93 // groupBoxFilterInfo 78 94 // 79 this.groupBoxFilterInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 95 this.groupBoxFilterInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 80 96 | System.Windows.Forms.AnchorStyles.Right))); 81 97 this.groupBoxFilterInfo.Controls.Add(this.lblPercentage); … … 103 119 // tbPercentage 104 120 // 105 this.tbPercentage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 121 this.tbPercentage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 106 122 | System.Windows.Forms.AnchorStyles.Right))); 107 123 this.tbPercentage.Enabled = false; … … 113 129 // tbFiltered 114 130 // 115 this.tbRemaining.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 131 this.tbRemaining.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 116 132 | System.Windows.Forms.AnchorStyles.Right))); 117 133 this.tbRemaining.Enabled = false; … … 132 148 // tbTotal 133 149 // 134 this.tbTotal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 150 this.tbTotal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 135 151 | System.Windows.Forms.AnchorStyles.Right))); 136 152 this.tbTotal.Enabled = false; … … 193 209 // groupBox1 194 210 // 195 this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 211 this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 196 212 | System.Windows.Forms.AnchorStyles.Right))); 197 213 this.groupBox1.Controls.Add(this.label4); -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs
r11044 r15280 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Linq; 4 using System.Windows.Forms;5 25 using HeuristicLab.Collections; 6 using HeuristicLab.Core;7 26 using HeuristicLab.Core.Views; 8 using HeuristicLab.Data;9 27 using HeuristicLab.DataPreprocessing.Filter; 10 28 using HeuristicLab.MainForm; … … 22 40 } 23 41 24 private void InitData() 25 { 26 checkedFilterView.Content = Content.Filters; 27 checkedFilterView.Content.ItemsAdded += Content_ItemsAdded; 28 checkedFilterView.Content.ItemsRemoved += Content_ItemsRemoved; 29 checkedFilterView.Content.CheckedItemsChanged += Content_CheckedItemsChanged; 42 private void InitData() { 43 checkedFilterView.Content = Content.Filters; 44 checkedFilterView.Content.ItemsAdded += Content_ItemsAdded; 45 checkedFilterView.Content.ItemsRemoved += Content_ItemsRemoved; 46 checkedFilterView.Content.CheckedItemsChanged += Content_CheckedItemsChanged; 30 47 } 31 48 … … 35 52 } 36 53 37 protected override void OnContentChanged() 38 { 54 protected override void OnContentChanged() { 39 55 base.OnContentChanged(); 40 if (Content != null) 41 { 56 if (Content != null) { 42 57 InitData(); 43 58 UpdateFilterInfo(); … … 46 61 47 62 private void Content_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) { 48 if (Content != null) 49 { 50 foreach (IFilter filter in e.Items) 51 { 63 if (Content != null) { 64 foreach (IFilter filter in e.Items) { 52 65 filter.Active = checkedFilterView.Content.ItemChecked(filter); 53 66 } … … 57 70 58 71 private void UpdateFilterInfo() { 59 60 61 62 63 64 65 72 List<IFilter> filters = Content.Filters.ToList(); 73 int activeFilters = filters.Count(c => c.Active); 74 applyFilterButton.Enabled = (activeFilters > 0); 75 rBtnAnd.Enabled = (activeFilters > 0); 76 rBtnOr.Enabled = (activeFilters > 0); 77 Content.FilterLogic.Reset(); 78 bool[] result = Content.FilterLogic.Preview(filters, rBtnAnd.Checked); 66 79 67 80 int filteredCnt = result.Count(c => !c); 68 81 69 70 71 72 82 tbRemaining.Text = filteredCnt.ToString(); 83 double percentage = result.Length == 0 ? 0.0 : filteredCnt * 100 / (double)result.Length; 84 tbPercentage.Text = String.Format("{0:0.0000}%", percentage); 85 tbTotal.Text = result.Length.ToString(); 73 86 } 74 87 75 88 private void applyFilterButton_Click(object sender, EventArgs e) { 76 if (Content != null) 77 { 89 if (Content != null) { 78 90 List<IFilter> filters = Content.Filters.ToList(); 79 91 //apply filters … … 81 93 //deactivate checked filters 82 94 filters = checkedFilterView.Content.CheckedItems.ToList(); 83 foreach (IFilter filter in filters) 84 { 95 foreach (IFilter filter in filters) { 85 96 checkedFilterView.Content.SetItemCheckedState(filter, false); 86 97 filter.Active = false; … … 92 103 //whenever a new filter is added the preprocessing data is set to the filter 93 104 private void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) { 94 if (Content != null) 95 { 96 foreach (IFilter filter in e.Items) 97 { 105 if (Content != null) { 106 foreach (IFilter filter in e.Items) { 98 107 filter.ConstrainedValue = Content.FilterLogic.PreprocessingData; 99 108 } … … 102 111 103 112 private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IFilter> e) { 104 if (Content != null) 105 { 113 if (Content != null) { 106 114 UpdateFilterInfo(); 107 115 } 108 116 } 109 117 110 private void rBtnAnd_CheckedChanged(object sender, EventArgs e) 111 { 112 if (Content != null) 113 { 118 private void rBtnAnd_CheckedChanged(object sender, EventArgs e) { 119 if (Content != null) { 114 120 UpdateFilterInfo(); 115 121 Content.IsAndCombination = rBtnAnd.Checked; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj
r13252 r15280 97 97 </ItemGroup> 98 98 <ItemGroup> 99 <Compile Include="DataPreprocessingMenuItem.cs" /> 99 100 <Compile Include="PreprocessingFeatureCorrelationView.cs"> 100 101 <SubType>UserControl</SubType> … … 254 255 <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project> 255 256 <Name>HeuristicLab.Collections-3.3</Name> 257 <Private>False</Private> 256 258 </ProjectReference> 257 259 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj"> … … 305 307 <Private>False</Private> 306 308 </ProjectReference> 309 <ProjectReference Include="..\..\HeuristicLab.Optimizer\3.3\HeuristicLab.Optimizer-3.3.csproj"> 310 <Project>{C664305E-497C-4533-A140-967DEDB05C19}</Project> 311 <Name>HeuristicLab.Optimizer-3.3</Name> 312 <Private>False</Private> 313 </ProjectReference> 307 314 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj"> 308 315 <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project> … … 318 325 <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project> 319 326 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 327 <Private>False</Private> 328 </ProjectReference> 329 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.DataAnalysis.Views\3.3\HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj"> 330 <Project>{72232235-B6CF-4E6C-B086-9E9E11AA0717}</Project> 331 <Name>HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3</Name> 332 <Private>False</Private> 333 </ProjectReference> 334 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.DataAnalysis\3.3\HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj"> 335 <Project>{94C7714E-29D4-4D6D-B213-2C18D627AB75}</Project> 336 <Name>HeuristicLab.Problems.Instances.DataAnalysis-3.3</Name> 337 <Private>False</Private> 338 </ProjectReference> 339 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 340 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 341 <Name>HeuristicLab.Problems.Instances-3.3</Name> 320 342 <Private>False</Private> 321 343 </ProjectReference> -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs
r12676 r15280 1 namespace HeuristicLab.DataPreprocessing.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 namespace HeuristicLab.DataPreprocessing.Views { 2 23 partial class HistogramView { 3 24 /// <summary> -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs
r12676 r15280 19 19 */ 20 20 #endregion 21 21 22 using System; 22 using System.Windows.Forms;23 23 using HeuristicLab.Analysis; 24 24 using HeuristicLab.MainForm; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.Designer.cs
r10736 r15280 1 namespace HeuristicLab.DataPreprocessing.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 namespace HeuristicLab.DataPreprocessing.Views { 2 23 partial class LineChartView { 3 24 /// <summary> -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.cs
r12012 r15280 21 21 22 22 using System; 23 using System.Windows.Forms;24 23 using HeuristicLab.Analysis; 25 24 using HeuristicLab.MainForm; … … 46 45 private void allInOneCheckBox_CheckedChanged(object sender, EventArgs e) { 47 46 Content.AllInOneMode = allInOneCheckBox.Checked; 48 47 49 48 GenerateChart(); 50 49 } 51 50 52 protected override void OnContentChanged() 53 { 51 protected override void OnContentChanged() { 54 52 base.OnContentChanged(); 55 if (Content != null) 56 { 53 if (Content != null) { 57 54 allInOneCheckBox.Checked = Content.AllInOneMode; 58 55 } -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.Designer.cs
r12676 r15280 1 namespace HeuristicLab.DataPreprocessing.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 namespace HeuristicLab.DataPreprocessing.Views { 2 23 partial class ManipulationView { 3 24 /// <summary> … … 91 112 // lstMethods 92 113 // 93 this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 114 this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 94 115 | System.Windows.Forms.AnchorStyles.Right))); 95 116 this.lstMethods.FormattingEnabled = true; … … 124 145 // grpBoxData 125 146 // 126 this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 147 this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 127 148 | System.Windows.Forms.AnchorStyles.Right))); 128 149 this.grpBoxData.Controls.Add(this.tabsData); … … 138 159 // tabsData 139 160 // 140 this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 161 this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 141 162 | System.Windows.Forms.AnchorStyles.Right))); 142 163 this.tabsData.Controls.Add(this.tabPage1); … … 416 437 // grpBoxPreview 417 438 // 418 this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 419 | System.Windows.Forms.AnchorStyles.Left) 439 this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 440 | System.Windows.Forms.AnchorStyles.Left) 420 441 | System.Windows.Forms.AnchorStyles.Right))); 421 442 this.grpBoxPreview.Controls.Add(this.tabsPreview); … … 431 452 // tabsPreview 432 453 // 433 this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 454 this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 434 455 | System.Windows.Forms.AnchorStyles.Right))); 435 456 this.tabsPreview.Controls.Add(this.tabPreviewInactive); -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs
r12676 r15280 155 155 int count = filteredColumns.Count; 156 156 int columnCount = Content.FilterLogic.PreprocessingData.Columns; 157 lblPreviewColumnsInfo.Text = count + " column" + (count > 1 || count == 0 ? "s" : "") + " of " + columnCount + " (" + string.Format("{0:F2}%", 100d / columnCount * count) + ") were detected with more than " + txtDeleteColumnsInfo.Text + "% missing values."; 158 if (count > 0) { 157 lblPreviewColumnsInfo.Text = string.Format("{0} column{1} of {2} ({3}) were detected with more than {4}% missing values.", count, (count > 1 || count == 0 ? "s" : ""), columnCount, string.Format("{0:F2}%", 100d / columnCount * count), txtDeleteColumnsInfo.Text); 158 159 //only display column names more than 0 and fewer than 50 are affected 160 if (count > 0 && count < 50) { 159 161 StringBuilder sb = new StringBuilder(); 160 162 sb.Append(Environment.NewLine); … … 170 172 171 173 lblPreviewColumnsInfo.Text += sb.ToString(); 172 } else {173 btnApply.Enabled = false; 174 }174 } 175 176 btnApply.Enabled = count > 0; 175 177 } else { 176 178 lblPreviewColumnsInfo.Text = "Preview not possible yet - please input the limit above."; … … 184 186 int count = filteredColumns.Count; 185 187 int columnCount = Content.FilterLogic.PreprocessingData.Columns; 186 lblPreviewColumnsVariance.Text = count + " column" + (count > 1 || count == 0 ? "s" : "") + " of " + columnCount + " (" + string.Format("{0:F2}%", 100d / columnCount * count) + ") were detected with a variance smaller than " + txtDeleteColumnsVariance.Text + "."; 187 if (count > 0) { 188 lblPreviewColumnsVariance.Text = string.Format("{0} column{1} of {2} ({3}) were detected with a variance smaller than {4}.", count, (count > 1 || count == 0 ? "s" : ""), columnCount, string.Format("{0:F2}%", 100d / columnCount * count), txtDeleteColumnsVariance.Text); 189 190 //only display column names more than 0 and fewer than 50 are affected 191 if (count > 0 && count < 50) { 188 192 StringBuilder sb = new StringBuilder(); 189 193 sb.Append(Environment.NewLine); … … 199 203 200 204 lblPreviewColumnsVariance.Text += sb.ToString(); 201 } else {202 btnApply.Enabled = false; 203 }205 } 206 207 btnApply.Enabled = count > 0; 204 208 } else { 205 209 lblPreviewColumnsVariance.Text = "Preview not possible yet - please input the limit for the variance above."; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/Plugin.cs.frame
r13321 r15280 41 41 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 42 42 [PluginDependency("HeuristicLab.Optimization", "3.3")] 43 [PluginDependency("HeuristicLab.Optimizer", "3.3")] 43 44 [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")] 44 45 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views", "3.4")] 46 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] 47 [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")] 48 [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis.Views", "3.3")] 45 49 [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")] 46 50 public class HeuristicLabDataPreprocessingViewPlugin : PluginBase { -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.Designer.cs
r12012 r15280 20 20 #endregion 21 21 22 using HeuristicLab.Data;23 22 namespace HeuristicLab.DataPreprocessing.Views { 24 23 partial class PreprocessingChartView { … … 65 64 // tableLayoutPanel 66 65 // 67 this.tableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 68 | System.Windows.Forms.AnchorStyles.Left) 66 this.tableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 67 | System.Windows.Forms.AnchorStyles.Left) 69 68 | System.Windows.Forms.AnchorStyles.Right))); 70 69 this.tableLayoutPanel.AutoScroll = true; … … 82 81 // checkedItemList 83 82 // 84 this.checkedItemList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 83 this.checkedItemList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 85 84 | System.Windows.Forms.AnchorStyles.Left))); 86 85 this.checkedItemList.Caption = "View"; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs
r12676 r15280 28 28 using HeuristicLab.Core.Views; 29 29 using HeuristicLab.Data; 30 using HeuristicLab.DataPreprocessing.Implementations;31 30 using HeuristicLab.MainForm; 32 31 33 32 namespace HeuristicLab.DataPreprocessing.Views { 34 35 33 [View("Preprocessing Chart View")] 36 34 [Content(typeof(PreprocessingChartContent), false)] -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedItemListView.cs
r12012 r15280 22 22 #endregion 23 23 24 using System.Windows.Forms;25 24 using HeuristicLab.Core; 26 25 using HeuristicLab.Core.Views; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.Designer.cs
r12012 r15280 20 20 #endregion 21 21 22 namespace HeuristicLab.DataPreprocessing.Views 23 { 22 namespace HeuristicLab.DataPreprocessing.Views { 24 23 partial class PreprocessingDataTableView { 25 24 /// <summary> … … 57 56 // chart 58 57 // 59 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 60 | System.Windows.Forms.AnchorStyles.Left) 58 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 59 | System.Windows.Forms.AnchorStyles.Left) 61 60 | System.Windows.Forms.AnchorStyles.Right))); 62 61 this.chart.BorderlineColor = System.Drawing.Color.Black; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.cs
r12676 r15280 26 26 using System.Windows.Forms; 27 27 using System.Windows.Forms.DataVisualization.Charting; 28 using HeuristicLab.Analysis; 29 using HeuristicLab.Analysis.Views; 28 30 using HeuristicLab.Collections; 29 31 using HeuristicLab.Core.Views; 30 using HeuristicLab.DataPreprocessing.Implementations;31 32 using HeuristicLab.MainForm; 32 using HeuristicLab.Analysis;33 using HeuristicLab.Analysis.Views;34 33 35 34 namespace HeuristicLab.DataPreprocessing.Views { … … 746 745 747 746 // shift the chart to the left so the bars are placed on the intervals 748 if (Classification != null || valueFrequencies.First().Item1 < doubleRange.First()) {747 if (Classification != null || (valueFrequencies.Any() && valueFrequencies.First().Item1 < doubleRange.First())) { 749 748 series.Points.Add(new DataPoint(min - intervalWidth, 0)); 750 749 series.Points.Add(new DataPoint(max + intervalWidth, 0)); -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.Designer.cs
r12012 r15280 47 47 /// </summary> 48 48 private void InitializeComponent() { 49 this.components = new System.ComponentModel.Container(); 49 this.components = new System.ComponentModel.Container(); 50 50 this.ResumeLayout(false); 51 51 } -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs
r12012 r15280 20 20 #endregion 21 21 22 using System.Collections.Generic;23 using System.ComponentModel;24 using System.Linq;25 22 using System.Windows.Forms; 26 using HeuristicLab.Data ;23 using HeuristicLab.DataPreprocessing; 27 24 using HeuristicLab.MainForm; 28 25 using HeuristicLab.MainForm.WindowsForms; 29 using HeuristicLab.PluginInfrastructure;30 using System;31 using HeuristicLab.DataPreprocessing;32 using HeuristicLab.Problems.DataAnalysis.Views;33 26 34 27 namespace HeuristicLab.Problems.DataAnalysis.Views { … … 37 30 public partial class PreprocessingFeatureCorrelationView : AsynchronousContentView { 38 31 39 public new CorrelationMatrixContent Content 40 { 41 get { return (CorrelationMatrixContent) base.Content; } 32 public new CorrelationMatrixContent Content { 33 get { return (CorrelationMatrixContent)base.Content; } 42 34 set { base.Content = value; } 43 35 } … … 55 47 protected override void RegisterContentEvents() { 56 48 base.RegisterContentEvents(); 57 Content.Changed += Data_Changed; 49 Content.Changed += Data_Changed; 58 50 } 59 51 60 52 protected override void DeregisterContentEvents() { 61 Content.Changed -= Data_Changed; 53 Content.Changed -= Data_Changed; 62 54 base.DeregisterContentEvents(); 63 55 } -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingScatterPlotView.Designer.cs
r12012 r15280 56 56 // chart 57 57 // 58 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 59 | System.Windows.Forms.AnchorStyles.Left) 58 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 59 | System.Windows.Forms.AnchorStyles.Left) 60 60 | System.Windows.Forms.AnchorStyles.Right))); 61 61 this.chart.BorderlineColor = System.Drawing.Color.Black; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingScatterPlotView.cs
r12012 r15280 462 462 if (chartDoubleClick != null) 463 463 chartDoubleClick(this, e); 464 } 464 } 465 465 } 466 466 } -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/RenameColumnsDialog.Designer.cs
r13271 r15280 78 78 this.dataGridView.AllowUserToAddRows = false; 79 79 this.dataGridView.AllowUserToDeleteRows = false; 80 this.dataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 81 | System.Windows.Forms.AnchorStyles.Left) 80 this.dataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 81 | System.Windows.Forms.AnchorStyles.Left) 82 82 | System.Windows.Forms.AnchorStyles.Right))); 83 83 this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs
r10987 r15280 1 namespace HeuristicLab.DataPreprocessing.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 namespace HeuristicLab.DataPreprocessing.Views { 2 23 partial class ScatterPlotMultiView { 3 24 /// <summary> … … 29 50 // tableLayoutPanel 30 51 // 31 this.tableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 32 | System.Windows.Forms.AnchorStyles.Left) 52 this.tableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 53 | System.Windows.Forms.AnchorStyles.Left) 33 54 | System.Windows.Forms.AnchorStyles.Right))); 34 55 this.tableLayoutPanel.AutoScroll = true; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
r10992 r15280 7 7 using HeuristicLab.Common; 8 8 using HeuristicLab.Core.Views; 9 using HeuristicLab.DataPreprocessing.Implementations;10 9 using HeuristicLab.MainForm; 11 10 12 11 namespace HeuristicLab.DataPreprocessing.Views { 13 14 12 [View("Scatter Plot Multi View")] 15 13 [Content(typeof(ScatterPlotContent), false)] … … 81 79 tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, (tableLayoutPanel.Height - HEADER_HEIGHT) / variables.Count)); 82 80 } 83 81 // fixed size 84 82 else { 85 83 tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, FIXED_CHART_WIDTH)); … … 111 109 tableLayoutPanel.Controls.Add(pcv, y, x); 112 110 } 113 111 //scatter plot 114 112 else { 115 113 ScatterPlot scatterPlot = Content.CreateScatterPlot(variables[x - 1], variables[y - 1]); -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs
r11043 r15280 1 namespace HeuristicLab.DataPreprocessing.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 namespace HeuristicLab.DataPreprocessing.Views { 2 23 partial class ScatterPlotSingleView { 3 24 /// <summary> … … 30 51 this.comboBoxYVariable = new System.Windows.Forms.ComboBox(); 31 52 this.comboBoxXVariable = new System.Windows.Forms.ComboBox(); 53 this.label3 = new System.Windows.Forms.Label(); 54 this.comboBoxColor = new System.Windows.Forms.ComboBox(); 32 55 this.groupBox1.SuspendLayout(); 33 56 this.SuspendLayout(); … … 35 58 // scatterPlotView 36 59 // 37 this.scatterPlotView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 38 | System.Windows.Forms.AnchorStyles.Left) 60 this.scatterPlotView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 61 | System.Windows.Forms.AnchorStyles.Left) 39 62 | System.Windows.Forms.AnchorStyles.Right))); 40 63 this.scatterPlotView.Caption = "ScatterPlot View"; … … 48 71 // groupBox1 49 72 // 73 this.groupBox1.Controls.Add(this.label3); 50 74 this.groupBox1.Controls.Add(this.label2); 51 75 this.groupBox1.Controls.Add(this.label1); 76 this.groupBox1.Controls.Add(this.comboBoxColor); 52 77 this.groupBox1.Controls.Add(this.comboBoxYVariable); 53 78 this.groupBox1.Controls.Add(this.comboBoxXVariable); 54 79 this.groupBox1.Location = new System.Drawing.Point(3, 3); 55 80 this.groupBox1.Name = "groupBox1"; 56 this.groupBox1.Size = new System.Drawing.Size(160, 140);81 this.groupBox1.Size = new System.Drawing.Size(160, 215); 57 82 this.groupBox1.TabIndex = 1; 58 83 this.groupBox1.TabStop = false; … … 99 124 this.comboBoxXVariable.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged); 100 125 // 126 // label3 127 // 128 this.label3.AutoSize = true; 129 this.label3.Location = new System.Drawing.Point(17, 141); 130 this.label3.Name = "label3"; 131 this.label3.Size = new System.Drawing.Size(31, 13); 132 this.label3.TabIndex = 3; 133 this.label3.Text = "Color"; 134 // 135 // comboBoxColor 136 // 137 this.comboBoxColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 138 this.comboBoxColor.FormattingEnabled = true; 139 this.comboBoxColor.Location = new System.Drawing.Point(20, 164); 140 this.comboBoxColor.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3); 141 this.comboBoxColor.Name = "comboBoxColor"; 142 this.comboBoxColor.Size = new System.Drawing.Size(121, 21); 143 this.comboBoxColor.TabIndex = 1; 144 this.comboBoxColor.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged); 145 // 101 146 // ScatterPlotSingleView 102 147 // … … 121 166 private System.Windows.Forms.ComboBox comboBoxYVariable; 122 167 private System.Windows.Forms.ComboBox comboBoxXVariable; 168 private System.Windows.Forms.ComboBox comboBoxColor; 169 private System.Windows.Forms.Label label3; 123 170 } 124 171 } -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs
r10998 r15280 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Linq; 4 using System.Windows.Forms;5 25 using HeuristicLab.Analysis; 6 26 using HeuristicLab.Core.Views; … … 18 38 } 19 39 20 public ScatterPlotSingleView() 21 { 40 public ScatterPlotSingleView() { 22 41 InitializeComponent(); 23 42 } 24 43 25 44 public void InitData() { 26 27 45 IEnumerable<string> variables = Content.PreprocessingData.GetDoubleVariableNames(); 28 46 … … 30 48 comboBoxXVariable.Items.Clear(); 31 49 comboBoxYVariable.Items.Clear(); 50 comboBoxColor.Items.Clear(); 32 51 comboBoxXVariable.Items.AddRange(variables.ToArray()); 33 52 comboBoxYVariable.Items.AddRange(variables.ToArray()); 53 comboBoxColor.Items.Add("-"); 54 for (int i = 0; i < Content.PreprocessingData.Columns; ++i) { 55 if (Content.PreprocessingData.VariableHasType<double>(i)) { 56 double distinctValueCount = Content.PreprocessingData.GetValues<double>(i).GroupBy(x => x).Count(); 57 if (distinctValueCount <= 20) 58 comboBoxColor.Items.Add(Content.PreprocessingData.GetVariableName(i)); 59 } 60 } 34 61 35 62 // use x and y variable from content 36 if (Content.SelectedXVariable != null && Content.SelectedYVariable != null ) {63 if (Content.SelectedXVariable != null && Content.SelectedYVariable != null && Content.SelectedColorVariable != null) { 37 64 comboBoxXVariable.SelectedItem = Content.SelectedXVariable; 38 65 comboBoxYVariable.SelectedItem = Content.SelectedYVariable; 66 comboBoxColor.SelectedItem = Content.SelectedColorVariable; 39 67 } else { 40 68 if (variables.Count() >= 2) { 41 69 comboBoxXVariable.SelectedIndex = 0; 42 70 comboBoxYVariable.SelectedIndex = 1; 71 comboBoxColor.SelectedIndex = 0; 43 72 UpdateScatterPlot(); 44 45 73 } 46 74 } … … 59 87 60 88 private void UpdateScatterPlot() { 61 if (comboBoxXVariable.SelectedItem != null && comboBoxYVariable.SelectedItem != null ) {89 if (comboBoxXVariable.SelectedItem != null && comboBoxYVariable.SelectedItem != null && comboBoxColor.SelectedItem != null) { 62 90 //get scatter plot with selected x and y variable 63 ScatterPlot scatterPlot = Content.CreateScatterPlot((string)comboBoxXVariable.SelectedItem, (string)comboBoxYVariable.SelectedItem); 91 ScatterPlot scatterPlot = Content.CreateScatterPlot( 92 (string)comboBoxXVariable.SelectedItem, 93 (string)comboBoxYVariable.SelectedItem, 94 (string)comboBoxColor.SelectedItem); 64 95 scatterPlotView.Content = scatterPlot; 65 96 … … 67 98 this.Content.SelectedXVariable = (string)comboBoxXVariable.SelectedItem; 68 99 this.Content.SelectedYVariable = (string)comboBoxYVariable.SelectedItem; 100 this.Content.SelectedColorVariable = (string)comboBoxColor.SelectedItem; 69 101 } 70 102 } 71 72 103 } 73 74 75 104 } -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.Designer.cs
r10930 r15280 1 namespace HeuristicLab.DataPreprocessing.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 namespace HeuristicLab.DataPreprocessing.Views { 2 23 partial class SearchAndReplaceDialog { 3 24 /// <summary> … … 44 65 // tabSearchReplace 45 66 // 46 this.tabSearchReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 47 | System.Windows.Forms.AnchorStyles.Left) 67 this.tabSearchReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 68 | System.Windows.Forms.AnchorStyles.Left) 48 69 | System.Windows.Forms.AnchorStyles.Right))); 49 70 this.tabSearchReplace.Controls.Add(this.tabSearch); -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.cs
r10930 r15280 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 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 22 using System; 2 23 using System.Windows.Forms; 3 24 … … 20 41 NotEqual 21 42 } 22 23 24 43 25 44 public partial class SearchAndReplaceDialog : Form { -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs
r12889 r15280 146 146 logic.GetColumnTypeAsString(columnIndex), 147 147 logic.GetMissingValueCount(columnIndex).ToString(), 148 logic.GetMin<double>(columnIndex ).ToString(),149 logic.GetMax<double>(columnIndex ).ToString(),148 logic.GetMin<double>(columnIndex,double.NaN).ToString(), 149 logic.GetMax<double>(columnIndex,double.NaN).ToString(), 150 150 logic.GetMedian(columnIndex).ToString(), 151 151 logic.GetAverage(columnIndex).ToString(), … … 154 154 logic.GetOneQuarterPercentile(columnIndex).ToString(), 155 155 logic.GetThreeQuarterPercentile(columnIndex).ToString(), 156 logic.GetMostCommonValue<double>(columnIndex ).ToString(),156 logic.GetMostCommonValue<double>(columnIndex,double.NaN).ToString(), 157 157 logic.GetDifferentValuesCount<double>(columnIndex).ToString() 158 158 }; … … 172 172 "", //quarter percentile 173 173 "", //three quarter percentile 174 logic.GetMostCommonValue<string>(columnIndex ) ?? "",174 logic.GetMostCommonValue<string>(columnIndex,string.Empty) ?? "", 175 175 logic.GetDifferentValuesCount<string>(columnIndex).ToString() 176 176 }; … … 182 182 logic.GetColumnTypeAsString(columnIndex), 183 183 logic.GetMissingValueCount(columnIndex).ToString(), 184 logic.GetMin<DateTime>(columnIndex ).ToString(),185 logic.GetMax<DateTime>(columnIndex ).ToString(),184 logic.GetMin<DateTime>(columnIndex,DateTime.MinValue).ToString(), 185 logic.GetMax<DateTime>(columnIndex,DateTime.MinValue).ToString(), 186 186 logic.GetMedianDateTime(columnIndex).ToString(), 187 187 logic.GetAverageDateTime(columnIndex).ToString(), … … 190 190 logic.GetOneQuarterPercentile(columnIndex).ToString(), 191 191 logic.GetThreeQuarterPercentile(columnIndex).ToString(), 192 logic.GetMostCommonValue<DateTime>(columnIndex ).ToString(),192 logic.GetMostCommonValue<DateTime>(columnIndex,DateTime.MinValue).ToString(), 193 193 logic.GetDifferentValuesCount<DateTime>(columnIndex).ToString() 194 194 }; -
branches/Async/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.Designer.cs
r12012 r15280 19 19 */ 20 20 #endregion 21 22 21 23 22 namespace HeuristicLab.DataPreprocessing.Views { … … 46 45 /// </summary> 47 46 private void InitializeComponent() { 47 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 48 this.splitContainer.Panel1.SuspendLayout(); 49 this.splitContainer.Panel2.SuspendLayout(); 50 this.splitContainer.SuspendLayout(); 51 this.itemsGroupBox.SuspendLayout(); 52 this.detailsGroupBox.SuspendLayout(); 48 53 this.SuspendLayout(); 54 // 55 // splitContainer 56 // 57 this.splitContainer.Size = new System.Drawing.Size(526, 364); 58 // 59 // itemsGroupBox 60 // 61 this.itemsGroupBox.Size = new System.Drawing.Size(532, 383); 62 // 63 // itemsListView 64 // 65 this.itemsListView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 66 this.itemsListView.Dock = System.Windows.Forms.DockStyle.Fill; 67 this.itemsListView.Location = new System.Drawing.Point(0, 0); 68 this.itemsListView.Size = new System.Drawing.Size(200, 364); 69 // 70 // detailsGroupBox 71 // 72 this.detailsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 73 this.detailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; 74 this.detailsGroupBox.Location = new System.Drawing.Point(0, 0); 75 this.detailsGroupBox.Size = new System.Drawing.Size(322, 364); 76 // 77 // addButton 78 // 79 this.toolTip.SetToolTip(this.addButton, "Add"); 80 this.addButton.Visible = false; 81 // 82 // removeButton 83 // 84 this.toolTip.SetToolTip(this.removeButton, "Remove"); 85 this.removeButton.Visible = false; 86 // 87 // moveUpButton 88 // 89 this.toolTip.SetToolTip(this.moveUpButton, "Move Up"); 90 this.moveUpButton.Visible = false; 91 // 92 // moveDownButton 93 // 94 this.toolTip.SetToolTip(this.moveDownButton, "Move Down"); 95 this.moveDownButton.Visible = false; 96 // 97 // viewHost 98 // 99 this.viewHost.Size = new System.Drawing.Size(310, 339); 100 // 101 // showDetailsCheckBox 102 // 103 this.showDetailsCheckBox.Visible = false; 49 104 // 50 105 // ViewShortcutListView 51 106 // 52 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);53 107 this.Name = "ViewShortcutListView"; 54 108 this.Size = new System.Drawing.Size(532, 383); 109 this.splitContainer.Panel1.ResumeLayout(false); 110 this.splitContainer.Panel2.ResumeLayout(false); 111 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 112 this.splitContainer.ResumeLayout(false); 113 this.itemsGroupBox.ResumeLayout(false); 114 this.detailsGroupBox.ResumeLayout(false); 55 115 this.ResumeLayout(false); 116 56 117 } 57 118
Note: See TracChangeset
for help on using the changeset viewer.