BF2Statistics.MedalData.ConditionListForm.UpdateRoot C# (CSharp) Method

UpdateRoot() private method

private UpdateRoot ( ) : void
return void
        private void UpdateRoot()
        {
            ConditionList NList = new ConditionList(List.Type);

            // Add existing nodes to the new list
            foreach (TreeNode E in ConditionTree.Nodes[0].Nodes)
                NList.Add((Condition)E.Tag);

            // Add condition value if enabled
            if (ValueBox.Enabled)
                NList.Add(new ConditionValue(ValueBox.Value.ToString()));

            // update tree
            ConditionTree.BeginUpdate();
            ConditionTree.Nodes.Clear();
            ConditionTree.Nodes.Add(NList.ToTree());
            ConditionTree.ExpandAll();
            ConditionTree.EndUpdate();
        }