Add() 공개 메소드

public Add ( IndentedComboBox item ) : void
item IndentedComboBox
리턴 void
예제 #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 + ")";
            }
        }