Пример #1
0
        private void SpellsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (frmSpell == null)
            {
                frmSpell = new FormSpell
                {
                    MdiParent = this
                };
            }

            frmSpell.Show();
            frmSpell.BringToFront();
        }
Пример #2
0
        private void PrepareForms()
        {
            if (frmClasses == null)
            {
                frmClasses           = new FormClasses();
                frmClasses.MdiParent = this;
            }

            frmClasses.FillListBox();

            if (frmArmor == null)
            {
                frmArmor           = new FormArmor();
                frmArmor.MdiParent = this;
            }

            frmArmor.FillListBox();

            if (frmShield == null)
            {
                frmShield           = new FormShield();
                frmShield.MdiParent = this;
            }

            frmShield.FillListBox();

            if (frmWeapon == null)
            {
                frmWeapon           = new FormWeapon();
                frmWeapon.MdiParent = this;
            }

            frmWeapon.FillListBox();

            if (frmKey == null)
            {
                frmKey           = new FormKey();
                frmKey.MdiParent = this;
            }

            frmKey.FillListBox();

            if (frmChest == null)
            {
                frmChest           = new FormChest();
                frmChest.MdiParent = this;
            }

            frmChest.FillListBox();

            if (frmSkill == null)
            {
                frmSkill           = new FormSkill();
                frmSkill.MdiParent = this;
            }

            frmSkill.FillListBox();

            if (frmSpell == null)
            {
                frmSpell           = new FormSpell();
                frmSpell.MdiParent = this;
            }

            frmSpell.FillListBox();

            classesToolStripMenuItem.Enabled = true;
            itemsToolStripMenuItem.Enabled   = true;
            keysToolStripMenuItem.Enabled    = true;
            chestsToolStripMenuItem.Enabled  = true;
            skillsToolStripMenuItem.Enabled  = true;
            spellsToolStripMenuItem.Enabled  = true;
        }