private void RestoreDefsClicked(object sender, EventArgs e) { try { viewOpts.Load(App.SettingsFileName); } catch (FileNotFoundException) { viewOpts = new ViewOpts(); } catch (IOException) { MessageBox.Show(App.GetStr("Unable to read from the setting file!"), App.GetStr("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); return; } catch (XmlException) { MessageBox.Show(App.GetStr("The setting file is corrupted!"), App.GetStr("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); return; } catch (FormatException) { MessageBox.Show(App.GetStr("The setting file is corrupted!"), App.GetStr("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); return; } SetOptions(viewOpts); }