Changeset 12398 for trunk/sources
- Timestamp:
- 05/26/15 13:36:26 (10 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.Designer.cs
r12397 r12398 42 42 this.searchLabel = new System.Windows.Forms.Label(); 43 43 this.searchTextBox = new System.Windows.Forms.TextBox(); 44 this.clearSearchButton = new System.Windows.Forms.Button(); 44 45 this.typeParametersGroupBox = new System.Windows.Forms.GroupBox(); 45 46 this.setTypeParameterButton = new System.Windows.Forms.Button(); … … 146 147 this.searchTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 147 148 | System.Windows.Forms.AnchorStyles.Right))); 149 this.searchTextBox.Controls.Add(this.clearSearchButton); 148 150 this.searchTextBox.Location = new System.Drawing.Point(29, 3); 149 151 this.searchTextBox.Name = "searchTextBox"; 150 152 this.searchTextBox.Size = new System.Drawing.Size(193, 20); 151 153 this.searchTextBox.TabIndex = 1; 152 this.toolTip.SetToolTip(this.searchTextBox, "Enter string to search for types"); 154 this.toolTip.SetToolTip(this.searchTextBox, "Filters the available Types.\r\nThe search term is tokenized by space and a name ha" + 155 "s to contain all tokens to be displayed.\r\n(E.g. \"Sym Reg\" matches \"SymbolicRegr" + 156 "ession\")"); 153 157 this.searchTextBox.TextChanged += new System.EventHandler(this.searchTextBox_TextChanged); 154 158 this.searchTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.searchTextBox_KeyDown); 159 // 160 // clearSearchButton 161 // 162 this.clearSearchButton.BackColor = System.Drawing.Color.Transparent; 163 this.clearSearchButton.Cursor = System.Windows.Forms.Cursors.Default; 164 this.clearSearchButton.Dock = System.Windows.Forms.DockStyle.Right; 165 this.clearSearchButton.FlatAppearance.BorderSize = 0; 166 this.clearSearchButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 167 this.clearSearchButton.ForeColor = System.Drawing.Color.Transparent; 168 this.clearSearchButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Delete; 169 this.clearSearchButton.Location = new System.Drawing.Point(543, 0); 170 this.clearSearchButton.Margin = new System.Windows.Forms.Padding(0); 171 this.clearSearchButton.Name = "clearSearchButton"; 172 this.clearSearchButton.Size = new System.Drawing.Size(15, 16); 173 this.clearSearchButton.TabIndex = 0; 174 this.clearSearchButton.TabStop = false; 175 this.clearSearchButton.UseVisualStyleBackColor = false; 176 this.clearSearchButton.Click += new System.EventHandler(this.clearSearchButton_Click); 155 177 // 156 178 // typeParametersGroupBox … … 245 267 protected System.Windows.Forms.Label searchLabel; 246 268 protected System.Windows.Forms.TextBox searchTextBox; 269 protected System.Windows.Forms.Button clearSearchButton; 247 270 protected System.Windows.Forms.ToolTip toolTip; 248 271 protected System.Windows.Forms.SplitContainer typeParametersSplitContainer; -
trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs
r12397 r12398 177 177 else { 178 178 searchString = searchString.ToLower(); 179 TreeNode selectedNode = typesTreeView.SelectedNode; 179 180 180 181 if (!searchString.Contains(currentSearchString)) { 181 182 typesTreeView.BeginUpdate(); 182 183 // expand search -> restore all tree nodes 183 TreeNode selectedNode = typesTreeView.SelectedNode;184 184 typesTreeView.Nodes.Clear(); 185 185 foreach (TreeNode node in treeNodes) 186 186 typesTreeView.Nodes.Add((TreeNode)node.Clone()); 187 RestoreSelectedNode(selectedNode);188 187 typesTreeView.EndUpdate(); 189 188 } 190 191 189 192 190 // remove nodes 193 191 typesTreeView.BeginUpdate(); 194 192 var searchTokens = searchString.Split(' '); 195 196 193 int i = 0; 197 194 while (i < typesTreeView.Nodes.Count) { … … 221 218 } 222 219 typesTreeView.EndUpdate(); 220 221 RestoreSelectedNode(selectedNode); 223 222 UpdateDescription(); 224 223 } … … 394 393 } 395 394 } 395 private void clearSearchButton_Click(object sender, EventArgs e) { 396 searchTextBox.Text = string.Empty; 397 searchTextBox.Focus(); 398 } 396 399 #endregion 397 400 -
trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
r12397 r12398 174 174 } else { 175 175 searchString = searchString.ToLower(); 176 var selectedNode = typesTreeView.SelectedNode; 176 177 177 178 if (!searchString.Contains(currentSearchString)) { 178 179 typesTreeView.BeginUpdate(); 179 180 // expand search -> restore all tree nodes 180 var selectedNode = typesTreeView.SelectedNode;181 181 typesTreeView.Nodes.Clear(); 182 182 foreach (TreeNode node in treeNodes) 183 183 typesTreeView.Nodes.Add((TreeNode)node.Clone()); 184 RestoreSelectedNode(selectedNode);185 184 typesTreeView.EndUpdate(); 186 185 } … … 189 188 typesTreeView.BeginUpdate(); 190 189 var searchTokens = searchString.Split(' '); 191 192 190 int i = 0; 193 191 while (i < typesTreeView.Nodes.Count) { … … 217 215 } 218 216 typesTreeView.EndUpdate(); 217 218 RestoreSelectedNode(selectedNode); 219 219 UpdateDescription(); 220 220 }
Note: See TracChangeset
for help on using the changeset viewer.