Esempio n. 1
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            Resources.Resource resource = (Resources.Resource)e.Node.Tag;
            DynResourceForm    form     = new DynResourceForm(resource);

            if (form.ShowDialog() == DialogResult.OK)
            {
                Controller.CurrentResources.SaveResources();
                SetupNode(e.Node);
                BuildTree(e.Node);
            }
        }
Esempio n. 2
0
        private void btnResourceAdd_Click(object sender, EventArgs e)
        {
            DynResourceForm resourceForm = new DynResourceForm();
            resourceForm.Family = ((Resources.Resource)treeView1.SelectedNode.Tag);
            if (resourceForm.ShowDialog() == DialogResult.OK) {
                Controller.CurrentResources.AddResource(
                    resourceForm.SelectedResourceParent, resourceForm.SelectedResource);

                // TODO: do this more economically, by adding only the new items
                BuildTree();
            }
        }
Esempio n. 3
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            Resources.Resource resource = (Resources.Resource)e.Node.Tag;
            DynResourceForm    form     = new DynResourceForm(resource);

            if (form.ShowDialog() == DialogResult.OK)
            {
                Controller.CurrentResources.SaveResources();

                // TODO: do this more economically, since only one resource has to be updated
                BuildTree();
            }
        }
Esempio n. 4
0
        private void btnResourceAdd_Click(object sender, EventArgs e)
        {
            DynResourceForm resourceForm = new DynResourceForm();

            resourceForm.Family = ((Resources.Resource)treeView1.SelectedNode.Tag);
            if (resourceForm.ShowDialog() == DialogResult.OK)
            {
                Controller.CurrentResources.AddResource(
                    resourceForm.SelectedResourceParent, resourceForm.SelectedResource);

                // TODO: do this more economically, by adding only the new items
                BuildTree();
            }
        }
Esempio n. 5
0
        private void btnResourceAdd_Click(object sender, EventArgs e)
        {
            DynResourceForm resourceForm = new DynResourceForm();

            resourceForm.SelectedResourceParent = ((Resources.Resource)treeView1.SelectedNode.Tag);
            if (resourceForm.ShowDialog() == DialogResult.OK)
            {
                Controller.CurrentResources.AddResource(
                    resourceForm.SelectedResourceParent, resourceForm.SelectedResource);

                /// only rebuild the tree from the parent onwards
                TreeNode childNode = CreateTreeNode(resourceForm.SelectedResource);
                BuildTree(childNode);
                AddNode(treeView1.SelectedNode, childNode);
                treeView1.SelectedNode.Expand();
                childNode.Expand();
            }
        }
Esempio n. 6
0
 private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     Resources.Resource resource = (Resources.Resource) e.Node.Tag;
     DynResourceForm form = new DynResourceForm(resource);
     if (form.ShowDialog() == DialogResult.OK)
     {
         Controller.CurrentResources.SaveResources();
         SetupNode(e.Node);
         BuildTree(e.Node);
     }
 }
Esempio n. 7
0
        private void btnResourceAdd_Click(object sender, EventArgs e)
        {
            DynResourceForm resourceForm = new DynResourceForm();
            resourceForm.SelectedResourceParent = ((Resources.Resource)treeView1.SelectedNode.Tag);
            if (resourceForm.ShowDialog() == DialogResult.OK) {
                Controller.CurrentResources.AddResource(
                    resourceForm.SelectedResourceParent, resourceForm.SelectedResource);

                /// only rebuild the tree from the parent onwards
                TreeNode childNode = CreateTreeNode(resourceForm.SelectedResource);
                BuildTree(childNode);
                AddNode(treeView1.SelectedNode, childNode);
                treeView1.SelectedNode.Expand();
                childNode.Expand();
            }
        }
Esempio n. 8
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            Resources.Resource resource = (Resources.Resource) e.Node.Tag;
            DynResourceForm form = new DynResourceForm(resource);
            if (form.ShowDialog() == DialogResult.OK)
            {
                Controller.CurrentResources.SaveResources();

                // TODO: do this more economically, since only one resource has to be updated
                BuildTree();
            }
        }