Example #1
0
        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.");
                }
            }
        }
Example #2
0
        private void btnAdd_Click(Object sender, EventArgs e)
        {
            using (GBGNodeAddModifyRecord modForm = new GBGNodeAddModifyRecord())
            {
                modForm.ShowDialog(this);

                if (modForm.OkExit)
                {
                    elbRecords.RelativeAdd(modForm.GetRecord(), 1);
                    parent.WriteLogLine("New record accepted.");
                }

                else
                {
                    parent.WriteLogLine("Record creation cancelled.");
                }
            }
        }