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