Пример #1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            NewActionDialog dialog = new NewActionDialog();



            if (dialog.ShowDialog(ActionContext, Variables) == DialogResult.OK)
            {
                BaseAction action = dialog.SelectedAction;
                actions.Add(action);

                ResetActionList();
            }
        }
Пример #2
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if ((treeView1.SelectedNode.Tag as string) == "Root")
            {

                return;
            }
            if (!actions.Actions.ContainsKey(treeView1.SelectedNode.Text)) return;
            ActionCollection bin = actions.Actions[treeView1.SelectedNode.Text];

            NewActionDialog dialog = new NewActionDialog();
            if(dialog.ShowDialog(treeView1.SelectedNode.Text, actions) == DialogResult.OK)
            {
                bin.Add(dialog.SelectedAction);
                treeView1.SelectedNode.Nodes.Add(new TreeNode()
                    {
                        Text = dialog.SelectedAction.ClassName,
                        Name = dialog.SelectedAction.ClassName,
                        Tag = dialog.SelectedAction,
                    });
                treeView1.SelectedNode.Expand();
            }
        }