public AddEventPresenter(IAddEventView addEventView) { _addEventView = addEventView; _eventDataValidation = new DataValidation(); _taskService = new TaskService(new TaskGoogleRepository(), null); _errorMessageView = new ErrorMessageView(); SubscribeToEventsSetup(); }
private void OnAddEventButtonClickEventRaised(object sender, EventArgs e) { int whatDay = Convert.ToInt32((sender as Button).Text); DateTime whatDate = new DateTime(CurrentDate.Year, CurrentDate.Month, whatDay); IAddEventPresenter addEventPresenter = new AddEventPresenter(new AddEventView(whatDate)); IAddEventView addEventView = addEventPresenter.GetAddEventView(); addEventView.ShowWindow(); }