private void editTitle_Click(object sender, EventArgs e) { using (TitleWindow window = new TitleWindow(TitleWindow.Operation.Edit, Titles.GetSelectedRow())) { var result = window.ShowDialog(); if (result == DialogResult.OK) { string[] editedValues = window.Values; Titles.EditSelectedRow(editedValues); } } }
private void addTitle_Click(object sender, EventArgs e) { using (TitleWindow window = new TitleWindow(TitleWindow.Operation.Add)) { var result = window.ShowDialog(); if (result == DialogResult.OK) { string[] row = window.Values; Titles.Add(row); } } }