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