* Fix: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/issues/153
Add temperature Sensor Ranges

Fix: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/issues/152
New exit function

Fix: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/pull/138
No drive info exception when LHM is in a Virtual Machine

* Bugfix Update
This commit is contained in:
sebastian-dev
2019-10-20 10:27:37 +02:00
committed by Phyxion
parent af9fb0231d
commit fa2ef007af
4 changed files with 25 additions and 8 deletions
+14 -5
View File
@@ -457,7 +457,7 @@ namespace LibreHardwareMonitor.UI
_settings.SetValue("plotForm.Height", _plotForm.Bounds.Height);
}
}
_plotForm.Move += MoveOrResizePlotForm;
_plotForm.Resize += MoveOrResizePlotForm;
@@ -614,7 +614,7 @@ namespace LibreHardwareMonitor.UI
private void ExitClick(object sender, EventArgs e)
{
Close();
CloseApplication();
}
private void Timer_Tick(object sender, EventArgs e)
@@ -672,8 +672,7 @@ namespace LibreHardwareMonitor.UI
Height = _settings.GetValue("mainForm.Height", 640)
};
Rectangle fullWorkingArea = new Rectangle(int.MaxValue, int.MaxValue,
int.MinValue, int.MinValue);
Rectangle fullWorkingArea = new Rectangle(int.MaxValue, int.MaxValue, int.MinValue, int.MinValue);
foreach (Screen screen in Screen.AllScreens)
fullWorkingArea = Rectangle.Union(fullWorkingArea, screen.Bounds);
@@ -685,10 +684,13 @@ namespace LibreHardwareMonitor.UI
newBounds.Y = (Screen.PrimaryScreen.WorkingArea.Height / 2) - (newBounds.Height / 2);
}
Bounds = newBounds;
FormClosed += MainForm_FormClosed;
}
private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
private void CloseApplication()
{
FormClosed -= MainForm_FormClosed;
Visible = false;
_systemTray.IsMainIconEnabled = false;
timer.Enabled = false;
@@ -697,6 +699,13 @@ namespace LibreHardwareMonitor.UI
if (_runWebServer.Value)
Server.Quit();
_systemTray.Dispose();
Application.Exit();
}
private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
{
CloseApplication();
}
private void AboutMenuItem_Click(object sender, EventArgs e)