C# Class HWBalanceAnalyzer.Control.Controller

Controls the application, setting up and updating all windows, scanning directories for Hostile Worlds logs and parsing them using an additional thread.
Afficher le fichier Open project: npruehs/hostile-worlds Class Usage Examples

Méthodes publiques

Méthode Description
AppendResult ( string s ) : void

Appends the specified string and a line feed to the results of the main application window.

ClearResults ( ) : void

Clears the results of the main application window.

Controller ( ) : System

Constructs a new application controller, initializing the log parser and preparing all windows.

GetApplicationCopyright ( ) : string

Gets the copyright information of the application.

GetApplicationTitle ( ) : string

Gets the title of the application.

GetApplicationVersion ( ) : string

Gets the major and minor version of the application.

MenuFileAbout ( ) : void

Shows a box with information about this application.

MenuFileExportResults ( ) : void

Raises a new SaveFileDialog and makes the user choose a file to write the analysis results to.

MenuFileOpen ( ) : void

Raises a new FolderBrowserDialog and makes the user choose a folder to be recursively scanned for log files, and starts a new thread for parsing these files.

MenuFileQuit ( ) : void

Shuts this application down.

ShowErrorDialog ( string message ) : void

Shows an error dialog with the passed error message.

ShowLogInfo ( int index ) : void

Shows detailed information on the Hostile Worlds match with the specified index within the log list.

Private Methods

Méthode Description
AddEmptyTableRow ( System.Windows.Forms.DataGridView table, int columnCount ) : void

Adds an empty row to the passed table with the specified number of columns.

AddEmptyTableRow ( System.Windows.Forms.DataGridView table, int columnCount, string description ) : void

Adds an empty row with the specified text in the first cell to the passed table with the specified number of columns.

BackgroundProcessLogs ( object sender, DoWorkEventArgs e ) : void

Parses all log files found, reporting progress to the user.

BackgroundProcessLogsCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void

Called as soon as the thread parsing all log files has finished. Shows a list of all parsed logs in the main application window.

BackgroundProgressChanged ( object sender, ProgressChangedEventArgs e ) : void

Called whenever the thread parsing all log files reports progress. Updates the progress bar and the status label in the status bar of the main application window.

ClearLogList ( ) : void

Clears the list of Hostile Worlds matches in the main application window.

RecursivelyScanDirectory ( string directory ) : void

Recursively scans the passed directory and all sub-directories for Hostile Worlds log files, adding them to the list of names of all Hostile Worlds log files found.

SetupForms ( ) : void

Sets up all windows of the application, showing the match information window on the secondary screen, if possible.

ShowLogList ( List hwlogs ) : void

Shows passed list of Hostile Worlds matches in the main application window.

Method Details

AppendResult() public méthode

Appends the specified string and a line feed to the results of the main application window.
public AppendResult ( string s ) : void
s string /// the string to append ///
Résultat void

ClearResults() public méthode

Clears the results of the main application window.
public ClearResults ( ) : void
Résultat void

Controller() public méthode

Constructs a new application controller, initializing the log parser and preparing all windows.
public Controller ( ) : System
Résultat System

GetApplicationCopyright() public méthode

Gets the copyright information of the application.
public GetApplicationCopyright ( ) : string
Résultat string

GetApplicationTitle() public méthode

Gets the title of the application.
public GetApplicationTitle ( ) : string
Résultat string

GetApplicationVersion() public méthode

Gets the major and minor version of the application.
public GetApplicationVersion ( ) : string
Résultat string

MenuFileAbout() public méthode

Shows a box with information about this application.
public MenuFileAbout ( ) : void
Résultat void

MenuFileExportResults() public méthode

Raises a new SaveFileDialog and makes the user choose a file to write the analysis results to.
public MenuFileExportResults ( ) : void
Résultat void

MenuFileOpen() public méthode

Raises a new FolderBrowserDialog and makes the user choose a folder to be recursively scanned for log files, and starts a new thread for parsing these files.
public MenuFileOpen ( ) : void
Résultat void

MenuFileQuit() public méthode

Shuts this application down.
public MenuFileQuit ( ) : void
Résultat void

ShowErrorDialog() public méthode

Shows an error dialog with the passed error message.
public ShowErrorDialog ( string message ) : void
message string /// the error message to show ///
Résultat void

ShowLogInfo() public méthode

Shows detailed information on the Hostile Worlds match with the specified index within the log list.
public ShowLogInfo ( int index ) : void
index int /// the index of the match to show detailed information on ///
Résultat void