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:
15
MainForm.cs
15
MainForm.cs
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user