1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-06 00:13:33 +00:00

Fixed cleanup on logout.

This commit is contained in:
Ylian Saint-Hilaire
2020-03-21 00:36:21 -07:00
parent bc90168df7
commit e57fdc8aed

View File

@@ -334,14 +334,19 @@ namespace MeshCentralRouter
// Clean up all mappings
foreach (Control c in mapPanel.Controls) {
if (c.GetType() == typeof(MapUserControl)) {
((MapUserControl)c).Dispose();
((MapUserControl)c).Dispose();
mapPanel.Controls.Remove(c);
}
if (c.GetType() == typeof(MapUserControl)) { ((MapUserControl)c).Dispose(); }
}
mapPanel.Controls.Clear();
noMapLabel.Visible = true;
// Clean up all devices
foreach (Control c in devicesPanel.Controls) {
if (c.GetType() == typeof(DeviceUserControl)) { ((DeviceUserControl)c).Dispose(); }
}
devicesPanel.Controls.Clear();
noSearchResultsLabel.Visible = false;
noDevicesLabel.Visible = true;
// Clean up the server
cookieRefreshTimer.Enabled = false;
meshcentral.onStateChanged -= Meshcentral_onStateChanged;