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