Esempio n. 1
0
        void TsbTaskAddClick(object sender, EventArgs e)
        {
            if (tree.SelectedNode == null || tree.SelectedNode.Tag == null)
            {
                return;
            }

            Task pt = tree.SelectedNode.Tag as Task;
            Task nt = new Task();

            nt.Level = pt.Level + 1;

            Aga.Controls.Tree.TreeNodeAdv project = tree.SelectedNode;
            while ((project.Tag as Task).Level != 0)
            {
                project = project.Parent;
            }

            if (dlgEditTask.ShowEditDialog(nt, project.Tag as Task) != DialogResult.OK)
            {
                return;
            }
            ;
            pt.Tasks.Add(nt);

            RefreshTree();

            tree.SelectedNode = tree.FindNodeByTag(nt);
            Saved             = false;
        }
Esempio n. 2
0
        void TsbTaskAddClick(object sender, EventArgs e)
        {
            if (tree.SelectedNode == null || tree.SelectedNode.Tag == null)
            {
                return;
            }

            Task pt = tree.SelectedNode.Tag as Task;
            Task nt = new Task();

            if (dlgEditTask.ShowEditDialog(nt) != DialogResult.OK)
            {
                return;
            }
            ;
            nt.Level = pt.Level + 1;
            pt.Tasks.Add(nt);
            RefreshTree();

            tree.SelectedNode = tree.FindNodeByTag(nt);
            Saved             = false;
        }