protected override void Context() { base.Context(); _columnWithCompound = PathElementId.Molecule; _parameterDTO1.PathElements[PathElementId.TopContainer] = new PathElement { DisplayName = "Organsim" }; _parameterDTO1.PathElements[PathElementId.Container] = new PathElement { DisplayName = "Liver" }; _parameterDTO1.PathElements[_columnWithCompound] = new PathElement { DisplayName = "Drug" }; _parameterDTO2.PathElements[PathElementId.TopContainer] = new PathElement { DisplayName = "Organsim" }; _parameterDTO2.PathElements[PathElementId.Container] = new PathElement { DisplayName = "Liver" }; _parameterDTO2.PathElements[_columnWithCompound] = new PathElement { DisplayName = "Inhibitor" }; _parameters = new List <IParameter> { _parameter1, _parameter2 }; var simulation = A.Fake <Simulation>(); A.CallTo(() => simulation.CompoundNames).Returns(new[] { "Drug", "Inhibitor" }); A.CallTo(_withIdRepository).WithReturnType <Simulation>().Returns(simulation); }
public void SetVisibility(PathElementId pathElementId, bool visible) { var colIndex = _columnPathElementCache.Keys.ToList().IndexOf(pathElementId); if (colIndex < 0) { return; } ColumnAt(pathElementId).UpdateVisibility(visible); }
public void SortColumn(PathElementId pathElementId) { View.SortedPathElementId = pathElementId; }
public static bool HasOnlyEmptyValuesAt(this IEnumerable <IPathRepresentableDTO> pathRepresentables, PathElementId pathElementId) { var allValues = pathRepresentables.AllDistinctValuesAt(pathElementId); return(allValues.Count == 1 && string.IsNullOrEmpty(allValues[0])); }
public void SetVisibility(PathElementId pathElementId, bool visible) { _pathElementsBinder.SetVisibility(pathElementId, visible); }
public void Hide(PathElementId pathElementId) { _allQuantityListPresenter.Hide(pathElementId); _selectedQuantityListPresenter.Hide(pathElementId); }
public void SortColumn(PathElementId pathElementId) { _allQuantityListPresenter.SortColumn(pathElementId); _selectedQuantityListPresenter.SortColumn(pathElementId); }
private void updateColumnVisibility(PathElementId pathElementId) { _view.SetVisibility(pathElementId, !_allLinkedParameters.HasOnlyEmptyValuesAt(pathElementId)); }
private IGridViewAutoBindColumn <T, PathElement> configurePathElement(Expression <Func <T, PathElement> > parameterPathExpression, PathElementId pathElementId, string caption) { var column = _gridViewBinder.AutoBind(parameterPathExpression) .WithCaption(caption) .AsReadOnly(); _columnPathElementCache.Add(pathElementId, column); return(column); }
private void configureImagePathElement(Expression <Func <T, PathElement> > parameterPathExpression, PathElementId pathElementId, string caption) { configurePathElement(parameterPathExpression, pathElementId, caption) .WithRepository(dto => configureContainerRepository(dto, parameterPathExpression.Compile())); }
public void GroupBy(PathElementId pathElementId, int groupIndex = 0) { groupByColumn(_pathElementsBinder.ColumnAt(pathElementId), groupIndex); }
protected void AddToList(List <string> displayList, PathElements pathElements, PathElementId pathElementId) { var displayName = pathElements[pathElementId].DisplayName; if (string.IsNullOrEmpty(displayName)) { return; } displayList.Add(displayName); }
public void SetCaption(PathElementId pathElementId, string caption) { View.SetCaption(pathElementId, caption); }
public void Hide(PathElementId pathElementId) { View.SetVisibility(pathElementId, visible: false); }
public void Show(PathElementId pathElementId) { View.SetVisibility(pathElementId, visible: true); }
public void SetCaption(PathElementId pathElementId, string caption) { _pathElementsBinder.SetCaption(pathElementId, caption); }
private GridColumn xtraColumnBy(PathElementId pathElementId) { return(_pathElementsBinder.ColumnAt(pathElementId).XtraColumn); }
public void SetCaption(PathElementId pathElementId, string caption) { ColumnAt(pathElementId).Caption = caption; }
private PathElement pathElementAt(PathElements pathElements, PathElementId pathElementId) { var dto = pathElements[pathElementId]; return(string.IsNullOrEmpty(dto.DisplayName) ? null : dto); }
public IGridViewColumn ColumnAt(PathElementId pathElementId) { return(_columnPathElementCache[pathElementId]); }
public void GroupBy(PathElementId pathElementId) { _allQuantityListPresenter.GroupBy(pathElementId); _selectedQuantityListPresenter.GroupBy(pathElementId); }
private void updateColumnVisibility(PathElementId pathElement) { SetVisibility(pathElement, !_parameterDTOs.HasOnlyEmptyValuesAt(pathElement)); }
public void Show(PathElementId pathElementId) { _allQuantityListPresenter.Show(pathElementId); _selectedQuantityListPresenter.Show(pathElementId); }
public void SetVisibility(PathElementId pathElement, bool isVisible) { View.SetVisibility(pathElement, isVisible); }
public void SetCaption(PathElementId pathElementId, string caption) { _allQuantityListPresenter.SetCaption(pathElementId, caption); _selectedQuantityListPresenter.SetCaption(pathElementId, caption); }
public void SetVisibility(PathElementId pathElement, bool isVisible) { _pathBinder.SetVisibility(pathElement, isVisible); }
public static bool HasDistinctValuesAt(this IEnumerable <IPathRepresentableDTO> pathRepresentables, PathElementId pathElementId) { return(pathRepresentables.AllDistinctValuesAt(pathElementId).Count > 1); }
private void updateColumnVisibility(PathElementId pathElementId) { _view.SetVisibility(pathElementId, !_allDiffItemDTO.HasOnlyEmptyValuesAt(pathElementId)); }
public static IReadOnlyList <string> AllDistinctValuesAt(this IEnumerable <IPathRepresentableDTO> pathRepresentables, PathElementId pathElementId) { return(pathRepresentables.AllDistinctValues(p => p.PathElements[pathElementId].DisplayName)); }
public void GroupBy(PathElementId pathElementId) { View.GroupPathElementId = pathElementId; }