Example #1
0
        public override void InitializeBinding()
        {
            base.InitializeBinding();
            _gridViewBinder.Bind(x => x.Name)
            .AsReadOnly();

            initPathElementColumn(dto => dto.PathElement0, Captions.PathElement(0));
            initPathElementColumn(dto => dto.PathElement1, Captions.PathElement(1));
            initPathElementColumn(dto => dto.PathElement2, Captions.PathElement(2));
            initPathElementColumn(dto => dto.PathElement3, Captions.PathElement(3));
            initPathElementColumn(dto => dto.PathElement4, Captions.PathElement(4));
            initPathElementColumn(dto => dto.PathElement5, Captions.PathElement(5));
            initPathElementColumn(dto => dto.PathElement6, Captions.PathElement(6));
            initPathElementColumn(dto => dto.PathElement7, Captions.PathElement(7));
            initPathElementColumn(dto => dto.PathElement8, Captions.PathElement(8));
            initPathElementColumn(dto => dto.PathElement9, Captions.PathElement(9));

            _gridViewBinder.AutoBind(x => x.ScaleDivisor)
            .WithOnValueUpdating((o, e) => _presenter.UpdateScaleFactorValue(o, e.NewValue));

            _gridViewBinder.Changed += NotifyViewChanged;

            btnCalculateScaleDivisors.Click += (o, e) => OnEvent(async() => await _presenter.StartScaleDivisorsCalculation());
        }