C# Class BF2Statistics.MainForm

Show file Open project: BF2Statistics/ControlCenter

Protected Properties

Property Type Description
Config Settings

Public Methods

Method Description
MainForm ( ) : System

Constructor. Initializes and Displays the Applications main GUI

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
ASPServer_ClientConnected ( ) : void

Update the GUI when a client connects

ASPServer_OnShutdown ( object sender, EventArgs E ) : void

Update the GUI when the ASP shutsdown

ASPServer_OnStart ( object sender, EventArgs E ) : void

Update the GUI when the ASP starts up

AspStatusDesc_DoubleClick ( object sender, EventArgs e ) : void
BF2Client_Exited ( object sender, EventArgs e ) : void

Event fired when Server has exited

BF2Server_Exited ( ) : void

Event fired when Server has exited

BF2Server_Started ( ) : void

Event called when the BF2 server has successfully started

BF2sConfig_Click ( object sender, EventArgs e ) : void

This button opens up the BF2Statistics config form

BF2sEditMedalDataBtn_Click ( object sender, EventArgs e ) : void

This button opens up the Medal Data Editor

BF2sRestoreBtn_Click ( object sender, EventArgs e ) : void

This button restores the clients Ranked Python files to the original state

Bf2StatisticsLink_Click ( object sender, EventArgs e ) : void
BuildClientsList ( ) : void

Builds the Login Tab's client list

CheckPythonStatus ( ) : void

This method sets the Stats Python status of the BF2s python files on the main GUI.

- Initial loading of the StatsPythonConfig object - Enables / Disables Stats config and Medal editor buttons - Sets the texts, font colors and status icon image for the stats python elements

CheckRedirectService ( ) : void

Fills the Gamespy Redirects tab with the associated information from the Redirector

ChkUpdateBtn_Click ( object sender, EventArgs e ) : void

Check for Updates Button

ConnectedClients_Enter ( object sender, EventArgs e ) : void

This event is used to prevent the Connected Login Clients window from being activatable, giving it the appearence of being disabled

CountSnapshots ( ) : void

Gets a count of processed and unprocessed snapshots

EditASPDatabaseBtn_Click ( object sender, EventArgs e ) : void

Edit Stats Database Settings Button Click Event

EditASPSettingsBtn_Click ( object sender, EventArgs e ) : void

Edit ASP Settings Button Click Event

EditAcctBtn_Click ( object sender, EventArgs e ) : void
EditBf2sCloneBtn_Click ( object sender, EventArgs e ) : void

Edit BF2sClone Config Button Click Event

EditGamespyConfigBtn_Click ( object sender, EventArgs e ) : void
EditMapListBtn_Click ( object sender, EventArgs e ) : void

Opens the Maplist form

EditPlayerBtn_Click ( object sender, EventArgs e ) : void

Edit Player Button Click Event

EditScoreSettingsBtn_Click ( object sender, EventArgs e ) : void

Shows the Edit Score Settings form

EditServerSettingsBtn_Click ( object sender, EventArgs e ) : void

Opens the Edit Server Settings Form

ExtraParamBtn_Click ( object sender, EventArgs e ) : void

Event fired when the Extra Params button is clicked

GamepsyServer_OnUpdate ( object sender, EventArgs e ) : void

This method updates the connected clients area of the login emulator tab

GamespyServer_OnShutdown ( ) : void

Event fired when the login emulator shutsdown

GamespyServer_OnStart ( ) : void

Event fired when the login server starts

HostsDiagnosticsBtn_Click ( object sender, EventArgs e ) : void

Event fired when the Run Diagnostics button is pushed on the Redirects Tab

HostsFileStatusLabel_DoubleClick ( object sender, EventArgs e ) : void
HostsLockCheckbox_CheckedChanged ( object sender, EventArgs e ) : void

Event fired when the Lock/Unlock hosts file checkbox is modified

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

InstallButton_Click ( object sender, EventArgs e ) : void

When the Install button is clicked, its checked whether the BF2statisticsConfig.py file is located in the "python/bf2" directory, and either installs or removes the bf2statistics python

LaunchClientBtn_Click ( object sender, EventArgs e ) : void

Client Launcher Button Click

LaunchEmuBtn_Click ( object sender, EventArgs e ) : void

Event fired when the Launch emulator button is pushed

LaunchServerBtn_Click ( object sender, EventArgs e ) : void

Server Launcher Button Click

LoadModList ( ) : void

Loads up all the supported mods, and adds them to the Mod select list

LoginStatusDesc_DoubleClick ( object sender, EventArgs e ) : void
MainForm_FormClosing ( object sender, FormClosingEventArgs e ) : void

Destructor

ManageGpDbBtn_Click ( object sender, EventArgs e ) : void
ManageStatsDBBtn_Click ( object sender, EventArgs e ) : void

Clear Stats Database Button Click Event

ModSelectList_SelectedIndexChanged ( object sender, EventArgs e ) : void

Event fired when the selected mod changes. When fired, this method fills in the "Next Map to be Played" area of the GUI.

OpenRootBtn_Click ( object sender, EventArgs e ) : void

Open Program Folder Click Event

RandomMapListBtn_Click ( object sender, EventArgs e ) : void

Event fired when the Randomize Maplist button is pushed

RedirectButton_Click ( object sender, EventArgs e ) : void

This is the main HOSTS file button event handler.

RefreshChkBox_CheckedChanged ( object sender, EventArgs e ) : void
ReportBugBtn_Click ( object sender, EventArgs e ) : void

Report Issue or Bug Button

ServerStatusDesc_DoubleClick ( object sender, EventArgs e ) : void
SetupBtn_Click ( object sender, EventArgs e ) : void

Setup Button Click Event. Relaunches the setup client/server paths screen

StartAspServerBtn_Click ( object sender, EventArgs e ) : void

Starts and stops the ASP HTTP server

StartLoginserverBtn_Click ( object sender, EventArgs e ) : void
StartWebserverBtn_Click ( object sender, EventArgs e ) : void

Starts the ASP Webserver

StatsManager_SnapshotProccessed ( ) : void

Updates the GUI when a snapshot is proccessed

StatsManager_SnapshotReceived ( ) : void

Updates the GUI when a snapshot is recieved successfully

StatsStatusDesc_DoubleClick ( object sender, EventArgs e ) : void
UpdateCacheStatus ( ) : void

Updates the Cache Address Verification section of the redirects tab with the latest cache information report

Updater_CheckCompleted ( object sender, EventArgs e ) : void

Event fired when an update check has finished

ViewAccessLogBtn_Click ( object sender, EventArgs e ) : void

View ASP Access Log Button Click Event

ViewBf2sCloneBtn_Click ( object sender, EventArgs e ) : void

View Leaderboard Button Click Event

ViewErrorLogBtn_Click ( object sender, EventArgs e ) : void

View ASP Error Log Button Click Event

ViewSnapshotBtn_Click ( object sender, EventArgs e ) : void

View Snapshots Button Click Event

ViewSnapshotLogBtn_Click ( object sender, EventArgs e ) : void

View Snapshot Logs Button Click Event

linkLabelReset_LinkClicked ( object sender, LinkLabelLinkClickedEventArgs e ) : void

Reset total web requests link click

tabControl1_SelectedIndexChanged ( object sender, EventArgs e ) : void

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

MainForm() public method

Constructor. Initializes and Displays the Applications main GUI
public MainForm ( ) : System
return System

Property Details

Config protected property

The User Config object
protected Settings Config
return Settings