Changeset 12202 for branches/NewItemDialog/HeuristicLab.Optimizer
- Timestamp:
- 03/16/15 12:03:52 (10 years ago)
- Location:
- branches/NewItemDialog/HeuristicLab.Optimizer/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NewItemDialog/HeuristicLab.Optimizer/3.3/NewItemDialog.Designer.cs
r12201 r12202 127 127 this.expandAllButton.Name = "expandAllButton"; 128 128 this.expandAllButton.Size = new System.Drawing.Size(23, 23); 129 this.expandAllButton.TabIndex = 4;129 this.expandAllButton.TabIndex = 1; 130 130 this.expandAllButton.UseVisualStyleBackColor = true; 131 131 this.expandAllButton.Click += new System.EventHandler(this.expandAllButton_Click); … … 137 137 this.collapseAllButton.Name = "collapseAllButton"; 138 138 this.collapseAllButton.Size = new System.Drawing.Size(23, 23); 139 this.collapseAllButton.TabIndex = 5;139 this.collapseAllButton.TabIndex = 2; 140 140 this.collapseAllButton.UseVisualStyleBackColor = true; 141 141 this.collapseAllButton.Click += new System.EventHandler(this.collapseAllButton_Click); … … 148 148 this.searchTextBox.Name = "searchTextBox"; 149 149 this.searchTextBox.Size = new System.Drawing.Size(514, 20); 150 this.searchTextBox.TabIndex = 1;150 this.searchTextBox.TabIndex = 3; 151 151 this.searchTextBox.TextChanged += new System.EventHandler(this.searchTextBox_TextChanged); 152 152 // … … 164 164 this.typesTreeView.ShowNodeToolTips = true; 165 165 this.typesTreeView.Size = new System.Drawing.Size(594, 260); 166 this.typesTreeView.TabIndex = 2;166 this.typesTreeView.TabIndex = 4; 167 167 this.typesTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.itemsTreeView_AfterSelect); 168 168 this.typesTreeView.VisibleChanged += new System.EventHandler(this.itemsTreeView_VisibleChanged); -
branches/NewItemDialog/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
r12201 r12202 30 30 internal partial class NewItemDialog : Form { 31 31 private bool isInitialized; 32 private bool firstShown = true; 32 33 33 34 private List<TreeNode> treeNodes; … … 58 59 } 59 60 60 61 61 private void NewItemDialog_Load(object sender, EventArgs e) { 62 62 if (isInitialized) return; … … 111 111 isInitialized = true; 112 112 } 113 114 113 private void NewItemDialog_Shown(object sender, EventArgs e) { 115 114 SelectedType = null; 115 if (firstShown) { 116 searchTextBox.Focus(); 117 firstShown = false; 118 } 116 119 } 117 120 … … 230 233 } 231 234 private void SetTreeNodeVisibility() { 235 typesTreeView.ExpandAll(); 232 236 TreeNode selectedNode = typesTreeView.SelectedNode; 233 if (string.IsNullOrEmpty(currentSearchString) && (typesTreeView.Nodes.Count > 1)) { 234 typesTreeView.CollapseAll(); 235 if (selectedNode != null) typesTreeView.SelectedNode = selectedNode; 236 } else { 237 typesTreeView.ExpandAll(); 238 } 239 if (selectedNode != null) selectedNode.EnsureVisible(); 237 if (selectedNode != null) { 238 typesTreeView.SelectedNode = selectedNode; 239 selectedNode.EnsureVisible(); 240 } else if (string.IsNullOrEmpty(currentSearchString) && typesTreeView.Nodes.Count > 1) { 241 typesTreeView.Nodes[0].EnsureVisible(); 242 } 240 243 } 241 244 #endregion
Note: See TracChangeset
for help on using the changeset viewer.