private void sizeToolStripMenuItem_Click(object sender, EventArgs e) { using (SizeDialog dlg = new SizeDialog()) { dlg.Value = imageSize; if (dlg.ShowDialog(this) == DialogResult.OK) { imageSize = dlg.Value; updateStatus(); try { loadImage(loadedImagePath); } catch (Exception ex) { handleUncaughtException(ex); } } } }