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 Show(IEnumerable <MoleculeBuilderDTO> dtos) { var nodes = dtos.MapAllUsing(_moleculeBuilderToTreeNodeMapper); nodes.Each(node => _treeView.AddNode(node)); }
public void Show(IEnumerable <EventGroupBuilderDTO> dtoEventGroupBuilders) { var nodes = dtoEventGroupBuilders.MapAllUsing(_dtoEventGroupToEventNodeMapper); nodes.Each(node => _treeView.AddNode(node)); }