BF2Statistics.MedalData.AwardCache.GetAward C# (CSharp) Method

GetAward() public static method

This method is used to fetch a particular Award or rank by ID
public static GetAward ( string Id ) : IAward
Id string The Award ID
return IAward
        public static IAward GetAward(string Id)
        {
            return Awards[Id];
        }

Usage Example

        /// <summary>
        /// Restores the condition / criteria back to default (vanilla)
        /// </summary>
        private void RestoreToDefaultMenuItem_Click(object sender, EventArgs e)
        {
            // Make sure we have an award selected
            if (SelectedAwardNode == null || SelectedAwardNode.Parent == null)
            {
                MessageBox.Show("Please select an award!");
                return;
            }

            // Delay or tree redraw
            AwardConditionsTree.BeginUpdate();

            // Clear all Nodes
            AwardConditionsTree.Nodes.Clear();

            // Parse award conditions into tree view
            IAward SAward = AwardCache.GetAward(SelectedAwardNode.Name);

            SAward.RestoreDefaultConditions();
            AwardConditionsTree.Nodes.Add(SAward.ToTree());

            // Revalidate
            ValidateConditions(SelectedAwardNode, SAward.GetCondition());

            // Conditions tree's are to be expanded at all times
            AwardConditionsTree.ExpandAll();

            // Redraw the tree
            AwardConditionsTree.EndUpdate();
        }
All Usage Examples Of BF2Statistics.MedalData.AwardCache::GetAward