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.
Mostrar archivo Open project: npruehs/hostile-worlds Class Usage Examples

Public Methods

Method 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

Method 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 method

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 ///
return void

ClearResults() public method

Clears the results of the main application window.
public ClearResults ( ) : void
return void

Controller() public method

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

GetApplicationCopyright() public method

Gets the copyright information of the application.
public GetApplicationCopyright ( ) : string
return string

GetApplicationTitle() public method

Gets the title of the application.
public GetApplicationTitle ( ) : string
return string

GetApplicationVersion() public method

Gets the major and minor version of the application.
public GetApplicationVersion ( ) : string
return string

MenuFileAbout() public method

Shows a box with information about this application.
public MenuFileAbout ( ) : void
return void

MenuFileExportResults() public method

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

MenuFileOpen() public method

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
return void

MenuFileQuit() public method

Shuts this application down.
public MenuFileQuit ( ) : void
return void

ShowErrorDialog() public method

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

ShowLogInfo() public method

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 ///
return void