Exemplo n.º 1
0
        private void AddNewTaskOperation()
        {
            AddModifyTask AddNewTask = new AddModifyTask(this.Location);
            AddNewTask.ShowDialog();
            if (AddNewTask.newTask != null)
            {
                NewTask = AddNewTask.newTask;
                P = AddNewTask.p;

                SetPriority(NewTask,P);

                if (ParentNode == null)
                {
                    NewTask.Tag = 0;
                    tasksTreeView.Nodes.Add(NewTask);
                    ParentNode = NewTask;
                }
                else
                {
                    NewTask.Tag = Convert.ToInt32(ParentNode.Tag) + 1;
                    ParentNode.Nodes.Add(NewTask);
                }
            }
        }
Exemplo n.º 2
0
        private void ModifyOperation(TreeNode treeNode)
        {
            AddModifyTask amt = new AddModifyTask(this.Location);
            amt.newTask = treeNode;
            amt.p = GetPriority(treeNode);

            amt.ShowDialog();
            treeNode.Text = amt.newTask.Text;
            NewTask = amt.newTask;
            P = amt.p;

            SetPriority(treeNode,P);
        }