Ejemplo n.º 1
0
        private void OnCharacterAdd(object sender, EventArgs e)
        {
            var form = new CharacterForm();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                AddCharacter(form.Character);
            }
            UpdateUI();
        }
Ejemplo n.º 2
0
 private void buttonStart_Click(object sender, EventArgs e)
 {
     try
     {
         CharacterForm cf = new CharacterForm((int)nudCharacterPoints.Value);
         cf.ShowDialog();
     }
     catch (Exception exe)
     {
         MessageBox.Show(exe.Message + "\n\n" + exe.StackTrace);
     }
 }
Ejemplo n.º 3
0
        private void OnCharacterEdit(object sender, EventArgs e)
        {
            var character = GetSelectedCharacter();

            if (character == null)
            {
                return;
            }

            var form = new CharacterForm();

            form.Character = character;

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