C# Класс BaconGame.GamePresenter

Controls presentation and layout of an IGameMainForm
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddQuestion ( ) : void

Creates a new blank question and appends it to the question view.

ClearTextFields ( ) : void

Clears each of the text and combo boxes in the view.

ConfirmDelete ( ) : bool

Brings up a confirmation of question deletion dialog.

CreateNeededQuestionFiles ( ) : void

Creates missing question files from the html files present on the server.

DepopulateQuestionView ( ) : void

Clears the question view.

DownloadSync ( ) : void

Opens a sync dialog to download necessary files.

GamePresenter ( IGameMainForm view ) : Common.System

Constructor accepting a single argument.

LoadTextFields ( ) : void

Loads the contents of the currently selected question into the text and combo boxes.

PopulateFileView ( ) : void

Populates the file view with any question files stored in the local directory.

PopulateQuestionView ( string questionFile ) : void

Populates the question view with questions, based on the selected question file.

RemoveQuestion ( ) : void

Deletes a selected question and removes it from the question box.

SaveOpen ( ) : void

Saves any open questions and question files.

SaveQuestion ( int index ) : void

Saves the question at a given index of the question view.

SaveQuestionFile ( string fileName ) : void

Saves the set of currently selected questions to a file.

ShowError ( string error ) : void

Shows an error dialog to the user.

UpdateAnswer ( ) : void

Updates the modified answer to a question in the question view.

UploadSync ( ) : void

Opens a sync dialog to upload necessary files.

UploadSync ( FormClosingEventArgs e ) : void

Opens a sync dialog to upload necessary files on form exit. First displays a confirmation to the user.

Приватные методы

Метод Описание
AddQuestionToView ( Question q ) : void

Adds a single question to the question view.

InitComboBox ( Question q ) : void

Populates the combo box with a list of possible answers to select from.

Описание методов

AddQuestion() публичный метод

Creates a new blank question and appends it to the question view.
public AddQuestion ( ) : void
Результат void

ClearTextFields() публичный метод

Clears each of the text and combo boxes in the view.
public ClearTextFields ( ) : void
Результат void

ConfirmDelete() публичный метод

Brings up a confirmation of question deletion dialog.
public ConfirmDelete ( ) : bool
Результат bool

CreateNeededQuestionFiles() публичный метод

Creates missing question files from the html files present on the server.
public CreateNeededQuestionFiles ( ) : void
Результат void

DepopulateQuestionView() публичный метод

Clears the question view.
public DepopulateQuestionView ( ) : void
Результат void

DownloadSync() публичный метод

Opens a sync dialog to download necessary files.
public DownloadSync ( ) : void
Результат void

GamePresenter() публичный метод

Constructor accepting a single argument.
public GamePresenter ( IGameMainForm view ) : Common.System
view IGameMainForm The form that this presenter controls the layout for.
Результат Common.System

LoadTextFields() публичный метод

Loads the contents of the currently selected question into the text and combo boxes.
public LoadTextFields ( ) : void
Результат void

PopulateFileView() публичный метод

Populates the file view with any question files stored in the local directory.
public PopulateFileView ( ) : void
Результат void

PopulateQuestionView() публичный метод

Populates the question view with questions, based on the selected question file.
public PopulateQuestionView ( string questionFile ) : void
questionFile string The currently open question file.
Результат void

RemoveQuestion() публичный метод

Deletes a selected question and removes it from the question box.
public RemoveQuestion ( ) : void
Результат void

SaveOpen() публичный метод

Saves any open questions and question files.
public SaveOpen ( ) : void
Результат void

SaveQuestion() публичный метод

Saves the question at a given index of the question view.
public SaveQuestion ( int index ) : void
index int Listview item index of the question to save.
Результат void

SaveQuestionFile() публичный метод

Saves the set of currently selected questions to a file.
public SaveQuestionFile ( string fileName ) : void
fileName string Name of the file.
Результат void

ShowError() публичный метод

Shows an error dialog to the user.
public ShowError ( string error ) : void
error string String to display.
Результат void

UpdateAnswer() публичный метод

Updates the modified answer to a question in the question view.
public UpdateAnswer ( ) : void
Результат void

UploadSync() публичный метод

Opens a sync dialog to upload necessary files.
public UploadSync ( ) : void
Результат void

UploadSync() публичный метод

Opens a sync dialog to upload necessary files on form exit. First displays a confirmation to the user.
public UploadSync ( FormClosingEventArgs e ) : void
e System.Windows.Forms.FormClosingEventArgs Form closing event args.
Результат void