Ejemplo n.º 1
0
        private void AddResourceGroup(object sender, EventArgs e)
        {
            AddResourceGroup addResourceGroup = new AddResourceGroup();

            if (DialogResult.OK == addResourceGroup.ShowDialog())
            {
                groupEntity = addResourceGroup.resourceGroupEntity;
                this.resourceTree.Nodes.Add(groupEntity.GroupName);
                this.resourceTree.Nodes[resourceTree.Nodes.Count - 1].Tag = groupEntity.GroupKey;
            }
        }
Ejemplo n.º 2
0
        private void UpdateResourceGroup(object sender, EventArgs e)
        {
            groupEntity          = new ResourceGroup();
            groupEntity.GroupKey = this.resourceTree.SelectedNode.Tag.ToString();
            AddResourceGroup resourceGroupDialog = new AddResourceGroup(groupEntity);

            if (DialogResult.OK == resourceGroupDialog.ShowDialog())
            {
                ResourceGroup resourceGroup = new ResourceGroup();
                resourceGroup = resourceGroupDialog.resourceGroupEntity;
                if (resourceTree.SelectedNode.Text != resourceGroup.GroupName)
                {
                    resourceTree.SelectedNode.Text = resourceGroup.GroupName;
                }
            }
        }