//new character private void OnCharacterNew(object sender, EventArgs e) { var form = new CharacterCreatorForm(); if (form.ShowDialog(this) == DialogResult.Cancel) { return; } _database.AddCharacter(form.Character); RefreshCharacter(); }
private void EditCharacter() { var item = GetSelectedCharacter(); if (item == null) { return; } var form = new CharacterCreatorForm(); form.Character = item; if (form.ShowDialog(this) == DialogResult.Cancel) { return; } _database.EditCharacter(item.Name, form.Character); RefreshCharacter(); }