Example #1
0
 private void addNodes(IEnumerable <ITreeNode> nodes, bool clear)
 {
     _treeView.DoWithinBatchUpdate(() => {
         if (clear)
         {
             _treeView.Clear();
         }
         nodes.Each(_treeView.AddNode);
     });
 }
Example #2
0
 public void BindTo(IEnumerable <IObjectBaseDTO> dtos)
 {
     _treeView.Clear();
     foreach (var dto in dtos)
     {
         if (dto.IsAnImplementationOf <SpatialStructureDTO>())
         {
             _treeView.AddNode(getSpatialStructureNode((SpatialStructureDTO)dto));
         }
         else
         {
             if (dto.IsAnImplementationOf <BuildingBlockDTO>())
             {
                 _treeView.AddNode(getBuildingBlockNode((BuildingBlockDTO)dto));
             }
             else
             {
                 _treeView.AddNode(_spatialStructureNodeMapper.MapFrom(dto));
             }
         }
     }
     SetOkButtonEnable();
 }
Example #3
0
 public void Clear()
 {
     _treeView.Clear();
 }