Fixed Issue 125.

This commit is contained in:
Michael Möller 2010-10-05 19:27:51 +00:00
parent 01b122da1d
commit 3e65f5bfc2

View File

@ -350,8 +350,15 @@ namespace OpenHardwareMonitor.GUI {
settings.SetValue("treeView.Columns." + column.Header + ".Width",
column.Width);
settings.Save(Path.ChangeExtension(
System.Windows.Forms.Application.ExecutablePath, ".config"));
string fileName = Path.ChangeExtension(
System.Windows.Forms.Application.ExecutablePath, ".config");
try {
settings.Save(fileName);
} catch (UnauthorizedAccessException) {
MessageBox.Show("Access to the path '" + fileName + "' is denied. " +
"The current seetings could not be saved.",
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void MainForm_FormClosed(object sender, FormClosedEventArgs e) {