private RepositoryItem selectRepository(CompoundSelectionDTO dto)
 {
     return(new UxRepositoryItemCheckEdit(gridView)
     {
         Caption = dto.DisplayName, GlyphAlignment = HorzAlignment.Near, AllowHtmlDraw = DefaultBoolean.True
     });
 }
示例#2
0
 protected override void Context()
 {
     base.Context();
     _toolTips             = new List <ToolTipPart>();
     _compoundSelectionDTO = new CompoundSelectionDTO {
         BuildingBlock = _compound1
     };
     A.CallTo(() => _buildingBlockSelectionDisplayer.ToolTipFor(_compound1)).Returns(_toolTips);
 }
        private void removeDuplicateSelection(CompoundSelectionDTO compoundSelectionDTO)
        {
            //compound was unselected. Nothing to check
            if (!compoundSelectionDTO.Selected)
            {
                return;
            }
            var selectedCompoundName         = compoundSelectionDTO.BuildingBlock.Name;
            var allOtherSelectedCompoundsDTO = selectedCompoundDTOs.ToList();

            allOtherSelectedCompoundsDTO.Remove(compoundSelectionDTO);

            var allOtherCompoundWithSameName = allOtherSelectedCompoundsDTO.Where(x => x.BuildingBlock.IsNamed(selectedCompoundName));

            allOtherCompoundWithSameName.Each(dto => dto.Selected = false);
        }
 public void SelectionChanged(CompoundSelectionDTO compoundSelectionDTO)
 {
     removeDuplicateSelection(compoundSelectionDTO);
     updateErrorMessage();
 }
 public IEnumerable <ToolTipPart> ToolTipFor(CompoundSelectionDTO compoundSelectionDTO)
 {
     return(_buildingBlockSelectionDisplayer.ToolTipFor(compoundSelectionDTO.BuildingBlock));
 }