private void editAchievement_Click(object sender, EventArgs e) { using (AchievementWindow window = new AchievementWindow(AchievementWindow.Operation.Edit, Achievements.GetSelectedRow())) { var result = window.ShowDialog(); if (result == DialogResult.OK) { string row = window.Value; Achievements.EditSelectedRow(row); } } }
private void addAchievement_Click(object sender, EventArgs e) { using (AchievementWindow window = new AchievementWindow(AchievementWindow.Operation.Add)) { var result = window.ShowDialog(); if (result == DialogResult.OK) { string row = window.Value; Achievements.Add(row); } } }