예제 #1
0
        public override void InitializeBinding()
        {
            _screenBinder.Bind(x => x.Name)
            .To(cbExplicitFormulaName)
            .WithValues(dto => _presenter.DisplayFormulaNames())
            .Changed += () => OnEvent(() => _presenter.NamedFormulaSelectionChanged());

            _screenBinder.Bind(x => x.Type)
            .To(cbFormulaType)
            .WithValues(dto => _presenter.AllFormulaTypes())
            .AndDisplays(type => _presenter.DisplayFor(type))
            .Changed += formulaTypeSelectionChanged;


            btnAddFormula.Click += (o, e) => this.DoWithinExceptionHandler(() => _presenter.AddNewFormula());

            RegisterValidationFor(_screenBinder, NotifyViewChanged);
        }