private void addNodes(IEnumerable <ITreeNode> nodes, bool clear) { _treeView.DoWithinBatchUpdate(() => { if (clear) { _treeView.Clear(); } nodes.Each(_treeView.AddNode); }); }
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(); }
public void Clear() { _treeView.Clear(); }