C# Class BaconGame.GamePresenter

Controls presentation and layout of an IGameMainForm
Afficher le fichier Open project: Revelations/BaconApp Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

AddQuestion() public méthode

Creates a new blank question and appends it to the question view.
public AddQuestion ( ) : void
Résultat void

ClearTextFields() public méthode

Clears each of the text and combo boxes in the view.
public ClearTextFields ( ) : void
Résultat void

ConfirmDelete() public méthode

Brings up a confirmation of question deletion dialog.
public ConfirmDelete ( ) : bool
Résultat bool

CreateNeededQuestionFiles() public méthode

Creates missing question files from the html files present on the server.
public CreateNeededQuestionFiles ( ) : void
Résultat void

DepopulateQuestionView() public méthode

Clears the question view.
public DepopulateQuestionView ( ) : void
Résultat void

DownloadSync() public méthode

Opens a sync dialog to download necessary files.
public DownloadSync ( ) : void
Résultat void

GamePresenter() public méthode

Constructor accepting a single argument.
public GamePresenter ( IGameMainForm view ) : Common.System
view IGameMainForm The form that this presenter controls the layout for.
Résultat Common.System

LoadTextFields() public méthode

Loads the contents of the currently selected question into the text and combo boxes.
public LoadTextFields ( ) : void
Résultat void

PopulateFileView() public méthode

Populates the file view with any question files stored in the local directory.
public PopulateFileView ( ) : void
Résultat void

PopulateQuestionView() public méthode

Populates the question view with questions, based on the selected question file.
public PopulateQuestionView ( string questionFile ) : void
questionFile string The currently open question file.
Résultat void

RemoveQuestion() public méthode

Deletes a selected question and removes it from the question box.
public RemoveQuestion ( ) : void
Résultat void

SaveOpen() public méthode

Saves any open questions and question files.
public SaveOpen ( ) : void
Résultat void

SaveQuestion() public méthode

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.
Résultat void

SaveQuestionFile() public méthode

Saves the set of currently selected questions to a file.
public SaveQuestionFile ( string fileName ) : void
fileName string Name of the file.
Résultat void

ShowError() public méthode

Shows an error dialog to the user.
public ShowError ( string error ) : void
error string String to display.
Résultat void

UpdateAnswer() public méthode

Updates the modified answer to a question in the question view.
public UpdateAnswer ( ) : void
Résultat void

UploadSync() public méthode

Opens a sync dialog to upload necessary files.
public UploadSync ( ) : void
Résultat void

UploadSync() public méthode

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.
Résultat void