예제 #1
0
 private void PrepareFaxHierarchy()
 {
     RootTreeNode rootNode = new RootTreeNode();
     rootNode.ControlInformation = _controlInformation;
     rootNode.Tag = _controlInformation;
     this.trvHierarchy.Nodes.Add(rootNode);
     this.trvHierarchy.SelectedNode = rootNode;
 }
예제 #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();
        }
예제 #3
0
        public override void InvokeDelete()
        {
            RootTreeNode parent = (RootTreeNode)this.Parent;

            parent.ControlInformation.Sections.Remove(this.Definition);
        }