Exemple #1
0
        private void OnCharacterAdd(object sender, EventArgs e)
        {
            var form = new Create_New_Character();

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

            if (character == null)
            {
                return;
            }

            var form = new Create_New_Character();

            form.Character = character;

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