private void btnCreateNode_Click(Object sender, EventArgs e) { // TODO: Generalize this for the creation of many types of // nodes, not just ClickNodes GenericNode newNode = new ClickNode(null); using (GBGNodeCreateModify creatorForm = new GBGNodeCreateModify(this, newNode, true)) { creatorForm.ShowDialog(this); if (creatorForm.OkExit) { if (elbNodes.RelativeAdd(newNode, 1)) { WriteLogLine("Successfully added new node."); } else { WriteLogLine("New node was rejected?"); } } else { WriteLogLine("Node creation cancelled."); } } }
private void btnModifyNode_Click(Object sender, EventArgs e) { using (GBGNodeCreateModify modForm = new GBGNodeCreateModify(this, (GenericNode)lbNodes.SelectedItem, false)) { modForm.ShowDialog(this); if (modForm.OkExit) { if (elbNodes.SelectedReplace(modForm.InternalNode)) { WriteLogLine("Node modification accepted."); } else { WriteLogLine("Node modification rejected?"); } } else { WriteLogLine("Node modification cancelled."); } } }
private void btnModifyNode_Click(Object sender, EventArgs e) { using(GBGNodeCreateModify modForm = new GBGNodeCreateModify(this, (GenericNode) lbNodes.SelectedItem, false)) { modForm.ShowDialog(this); if(modForm.OkExit) { if(elbNodes.SelectedReplace(modForm.InternalNode)) WriteLogLine("Node modification accepted."); else WriteLogLine("Node modification rejected?"); } else WriteLogLine("Node modification cancelled."); } }
private void btnCreateNode_Click(Object sender, EventArgs e) { // TODO: Generalize this for the creation of many types of // nodes, not just ClickNodes GenericNode newNode = new ClickNode(null); using(GBGNodeCreateModify creatorForm = new GBGNodeCreateModify(this, newNode, true)) { creatorForm.ShowDialog(this); if(creatorForm.OkExit) { if(elbNodes.RelativeAdd(newNode, 1)) WriteLogLine("Successfully added new node."); else WriteLogLine("New node was rejected?"); } else WriteLogLine("Node creation cancelled."); } }