From d3b9770dd5e1d34e9433a115cbed5ef1a53546f6 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 26 Nov 2018 18:02:02 +0200 Subject: Working on PPC event notifications. --- .../Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication') 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 4021d89ef..957a4ee1d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -24,6 +24,8 @@ using System.Data.SqlClient; using Tango.BL.Builders; using Tango.PPC.Common.Threading; using System.Diagnostics; +using Tango.PPC.Common.EventLogging; +using Tango.BL.Enumerations; namespace Tango.PPC.UI.PPCApplication { @@ -38,6 +40,7 @@ namespace Tango.PPC.UI.PPCApplication private IMachineProvider _machineProvider; private Machine _machine; private IDispatcherProvider _dispatcher; + private IEventLogger _eventLogger; /// /// Occurs when the application has started. @@ -99,10 +102,12 @@ namespace Tango.PPC.UI.PPCApplication /// /// Initializes a new instance of the class. /// - public DefaultPPCApplicationManager(IMachineProvider machineProvider, IDispatcherProvider dispatcherProvider) + public DefaultPPCApplicationManager(IMachineProvider machineProvider, IDispatcherProvider dispatcherProvider, IEventLogger eventLogger) { _machineProvider = machineProvider; _dispatcher = dispatcherProvider; + _eventLogger = eventLogger; + ; if (!DesignMode) { @@ -166,6 +171,8 @@ namespace Tango.PPC.UI.PPCApplication _machine = new MachineBuilder(ObservablesContext.CreateDefault()).SetFirst().WithOrganization().WithConfiguration().Build(); } + _eventLogger.Log(EventTypes.ApplicationStarted, "Application Started!"); + initialized = true; } catch (Exception ex) -- cgit v1.3.1