Changeset 13252 for trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4
- Timestamp:
- 11/18/15 14:10:12 (9 years ago)
- Location:
- trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.Designer.cs
r12986 r13252 63 63 this.btnReplace = new System.Windows.Forms.Button(); 64 64 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 65 this.add LineButton = new System.Windows.Forms.Button();65 this.addRowButton = new System.Windows.Forms.Button(); 66 66 this.addColumnButton = new System.Windows.Forms.Button(); 67 this.renameColumnsButton = new System.Windows.Forms.Button(); 67 68 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 68 69 this.contextMenuCell.SuspendLayout(); … … 81 82 this.columnsTextBox.Size = new System.Drawing.Size(71, 20); 82 83 // 84 // statisticsTextBox 85 // 86 this.statisticsTextBox.Location = new System.Drawing.Point(3, 387); 87 this.statisticsTextBox.Size = new System.Drawing.Size(421, 13); 88 // 83 89 // btnApplySort 84 90 // 85 this.btnApplySort.Location = new System.Drawing.Point( 320, -1);91 this.btnApplySort.Location = new System.Drawing.Point(234, 0); 86 92 this.btnApplySort.Name = "btnApplySort"; 87 this.btnApplySort.Size = new System.Drawing.Size( 87, 23);93 this.btnApplySort.Size = new System.Drawing.Size(104, 23); 88 94 this.btnApplySort.TabIndex = 7; 89 95 this.btnApplySort.Text = "Apply Sort"; … … 196 202 // btnSearch 197 203 // 198 this.btnSearch.Location = new System.Drawing.Point(173, -1);204 this.btnSearch.Location = new System.Drawing.Point(173, 0); 199 205 this.btnSearch.Name = "btnSearch"; 200 this.btnSearch.Size = new System.Drawing.Size(5 3, 23);206 this.btnSearch.Size = new System.Drawing.Size(55, 23); 201 207 this.btnSearch.TabIndex = 8; 202 208 this.btnSearch.Text = "Search"; … … 207 213 // btnReplace 208 214 // 209 this.btnReplace.Location = new System.Drawing.Point( 232, -1);215 this.btnReplace.Location = new System.Drawing.Point(173, 26); 210 216 this.btnReplace.Name = "btnReplace"; 211 217 this.btnReplace.Size = new System.Drawing.Size(55, 23); … … 216 222 this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click); 217 223 // 218 // add LineButton219 // 220 this.add LineButton.Location = new System.Drawing.Point(173, 25);221 this.add LineButton.Name = "addLineButton";222 this.add LineButton.Size = new System.Drawing.Size(114, 23);223 this.add LineButton.TabIndex = 10;224 this.add LineButton.Text = "Add Line";225 this.add LineButton.UseVisualStyleBackColor = true;226 this.add LineButton.Click += new System.EventHandler(this.addLineButton_Click);224 // addRowButton 225 // 226 this.addRowButton.Location = new System.Drawing.Point(344, 26); 227 this.addRowButton.Name = "addRowButton"; 228 this.addRowButton.Size = new System.Drawing.Size(76, 23); 229 this.addRowButton.TabIndex = 10; 230 this.addRowButton.Text = "Add Row"; 231 this.addRowButton.UseVisualStyleBackColor = true; 232 this.addRowButton.Click += new System.EventHandler(this.addRowButton_Click); 227 233 // 228 234 // addColumnButton 229 235 // 230 this.addColumnButton.Location = new System.Drawing.Point( 293, 25);236 this.addColumnButton.Location = new System.Drawing.Point(344, 0); 231 237 this.addColumnButton.Name = "addColumnButton"; 232 this.addColumnButton.Size = new System.Drawing.Size( 114, 23);238 this.addColumnButton.Size = new System.Drawing.Size(76, 23); 233 239 this.addColumnButton.TabIndex = 10; 234 240 this.addColumnButton.Text = "Add Column"; … … 236 242 this.addColumnButton.Click += new System.EventHandler(this.addColumnButton_Click); 237 243 // 244 // renameColumnsButton 245 // 246 this.renameColumnsButton.Location = new System.Drawing.Point(234, 26); 247 this.renameColumnsButton.Name = "renameColumnsButton"; 248 this.renameColumnsButton.Size = new System.Drawing.Size(104, 23); 249 this.renameColumnsButton.TabIndex = 11; 250 this.renameColumnsButton.Text = "Rename Columns"; 251 this.renameColumnsButton.UseVisualStyleBackColor = true; 252 this.renameColumnsButton.Click += new System.EventHandler(this.renameColumnsButton_Click); 253 // 238 254 // DataGridContentView 239 255 // 240 256 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 241 257 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 258 this.Controls.Add(this.renameColumnsButton); 242 259 this.Controls.Add(this.addColumnButton); 243 this.Controls.Add(this.add LineButton);260 this.Controls.Add(this.addRowButton); 244 261 this.Controls.Add(this.btnReplace); 245 262 this.Controls.Add(this.btnSearch); 246 263 this.Controls.Add(this.btnApplySort); 247 264 this.Name = "DataGridContentView"; 265 this.Size = new System.Drawing.Size(430, 403); 266 this.Controls.SetChildIndex(this.btnApplySort, 0); 267 this.Controls.SetChildIndex(this.btnSearch, 0); 268 this.Controls.SetChildIndex(this.btnReplace, 0); 269 this.Controls.SetChildIndex(this.addRowButton, 0); 270 this.Controls.SetChildIndex(this.addColumnButton, 0); 271 this.Controls.SetChildIndex(this.renameColumnsButton, 0); 248 272 this.Controls.SetChildIndex(this.statisticsTextBox, 0); 249 273 this.Controls.SetChildIndex(this.rowsLabel, 0); … … 251 275 this.Controls.SetChildIndex(this.rowsTextBox, 0); 252 276 this.Controls.SetChildIndex(this.columnsTextBox, 0); 253 this.Controls.SetChildIndex(this.btnApplySort, 0);254 this.Controls.SetChildIndex(this.btnSearch, 0);255 this.Controls.SetChildIndex(this.btnReplace, 0);256 this.Controls.SetChildIndex(this.addLineButton, 0);257 this.Controls.SetChildIndex(this.addColumnButton, 0);258 277 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 259 278 this.contextMenuCell.ResumeLayout(false); … … 282 301 private System.Windows.Forms.ToolTip toolTip; 283 302 private System.Windows.Forms.ToolStripMenuItem smoothingToolStripMenuItem_Column; 284 private System.Windows.Forms.Button add LineButton;303 private System.Windows.Forms.Button addRowButton; 285 304 private System.Windows.Forms.Button addColumnButton; 305 private System.Windows.Forms.Button renameColumnsButton; 286 306 } 287 307 } -
trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
r12986 r13252 59 59 InitializeComponent(); 60 60 dataGridView.CellMouseClick += dataGridView_CellMouseClick; 61 dataGridView.RowHeaderMouseClick += dataGridView_RowHeaderMouseClick; 61 62 dataGridView.KeyDown += dataGridView_KeyDown; 62 63 dataGridView.MouseUp += dataGridView_MouseUp; … … 184 185 protected override void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { 185 186 if (Content != null) { 186 if (e.Button == System.Windows.Forms.MouseButtons.Left) {187 if (e.Button == MouseButtons.Left) { 187 188 dataGridView.Focus(); 188 189 dataGridView.ClearSelection(); … … 193 194 dataGridView[e.ColumnIndex, i].Selected = true; 194 195 } 195 } else if (Content.SortableView) { 196 } else if (e.Button == MouseButtons.Middle) { 197 int newIndex = e.ColumnIndex >= 0 ? e.ColumnIndex : 0; 198 Content.PreProcessingData.InsertColumn<double>(newIndex.ToString(), newIndex); 199 } else if (e.Button == MouseButtons.Right && Content.SortableView) { 196 200 SortColumn(e.ColumnIndex); 197 201 } 198 202 } 199 203 searchIterator = null; 204 } 205 private void dataGridView_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { 206 if (Content != null) { 207 if (e.Button == MouseButtons.Middle) { 208 int newIndex = e.RowIndex >= 0 ? e.RowIndex : 0; 209 Content.PreProcessingData.InsertRow(newIndex); 210 } 211 } 200 212 } 201 213 … … 469 481 private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { 470 482 if (Content == null) return; 471 if (e.Button == System.Windows.Forms.MouseButtons.Right && !(e.ColumnIndex != -1 && e.RowIndex == -1)) {483 if (e.Button == MouseButtons.Right && !(e.ColumnIndex != -1 && e.RowIndex == -1)) { 472 484 if (e.ColumnIndex == -1 || e.RowIndex == -1) { 473 485 replaceValueOverColumnToolStripMenuItem.Visible = false; … … 631 643 #endregion 632 644 633 private void add LineButton_Click(object sender, EventArgs e) {645 private void addRowButton_Click(object sender, EventArgs e) { 634 646 Content.PreProcessingData.InsertRow(Content.Rows); 635 647 } … … 639 651 } 640 652 653 private void renameColumnsButton_Click(object sender, EventArgs e) { 654 var renameDialog = new RenameColumnsDialog(Content.ColumnNames); 655 656 if (renameDialog.ShowDialog(this) == DialogResult.OK) { 657 Content.PreProcessingData.RenameColumns(renameDialog.ColumnNames); 658 } 659 } 641 660 } 642 661 } -
trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj
r12683 r13252 120 120 <Compile Include="ComparisonFilterView.Designer.cs"> 121 121 <DependentUpon>ComparisonFilterView.cs</DependentUpon> 122 </Compile> 123 <Compile Include="RenameColumnsDialog.cs"> 124 <SubType>Form</SubType> 125 </Compile> 126 <Compile Include="RenameColumnsDialog.Designer.cs"> 127 <DependentUpon>RenameColumnsDialog.cs</DependentUpon> 122 128 </Compile> 123 129 <Compile Include="ScatterPlotSingleView.cs">
Note: See TracChangeset
for help on using the changeset viewer.