private void buttonSearch_Click(object sender, EventArgs e) { String table = this.comboBoxPropertyGroup.Text.Replace(" ", ""); table = table.Replace("(", ""); table = table.Replace(")", ""); PropertyNamesSearchDialog dlg = new PropertyNamesSearchDialog(table); dlg.Location = new Point((this.Size.Width) / 2 - (dlg.Size.Width) / 2, this.Location.Y); if (dlg.ShowDialog() == DialogResult.OK) { Cursor.Current = Cursors.WaitCursor; PropertyNames tmp = dlg.PropertyName; this.comboBoxDisplayText.Items.Clear(); if (tmp != null) { this.comboBoxDisplayText.Text = tmp.DisplayText; } pn = tmp; this.treeViewPropertyHierarchy.Nodes.Clear(); this.treeViewPropertyHierarchy.Nodes.Add(buildBottomUp(pn)); this.treeViewPropertyHierarchy.ExpandAll(); } Cursor.Current = Cursors.Default; SetOKButton(); }
private void buttonSearch_Click(object sender, EventArgs e) { String table = this.comboBoxPropertyGroup.Text.Replace(" ", ""); table = table.Replace("(", ""); table = table.Replace(")", ""); PropertyNamesSearchDialog dlg = new PropertyNamesSearchDialog(table); dlg.Location = new Point((this.Size.Width) / 2 - (dlg.Size.Width) / 2, this.Location.Y); if (dlg.ShowDialog() == DialogResult.OK) { Cursor.Current = Cursors.WaitCursor; PropertyNames tmp = dlg.PropertyName; this.comboBoxDisplayText.Items.Clear(); if(tmp != null) this.comboBoxDisplayText.Text = tmp.DisplayText; pn = tmp; this.treeViewPropertyHierarchy.Nodes.Clear(); this.treeViewPropertyHierarchy.Nodes.Add(buildBottomUp(pn)); this.treeViewPropertyHierarchy.ExpandAll(); } Cursor.Current = Cursors.Default; SetOKButton(); }