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 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.");
                }
            }
        }
Example #3
0
 public GBGNodeSettings(GBGNodeCreateModify parent, InternalNodeSettings nodeSettings)
 {
     InitializeComponent();
     this.parent = parent;
     this.nodeSettings = nodeSettings;
 }
Example #4
0
 public GBGTimeSettings(GBGNodeCreateModify parent, InternalTimeSettings timeSettings)
 {
     InitializeComponent();
     this.parent       = parent;
     this.timeSettings = timeSettings;
 }
Example #5
0
        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.");
            }
        }
Example #6
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 #7
0
 public GBGNodeSettings(GBGNodeCreateModify parent, InternalNodeSettings nodeSettings)
 {
     InitializeComponent();
     this.parent       = parent;
     this.nodeSettings = nodeSettings;
 }
Example #8
0
 public GBGTimeSettings(GBGNodeCreateModify parent, InternalTimeSettings timeSettings)
 {
     InitializeComponent();
     this.parent = parent;
     this.timeSettings = timeSettings;
 }