|
@@ -1,7 +1,6 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
-using System.Threading;
|
|
|
using System.Threading.Tasks;
|
|
|
using Comal.Classes;
|
|
|
using InABox.Clients;
|
|
@@ -361,17 +360,18 @@ namespace PRS.Mobile
|
|
|
App.Transport.OnOpen += OnTransportConnected;
|
|
|
App.Transport.OnClose += OnTransportDisconnected;
|
|
|
|
|
|
-
|
|
|
- DigitalFormDocumentFactory.Run<MobileDigitalFormDocumentHandler>(
|
|
|
+ DigitalFormDocumentFactory.Init(
|
|
|
+ new MobileDigitalFormDocumentHandler(
|
|
|
b =>
|
|
|
{
|
|
|
IsBackgroundUpdateStatusActive = b;
|
|
|
BackgroundUpdateStatusChanged?.Invoke(this, EventArgs.Empty);
|
|
|
- }
|
|
|
+ })
|
|
|
);
|
|
|
-
|
|
|
+ DigitalFormDocumentFactory.Run();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public bool IsBackgroundUpdateStatusActive { get; private set; }
|
|
|
|
|
|
public event BackgroundUpdateStatusEvent BackgroundUpdateStatusChanged;
|
|
@@ -384,12 +384,14 @@ namespace PRS.Mobile
|
|
|
|
|
|
private void OnTransportDisconnected(IRpcTransport transport, RpcTransportCloseArgs e)
|
|
|
{
|
|
|
+ DigitalFormDocumentFactory.Stop();
|
|
|
TransportDisconnected?.Invoke(new TransportDisconnectedEventArgs());
|
|
|
Task.Run(() =>
|
|
|
{
|
|
|
while (!IsConnected())
|
|
|
App.Transport.Connect();
|
|
|
ClientFactory.Validate(ClientFactory.SessionID);
|
|
|
+ DigitalFormDocumentFactory.Run();
|
|
|
});
|
|
|
}
|
|
|
|