private void add_ToolStripButton_Click(object sender, EventArgs e) { using (SoftwareInstallerForm installerDialog = new SoftwareInstallerForm()) { if (installerDialog.ShowDialog(this) == DialogResult.OK) { _installers.Add(installerDialog.SoftwareInstaller); _dataContext.AddToSoftwareInstallers(installerDialog.SoftwareInstaller); RefreshInstallerGrid(); } } }