Browse Source

Fixed DigitalFormDocumentFactory Startup code

frogsoftware 1 year ago
parent
commit
dd8b0e3f18
1 changed files with 13 additions and 9 deletions
  1. 13 9
      prs.desktop/MainWindow.xaml.cs

+ 13 - 9
prs.desktop/MainWindow.xaml.cs

@@ -257,16 +257,20 @@ namespace PRSDesktop
                 ImportFactory.Register(typeof(ExcelImporter<>), "Excel File", "Excel Files (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm");
 
                 FormUtils.Register();
-
-                DigitalFormDocumentFactory.Run(
-                    new WpfDigitalFormDocumentHandler(() => _transport?.IsConnected() ?? false),
-                    b => Dispatcher.BeginInvoke(() =>
-                    {
-                        BackgroundUploadStatus.Visibility = b 
-                            ? Visibility.Visible 
-                            : Visibility.Hidden;
-                    })
+                
+                DigitalFormDocumentFactory.Init(
+                    new WpfDigitalFormDocumentHandler(
+                        b => Dispatcher.BeginInvoke(() =>
+                            {
+                                BackgroundUploadStatus.Visibility = b
+                                    ? Visibility.Visible
+                                    : Visibility.Hidden;
+                            }
+                        ),
+                        () => _transport?.IsConnected() ?? false
+                    )
                 );
+                DigitalFormDocumentFactory.Run();
                 
                 Logger.Send(LogType.Information, "", "Registering Classes");