private void FillTree(DesignBinding initialSelectedItem)
 {
     this.selectedItem = initialSelectedItem;
     this.EmptyTree();
     this.noneNode = new NoneNode();
     this.otherNode = new OtherNode();
     this.projectNode = new ProjectNode(this);
     if (((this.hostSvc != null) && (this.hostSvc.RootComponent != null)) && (this.hostSvc.RootComponent.Site != null))
     {
         this.instancesNode = new InstancesNode(this.hostSvc.RootComponent.Site.Name);
     }
     else
     {
         this.instancesNode = new InstancesNode(string.Empty);
     }
     this.treeViewCtrl.Nodes.Add(this.noneNode);
     if (this.showDataSources)
     {
         this.AddFormDataSources();
         this.AddProjectDataSources();
         if (this.projectNode.Nodes.Count > 0)
         {
             this.otherNode.Nodes.Add(this.projectNode);
         }
         if (this.instancesNode.Nodes.Count > 0)
         {
             this.otherNode.Nodes.Add(this.instancesNode);
         }
         if (this.otherNode.Nodes.Count > 0)
         {
             this.treeViewCtrl.Nodes.Add(this.otherNode);
         }
     }
     else
     {
         this.AddDataSourceContents(this.treeViewCtrl.Nodes, this.rootDataSource, this.rootDataMember, null);
     }
     if (this.selectedNode == null)
     {
         this.selectedNode = this.noneNode;
     }
     this.selectedItem = null;
     base.Width = Math.Max(base.Width, this.treeViewCtrl.PreferredWidth + (SystemInformation.VerticalScrollBarWidth * 2));
 }
 private void EmptyTree()
 {
     this.noneNode = null;
     this.otherNode = null;
     this.projectNode = null;
     this.instancesNode = null;
     this.selectedNode = null;
     this.treeViewCtrl.Nodes.Clear();
 }