mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge pull request #2850 from mRemoteNG/copilot/fix-d3d20276-2cee-4d8f-af65-24f3320db36a
Fix password dialog appearing behind splash screen on startup
This commit is contained in:
@@ -216,6 +216,14 @@ namespace mRemoteNG.UI.Forms
|
||||
|
||||
Runtime.ConnectionsService.ConnectionsLoaded += ConnectionsServiceOnConnectionsLoaded;
|
||||
Runtime.ConnectionsService.ConnectionsSaved += ConnectionsServiceOnConnectionsSaved;
|
||||
|
||||
// Close splash screen before loading connections to ensure password dialog appears on top
|
||||
FrmSplashScreenNew splash = FrmSplashScreenNew.GetInstance();
|
||||
if (splash.Dispatcher.CheckAccess())
|
||||
splash.Close();
|
||||
else
|
||||
splash.Dispatcher.Invoke(() => splash.Close());
|
||||
|
||||
CredsAndConsSetup credsAndConsSetup = new();
|
||||
credsAndConsSetup.LoadCredsAndCons();
|
||||
|
||||
@@ -234,12 +242,6 @@ namespace mRemoteNG.UI.Forms
|
||||
|
||||
pnlDock.ShowDocumentIcon = true;
|
||||
|
||||
FrmSplashScreenNew splash = FrmSplashScreenNew.GetInstance();
|
||||
if (splash.Dispatcher.CheckAccess())
|
||||
splash.Close();
|
||||
else
|
||||
splash.Dispatcher.Invoke(() => splash.Close());
|
||||
|
||||
if (Properties.OptionsStartupExitPage.Default.StartMinimized)
|
||||
{
|
||||
WindowState = FormWindowState.Minimized;
|
||||
|
||||
Reference in New Issue
Block a user