Changeset 14915 for branches/DataPreprocessing Enhancements
- Timestamp:
- 05/03/17 14:33:09 (8 years ago)
- Location:
- branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.Designer.cs
r14546 r14915 63 63 this.btnReplace = new System.Windows.Forms.Button(); 64 64 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 65 this.checkInputsTargetButton = new System.Windows.Forms.Button(); 65 66 this.uncheckAllButton = new System.Windows.Forms.Button(); 66 67 this.checkAllButton = new System.Windows.Forms.Button(); 67 this.checkInputsTargetButton = new System.Windows.Forms.Button();68 68 this.addRowButton = new System.Windows.Forms.Button(); 69 69 this.addColumnButton = new System.Windows.Forms.Button(); 70 70 this.renameColumnsButton = new System.Windows.Forms.Button(); 71 this. groupBox1= new System.Windows.Forms.GroupBox();71 this.showVariablesGroupBox = new System.Windows.Forms.GroupBox(); 72 72 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 73 73 this.contextMenuCell.SuspendLayout(); 74 this. groupBox1.SuspendLayout();74 this.showVariablesGroupBox.SuspendLayout(); 75 75 this.SuspendLayout(); 76 76 // … … 86 86 this.columnsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); 87 87 this.columnsTextBox.Size = new System.Drawing.Size(71, 20); 88 // 89 // statisticsTextBox 90 // 91 this.statisticsTextBox.Size = new System.Drawing.Size(1133, 13); 88 92 // 89 93 // btnApplySort … … 222 226 this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click); 223 227 // 228 // checkInputsTargetButton 229 // 230 this.checkInputsTargetButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.Inputs; 231 this.checkInputsTargetButton.Location = new System.Drawing.Point(36, 19); 232 this.checkInputsTargetButton.Name = "checkInputsTargetButton"; 233 this.checkInputsTargetButton.Size = new System.Drawing.Size(24, 24); 234 this.checkInputsTargetButton.TabIndex = 14; 235 this.toolTip.SetToolTip(this.checkInputsTargetButton, "Inputs & Target"); 236 this.checkInputsTargetButton.UseVisualStyleBackColor = true; 237 this.checkInputsTargetButton.Click += new System.EventHandler(this.checkInputsTargetButton_Click); 238 // 224 239 // uncheckAllButton 225 240 // 226 this.uncheckAllButton.Location = new System.Drawing.Point(105, 17); 241 this.uncheckAllButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.None; 242 this.uncheckAllButton.Location = new System.Drawing.Point(66, 19); 227 243 this.uncheckAllButton.Name = "uncheckAllButton"; 228 this.uncheckAllButton.Size = new System.Drawing.Size( 43, 24);244 this.uncheckAllButton.Size = new System.Drawing.Size(24, 24); 229 245 this.uncheckAllButton.TabIndex = 12; 230 this.uncheckAllButton.Text = "None"; 231 this.toolTip.SetToolTip(this.uncheckAllButton, "Uncheck all variables"); 246 this.toolTip.SetToolTip(this.uncheckAllButton, "None"); 232 247 this.uncheckAllButton.UseVisualStyleBackColor = true; 233 248 this.uncheckAllButton.Click += new System.EventHandler(this.uncheckAllButton_Click); … … 235 250 // checkAllButton 236 251 // 237 this.checkAllButton.Location = new System.Drawing.Point(68, 17); 252 this.checkAllButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.All; 253 this.checkAllButton.Location = new System.Drawing.Point(6, 19); 238 254 this.checkAllButton.Name = "checkAllButton"; 239 this.checkAllButton.Size = new System.Drawing.Size( 31, 24);255 this.checkAllButton.Size = new System.Drawing.Size(24, 24); 240 256 this.checkAllButton.TabIndex = 13; 241 this.checkAllButton.Text = "All"; 242 this.toolTip.SetToolTip(this.checkAllButton, "Check all variables"); 257 this.toolTip.SetToolTip(this.checkAllButton, "All"); 243 258 this.checkAllButton.UseVisualStyleBackColor = true; 244 259 this.checkAllButton.Click += new System.EventHandler(this.checkAllButton_Click); 245 //246 // checkInputsTargetButton247 //248 this.checkInputsTargetButton.Location = new System.Drawing.Point(6, 17);249 this.checkInputsTargetButton.Name = "checkInputsTargetButton";250 this.checkInputsTargetButton.Size = new System.Drawing.Size(56, 24);251 this.checkInputsTargetButton.TabIndex = 14;252 this.checkInputsTargetButton.Text = "Inputs";253 this.toolTip.SetToolTip(this.checkInputsTargetButton, "Check only inputs and target variable");254 this.checkInputsTargetButton.UseVisualStyleBackColor = true;255 this.checkInputsTargetButton.Click += new System.EventHandler(this.checkInputsTargetButton_Click);256 260 // 257 261 // addRowButton … … 285 289 this.renameColumnsButton.Click += new System.EventHandler(this.renameColumnsButton_Click); 286 290 // 287 // groupBox1288 // 289 this. groupBox1.Controls.Add(this.checkInputsTargetButton);290 this. groupBox1.Controls.Add(this.uncheckAllButton);291 this. groupBox1.Controls.Add(this.checkAllButton);292 this. groupBox1.Location = new System.Drawing.Point(426, 0);293 this. groupBox1.Name = "groupBox1";294 this. groupBox1.Size = new System.Drawing.Size(160, 49);295 this. groupBox1.TabIndex = 15;296 this. groupBox1.TabStop = false;297 this. groupBox1.Text = "Show Variables";291 // showVariablesGroupBox 292 // 293 this.showVariablesGroupBox.Controls.Add(this.checkInputsTargetButton); 294 this.showVariablesGroupBox.Controls.Add(this.uncheckAllButton); 295 this.showVariablesGroupBox.Controls.Add(this.checkAllButton); 296 this.showVariablesGroupBox.Location = new System.Drawing.Point(448, 0); 297 this.showVariablesGroupBox.Name = "showVariablesGroupBox"; 298 this.showVariablesGroupBox.Size = new System.Drawing.Size(97, 49); 299 this.showVariablesGroupBox.TabIndex = 17; 300 this.showVariablesGroupBox.TabStop = false; 301 this.showVariablesGroupBox.Text = "Show Variables"; 298 302 // 299 303 // DataGridContentView … … 301 305 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 302 306 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 303 this.Controls.Add(this. groupBox1);307 this.Controls.Add(this.showVariablesGroupBox); 304 308 this.Controls.Add(this.renameColumnsButton); 305 309 this.Controls.Add(this.addColumnButton); … … 320 324 this.Controls.SetChildIndex(this.rowsTextBox, 0); 321 325 this.Controls.SetChildIndex(this.columnsTextBox, 0); 322 this.Controls.SetChildIndex(this. groupBox1, 0);326 this.Controls.SetChildIndex(this.showVariablesGroupBox, 0); 323 327 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 324 328 this.contextMenuCell.ResumeLayout(false); 325 this. groupBox1.ResumeLayout(false);329 this.showVariablesGroupBox.ResumeLayout(false); 326 330 this.ResumeLayout(false); 327 331 this.PerformLayout(); … … 351 355 private System.Windows.Forms.Button addColumnButton; 352 356 private System.Windows.Forms.Button renameColumnsButton; 357 private System.Windows.Forms.GroupBox showVariablesGroupBox; 358 private System.Windows.Forms.Button checkInputsTargetButton; 353 359 private System.Windows.Forms.Button uncheckAllButton; 354 360 private System.Windows.Forms.Button checkAllButton; 355 private System.Windows.Forms.Button checkInputsTargetButton;356 private System.Windows.Forms.GroupBox groupBox1;357 361 } 358 362 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj
r14521 r14915 208 208 <DependentUpon>ComparisonFilterView.cs</DependentUpon> 209 209 </Compile> 210 <Compile Include="PreprocessingIcons.Designer.cs"> 211 <AutoGen>True</AutoGen> 212 <DesignTime>True</DesignTime> 213 <DependentUpon>PreprocessingIcons.resx</DependentUpon> 214 </Compile> 210 215 <Compile Include="RenameColumnsDialog.cs"> 211 216 <SubType>Form</SubType> … … 319 324 </ItemGroup> 320 325 <ItemGroup> 326 <EmbeddedResource Include="PreprocessingIcons.resx"> 327 <Generator>ResXFileCodeGenerator</Generator> 328 <LastGenOutput>PreprocessingIcons.Designer.cs</LastGenOutput> 329 </EmbeddedResource> 321 330 <EmbeddedResource Include="ScatterPlotSingleView.resx"> 322 331 <DependentUpon>ScatterPlotSingleView.cs</DependentUpon> 323 332 </EmbeddedResource> 333 </ItemGroup> 334 <ItemGroup> 335 <Content Include="Icons\All.png" /> 336 <Content Include="Icons\Inputs.png" /> 337 <Content Include="Icons\None.png" /> 324 338 </ItemGroup> 325 339 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.Designer.cs
r14546 r14915 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 47 48 this.lblRows = new System.Windows.Forms.Label(); 48 this.txtRows = new System.Windows.Forms.Label();49 49 this.lblColumns = new System.Windows.Forms.Label(); 50 50 this.lblMissingValuesTotal = new System.Windows.Forms.Label(); 51 this.txtColumns = new System.Windows.Forms.Label();52 this.txtNumericColumns = new System.Windows.Forms.Label();53 this.txtNominalColumns = new System.Windows.Forms.Label();54 51 this.lblNumericColumns = new System.Windows.Forms.Label(); 55 52 this.lblNominalColumns = new System.Windows.Forms.Label(); 56 this.txtMissingValuesTotal = new System.Windows.Forms.Label();57 53 this.stringMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView(); 58 this. groupBox1= new System.Windows.Forms.GroupBox();54 this.showVariablesGroupBox = new System.Windows.Forms.GroupBox(); 59 55 this.checkInputsTargetButton = new System.Windows.Forms.Button(); 60 56 this.uncheckAllButton = new System.Windows.Forms.Button(); 61 57 this.checkAllButton = new System.Windows.Forms.Button(); 62 this.groupBox1.SuspendLayout(); 58 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 59 this.lblTNumValues = new System.Windows.Forms.Label(); 60 this.orientationGroupBox = new System.Windows.Forms.GroupBox(); 61 this.verticalRadioButton = new System.Windows.Forms.RadioButton(); 62 this.horizontalRadioButton = new System.Windows.Forms.RadioButton(); 63 this.rowsTextBox = new System.Windows.Forms.TextBox(); 64 this.columnsTextBox = new System.Windows.Forms.TextBox(); 65 this.totalValuesTextBox = new System.Windows.Forms.TextBox(); 66 this.overviewTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 67 this.numericColumnsTextBox = new System.Windows.Forms.TextBox(); 68 this.nominalColumnsTextBox5 = new System.Windows.Forms.TextBox(); 69 this.missingValuesTextBox = new System.Windows.Forms.TextBox(); 70 this.overviewGroupBox = new System.Windows.Forms.GroupBox(); 71 this.showVariablesGroupBox.SuspendLayout(); 72 this.orientationGroupBox.SuspendLayout(); 73 this.overviewTableLayoutPanel.SuspendLayout(); 74 this.overviewGroupBox.SuspendLayout(); 63 75 this.SuspendLayout(); 64 76 // … … 66 78 // 67 79 this.lblRows.AutoSize = true; 68 this.lblRows.Location = new System.Drawing.Point(2, 6); 80 this.lblRows.Dock = System.Windows.Forms.DockStyle.Fill; 81 this.lblRows.Location = new System.Drawing.Point(3, 0); 69 82 this.lblRows.Name = "lblRows"; 70 this.lblRows.Size = new System.Drawing.Size( 34, 13);83 this.lblRows.Size = new System.Drawing.Size(47, 26); 71 84 this.lblRows.TabIndex = 0; 72 85 this.lblRows.Text = "Rows"; 73 // 74 // txtRows 75 // 76 this.txtRows.AutoSize = true; 77 this.txtRows.Location = new System.Drawing.Point(114, 6); 78 this.txtRows.Name = "txtRows"; 79 this.txtRows.Size = new System.Drawing.Size(19, 13); 80 this.txtRows.TabIndex = 1; 81 this.txtRows.Text = "12"; 86 this.lblRows.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 82 87 // 83 88 // lblColumns 84 89 // 85 90 this.lblColumns.AutoSize = true; 86 this.lblColumns.Location = new System.Drawing.Point(2, 26); 91 this.lblColumns.Dock = System.Windows.Forms.DockStyle.Fill; 92 this.lblColumns.Location = new System.Drawing.Point(3, 26); 87 93 this.lblColumns.Name = "lblColumns"; 88 this.lblColumns.Size = new System.Drawing.Size(47, 13);94 this.lblColumns.Size = new System.Drawing.Size(47, 26); 89 95 this.lblColumns.TabIndex = 2; 90 96 this.lblColumns.Text = "Columns"; 97 this.lblColumns.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 91 98 // 92 99 // lblMissingValuesTotal 93 100 // 94 101 this.lblMissingValuesTotal.AutoSize = true; 95 this.lblMissingValuesTotal.Location = new System.Drawing.Point(2, 87); 102 this.lblMissingValuesTotal.Dock = System.Windows.Forms.DockStyle.Fill; 103 this.lblMissingValuesTotal.Location = new System.Drawing.Point(233, 26); 96 104 this.lblMissingValuesTotal.Name = "lblMissingValuesTotal"; 97 this.lblMissingValuesTotal.Size = new System.Drawing.Size( 100, 13);105 this.lblMissingValuesTotal.Size = new System.Drawing.Size(77, 26); 98 106 this.lblMissingValuesTotal.TabIndex = 3; 99 this.lblMissingValuesTotal.Text = "Missing Values total"; 100 // 101 // txtColumns 102 // 103 this.txtColumns.AutoSize = true; 104 this.txtColumns.Location = new System.Drawing.Point(114, 26); 105 this.txtColumns.Name = "txtColumns"; 106 this.txtColumns.Size = new System.Drawing.Size(25, 13); 107 this.txtColumns.TabIndex = 1; 108 this.txtColumns.Text = "123"; 109 // 110 // txtNumericColumns 111 // 112 this.txtNumericColumns.AutoSize = true; 113 this.txtNumericColumns.Location = new System.Drawing.Point(114, 46); 114 this.txtNumericColumns.Name = "txtNumericColumns"; 115 this.txtNumericColumns.Size = new System.Drawing.Size(25, 13); 116 this.txtNumericColumns.TabIndex = 1; 117 this.txtNumericColumns.Text = "456"; 118 // 119 // txtNominalColumns 120 // 121 this.txtNominalColumns.AutoSize = true; 122 this.txtNominalColumns.Location = new System.Drawing.Point(114, 67); 123 this.txtNominalColumns.Name = "txtNominalColumns"; 124 this.txtNominalColumns.Size = new System.Drawing.Size(25, 13); 125 this.txtNominalColumns.TabIndex = 1; 126 this.txtNominalColumns.Text = "789"; 107 this.lblMissingValuesTotal.Text = "Missing Values"; 108 this.lblMissingValuesTotal.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 127 109 // 128 110 // lblNumericColumns 129 111 // 130 112 this.lblNumericColumns.AutoSize = true; 131 this.lblNumericColumns.Location = new System.Drawing.Point(2, 46); 113 this.lblNumericColumns.Dock = System.Windows.Forms.DockStyle.Fill; 114 this.lblNumericColumns.Location = new System.Drawing.Point(97, 0); 132 115 this.lblNumericColumns.Name = "lblNumericColumns"; 133 this.lblNumericColumns.Size = new System.Drawing.Size(89, 13);116 this.lblNumericColumns.Size = new System.Drawing.Size(89, 26); 134 117 this.lblNumericColumns.TabIndex = 3; 135 118 this.lblNumericColumns.Text = "Numeric Columns"; 119 this.lblNumericColumns.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 136 120 // 137 121 // lblNominalColumns 138 122 // 139 123 this.lblNominalColumns.AutoSize = true; 140 this.lblNominalColumns.Location = new System.Drawing.Point(2, 67); 124 this.lblNominalColumns.Dock = System.Windows.Forms.DockStyle.Fill; 125 this.lblNominalColumns.Location = new System.Drawing.Point(97, 26); 141 126 this.lblNominalColumns.Name = "lblNominalColumns"; 142 this.lblNominalColumns.Size = new System.Drawing.Size(8 8, 13);127 this.lblNominalColumns.Size = new System.Drawing.Size(89, 26); 143 128 this.lblNominalColumns.TabIndex = 3; 144 129 this.lblNominalColumns.Text = "Nominal Columns"; 145 // 146 // txtMissingValuesTotal 147 // 148 this.txtMissingValuesTotal.AutoSize = true; 149 this.txtMissingValuesTotal.Location = new System.Drawing.Point(114, 87); 150 this.txtMissingValuesTotal.Name = "txtMissingValuesTotal"; 151 this.txtMissingValuesTotal.Size = new System.Drawing.Size(25, 13); 152 this.txtMissingValuesTotal.TabIndex = 1; 153 this.txtMissingValuesTotal.Text = "102"; 130 this.lblNominalColumns.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 154 131 // 155 132 // stringMatrixView … … 160 137 this.stringMatrixView.Caption = "StringConvertibleMatrix View"; 161 138 this.stringMatrixView.Content = null; 162 this.stringMatrixView.Location = new System.Drawing.Point( 5, 112);139 this.stringMatrixView.Location = new System.Drawing.Point(3, 74); 163 140 this.stringMatrixView.Name = "stringMatrixView"; 164 141 this.stringMatrixView.ReadOnly = true; 165 142 this.stringMatrixView.ShowRowsAndColumnsTextBox = false; 166 143 this.stringMatrixView.ShowStatisticalInformation = true; 167 this.stringMatrixView.Size = new System.Drawing.Size(5 30, 283);144 this.stringMatrixView.Size = new System.Drawing.Size(592, 331); 168 145 this.stringMatrixView.TabIndex = 4; 169 146 // 170 // groupBox1171 // 172 this. groupBox1.Controls.Add(this.checkInputsTargetButton);173 this. groupBox1.Controls.Add(this.uncheckAllButton);174 this. groupBox1.Controls.Add(this.checkAllButton);175 this. groupBox1.Location = new System.Drawing.Point(212, 3);176 this. groupBox1.Name = "groupBox1";177 this. groupBox1.Size = new System.Drawing.Size(160, 49);178 this. groupBox1.TabIndex = 16;179 this. groupBox1.TabStop = false;180 this. groupBox1.Text = "Show Variables";147 // showVariablesGroupBox 148 // 149 this.showVariablesGroupBox.Controls.Add(this.checkInputsTargetButton); 150 this.showVariablesGroupBox.Controls.Add(this.uncheckAllButton); 151 this.showVariablesGroupBox.Controls.Add(this.checkAllButton); 152 this.showVariablesGroupBox.Location = new System.Drawing.Point(393, 0); 153 this.showVariablesGroupBox.Name = "showVariablesGroupBox"; 154 this.showVariablesGroupBox.Size = new System.Drawing.Size(97, 55); 155 this.showVariablesGroupBox.TabIndex = 16; 156 this.showVariablesGroupBox.TabStop = false; 157 this.showVariablesGroupBox.Text = "Show Variables"; 181 158 // 182 159 // checkInputsTargetButton 183 160 // 184 this.checkInputsTargetButton.Location = new System.Drawing.Point(6, 17); 161 this.checkInputsTargetButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.Inputs; 162 this.checkInputsTargetButton.Location = new System.Drawing.Point(36, 19); 185 163 this.checkInputsTargetButton.Name = "checkInputsTargetButton"; 186 this.checkInputsTargetButton.Size = new System.Drawing.Size( 56, 24);164 this.checkInputsTargetButton.Size = new System.Drawing.Size(24, 24); 187 165 this.checkInputsTargetButton.TabIndex = 14; 188 this. checkInputsTargetButton.Text = "Inputs";166 this.toolTip.SetToolTip(this.checkInputsTargetButton, "Inputs & Target"); 189 167 this.checkInputsTargetButton.UseVisualStyleBackColor = true; 190 168 this.checkInputsTargetButton.Click += new System.EventHandler(this.checkInputsTargetButton_Click); … … 192 170 // uncheckAllButton 193 171 // 194 this.uncheckAllButton.Location = new System.Drawing.Point(105, 17); 172 this.uncheckAllButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.None; 173 this.uncheckAllButton.Location = new System.Drawing.Point(66, 19); 195 174 this.uncheckAllButton.Name = "uncheckAllButton"; 196 this.uncheckAllButton.Size = new System.Drawing.Size( 43, 24);175 this.uncheckAllButton.Size = new System.Drawing.Size(24, 24); 197 176 this.uncheckAllButton.TabIndex = 12; 198 this. uncheckAllButton.Text = "None";177 this.toolTip.SetToolTip(this.uncheckAllButton, "None"); 199 178 this.uncheckAllButton.UseVisualStyleBackColor = true; 200 179 this.uncheckAllButton.Click += new System.EventHandler(this.uncheckAllButton_Click); … … 202 181 // checkAllButton 203 182 // 204 this.checkAllButton.Location = new System.Drawing.Point(68, 17); 183 this.checkAllButton.Image = global::HeuristicLab.DataPreprocessing.Views.PreprocessingIcons.All; 184 this.checkAllButton.Location = new System.Drawing.Point(6, 19); 205 185 this.checkAllButton.Name = "checkAllButton"; 206 this.checkAllButton.Size = new System.Drawing.Size( 31, 24);186 this.checkAllButton.Size = new System.Drawing.Size(24, 24); 207 187 this.checkAllButton.TabIndex = 13; 208 this. checkAllButton.Text = "All";188 this.toolTip.SetToolTip(this.checkAllButton, "All"); 209 189 this.checkAllButton.UseVisualStyleBackColor = true; 210 190 this.checkAllButton.Click += new System.EventHandler(this.checkAllButton_Click); 211 191 // 192 // lblTNumValues 193 // 194 this.lblTNumValues.AutoSize = true; 195 this.lblTNumValues.Dock = System.Windows.Forms.DockStyle.Fill; 196 this.lblTNumValues.Location = new System.Drawing.Point(233, 0); 197 this.lblTNumValues.Name = "lblTNumValues"; 198 this.lblTNumValues.Size = new System.Drawing.Size(77, 26); 199 this.lblTNumValues.TabIndex = 2; 200 this.lblTNumValues.Text = "Total Values"; 201 this.lblTNumValues.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 202 this.toolTip.SetToolTip(this.lblTNumValues, "Valid Values (excl. missing Values)"); 203 // 204 // orientationGroupBox 205 // 206 this.orientationGroupBox.Controls.Add(this.verticalRadioButton); 207 this.orientationGroupBox.Controls.Add(this.horizontalRadioButton); 208 this.orientationGroupBox.Location = new System.Drawing.Point(496, 0); 209 this.orientationGroupBox.Name = "orientationGroupBox"; 210 this.orientationGroupBox.Size = new System.Drawing.Size(94, 55); 211 this.orientationGroupBox.TabIndex = 17; 212 this.orientationGroupBox.TabStop = false; 213 this.orientationGroupBox.Text = "Orientation"; 214 // 215 // verticalRadioButton 216 // 217 this.verticalRadioButton.AutoSize = true; 218 this.verticalRadioButton.Location = new System.Drawing.Point(6, 32); 219 this.verticalRadioButton.Name = "verticalRadioButton"; 220 this.verticalRadioButton.Size = new System.Drawing.Size(60, 17); 221 this.verticalRadioButton.TabIndex = 1; 222 this.verticalRadioButton.TabStop = true; 223 this.verticalRadioButton.Text = "Vertical"; 224 this.verticalRadioButton.UseVisualStyleBackColor = true; 225 this.verticalRadioButton.CheckedChanged += new System.EventHandler(this.verticalRadioButton_CheckedChanged); 226 // 227 // horizontalRadioButton 228 // 229 this.horizontalRadioButton.AutoSize = true; 230 this.horizontalRadioButton.Checked = true; 231 this.horizontalRadioButton.Location = new System.Drawing.Point(6, 14); 232 this.horizontalRadioButton.Name = "horizontalRadioButton"; 233 this.horizontalRadioButton.Size = new System.Drawing.Size(72, 17); 234 this.horizontalRadioButton.TabIndex = 0; 235 this.horizontalRadioButton.TabStop = true; 236 this.horizontalRadioButton.Text = "Horizontal"; 237 this.horizontalRadioButton.UseVisualStyleBackColor = true; 238 this.horizontalRadioButton.CheckedChanged += new System.EventHandler(this.horizontalRadioButton_CheckedChanged); 239 // 240 // rowsTextBox 241 // 242 this.rowsTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 243 this.rowsTextBox.Location = new System.Drawing.Point(56, 3); 244 this.rowsTextBox.Name = "rowsTextBox"; 245 this.rowsTextBox.ReadOnly = true; 246 this.rowsTextBox.Size = new System.Drawing.Size(35, 20); 247 this.rowsTextBox.TabIndex = 18; 248 // 249 // columnsTextBox 250 // 251 this.columnsTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 252 this.columnsTextBox.Location = new System.Drawing.Point(56, 29); 253 this.columnsTextBox.Name = "columnsTextBox"; 254 this.columnsTextBox.ReadOnly = true; 255 this.columnsTextBox.Size = new System.Drawing.Size(35, 20); 256 this.columnsTextBox.TabIndex = 18; 257 // 258 // totalValuesTextBox 259 // 260 this.totalValuesTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 261 this.totalValuesTextBox.Location = new System.Drawing.Point(316, 3); 262 this.totalValuesTextBox.Name = "totalValuesTextBox"; 263 this.totalValuesTextBox.ReadOnly = true; 264 this.totalValuesTextBox.Size = new System.Drawing.Size(59, 20); 265 this.totalValuesTextBox.TabIndex = 18; 266 // 267 // overviewTableLayoutPanel 268 // 269 this.overviewTableLayoutPanel.ColumnCount = 6; 270 this.overviewTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 271 this.overviewTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28.57143F)); 272 this.overviewTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 273 this.overviewTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28.57143F)); 274 this.overviewTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 275 this.overviewTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 42.85715F)); 276 this.overviewTableLayoutPanel.Controls.Add(this.lblRows, 0, 0); 277 this.overviewTableLayoutPanel.Controls.Add(this.lblColumns, 0, 1); 278 this.overviewTableLayoutPanel.Controls.Add(this.columnsTextBox, 1, 1); 279 this.overviewTableLayoutPanel.Controls.Add(this.lblNominalColumns, 2, 1); 280 this.overviewTableLayoutPanel.Controls.Add(this.lblNumericColumns, 2, 0); 281 this.overviewTableLayoutPanel.Controls.Add(this.rowsTextBox, 1, 0); 282 this.overviewTableLayoutPanel.Controls.Add(this.numericColumnsTextBox, 3, 0); 283 this.overviewTableLayoutPanel.Controls.Add(this.nominalColumnsTextBox5, 3, 1); 284 this.overviewTableLayoutPanel.Controls.Add(this.missingValuesTextBox, 5, 1); 285 this.overviewTableLayoutPanel.Controls.Add(this.lblTNumValues, 4, 0); 286 this.overviewTableLayoutPanel.Controls.Add(this.totalValuesTextBox, 5, 0); 287 this.overviewTableLayoutPanel.Controls.Add(this.lblMissingValuesTotal, 4, 1); 288 this.overviewTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; 289 this.overviewTableLayoutPanel.Location = new System.Drawing.Point(3, 16); 290 this.overviewTableLayoutPanel.Name = "overviewTableLayoutPanel"; 291 this.overviewTableLayoutPanel.RowCount = 3; 292 this.overviewTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); 293 this.overviewTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); 294 this.overviewTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); 295 this.overviewTableLayoutPanel.Size = new System.Drawing.Size(378, 52); 296 this.overviewTableLayoutPanel.TabIndex = 19; 297 // 298 // numericColumnsTextBox 299 // 300 this.numericColumnsTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 301 this.numericColumnsTextBox.Location = new System.Drawing.Point(192, 3); 302 this.numericColumnsTextBox.Name = "numericColumnsTextBox"; 303 this.numericColumnsTextBox.ReadOnly = true; 304 this.numericColumnsTextBox.Size = new System.Drawing.Size(35, 20); 305 this.numericColumnsTextBox.TabIndex = 18; 306 // 307 // nominalColumnsTextBox5 308 // 309 this.nominalColumnsTextBox5.Dock = System.Windows.Forms.DockStyle.Fill; 310 this.nominalColumnsTextBox5.Location = new System.Drawing.Point(192, 29); 311 this.nominalColumnsTextBox5.Name = "nominalColumnsTextBox5"; 312 this.nominalColumnsTextBox5.ReadOnly = true; 313 this.nominalColumnsTextBox5.Size = new System.Drawing.Size(35, 20); 314 this.nominalColumnsTextBox5.TabIndex = 18; 315 // 316 // missingValuesTextBox 317 // 318 this.missingValuesTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 319 this.missingValuesTextBox.Location = new System.Drawing.Point(316, 29); 320 this.missingValuesTextBox.Name = "missingValuesTextBox"; 321 this.missingValuesTextBox.ReadOnly = true; 322 this.missingValuesTextBox.Size = new System.Drawing.Size(59, 20); 323 this.missingValuesTextBox.TabIndex = 18; 324 // 325 // overviewGroupBox 326 // 327 this.overviewGroupBox.Controls.Add(this.overviewTableLayoutPanel); 328 this.overviewGroupBox.Location = new System.Drawing.Point(3, 0); 329 this.overviewGroupBox.Name = "overviewGroupBox"; 330 this.overviewGroupBox.Size = new System.Drawing.Size(384, 71); 331 this.overviewGroupBox.TabIndex = 20; 332 this.overviewGroupBox.TabStop = false; 333 this.overviewGroupBox.Text = "Overview"; 334 // 212 335 // StatisticsView 213 336 // 214 337 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 215 338 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 216 this.Controls.Add(this.groupBox1); 339 this.Controls.Add(this.overviewGroupBox); 340 this.Controls.Add(this.orientationGroupBox); 341 this.Controls.Add(this.showVariablesGroupBox); 217 342 this.Controls.Add(this.stringMatrixView); 218 this.Controls.Add(this.lblNominalColumns);219 this.Controls.Add(this.lblNumericColumns);220 this.Controls.Add(this.lblMissingValuesTotal);221 this.Controls.Add(this.txtMissingValuesTotal);222 this.Controls.Add(this.txtNominalColumns);223 this.Controls.Add(this.lblColumns);224 this.Controls.Add(this.txtNumericColumns);225 this.Controls.Add(this.txtColumns);226 this.Controls.Add(this.txtRows);227 this.Controls.Add(this.lblRows);228 343 this.Name = "StatisticsView"; 229 this.Size = new System.Drawing.Size(549, 408); 230 this.groupBox1.ResumeLayout(false); 344 this.Size = new System.Drawing.Size(598, 408); 345 this.showVariablesGroupBox.ResumeLayout(false); 346 this.orientationGroupBox.ResumeLayout(false); 347 this.orientationGroupBox.PerformLayout(); 348 this.overviewTableLayoutPanel.ResumeLayout(false); 349 this.overviewTableLayoutPanel.PerformLayout(); 350 this.overviewGroupBox.ResumeLayout(false); 231 351 this.ResumeLayout(false); 232 this.PerformLayout();233 352 234 353 } … … 237 356 238 357 private System.Windows.Forms.Label lblRows; 239 private System.Windows.Forms.Label txtRows;240 358 private System.Windows.Forms.Label lblColumns; 241 359 private System.Windows.Forms.Label lblMissingValuesTotal; 242 private System.Windows.Forms.Label txtColumns;243 private System.Windows.Forms.Label txtNumericColumns;244 private System.Windows.Forms.Label txtNominalColumns;245 360 private System.Windows.Forms.Label lblNumericColumns; 246 361 private System.Windows.Forms.Label lblNominalColumns; 247 private System.Windows.Forms.Label txtMissingValuesTotal;248 362 private HeuristicLab.Data.Views.StringConvertibleMatrixView stringMatrixView; 249 private System.Windows.Forms.GroupBox groupBox1;363 private System.Windows.Forms.GroupBox showVariablesGroupBox; 250 364 private System.Windows.Forms.Button checkInputsTargetButton; 251 365 private System.Windows.Forms.Button uncheckAllButton; 252 366 private System.Windows.Forms.Button checkAllButton; 367 private System.Windows.Forms.ToolTip toolTip; 368 private System.Windows.Forms.GroupBox orientationGroupBox; 369 private System.Windows.Forms.RadioButton verticalRadioButton; 370 private System.Windows.Forms.RadioButton horizontalRadioButton; 371 private System.Windows.Forms.Label lblTNumValues; 372 private System.Windows.Forms.TextBox rowsTextBox; 373 private System.Windows.Forms.TextBox columnsTextBox; 374 private System.Windows.Forms.TextBox totalValuesTextBox; 375 private System.Windows.Forms.TableLayoutPanel overviewTableLayoutPanel; 376 private System.Windows.Forms.TextBox numericColumnsTextBox; 377 private System.Windows.Forms.TextBox nominalColumnsTextBox5; 378 private System.Windows.Forms.TextBox missingValuesTextBox; 379 private System.Windows.Forms.GroupBox overviewGroupBox; 253 380 } 254 381 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs
r14546 r14915 21 21 22 22 using System; 23 using System.Collections; 23 24 using System.Collections.Generic; 25 using System.Linq; 24 26 using System.Windows.Forms; 25 27 using HeuristicLab.Core.Views; 26 28 using HeuristicLab.Data; 27 29 using HeuristicLab.MainForm; 30 using HeuristicLab.MainForm.WindowsForms; 28 31 29 32 namespace HeuristicLab.DataPreprocessing.Views { … … 33 36 public partial class StatisticsView : ItemView { 34 37 38 private bool horizontal = true; 39 35 40 private StringMatrix statisticsMatrix; 36 41 37 private static readonly string[] RowNames = new[] {42 private static readonly string[] StatisticsNames = new[] { 38 43 "Type", 39 44 "Missing Values", … … 42 47 "Median", 43 48 "Average", 44 " std. Deviation",49 "Std. Deviation", 45 50 "Variance", 46 51 "25th Percentile", … … 62 67 base.OnContentChanged(); 63 68 if (Content == null) { 64 txtRows.Text = ""; 65 txtColumns.Text = ""; 66 txtNumericColumns.Text = ""; 67 txtNominalColumns.Text = ""; 68 txtMissingValuesTotal.Text = ""; 69 rowsTextBox.Text = string.Empty; 70 columnsTextBox.Text = string.Empty; 71 numericColumnsTextBox.Text = string.Empty; 72 nominalColumnsTextBox5.Text = string.Empty; 73 missingValuesTextBox.Text = string.Empty; 74 totalValuesTextBox.Text = string.Empty; 69 75 stringMatrixView.Content = null; 70 76 statisticsMatrix = null; … … 84 90 } 85 91 86 private void UpdateData() { 87 var logic = Content.StatisticsLogic; 88 var rowCount = logic.GetRowCount(); 89 txtRows.Text = logic.GetColumnCount().ToString(); 90 txtColumns.Text = rowCount.ToString(); 91 txtNumericColumns.Text = logic.GetNumericColumnCount().ToString(); 92 txtNominalColumns.Text = logic.GetNominalColumnCount().ToString(); 93 txtMissingValuesTotal.Text = logic.GetMissingValueCount().ToString(); 94 95 statisticsMatrix = new StringMatrix(RowNames.Length, Content.PreprocessingData.Columns) { 96 RowNames = StatisticsView.RowNames, 97 ColumnNames = Content.PreprocessingData.VariableNames 98 }; 99 100 if (rowCount > 0) { 101 for (int i = 0; i < logic.GetColumnCount(); ++i) { 102 var data = GetList(i); 103 for (int j = 0; j < data.Count; j++) { 92 private void UpdateData(Dictionary<string, bool> oldVisibility = null) { 93 var logic = Content.StatisticsLogic; 94 rowsTextBox.Text = logic.GetColumnCount().ToString(); 95 columnsTextBox.Text = logic.GetRowCount().ToString(); 96 numericColumnsTextBox.Text = logic.GetNumericColumnCount().ToString(); 97 nominalColumnsTextBox5.Text = logic.GetNominalColumnCount().ToString(); 98 missingValuesTextBox.Text = logic.GetMissingValueCount().ToString(); 99 totalValuesTextBox.Text = (logic.GetColumnCount() * logic.GetRowCount() - logic.GetMissingValueCount()).ToString(); 100 101 var variableNames = Content.PreprocessingData.VariableNames.ToList(); 102 if (horizontal) 103 statisticsMatrix = new StringMatrix(StatisticsNames.Length, Content.PreprocessingData.Columns) { 104 RowNames = StatisticsView.StatisticsNames, 105 ColumnNames = variableNames 106 }; 107 else 108 statisticsMatrix = new StringMatrix(Content.PreprocessingData.Columns, StatisticsNames.Length) { 109 RowNames = variableNames, 110 ColumnNames = StatisticsView.StatisticsNames 111 }; 112 113 for (int i = 0; i < logic.GetColumnCount(); i++) { 114 var data = GetStatistics(i); 115 for (int j = 0; j < data.Count; j++) { 116 if (horizontal) 104 117 statisticsMatrix[j, i] = data[j]; 105 } 106 } 107 } 118 else 119 statisticsMatrix[i, j] = data[j]; 120 } 121 } 122 123 stringMatrixView.Parent.SuspendRepaint(); 108 124 stringMatrixView.Content = statisticsMatrix; 109 125 110 foreach (DataGridViewColumn column in stringMatrixView.DataGridView.Columns) { 111 var variable = column.HeaderText; 112 bool isInputTarget = Content.PreprocessingData.InputVariables.Contains(variable) 113 || Content.PreprocessingData.TargetVariable == variable; 114 column.Visible = isInputTarget; 115 } 126 var grid = stringMatrixView.DataGridView; 127 int idx = 0; 128 var list = horizontal ? grid.Columns : grid.Rows as IList; 129 foreach (DataGridViewBand band in list) { 130 var variable = variableNames[idx++]; 131 if (oldVisibility != null) { 132 band.Visible = !oldVisibility.ContainsKey(variable) || oldVisibility[variable]; 133 } 134 } 135 if (horizontal) 136 stringMatrixView.UpdateColumnHeaders(); 137 else 138 stringMatrixView.UpdateRowHeaders(); 139 116 140 stringMatrixView.DataGridView.AutoResizeColumns(); 117 118 //foreach (DataGridViewRow row in stringMatrixView.DataGridView.Rows) { 119 // var variable = (string)row.HeaderCell.Value; 120 // bool isInputTarget = Content.PreprocessingData.InputVariables.Contains(variable) 121 // || Content.PreprocessingData.TargetVariable == variable; 122 // row.Visible = isInputTarget; 123 //} 124 } 125 126 private List<string> GetList(int i) { 141 stringMatrixView.Parent.ResumeRepaint(true); 142 } 143 144 private List<string> GetStatistics(int varIdx) { 127 145 List<string> list; 128 146 var logic = Content.StatisticsLogic; 129 if (logic.VariableHasType<double>( i)) {130 list = GetDoubleColumns( i);131 } else if (logic.VariableHasType<string>( i)) {132 list = GetStringColumns( i);133 } else if (logic.VariableHasType<DateTime>( i)) {134 list = GetDateTimeColumns( i);147 if (logic.VariableHasType<double>(varIdx)) { 148 list = GetDoubleColumns(varIdx); 149 } else if (logic.VariableHasType<string>(varIdx)) { 150 list = GetStringColumns(varIdx); 151 } else if (logic.VariableHasType<DateTime>(varIdx)) { 152 list = GetDateTimeColumns(varIdx); 135 153 } else { 136 154 list = new List<string>(); 137 for (int j = 0; j < RowNames.Length; ++j) {155 for (int j = 0; j < StatisticsNames.Length; ++j) { 138 156 list.Add("unknown column type"); 139 157 } … … 142 160 } 143 161 144 private List<string> GetDoubleColumns(int columnIndex) {162 private List<string> GetDoubleColumns(int statIdx) { 145 163 var logic = Content.StatisticsLogic; 146 164 return new List<string> { 147 logic.GetColumnTypeAsString( columnIndex),148 logic.GetMissingValueCount( columnIndex).ToString(),149 logic.GetMin<double>( columnIndex,double.NaN).ToString(),150 logic.GetMax<double>( columnIndex,double.NaN).ToString(),151 logic.GetMedian( columnIndex).ToString(),152 logic.GetAverage( columnIndex).ToString(),153 logic.GetStandardDeviation( columnIndex).ToString(),154 logic.GetVariance( columnIndex).ToString(),155 logic.GetOneQuarterPercentile( columnIndex).ToString(),156 logic.GetThreeQuarterPercentile( columnIndex).ToString(),157 logic.GetMostCommonValue<double>( columnIndex,double.NaN).ToString(),158 logic.GetDifferentValuesCount<double>( columnIndex).ToString()165 logic.GetColumnTypeAsString(statIdx), 166 logic.GetMissingValueCount(statIdx).ToString(), 167 logic.GetMin<double>(statIdx, double.NaN).ToString(), 168 logic.GetMax<double>(statIdx, double.NaN).ToString(), 169 logic.GetMedian(statIdx).ToString(), 170 logic.GetAverage(statIdx).ToString(), 171 logic.GetStandardDeviation(statIdx).ToString(), 172 logic.GetVariance(statIdx).ToString(), 173 logic.GetOneQuarterPercentile(statIdx).ToString(), 174 logic.GetThreeQuarterPercentile(statIdx).ToString(), 175 logic.GetMostCommonValue<double>(statIdx, double.NaN).ToString(), 176 logic.GetDifferentValuesCount<double>(statIdx).ToString() 159 177 }; 160 178 } 161 179 162 private List<string> GetStringColumns(int columnIndex) {180 private List<string> GetStringColumns(int statIdx) { 163 181 var logic = Content.StatisticsLogic; 164 182 return new List<string> { 165 logic.GetColumnTypeAsString( columnIndex),166 logic.GetMissingValueCount( columnIndex).ToString(),183 logic.GetColumnTypeAsString(statIdx), 184 logic.GetMissingValueCount(statIdx).ToString(), 167 185 "", //min 168 186 "", //max … … 173 191 "", //quarter percentile 174 192 "", //three quarter percentile 175 logic.GetMostCommonValue<string>( columnIndex,string.Empty) ?? "",176 logic.GetDifferentValuesCount<string>( columnIndex).ToString()193 logic.GetMostCommonValue<string>(statIdx,string.Empty) ?? "", 194 logic.GetDifferentValuesCount<string>(statIdx).ToString() 177 195 }; 178 196 } 179 197 180 private List<string> GetDateTimeColumns(int columnIndex) {198 private List<string> GetDateTimeColumns(int statIdx) { 181 199 var logic = Content.StatisticsLogic; 182 200 return new List<string> { 183 logic.GetColumnTypeAsString( columnIndex),184 logic.GetMissingValueCount( columnIndex).ToString(),185 logic.GetMin<DateTime>( columnIndex,DateTime.MinValue).ToString(),186 logic.GetMax<DateTime>( columnIndex,DateTime.MinValue).ToString(),187 logic.GetMedianDateTime( columnIndex).ToString(),188 logic.GetAverageDateTime( columnIndex).ToString(),189 logic.GetStandardDeviation( columnIndex).ToString(),190 logic.GetVariance( columnIndex).ToString(), //variance191 logic.GetOneQuarterPercentile( columnIndex).ToString(),192 logic.GetThreeQuarterPercentile( columnIndex).ToString(),193 logic.GetMostCommonValue<DateTime>( columnIndex,DateTime.MinValue).ToString(),194 logic.GetDifferentValuesCount<DateTime>( columnIndex).ToString()201 logic.GetColumnTypeAsString(statIdx), 202 logic.GetMissingValueCount(statIdx).ToString(), 203 logic.GetMin<DateTime>(statIdx, DateTime.MinValue).ToString(), 204 logic.GetMax<DateTime>(statIdx, DateTime.MinValue).ToString(), 205 logic.GetMedianDateTime(statIdx).ToString(), 206 logic.GetAverageDateTime(statIdx).ToString(), 207 logic.GetStandardDeviation(statIdx).ToString(), 208 logic.GetVariance(statIdx).ToString(), 209 logic.GetOneQuarterPercentile(statIdx).ToString(), 210 logic.GetThreeQuarterPercentile(statIdx).ToString(), 211 logic.GetMostCommonValue<DateTime>(statIdx, DateTime.MinValue).ToString(), 212 logic.GetDifferentValuesCount<DateTime>(statIdx).ToString() 195 213 }; 196 214 } … … 200 218 } 201 219 220 #region Show/Hide Variables 202 221 private void checkInputsTargetButton_Click(object sender, EventArgs e) { 203 foreach (DataGridViewColumn column in stringMatrixView.DataGridView.Columns) { 204 var variable = column.HeaderText; 222 var grid = stringMatrixView.DataGridView; 223 var list = horizontal ? grid.Columns : grid.Rows as IList; 224 var variableNames = Content.PreprocessingData.VariableNames.ToList(); 225 int idx = 0; 226 foreach (DataGridViewBand band in list) { 227 var variable = variableNames[idx++]; 205 228 bool isInputTarget = Content.PreprocessingData.InputVariables.Contains(variable) 206 229 || Content.PreprocessingData.TargetVariable == variable; 207 column.Visible = isInputTarget; 208 } 209 } 210 230 band.Visible = isInputTarget; 231 if (horizontal) 232 stringMatrixView.UpdateColumnHeaders(); 233 else 234 stringMatrixView.UpdateRowHeaders(); 235 } 236 237 } 211 238 private void checkAllButton_Click(object sender, EventArgs e) { 212 foreach (DataGridViewColumn column in stringMatrixView.DataGridView.Columns) { 213 column.Visible = true; 214 } 215 } 216 239 var grid = stringMatrixView.DataGridView; 240 var list = horizontal ? grid.Columns : grid.Rows as IList; 241 foreach (DataGridViewBand band in list) { 242 band.Visible = true; 243 } 244 if (horizontal) 245 stringMatrixView.UpdateColumnHeaders(); 246 else 247 stringMatrixView.UpdateRowHeaders(); 248 } 217 249 private void uncheckAllButton_Click(object sender, EventArgs e) { 218 foreach (DataGridViewColumn column in stringMatrixView.DataGridView.Columns) { 219 column.Visible = false; 220 } 221 } 250 var grid = stringMatrixView.DataGridView; 251 var list = horizontal ? grid.Columns : grid.Rows as IList; 252 foreach (DataGridViewBand band in list) { 253 band.Visible = false; 254 } 255 } 256 #endregion 257 258 #region Orientation 259 private void horizontalRadioButton_CheckedChanged(object sender, EventArgs e) { 260 var grid = stringMatrixView.DataGridView; 261 var oldVisibility = new Dictionary<string, bool>(); 262 var variableNames = Content.PreprocessingData.VariableNames.ToList(); 263 if (stringMatrixView.Content != null) { 264 var list = horizontal ? grid.Columns : grid.Rows as IList; 265 int idx = 0; 266 foreach (DataGridViewBand band in list) { 267 var variable = variableNames[idx++]; 268 oldVisibility.Add(variable, band.Visible); 269 } 270 } 271 horizontal = horizontalRadioButton.Checked; 272 UpdateData(oldVisibility); 273 } 274 private void verticalRadioButton_CheckedChanged(object sender, EventArgs e) { 275 // everything is handled in horizontalRadioButton_CheckedChanged 276 } 277 #endregion 222 278 } 223 279 }
Note: See TracChangeset
for help on using the changeset viewer.