Esempio n. 1
0
        private void createList()
        {
            if (comboboxes != null)
            {
                comboboxes.Clear();
            }

            comboboxes = new List <ComboboxNew> {
            };

            foreach (var item in namesArray)
            {
                var combobox = new ComboboxNew(withAdd);
                combobox.setName(item.ToString());

                if (item is names.room)
                {
                    combobox.SelectedIndexChanged += new EventHandler(Room_SelectedIndexChanged);
                }
                else if (item is names.wardrobe)
                {
                    combobox.SelectedIndexChanged += new EventHandler(Wardrobe_SelectedIndexChanged);
                }

                comboboxes.Add(combobox);
            }
        }
Esempio n. 2
0
 private static void disposeCombobox(ComboboxNew combobox)
 {
     combobox.SelectedItem = null;
     combobox.Items.Clear();
 }