FC3Editor.UI.IndentedComboBox.Item.Add C# (CSharp) Method

Add() public method

public Add ( IndentedComboBox item ) : void
item IndentedComboBox
return void
            public void Add(IndentedComboBox.Item item)
            {
                this.m_childList.Add(item);
                item.Depth = this.Depth + 1;
                item.Owner = this.Owner;
            }

Usage Example

Exemplo n.º 1
0
        private void FillCategories(Inventory.Entry entry, IndentedComboBox.Item item)
        {
            if (!entry.IsDirectory)
            {
                return;
            }
            if (entry.Deleted)
            {
                return;
            }
            IndentedComboBox.Item item2 = new IndentedComboBox.Item();
            item2.Tag   = entry;
            item2.Text  = entry.DisplayName;
            item2.Image = entry.Icon;
            item.Add(item2);
            int num = 0;

            Inventory.Entry[] children = entry.Children;
            for (int i = 0; i < children.Length; i++)
            {
                Inventory.Entry entry2 = children[i];
                if (entry2.IsDirectory)
                {
                    this.FillCategories(entry2, item2);
                }
                else
                {
                    num++;
                }
            }
            if (num > 0)
            {
                item2.SubText = "(" + num + ")";
            }
        }
IndentedComboBox.Item