Ejemplo n.º 1
0
 public TrainingProgramPresenter(ITrainigProgram view, IMessenger messenger,
                                 ITrainingProgramHeadReposytory <TrainingProgramHead> reposytory, IController controller)
 {
     this.view       = view;
     this.messenger  = messenger;
     this.reposytory = reposytory;
     this.controller = controller;
     view.TrainigProgramIsActivated += View_TrainigProgramIsActivated;
     view.MouseDgvHeadClick         += View_MouseDgvHeadClick;
     view.AddTrainigProgram         += View_AddNewTrainigProgram;
     view.ModifyTrainigProgram      += View_ModifyTrainigProgram;
     view.DeleteTrainigProgram      += View_DeleteTrainigProgram;
 }
        public AddModifyTrainigProgramPresenter(IAddModifyTrainigProgram view, IExerciseReposytory <Exercise> reposytoryExercise, ICategoryReposytory <Category> reposytoryCategory, ISetReposytory <Set> reposytorySet,
                                                ITrainingProgramHeadReposytory <TrainingProgramHead> reposytoryTrainigProgramHead, IAddTrainigProgramSpecRow dialog, IMessenger messenger)
        {
            this.view                         = view;
            this.viewAddRowDialog             = dialog;
            this.reposytoryCategory           = reposytoryCategory;
            this.reposytoryExercise           = reposytoryExercise;
            this.reposytoryTrainigProgramHead = reposytoryTrainigProgramHead;
            this.messenger                    = messenger;
            view.AddNewRowButtonClick        += View_AddNewRow;
            view.ModifyRowButtonClick        += View_ModifyRow;
            view.DeleteRowButtonClick        += View_DeleteRow;
            view.OkButtonClick               += View_Ок;
            view.CancelButtonClick           += View_Cancel;
            view.FormLoaded                  += View_IsLoad;
            view.NameFieldChanged            += View_NameFieldChanged;

            viewAddRowDialog.Ok     += ViewAddRowDialog_Ok;
            viewAddRowDialog.Cancel += ViewAddRowDialog_Cancel;
        }