コード例 #1
0
ファイル: Presenter.cs プロジェクト: imaji/SwagOMeter
        public Presenter(IView view, IFileDetailProvider fileDetailProvider, IDisplayErrorMessages errorMessage)
        {
            var attendeeSource = new AttendeeSource(errorMessage);
            var swagSource = new SwagSource(errorMessage);
            var winnersSource = new WinnersSource(fileDetailProvider);

            _model = new Model(attendeeSource, swagSource, winnersSource, fileDetailProvider.FileLocation);
            _model.WinnerAvailable += _model_WinnerAvailable;

            _view = view;
            view.AttendeeLeft += view_AttendeeLeft;
            view.AttendeeRefused += view_AttendeeRefused;
            view.NewWinnerRequested += view_NewWinnerRequested;
            view.WinnersReportRequired += view_WinnersReportRequired;
        }
コード例 #2
0
ファイル: Presenter.cs プロジェクト: orangutanboy/SwagOMeter
        public Presenter(IView view, IFileDetailProvider fileDetailProvider, IDisplayErrorMessages errorMessage)
        {
            var attendeeSource = new AttendeeSource(errorMessage);
            var swagSource     = new SwagSource(errorMessage);
            var winnersSource  = new WinnersSource(fileDetailProvider);

            _model = new Model(attendeeSource, swagSource, winnersSource, fileDetailProvider.FileLocation);
            _model.WinnerAvailable += _model_WinnerAvailable;

            _view                       = view;
            view.AttendeeLeft          += view_AttendeeLeft;
            view.AttendeeRefused       += view_AttendeeRefused;
            view.NewWinnerRequested    += view_NewWinnerRequested;
            view.WinnersReportRequired += view_WinnersReportRequired;
        }
コード例 #3
0
ファイル: SwagSource.cs プロジェクト: orangutanboy/SwagOMeter
 public SwagSource(IDisplayErrorMessages displayErrorMessage) : base(displayErrorMessage, "Swag")
 {
 }
コード例 #4
0
 public AttendeeSource(IDisplayErrorMessages displayErrorMessage) : base(displayErrorMessage, "Attendee")
 {
 }
コード例 #5
0
 protected ThingSource(IDisplayErrorMessages displayErrorMessage, string thing)
 {
     _thing = thing;
     _displayErrorMessage = displayErrorMessage;
 }