Exemple #1
0
 public void ClearSelection()
 {
     foreach (var item in CheckBoxItems.Where(item => item.Checked))
     {
         item.Checked = false;
     }
 }
        private void chkLst_Spells_Selected_SelectedIndexChanged(object sender, EventArgs e)
        {
            Spell spell = new Spell();

            if (chkLst_Spell_list.SelectedItem != null)
            {
                CheckBoxItems selectedItem = ((CheckBoxItems)chkLst_Spell_list.SelectedItem);
                string        xmlPath      = selectedItem.path;
                Controllers.SpellController sController = new Controllers.SpellController(xmlPath);
                spell = sController.GetSpell(selectedItem.display);
            }
            pnl_Spell.SetValue(spell);
        }
Exemple #3
0
        private void chkLst_Bestiary_Selected_SelectedIndexChanged(object sender, EventArgs e)
        {
            Creature creature = new Creature();

            if (chkLst_Bestiary_Selected.SelectedItem != null)
            {
                CheckBoxItems selectedItem = ((CheckBoxItems)chkLst_Bestiary_Selected.SelectedItem);
                string        xmlPath      = selectedItem.path;
                Controllers.CreatureController sController = new Controllers.CreatureController(xmlPath);
                creature = sController.GetCreature(selectedItem.display);
            }
            pnl_Bestiary.SetValue(creature);
        }
        private void chkLst_Items_Selected_SelectedIndexChanged(object sender, EventArgs e)
        {
            Item item = new Item();

            if (chkLst_Items_Selected.SelectedItem != null)
            {
                CheckBoxItems selectedItem             = ((CheckBoxItems)chkLst_Items_Selected.SelectedItem);
                string        xmlPath                  = selectedItem.path;
                Controllers.ItemController sController = new Controllers.ItemController(xmlPath);
                item = sController.GetItem(selectedItem.display);
            }
            itemPanel1.SetValue(item);
        }
        public CheckBoxElement this[string title]
        {
            get
            {
                CheckBoxElement element = null;
                if (title.ToLower().Equals("all"))
                {
                    element = new CheckBoxElement(_rootElement);
                }
                else
                {
                    element = CheckBoxItems.FirstOrDefault(x => x.Title.Equals(title));
                }

                return(element);
            }
        }