Fix active/save Profile

Fix SingleInstance
MainForm Refactors
This commit is contained in:
ChsBuffer
2021-11-06 19:04:42 +08:00
parent 6b1c1cfc37
commit a13b83fd9f
5 changed files with 85 additions and 97 deletions

View File

@@ -255,5 +255,17 @@ namespace Netch.Utils
var endIndex = str.IndexOf(':');
return endIndex == -1 ? str : str[..endIndex];
}
public static void ActivateVisibleWindows()
{
foreach (var f in Application.OpenForms.Cast<Form>())
{
if (!f.Visible)
continue;
f.WindowState = FormWindowState.Normal;
f.Activate();
}
}
}
}