|
@@ -336,29 +336,31 @@ public partial class MainWindow : IPanelHostControl
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
+ });
|
|
|
|
|
|
- if (startupException is null && App.DatabaseSettings.Autologin)
|
|
|
+ if (startupException is null && App.DatabaseSettings.Autologin)
|
|
|
+ {
|
|
|
+ try
|
|
|
{
|
|
|
- try
|
|
|
+ Logger.Send(LogType.Information, "", "Logging in");
|
|
|
+ Dispatcher.Invoke(() =>
|
|
|
{
|
|
|
- Logger.Send(LogType.Information, "", "Logging in");
|
|
|
- progress.Report("Logging in");
|
|
|
- Dispatcher.Invoke(() =>
|
|
|
- {
|
|
|
- loginStatus = TryAutoLogin();
|
|
|
- });
|
|
|
- if(loginStatus == ValidationStatus.VALID)
|
|
|
+ loginStatus = TryAutoLogin();
|
|
|
+ });
|
|
|
+ if(loginStatus == ValidationStatus.VALID)
|
|
|
+ {
|
|
|
+ // Do the AfterLogin() here so that we aren't opening and closing progress windows again and again.
|
|
|
+ Progress.ShowModal("Loading PRS", progress =>
|
|
|
{
|
|
|
- // Do the AfterLogin() here so that we aren't opening and closing progress windows again and again.
|
|
|
AfterLogin(progress);
|
|
|
- }
|
|
|
- }
|
|
|
- catch(Exception e)
|
|
|
- {
|
|
|
- startupException = e;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ catch(Exception e)
|
|
|
+ {
|
|
|
+ startupException = e;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (startupException != null)
|
|
|
{
|
|
@@ -373,6 +375,14 @@ public partial class MainWindow : IPanelHostControl
|
|
|
{
|
|
|
AfterLogin(null);
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ConfigureMainScreen(null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ConfigureMainScreen(null);
|
|
|
}
|
|
|
|
|
|
ProfileName.Content = App.Profile;
|
|
@@ -743,7 +753,6 @@ public partial class MainWindow : IPanelHostControl
|
|
|
|
|
|
BackstageSeparator1a.Visibility = Visibility.Visible;
|
|
|
SystemLogsButton.Visibility = Visibility.Visible;
|
|
|
- IssuesButton.Visibility = Visibility.Visible;
|
|
|
|
|
|
SetVisibility(DocumentTypeList, ClientFactory.IsSupported<DocumentType>() && Security.IsAllowed<CanViewDocumentTypes>());
|
|
|
SetVisibleIfAny(BackstageSeparator2, DocumentTypeList);
|