Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of a TreeView.
 /// </summary>
 public TreeView()
     : base()
 {
     _TreeNodeTypes = new TreeNodeTypeCollection(this);
     _Nodes = new TreeNodeCollection(this);
     _bFocused = false;
     _bCreated = false;
     _HoverStyle = new CssCollection();
     _DefaultStyle = new CssCollection();
     _SelectedStyle = new CssCollection();
     _scrollTop = _scrollLeft = -1;
     _parentTop = _parentLeft = -1;
     _eventList = new ArrayList();
 }
Exemplo n.º 2
0
 //
 // ReadTreeNodeTypeXmlSrc()
 //
 // Reads the XML file specified in TreeNodeTypeSrc and creates TreeNodeTypes accordingly.  The
 // file is assumed to be valid XML with a <TREENODETYPES> outer container and <TREENODETYPE>
 // inner containers.
 //
 internal void ReadTreeNodeTypeXmlSrc()
 {
     TreeView tv = ReadXmlSrc(TreeNodeTypeSrc, String.Empty, "TREENODETYPES");
     if (tv != null)
     {
         TreeNodeTypeCollection newTypes = new TreeNodeTypeCollection(this);
         ((IStateManager)newTypes).TrackViewState();
         newTypes.Clear();
         if (tv.TreeNodeTypes != null)
         {
             for (int i = 0; i < tv.TreeNodeTypes.Count; i++)
             {
                 newTypes.Add(tv.TreeNodeTypes[i]);
                 tv.TreeNodeTypes[i].SetViewStateDirty();
             }
         }
         _TreeNodeTypes = newTypes;
     }
 }