aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2019-12-11 20:57:30 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2019-12-11 20:57:30 +0200
commit621230afe9d9040536b43241e63117c9bb34beaa (patch)
treec9f3a3793372a1be6a7e73cdf633e2dae40c21c9 /Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication
parent3f069bb4a5303b2c732ba1263229f62526acc693 (diff)
downloadTango-621230afe9d9040536b43241e63117c9bb34beaa.tar.gz
Tango-621230afe9d9040536b43241e63117c9bb34beaa.zip
Implemented Jobs, JobRuns & Machine Events Synchronization.
Added synchronizations to Updates view on Machine Designer. Removed request response events logging from machine studio. Fixed issue with exception throwing from machine service. Implemented "New jobs synchronized" notification item to PPC. Added synchronization to PPC settings. Added Synchronization view to technician module. Implemented PPC Schema synchronizer utility. Added custom query support to EntityCollectionBuilder. Added synchronization status to TangoUpdate. Removed FK from Jobs and Job runs.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
index 44b6ffded..70ba4b695 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
@@ -33,6 +33,7 @@ using Tango.Core.Threading;
using Tango.PPC.Common.Messages;
using Tango.Core.ExtensionMethods;
using Tango.PPC.Common.Navigation;
+using Tango.PPC.Common.Synchronization;
namespace Tango.PPC.UI.PPCApplication
{
@@ -50,6 +51,7 @@ namespace Tango.PPC.UI.PPCApplication
private IEventLogger _eventLogger;
private IPPCModuleLoader _moduleLoader;
private INotificationProvider _notificationProvider;
+ private IMachineDataSynchronizer _machineDataSynchronizer;
private WatchDogServer _watchdogServer;
private ObservablesContext _machineContext;
private ActionTimer _screenLockTimer;
@@ -147,15 +149,27 @@ namespace Tango.PPC.UI.PPCApplication
}
/// <summary>
+ /// Gets the firmware version.
+ /// </summary>
+ public Version FirmwareVersion
+ {
+ get
+ {
+ return Version.Parse(SettingsManager.Default.GetOrCreate<PPCSettings>().FirmwareVersion);
+ }
+ }
+
+ /// <summary>
/// Initializes a new instance of the <see cref="DefaultPPCApplicationManager"/> class.
/// </summary>
- public DefaultPPCApplicationManager(IMachineProvider machineProvider, IDispatcherProvider dispatcherProvider, IEventLogger eventLogger, IPPCModuleLoader moduleLoader, INotificationProvider notificationProvider)
+ public DefaultPPCApplicationManager(IMachineProvider machineProvider, IDispatcherProvider dispatcherProvider, IEventLogger eventLogger, IPPCModuleLoader moduleLoader, INotificationProvider notificationProvider, IMachineDataSynchronizer machineDataSynchronizer)
{
_notificationProvider = notificationProvider;
_machineProvider = machineProvider;
_dispatcher = dispatcherProvider;
_eventLogger = eventLogger;
_moduleLoader = moduleLoader;
+ _machineDataSynchronizer = machineDataSynchronizer;
if (!DesignMode)
{
@@ -248,6 +262,8 @@ namespace Tango.PPC.UI.PPCApplication
LogManager.Log("Loading machine from database...");
_machineContext = ObservablesContext.CreateDefault();
_machine = new MachineBuilder(_machineContext).SetFirst().WithVersion().WithSettings().WithOrganization().WithConfiguration().WithSpools().WithCats().Build();
+
+
}
initialized = true;
@@ -349,6 +365,9 @@ namespace Tango.PPC.UI.PPCApplication
LogManager.Log("Initializing Machine Provider...");
_machineProvider.Init(_machine, _machineContext);
+ LogManager.Log("Starting Machine Data Synchronizer...");
+ _machineDataSynchronizer.IsEnabled = true;
+
LogManager.Log("Applications initialization completed!");
LogManager.Log("Checking for un-notified PPC view models...");