mirror of
https://github.com/Ylianst/MeshCentralRouter
synced 2025-12-14 23:33:35 +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
|
// Clean up all mappings
|
||||||
foreach (Control c in mapPanel.Controls) {
|
foreach (Control c in mapPanel.Controls) {
|
||||||
if (c.GetType() == typeof(MapUserControl)) {
|
if (c.GetType() == typeof(MapUserControl)) { ((MapUserControl)c).Dispose(); }
|
||||||
((MapUserControl)c).Dispose();
|
|
||||||
((MapUserControl)c).Dispose();
|
|
||||||
mapPanel.Controls.Remove(c);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
mapPanel.Controls.Clear();
|
||||||
noMapLabel.Visible = true;
|
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
|
// Clean up the server
|
||||||
cookieRefreshTimer.Enabled = false;
|
cookieRefreshTimer.Enabled = false;
|
||||||
meshcentral.onStateChanged -= Meshcentral_onStateChanged;
|
meshcentral.onStateChanged -= Meshcentral_onStateChanged;
|
||||||
|
|||||||
Reference in New Issue
Block a user