Changeset 10706 for branches/DataPreprocessing
- Timestamp:
- 04/02/14 14:07:32 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
r10705 r10706 37 37 private IFindPreprocessingItemsIterator searchIterator; 38 38 private string currentSearchText; 39 private Tuple<int, int> currentCell; 39 40 40 41 public new IDataGridContent Content { … … 69 70 _highlightedCells = new Dictionary<int, IList<int>>(); 70 71 _highlightedRowIndices = new List<int>(); 72 currentCell = null; 71 73 } 72 74 … … 160 162 if (searchIterator != null && searchIterator.GetCurrent() != null) 161 163 { 162 Replace(TransformToDictionary( searchIterator.GetCurrent()));164 Replace(TransformToDictionary(currentCell)); 163 165 } 164 166 } … … 166 168 void findAndReplaceDialog_ReplaceAllEvent(object sender, EventArgs e) { 167 169 Replace(FindAll(findAndReplaceDialog.GetSearchText())); 168 findAndReplaceDialog.SetEndReached(false);169 170 } 170 171 … … 173 174 searchIterator = new FindPreprocessingItemsIterator(FindAll(findAndReplaceDialog.GetSearchText())); 174 175 currentSearchText = findAndReplaceDialog.GetSearchText(); 175 findAndReplaceDialog.SetEndReached(false);176 176 } 177 177 178 Tuple<int, int> currentCell = null;179 178 bool moreOccurences = false; 180 179 do { … … 183 182 } while (moreOccurences && (currentCell == null || !Content.GetValue(currentCell.Item2, currentCell.Item1).Equals(currentSearchText))); 184 183 185 if (!moreOccurences) {186 findAndReplaceDialog.SetEndReached(true);187 }188 189 184 if (currentCell != null) { 190 185 HightlightedCells = TransformToDictionary(currentCell); … … 192 187 ResetHighlightedCells(); 193 188 } 189 190 if (!moreOccurences) { 191 searchIterator.Reset(); 192 ResetHighlightedCells(); 193 } 194 194 } 195 195 196 196 void findAndReplaceDialog_FindAllEvent(object sender, EventArgs e) { 197 197 HightlightedCells = FindAll(findAndReplaceDialog.GetSearchText()); 198 findAndReplaceDialog.SetEndReached(false);199 198 } 200 199 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FindAndReplaceDialog.Designer.cs
r10705 r10706 37 37 this.txtValue = new System.Windows.Forms.TextBox(); 38 38 this.label1 = new System.Windows.Forms.Label(); 39 this.lblEndReached = new System.Windows.Forms.Label();40 39 this.tabSearchReplace.SuspendLayout(); 41 40 this.tabReplace.SuspendLayout(); … … 52 51 this.tabSearchReplace.Name = "tabSearchReplace"; 53 52 this.tabSearchReplace.SelectedIndex = 0; 54 this.tabSearchReplace.Size = new System.Drawing.Size(564, 1 43);53 this.tabSearchReplace.Size = new System.Drawing.Size(564, 132); 55 54 this.tabSearchReplace.TabIndex = 0; 56 55 this.tabSearchReplace.SelectedIndexChanged += new System.EventHandler(this.tabSearchReplace_SelectedIndexChanged); … … 61 60 this.tabSearch.Name = "tabSearch"; 62 61 this.tabSearch.Padding = new System.Windows.Forms.Padding(3); 63 this.tabSearch.Size = new System.Drawing.Size(556, 1 09);62 this.tabSearch.Size = new System.Drawing.Size(556, 117); 64 63 this.tabSearch.TabIndex = 0; 65 64 this.tabSearch.Text = "Search"; … … 68 67 // tabReplace 69 68 // 70 this.tabReplace.Controls.Add(this.lblEndReached);71 69 this.tabReplace.Controls.Add(this.txtSearchString); 72 70 this.tabReplace.Controls.Add(this.lblSearch); … … 82 80 this.tabReplace.Name = "tabReplace"; 83 81 this.tabReplace.Padding = new System.Windows.Forms.Padding(3); 84 this.tabReplace.Size = new System.Drawing.Size(556, 1 17);82 this.tabReplace.Size = new System.Drawing.Size(556, 106); 85 83 this.tabReplace.TabIndex = 1; 86 84 this.tabReplace.Text = "Replace"; … … 174 172 this.label1.Text = "Replace with"; 175 173 // 176 // lblEndReached177 //178 this.lblEndReached.AutoSize = true;179 this.lblEndReached.Location = new System.Drawing.Point(218, 100);180 this.lblEndReached.Name = "lblEndReached";181 this.lblEndReached.Size = new System.Drawing.Size(139, 13);182 this.lblEndReached.TabIndex = 24;183 this.lblEndReached.Text = "No more occurences found.";184 //185 174 // FindAndReplaceDialog 186 175 // 187 176 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 188 177 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 189 this.ClientSize = new System.Drawing.Size(588, 1 67);178 this.ClientSize = new System.Drawing.Size(588, 156); 190 179 this.Controls.Add(this.tabSearchReplace); 191 180 this.Name = "FindAndReplaceDialog"; … … 213 202 private System.Windows.Forms.TextBox txtValue; 214 203 private System.Windows.Forms.Label label1; 215 private System.Windows.Forms.Label lblEndReached;216 204 } 217 205 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FindAndReplaceDialog.cs
r10705 r10706 20 20 cmbReplaceWith.Items.AddRange(cmbItemsText); 21 21 cmbReplaceWith.SelectedIndex = (int)ReplaceAction.Value; 22 SetEndReached(false);23 22 } 24 23 … … 31 30 tabReplace.Focus(); 32 31 AddControlsToCurrentTab(); 33 }34 35 public void SetEndReached(bool endReached) {36 lblEndReached.Visible = endReached;37 32 } 38 33 … … 50 45 tabSearchReplace.SelectedTab.Controls.Add(lblSearch); 51 46 tabSearchReplace.SelectedTab.Controls.Add(txtSearchString); 52 tabSearchReplace.SelectedTab.Controls.Add(lblEndReached);53 47 } 54 48
Note: See TracChangeset
for help on using the changeset viewer.