private void tsEditGK_Click(object sender, EventArgs e) { AFATreeNode selNode = (AFATreeNode)this.treeView1.SelectedNode; if (selNode != null) { GKDlg dlg = new GKDlg(true, selNode); //dlg.SetData(ref selNode); if (dlg.ShowDialog(this) == DialogResult.OK) { refreshChart(selNode); } } }
private void tsAddGK_Click(object sender, EventArgs e) { AFATreeNode selNode = (AFATreeNode)this.treeView1.SelectedNode; if (selNode != null) { GKDlg dlg; if (selNode.Nodes.Count == 0) { dlg = new GKDlg(false); } else { dlg = new GKDlg(false, (AFATreeNode)selNode.Nodes[selNode.Nodes.Count - 1]); } if (dlg.ShowDialog() == DialogResult.OK) { AFATreeNode node = null; node = new AFATreeNode(dlg.m_Data.Name, TreeNodeType.nodeGKCase); node.Name = dlg.m_Data.Name; node.Tag = dlg.m_Data; selNode.Nodes.Add(node); //GKNode.Nodes } } selNode.Expand(); }