C# Class BF2Statistics.MedalData.MedalDataEditor

Inheritance: System.Windows.Forms.Form
Afficher le fichier Open project: BF2Statistics/ControlCenter Class Usage Examples

Méthodes publiques

Свойство Type Description
ChangesMade bool
PythonPath string
SelectedAward IAward

Protected Properties

Свойство Type Description
ActiveProfile string
Child ConditionForm
ConditionNode System.Windows.Forms.TreeNode
LastSelectedProfile string
SelectedAwardNode System.Windows.Forms.TreeNode

Méthodes publiques

Méthode Description
DeleteCriteria ( ) : void

Removes a criteria from the selected awards condition tree

EditCriteria ( ) : void

Brings up the Criteria Editor for the selected Award Condition Node

MedalDataEditor ( ) : System

Constructor

SetAwardImage ( string name ) : void

Sets the award image based on the Award ID Passed

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

LoadProfiles ( ) : void

Scans the stats directory, and adds each found medal data profile to the profile selector

ValidateConditions ( TreeNode AwardNode, Condition Con ) : void

This method is used to highlight the invalid condition nodes of the current selected AwardNode, to let the user know that the conditions selected wont work properly when loaded by the server

Applies highlighting from the Award Node => to => The Root Node

Private Methods

Méthode Description
ActivateProfileBtn_Click ( object sender, EventArgs e ) : void

Activates the current profile within the BF2StatisticsConfig.py

AddNewCriteria ( object sender, FormClosingEventArgs e ) : void

Adds a new criteria to an award from the Add Critera Dialog

AwardConditionsTree_AfterSelect ( object sender, TreeViewEventArgs e ) : void

Assigns the correct Context menu options based on the selected node

AwardConditionsTree_BeforeCollapse ( object sender, System.Windows.Forms.TreeViewCancelEventArgs e ) : void

Disables collapsing of condition tree nodes

AwardConditionsTree_KeyDown ( object sender, KeyEventArgs e ) : void

Allows enter and delete keys to edit and delete criteria

AwardConditionsTree_NodeMouseDoubleClick ( object sender, TreeNodeMouseClickEventArgs e ) : void

Allows edit of criteria's on double mouse click

AwardTree_AfterSelect ( object sender, TreeViewEventArgs e ) : void

An event called everytime a new award is selected... It repaints the current award info

DelProfileBtn_Click ( object sender, EventArgs e ) : void

Deletes the selected profile

DeleteCriteriaMenuItem_Click ( object sender, EventArgs e ) : void

When the delete option is pressed, removes the criteria

EditCriteriaMenuItem_Click ( object sender, EventArgs e ) : void

Edit Criteria option Click

InitializeComponent ( ) : void

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

NewCriteriaMenuItem_Click ( object sender, EventArgs e ) : void

Adding a new Criteria

NewCriteria_Closing ( object sender, FormClosingEventArgs e ) : void

Shows the correct new criteria screen when the uesr selects which type.

NewProfileBtn_Click ( object sender, EventArgs e ) : void

Opens the dialog to create a new profile

ProfileSelector_SelectedIndexChanged ( object sender, EventArgs e ) : void

This method is called upon selecting a new Medal Data Profile. It loads the new medal data, and calls the parser to parse it.

RestoreToDefaultMenuItem_Click ( object sender, EventArgs e ) : void

Restores the condition / criteria back to default (vanilla)

SaveButton_Click ( object sender, EventArgs e ) : void

Saves the medal data to a file

UndoAllChangesMenuItem_Click ( object sender, EventArgs e ) : void

When the Undo Changes menu option is selected, this method reverts any changes made to the current condition list

ValidateConditions ( ) : void

This method is used to highlight the invalid condition nodes in the conditions treeview, as to let the user know that the conditions selected wont work properly when loaded by the server

Applies highlighting from the Root Nodes => to => The Award Nodes

Method Details

DeleteCriteria() public méthode

Removes a criteria from the selected awards condition tree
public DeleteCriteria ( ) : void
Résultat void

Dispose() protected méthode

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

EditCriteria() public méthode

Brings up the Criteria Editor for the selected Award Condition Node
public EditCriteria ( ) : void
Résultat void

LoadProfiles() protected méthode

Scans the stats directory, and adds each found medal data profile to the profile selector
protected LoadProfiles ( ) : void
Résultat void

MedalDataEditor() public méthode

Constructor
public MedalDataEditor ( ) : System
Résultat System

SetAwardImage() public méthode

Sets the award image based on the Award ID Passed
public SetAwardImage ( string name ) : void
name string The Award ID
Résultat void

ValidateConditions() protected méthode

This method is used to highlight the invalid condition nodes of the current selected AwardNode, to let the user know that the conditions selected wont work properly when loaded by the server
Applies highlighting from the Award Node => to => The Root Node
protected ValidateConditions ( TreeNode AwardNode, Condition Con ) : void
AwardNode System.Windows.Forms.TreeNode
Con Condition
Résultat void

Property Details

ActiveProfile protected_oe property

The current active profile in the BF2sConfig.py
protected string ActiveProfile
Résultat string

ChangesMade public_oe static_oe property

Indicates whether changes have been made to any criteria
public static bool ChangesMade
Résultat bool

Child protected_oe property

Our child form if applicable
protected ConditionForm,BF2Statistics.MedalData Child
Résultat ConditionForm

ConditionNode protected_oe property

The highlighted Award condition node (if any)
protected TreeNode,System.Windows.Forms ConditionNode
Résultat System.Windows.Forms.TreeNode

LastSelectedProfile protected_oe property

Indicates the last selected profile
protected string LastSelectedProfile
Résultat string

PythonPath public_oe static_oe property

The full path to the "stats" python folder
public static string PythonPath
Résultat string

SelectedAward public_oe static_oe property

The current selected award
public static IAward SelectedAward
Résultat IAward

SelectedAwardNode protected_oe property

The current selected award node
protected TreeNode,System.Windows.Forms SelectedAwardNode
Résultat System.Windows.Forms.TreeNode