/// <summary> /// 点击添加按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { NullityButtons(); if (treeView1.SelectedNode == null || !(GetTreeNodeLev(treeView1.SelectedNode) == 2 || GetTreeNodeLev(treeView1.SelectedNode) == 3)) { return; } //显示编辑窗口 FeederEditor f = new FeederEditor(formType.regionAdd, null); if (f.ShowDialog() == DialogResult.OK) { AddKX(GetSeleteBDZ()); } }
/// <summary> /// 点击编辑按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button2_Click(object sender, EventArgs e) { NullityButtons(); if (treeView1.SelectedNode == null || GetTreeNodeLev(treeView1.SelectedNode) != 3) { return; } //获取支线的FID与Name String name; name = treeView1.SelectedNode.Text; //显示编辑窗口 FeederEditor f = new FeederEditor(formType.regionEdit, name); if (f.ShowDialog() == DialogResult.OK) { AddKX(GetSeleteBDZ()); } //Application.ShowModalDialog(f); }