private void AddToolStripMenuItem_Click(object sender, EventArgs e) { var form = new CreateNewCharacter(); if (form.ShowDialog(this) == DialogResult.OK) { AddCharacter(form.Character); } UpdateUI(); }
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(); } }