private void zoneAdd_Click(object sender, EventArgs e)
        {
            var inform = new Prompt("SubCat");

            if (inform.ShowDialog() == DialogResult.OK)
            {
                var newSubCat = new Subcat()
                {
                    items = new List <Item>(),
                    name  = inform.Value
                };

                ((Pets)this.categoryListBox.SelectedItem).subcats.Add(newSubCat);
                this.zoneListBox.Items.Add(newSubCat);
            }
        }
Exemplo n.º 2
0
 public VisualCategory(string display, Subcat subCategory)
 {
     this.display     = display;
     this.SubCategory = subCategory;
 }