public override void InitializeBinding() { _screenBinder.Bind(x => x.TransportType) .To(cbTransporterType) .WithImages(x => x.Icon.Index) .WithValues(x => _presenter.AllTransportTypes()) .AndDisplays(x => x.DisplayName) .OnValueUpdating += (o, e) => OnEvent(() => _presenter.UpdateTransportType(e.NewValue.TransportType)); RegisterValidationFor(_screenBinder, NotifyViewChanged); }
public override void InitializeBinding() { _screenBinder.Bind(x => x.TransportType) .To(cbTransporterType) .WithImages(transporterIconIndex) .WithValues(x => _presenter.AllTransportTypes()) .AndDisplays(x => _presenter.TransportTypeCaptionFor(x)) .OnValueUpdating += (o, e) => OnEvent(() => _presenter.UpdateTransportType(e.NewValue)); _colGrouping = _gridViewBinder.AutoBind(item => item.GroupingPathDTO) .WithRepository(dto => configureContainerRepository(dto.GroupingPathDTO)) .WithCaption(PKSimConstants.UI.EmptyColumn) .AsReadOnly(); _colGrouping.XtraColumn.GroupIndex = 0; _colGrouping.XtraColumn.SortMode = ColumnSortMode.Custom; _gridViewBinder.Bind(item => item.MembraneLocation) .WithRepository(getTransporterMembraneRepository) .WithEditorConfiguration(editTransporterMembraneTypeRepository) .WithShowButton(ShowButtonModeEnum.ShowAlways) .WithCaption(PKSimConstants.UI.EmptyColumn) .OnValueUpdating += (transporter, args) => _presenter.SetMembraneLocation(transporter, args.NewValue); _colRelativeExpression = _gridViewBinder.Bind(item => item.RelativeExpression) .WithCaption(PKSimConstants.UI.RelativeExpression) .WithOnValueUpdating((protein, args) => _presenter.SetRelativeExpression(protein, args.NewValue)); var col = _gridViewBinder.Bind(item => item.RelativeExpressionNorm) .WithCaption(PKSimConstants.UI.RelativeExpressionNorm) .WithRepository(x => _progressBarRepository) .AsReadOnly(); //necessary to align center since double value are aligned right by default col.XtraColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center; col.XtraColumn.DisplayFormat.FormatType = FormatType.None; RegisterValidationFor(_screenBinder, NotifyViewChanged); }