Esempio n. 1
0
        private void AddToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new CreateNewCharacter();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                AddCharacter(form.Character);
            }
            UpdateUI();
        }
Esempio n. 2
0
        private void EditToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var character = GetSelectedCharacter();

            if (character == null)
            {
                return;
            }

            var form = new CreateNewCharacter();

            form.Character = character;

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                RemoveCharacter(character);
                AddCharacter(form.Character);
                UpdateUI();
            }
        }