Example #1
0
        public override FaxHierarchyTreeNode InvokeAdd()
        {
            SectionTreeNode sectionNode = new SectionTreeNode();

            this.Nodes.Add(sectionNode);
            this.ExpandAll();

            // Add to control information
            if (ControlInformation != null)
            {
                ControlInformation.Sections.Add(sectionNode.Definition);
            }

            return(sectionNode);
        }
Example #2
0
        /// <summary>
        /// Updates the form by reading the current control information.
        /// </summary>
        private void UpdateFromControlInformation()
        {
            this.trvHierarchy.Nodes.Clear();
            // Create root node
            RootTreeNode root = new RootTreeNode();
            root.ControlInformation = _controlInformation;
            root.Tag = _controlInformation;
            root.Text = _controlInformation.FaxName;

            // Create sections
            foreach (SectionDefinition sd in _controlInformation.Sections)
            {
                SectionTreeNode section = new SectionTreeNode();
                section.Tag = sd;
                section.Definition = sd;

                foreach (AreaDefinition ad in sd.Areas)
                {
                    AreaTreeNode area = new AreaTreeNode();
                    area.Tag = ad;
                    area.Definition = ad;

                    section.Nodes.Add(area);
                }

                root.Nodes.Add(section);
            }

            this.trvHierarchy.Nodes.Add(root);
            this.trvHierarchy.SelectedNode = root;
            this.trvHierarchy.ExpandAll();
        }
Example #3
0
        public override void InvokeDelete()
        {
            SectionTreeNode parent = (SectionTreeNode)this.Parent;

            parent.Definition.Areas.Remove(this.Definition);
        }
        public override FaxHierarchyTreeNode InvokeAdd()
        {
            SectionTreeNode sectionNode = new SectionTreeNode();
            this.Nodes.Add(sectionNode);
            this.ExpandAll();

            // Add to control information
            if (ControlInformation != null)
            {
                ControlInformation.Sections.Add(sectionNode.Definition);
            }

            return sectionNode;
        }