public void Add() { using var dialog = new NewErrorDialog(Module, null, this); if (dialog.ShowDialog() != DialogResult.OK) { return; } AddItem(dialog.Item); }
public void Edit() { var dialog = new NewErrorDialog(this.Module, this.SelectedItem, this); if (dialog.ShowDialog() != DialogResult.OK) { return; } this.EditItem(this.SelectedItem); }
public void Edit() { using (var dialog = new NewErrorDialog(Module, SelectedItem, this)) { if (dialog.ShowDialog() != DialogResult.OK) { return; } } EditItem(SelectedItem); }