Fixed Issue 179.

This commit is contained in:
Michael Möller
2011-03-16 22:10:26 +00:00
parent 0aa52cfc64
commit ca1f45475d
3 changed files with 37 additions and 7 deletions

View File

@@ -388,9 +388,10 @@ namespace OpenHardwareMonitor.GUI {
Visible = false;
SaveConfiguration();
timer.Enabled = false;
systemTray.Dispose();
systemTray.IsMainIconEnabled = false;
timer.Enabled = false;
computer.Close();
systemTray.Dispose();
}
private void aboutMenuItem_Click(object sender, EventArgs e) {
@@ -593,5 +594,15 @@ namespace OpenHardwareMonitor.GUI {
settings.SetValue("mainForm.Height", Bounds.Height);
}
}
private void resetClick(object sender, EventArgs e) {
// disable the fallback MainIcon during reset, otherwise icon visibility
// might be lost
systemTray.IsMainIconEnabled = false;
computer.Close();
computer.Open();
// restore the MainIcon setting
systemTray.IsMainIconEnabled = minimizeToTray.Value;
}
}
}