BF2Statistics.MedalData.Award.ToTree C# (CSharp) Method

ToTree() public method

Converts the medal's conditions to a TreeView
public ToTree ( ) : TreeNode
return System.Windows.Forms.TreeNode
        public TreeNode ToTree()
        {
            return (Conditions == null) ? null : Conditions.ToTree();
        }

Usage Example

        /// <summary>
        /// Used by the parser to add found awards to the list
        /// </summary>
        /// <param name="A">The Award Object To Add</param>
        public static void AddAward(Award A)
        {
            // Add award to individual award type collection
            switch (Award.GetType(A.Id))
            {
                case AwardType.Badge:
                    Badges.Add(A);
                    break;
                case AwardType.Medal:
                    Medals.Add(A);
                    break;
                case AwardType.Ribbon:
                    Ribbons.Add(A);
                    break;
            }

            // Add the award to the overall awards cache
            Awards.Add(A.Id, A);

            // Build the award tree here to Initially check for condition errors
            A.ToTree();
        }
All Usage Examples Of BF2Statistics.MedalData.Award::ToTree