private void buttonUpdateThumb_Click(object sender, EventArgs e) { try { AddImageForm dlg = new AddImageForm(this.getSelectedNameId(), true); if (dlg.ShowDialog() == DialogResult.OK) { updateNamesListBox(); } } catch (Exception) { MessageBox.Show("Failed!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }