Example #1
0
 public CalcPresenter(ICalcView view = null, ICalcModel model = null)
 {
     this.view        = view;
     this.model       = model;
     this.view.Add   += Add;
     this.view.Reset += Reset;
     this.view.Show();
 }
Example #2
0
        public CalcPresenter(ICalcView view       = null, ICalcModel model = null,
                             ICalcService service = null)
        {
            _model   = model;
            _service = service;
            _view    = view;

            MapMessages();
        }
Example #3
0
        public CalcPresenter(IKernel kernel, ICalcView view, ICalcService service)
        {
            _kernel  = kernel;
            _view    = view;
            _service = service;

            _view.Calculate        += Calculate;
            _view.GetValues        += GetValues;
            _view.GetInitialValues += GetInitialValues;
        }
Example #4
0
File: Form1.cs Project: ombt/ombt
 public CalcController( ICalcModel model, ICalcView view)
 {
     this.model = model;
     this.view  = view;
     this.view.AddListener(this);
 }
 /// <summary>
 /// Creates a new instance of an object that implements the
 /// <see
 ///     cref="T:SampleMVP.ICalcPresenter" />
 /// interface and returns a
 /// reference to it.
 /// <para />
 /// Also associates, with the newly-created Presenter object, a
 /// reference to the <paramref name="view" /> specified.
 /// <para />
 /// The view must implement the <see cref="T:SampleMVP.ICalcView" /> interface.
 /// </summary>
 public static ICalcPresenter ForView(ICalcView view)
 => new CalcPresenter(view);