Загрузка страницы

Model View Presenter (MVP) Example - #9 Views and Presenters

Video #9 Part 2 of Model View Presenter (MVP) covering Views and Presenters. Visual Studio 2017 development of the Views and Presenters using C# for a demo application begins with this video. WinForms is being used for the graphical user interface. It will take several videos to cover this topic. Note that although WinForms is being used for the user interface, the other parts making up the engine such as service layer and repositories can be reused by other user interface technologies such as WPF which may be demonstrated later in the future.

Note the overview video is in Video #1.

Briefly discussed topics in this Video:

- Creation of Presentation Layer and folders

- Adding Microsoft Unity Container

- Adding graphical images to project resource file

- Creation of support classes in common area

- Early setup of Unity Container in Program.cs demonstrating dependency injection through constructors

- Early development of Main View and Main Presenter

Follow me on twitter to see what I'm working on and news on upcoming videos. My twitter page is at the below URL:

https://twitter.com/RobertGMarquez1

My twitter account is @RobertGMarquez1
Personal website is at:

http://www.robertmarquez.com

//--------------------------------------------------------------------------

*** Code Updates:
Changes were made to allow Unity to instantiate the ErrorMessageView instead of a manual new up. The following corrections have been made:

The MainPresenter constructor has been updated as follows:

public MainPresenter(IMainView mainView, IErrorMessageView errorMessageView) : base(errorMessageView)

//--------------------------------------------------------------------------

The ErrorMessageView form ShowErrorMessageView method has been updated as follows:

public void ShowErrorMessageView(string windowTitle, string errorMessage)
{
this.Text = windowTitle;
this.messageTextBox.Text = errorMessage;
this.ShowDialog();
}

//--------------------------------------------------------------------------

The BasePresenter constructor has been updated as follows:

public BasePresenter(IErrorMessageView errorMessageView)
{
_errorMessageView = errorMessageView;
}

//--------------------------------------------------------------------------

The BasePresenter class field _errorMessageView has been updated as follows:

public IErrorMessageView _errorMessageView;

//--------------------------------------------------------------------------

The BasePresenter class ShowErrorMessage method has been updated as follows:

public void ShowErrorMessage(string windowTitle, string errorMessage)
{
_errorMessageView.ShowErrorMessageView(windowTitle, errorMessage);
}

//--------------------------------------------------------------------------

Robert Glenn Marquez Samples
Robert G Marquez Samples
Robert Marquez Samples

Author Name Look ups are: Robert G Marquez, Robert G. Marquez, Robert Glenn Marquez, and Robert Marquez.

rgmtechvideos

Видео Model View Presenter (MVP) Example - #9 Views and Presenters канала Robert G Marquez
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
29 июня 2018 г. 11:40:08
00:31:32
Яндекс.Метрика