- Timestamp:
- 03/19/14 16:09:47 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
r10633 r10636 33 33 34 34 private bool notOwnEvent = true; 35 private FindAndReplaceDialog findAndReplaceDialog; 35 36 36 37 public new IDataGridContent Content { … … 149 150 }); 150 151 } else if (e.Control && e.KeyCode == Keys.F) { 151 FindAndReplaceDialog findAndReplaceDialog = new FindAndReplaceDialog(); 152 findAndReplaceDialog.Show(); 152 CreateFindAndReplaceDialog(); 153 153 findAndReplaceDialog.ActivateSearch(); 154 155 154 } else if (e.Control && e.KeyCode == Keys.R) { 156 FindAndReplaceDialog findAndReplaceDialog = new FindAndReplaceDialog(); 157 findAndReplaceDialog.Show(); 155 CreateFindAndReplaceDialog(); 158 156 findAndReplaceDialog.ActivateReplace(); 159 157 } 158 } 159 160 private void CreateFindAndReplaceDialog() { 161 findAndReplaceDialog = new FindAndReplaceDialog(); 162 findAndReplaceDialog.Show(); 163 findAndReplaceDialog.FindAllEvent += findAndReplaceDialog_FindAllEvent; 164 findAndReplaceDialog.FindNextEvent += findAndReplaceDialog_FindNextEvent; 165 findAndReplaceDialog.ReplaceAllEvent += findAndReplaceDialog_ReplaceAllEvent; 166 findAndReplaceDialog.ReplaceNextEvent += findAndReplaceDialog_ReplaceNextEvent; 167 } 168 169 void findAndReplaceDialog_ReplaceNextEvent(object sender, EventArgs e) { 170 throw new NotImplementedException(); 171 } 172 173 void findAndReplaceDialog_ReplaceAllEvent(object sender, EventArgs e) { 174 throw new NotImplementedException(); 175 } 176 177 void findAndReplaceDialog_FindNextEvent(object sender, EventArgs e) { 178 throw new NotImplementedException(); 179 } 180 181 void findAndReplaceDialog_FindAllEvent(object sender, EventArgs e) { 182 throw new NotImplementedException(); 160 183 } 161 184 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataPreprocessingView.cs
r10625 r10636 55 55 56 56 var viewShortcuts = new ItemCollection<IViewShortcut>() { 57 new DataGridContent(dataGridLogic, manipulationLogic ),57 new DataGridContent(dataGridLogic, manipulationLogic, filterLogic), 58 58 new StatisticsContent(statisticsLogic), 59 59 new FilterContent(filterLogic), -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FindAndReplaceDialog.Designer.cs
r10633 r10636 31 31 this.btnFindNext = new System.Windows.Forms.Button(); 32 32 this.tabReplace = new System.Windows.Forms.TabPage(); 33 this.lblValue = new System.Windows.Forms.Label(); 34 this.btnReplaceAll = new System.Windows.Forms.Button(); 35 this.btnReplaceNext = new System.Windows.Forms.Button(); 36 this.cmbReplaceWith = new System.Windows.Forms.ComboBox(); 37 this.txtValue = new System.Windows.Forms.TextBox(); 38 this.label1 = new System.Windows.Forms.Label(); 33 39 this.tabSearchReplace.SuspendLayout(); 34 this.tab Search.SuspendLayout();40 this.tabReplace.SuspendLayout(); 35 41 this.SuspendLayout(); 36 42 // 37 43 // tabSearchReplace 38 44 // 45 this.tabSearchReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 46 | System.Windows.Forms.AnchorStyles.Left) 47 | System.Windows.Forms.AnchorStyles.Right))); 39 48 this.tabSearchReplace.Controls.Add(this.tabSearch); 40 49 this.tabSearchReplace.Controls.Add(this.tabReplace); … … 42 51 this.tabSearchReplace.Name = "tabSearchReplace"; 43 52 this.tabSearchReplace.SelectedIndex = 0; 44 this.tabSearchReplace.Size = new System.Drawing.Size(5 11, 174);53 this.tabSearchReplace.Size = new System.Drawing.Size(564, 135); 45 54 this.tabSearchReplace.TabIndex = 0; 46 55 // 47 56 // tabSearch 48 57 // 49 this.tabSearch.Controls.Add(this.txtSearchString);50 this.tabSearch.Controls.Add(this.lblSearch);51 this.tabSearch.Controls.Add(this.btnFindAll);52 this.tabSearch.Controls.Add(this.btnFindNext);53 58 this.tabSearch.Location = new System.Drawing.Point(4, 22); 54 59 this.tabSearch.Name = "tabSearch"; 55 60 this.tabSearch.Padding = new System.Windows.Forms.Padding(3); 56 this.tabSearch.Size = new System.Drawing.Size(5 03, 148);61 this.tabSearch.Size = new System.Drawing.Size(556, 148); 57 62 this.tabSearch.TabIndex = 0; 58 63 this.tabSearch.Text = "Search"; … … 61 66 // txtSearchString 62 67 // 63 this.txtSearchString.Location = new System.Drawing.Point( 97, 27);68 this.txtSearchString.Location = new System.Drawing.Point(103, 20); 64 69 this.txtSearchString.Name = "txtSearchString"; 65 70 this.txtSearchString.Size = new System.Drawing.Size(254, 20); 66 this.txtSearchString.TabIndex = 3;71 this.txtSearchString.TabIndex = 23; 67 72 // 68 73 // lblSearch 69 74 // 70 75 this.lblSearch.AutoSize = true; 71 this.lblSearch.Location = new System.Drawing.Point( 32, 30);76 this.lblSearch.Location = new System.Drawing.Point(41, 26); 72 77 this.lblSearch.Name = "lblSearch"; 73 this.lblSearch.Size = new System.Drawing.Size(5 9, 13);74 this.lblSearch.TabIndex = 2 ;75 this.lblSearch.Text = "Search for :";78 this.lblSearch.Size = new System.Drawing.Size(56, 13); 79 this.lblSearch.TabIndex = 22; 80 this.lblSearch.Text = "Search for"; 76 81 // 77 82 // btnFindAll 78 83 // 79 this.btnFindAll.Location = new System.Drawing.Point( 360, 96);84 this.btnFindAll.Location = new System.Drawing.Point(458, 20); 80 85 this.btnFindAll.Name = "btnFindAll"; 81 this.btnFindAll.Size = new System.Drawing.Size( 75, 23);82 this.btnFindAll.TabIndex = 1;86 this.btnFindAll.Size = new System.Drawing.Size(80, 23); 87 this.btnFindAll.TabIndex = 21; 83 88 this.btnFindAll.Text = "Find All"; 84 89 this.btnFindAll.UseVisualStyleBackColor = true; … … 86 91 // btnFindNext 87 92 // 88 this.btnFindNext.Location = new System.Drawing.Point(3 60, 67);93 this.btnFindNext.Location = new System.Drawing.Point(372, 20); 89 94 this.btnFindNext.Name = "btnFindNext"; 90 this.btnFindNext.Size = new System.Drawing.Size( 75, 23);91 this.btnFindNext.TabIndex = 0;95 this.btnFindNext.Size = new System.Drawing.Size(80, 23); 96 this.btnFindNext.TabIndex = 20; 92 97 this.btnFindNext.Text = "Find Next"; 93 98 this.btnFindNext.UseVisualStyleBackColor = true; … … 95 100 // tabReplace 96 101 // 102 this.tabReplace.Controls.Add(this.txtSearchString); 103 this.tabReplace.Controls.Add(this.lblSearch); 104 this.tabReplace.Controls.Add(this.btnFindAll); 105 this.tabReplace.Controls.Add(this.btnFindNext); 106 this.tabReplace.Controls.Add(this.lblValue); 107 this.tabReplace.Controls.Add(this.btnReplaceAll); 108 this.tabReplace.Controls.Add(this.btnReplaceNext); 109 this.tabReplace.Controls.Add(this.cmbReplaceWith); 110 this.tabReplace.Controls.Add(this.txtValue); 111 this.tabReplace.Controls.Add(this.label1); 97 112 this.tabReplace.Location = new System.Drawing.Point(4, 22); 98 113 this.tabReplace.Name = "tabReplace"; 99 114 this.tabReplace.Padding = new System.Windows.Forms.Padding(3); 100 this.tabReplace.Size = new System.Drawing.Size(5 03, 148);115 this.tabReplace.Size = new System.Drawing.Size(556, 109); 101 116 this.tabReplace.TabIndex = 1; 102 117 this.tabReplace.Text = "Replace"; 103 118 this.tabReplace.UseVisualStyleBackColor = true; 104 119 // 120 // lblValue 121 // 122 this.lblValue.AutoSize = true; 123 this.lblValue.Location = new System.Drawing.Point(64, 76); 124 this.lblValue.Name = "lblValue"; 125 this.lblValue.Size = new System.Drawing.Size(34, 13); 126 this.lblValue.TabIndex = 19; 127 this.lblValue.Text = "Value"; 128 // 129 // btnReplaceAll 130 // 131 this.btnReplaceAll.Location = new System.Drawing.Point(458, 47); 132 this.btnReplaceAll.Name = "btnReplaceAll"; 133 this.btnReplaceAll.Size = new System.Drawing.Size(80, 23); 134 this.btnReplaceAll.TabIndex = 18; 135 this.btnReplaceAll.Text = "Replace All"; 136 this.btnReplaceAll.UseVisualStyleBackColor = true; 137 // 138 // btnReplaceNext 139 // 140 this.btnReplaceNext.Location = new System.Drawing.Point(372, 47); 141 this.btnReplaceNext.Name = "btnReplaceNext"; 142 this.btnReplaceNext.Size = new System.Drawing.Size(80, 23); 143 this.btnReplaceNext.TabIndex = 17; 144 this.btnReplaceNext.Text = "Replace Next"; 145 this.btnReplaceNext.UseVisualStyleBackColor = true; 146 // 147 // cmbReplaceWith 148 // 149 this.cmbReplaceWith.FormattingEnabled = true; 150 this.cmbReplaceWith.Location = new System.Drawing.Point(103, 46); 151 this.cmbReplaceWith.Name = "cmbReplaceWith"; 152 this.cmbReplaceWith.Size = new System.Drawing.Size(254, 21); 153 this.cmbReplaceWith.TabIndex = 16; 154 // 155 // txtValue 156 // 157 this.txtValue.Location = new System.Drawing.Point(103, 73); 158 this.txtValue.Name = "txtValue"; 159 this.txtValue.Size = new System.Drawing.Size(254, 20); 160 this.txtValue.TabIndex = 15; 161 // 162 // label1 163 // 164 this.label1.AutoSize = true; 165 this.label1.Location = new System.Drawing.Point(28, 49); 166 this.label1.Name = "label1"; 167 this.label1.Size = new System.Drawing.Size(69, 13); 168 this.label1.TabIndex = 14; 169 this.label1.Text = "Replace with"; 170 // 105 171 // FindAndReplaceDialog 106 172 // 107 173 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 108 174 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 109 this.ClientSize = new System.Drawing.Size(5 32, 197);175 this.ClientSize = new System.Drawing.Size(588, 159); 110 176 this.Controls.Add(this.tabSearchReplace); 111 177 this.Name = "FindAndReplaceDialog"; 112 this.Text = "Find AndReplaceDialog";178 this.Text = "Find and Replace"; 113 179 this.tabSearchReplace.ResumeLayout(false); 114 this.tab Search.ResumeLayout(false);115 this.tab Search.PerformLayout();180 this.tabReplace.ResumeLayout(false); 181 this.tabReplace.PerformLayout(); 116 182 this.ResumeLayout(false); 117 183 … … 123 189 private System.Windows.Forms.TabPage tabSearch; 124 190 private System.Windows.Forms.TabPage tabReplace; 191 private System.Windows.Forms.TextBox txtSearchString; 192 private System.Windows.Forms.Label lblSearch; 125 193 private System.Windows.Forms.Button btnFindAll; 126 194 private System.Windows.Forms.Button btnFindNext; 127 private System.Windows.Forms.TextBox txtSearchString; 128 private System.Windows.Forms.Label lblSearch; 195 private System.Windows.Forms.Label lblValue; 196 private System.Windows.Forms.Button btnReplaceAll; 197 private System.Windows.Forms.Button btnReplaceNext; 198 private System.Windows.Forms.ComboBox cmbReplaceWith; 199 private System.Windows.Forms.TextBox txtValue; 200 private System.Windows.Forms.Label label1; 129 201 } 130 202 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FindAndReplaceDialog.cs
r10633 r10636 1 using System.Windows.Forms; 1 using System; 2 using System.Windows.Forms; 2 3 3 4 namespace HeuristicLab.DataPreprocessing.Views { … … 5 6 public FindAndReplaceDialog() { 6 7 InitializeComponent(); 8 string[] cmbItems = { "Value", "Average", "Median", "Random", "Most Common", "Interpolation" }; 9 cmbReplaceWith.Items.AddRange(cmbItems); 7 10 } 8 11 9 12 public void ActivateSearch() { 10 13 tabSearch.Focus(); 14 AddControlsToCurrentTab(); 11 15 } 12 16 13 17 public void ActivateReplace() { 14 18 tabReplace.Focus(); 19 AddControlsToCurrentTab(); 15 20 } 16 21 17 private void tabControl1_SelectedIndexChanged(object sender, System.EventArgs e) { 18 if (sender is TabControl) { 19 TabControl tc = (TabControl)sender; 20 tc.SelectedTab.Controls.Add(btnFindAll); 21 tc.SelectedTab.Controls.Add(btnFindNext); 22 tc.SelectedTab.Controls.Add(lblSearch); 23 tc.SelectedTab.Controls.Add(txtSearchString); 24 } 22 private void tabSearchReplace_SelectedIndexChanged(object sender, System.EventArgs e) { 23 AddControlsToCurrentTab(); 25 24 } 26 25 26 private void AddControlsToCurrentTab() { 27 tabSearchReplace.SelectedTab.Controls.Add(btnFindAll); 28 tabSearchReplace.SelectedTab.Controls.Add(btnFindNext); 29 tabSearchReplace.SelectedTab.Controls.Add(lblSearch); 30 tabSearchReplace.SelectedTab.Controls.Add(txtSearchString); 31 } 32 33 public string GetSearchText() { 34 return txtSearchString.Text; 35 } 36 37 public string GetReplaceText() { 38 return txtValue.Text; 39 } 40 41 public string GetReplaceAction() { 42 return cmbReplaceWith.SelectedText; 43 } 44 45 public event EventHandler FindAllEvent { 46 add { btnFindAll.Click += value; } 47 remove { btnFindAll.Click -= value; } 48 } 49 50 public event EventHandler FindNextEvent { 51 add { btnFindNext.Click += value; } 52 remove { btnFindNext.Click -= value; } 53 } 54 55 public event EventHandler ReplaceAllEvent { 56 add { btnReplaceAll.Click += value; } 57 remove { btnReplaceAll.Click -= value; } 58 } 59 60 public event EventHandler ReplaceNextEvent { 61 add { btnReplaceNext.Click += value; } 62 remove { btnReplaceNext.Click -= value; } 63 } 64 27 65 } 28 66 }
Note: See TracChangeset
for help on using the changeset viewer.