From ecf55f4193c0a7ab273c7e8243e446a2f2c32d51 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 16 Dec 2018 08:22:45 +0200 Subject: Working on PPC tech mode & logging module. Working on PPC date picker & calendar. Implemented no-permissions view. --- .../PPCApplication/DefaultPPCApplicationManager.cs | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs') 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 f8a0fdc36..f9830940b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -26,6 +26,7 @@ using Tango.PPC.Common.Threading; using System.Diagnostics; using Tango.PPC.Common.EventLogging; using Tango.BL.Enumerations; +using Tango.PPC.Common.Notifications; namespace Tango.PPC.UI.PPCApplication { @@ -41,6 +42,8 @@ namespace Tango.PPC.UI.PPCApplication private Machine _machine; private IDispatcherProvider _dispatcher; private IEventLogger _eventLogger; + private IPPCModuleLoader _moduleLoader; + private INotificationProvider _notificationProvider; /// /// Occurs when the application has started. @@ -102,12 +105,13 @@ namespace Tango.PPC.UI.PPCApplication /// /// Initializes a new instance of the class. /// - public DefaultPPCApplicationManager(IMachineProvider machineProvider, IDispatcherProvider dispatcherProvider, IEventLogger eventLogger) + public DefaultPPCApplicationManager(IMachineProvider machineProvider, IDispatcherProvider dispatcherProvider, IEventLogger eventLogger, IPPCModuleLoader moduleLoader, INotificationProvider notificationProvider) { + _notificationProvider = notificationProvider; _machineProvider = machineProvider; _dispatcher = dispatcherProvider; _eventLogger = eventLogger; - ; + _moduleLoader = moduleLoader; if (!DesignMode) { @@ -320,5 +324,23 @@ namespace Tango.PPC.UI.PPCApplication Process.Start(Application.ResourceAssembly.Location); Environment.Exit(0); } + + /// + /// Enteres the application technician mode. + /// + public void EnterTechnicianMode() + { + _moduleLoader.AllModules.ToList().ForEach(x => x.OnTechnicianEntered()); + _notificationProvider.ShowInfo("Technician mode is now enabled."); + } + + /// + /// Exits the application technician mode. + /// + public void ExitTechnicianMode() + { + _moduleLoader.AllModules.ToList().ForEach(x => x.OnTechnicianExited()); + _notificationProvider.ShowInfo("Technician mode is now disabled."); + } } } -- cgit v1.3.1