private void button3_Click(object sender, EventArgs e) { ConditionDefineEditor conditionDefineEditor = new ConditionDefineEditor(); conditionDefineEditor.ChangeSelectedTab(1); // 选中当前相关的行 DorpDownListItem dorpDownListItem = (DorpDownListItem)comboBox3.SelectedItem; conditionDefineEditor.ChangeSelectedRow(dorpDownListItem.Value); if (conditionDefineEditor.ShowDialog() == DialogResult.OK) // 这里刷新面板以出现新的内容 { // TODO: 考虑是否自动选中刚配置的项或者刷新后也回复刷新前的选择状态(下面的三行代码会强制保存, 不满足条件) //TreeNode SourceNode = (TreeNode)this.Tag; //Form1 form1 = (Form1)SourceNode.TreeView.FindForm(); //form1.SaveConditionPageData(); ConditionSelector_Load(sender, e); } conditionDefineEditor.Dispose(); }
private void conditionDefineToolStripMenuItem1_Click(object sender, EventArgs e) { conditionDefineEditor.ChangeSelectedTab(1); conditionDefineEditor.ShowDialog(); }