private void OnCheatEdit(object sender, EventArgs eventArgs) { CheatDetailsForm cheatDetailsForm = new CheatDetailsForm(selectedCheat, false); if (cheatDetailsForm.ShowDialog() == DialogResult.Cancel) { return; } UpdateCheatListBox(); }
private void OnCheatNewManualEntry(object sender, EventArgs eventArgs) { Cheat newCheat = new Cheat(); CheatDetailsForm cheatDetailsForm = new CheatDetailsForm(newCheat, true); if (cheatDetailsForm.ShowDialog() == DialogResult.Cancel) { return; } cheatSystem.AddCheat(newCheat); UpdateCheatListBox(); }
private void OnCreateCheatMenuItem(object sender, EventArgs eventArgs) { if (resultListBox.SelectedIndex < 0) { return; } Cheat newCheat = new Cheat(); newCheat.Address = Convert.ToUInt16( resultListBox.SelectedItem.ToString().Substring(0, 4), 16); CheatDetailsForm cheatDetailsForm = new CheatDetailsForm(newCheat, false); if (cheatDetailsForm.ShowDialog() == DialogResult.Cancel) { return; } cheatSystem.AddCheat(newCheat); }