diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2018-12-16 08:22:45 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2018-12-16 08:22:45 +0200 |
| commit | ecf55f4193c0a7ab273c7e8243e446a2f2c32d51 (patch) | |
| tree | aa965e23ba3d0dcd4fecf739b4ed95040553b628 /Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication | |
| parent | b279560f0b4dfdd16dea6b70975dfc1961b8d61e (diff) | |
| download | Tango-ecf55f4193c0a7ab273c7e8243e446a2f2c32d51.tar.gz Tango-ecf55f4193c0a7ab273c7e8243e446a2f2c32d51.zip | |
Working on PPC tech mode & logging module.
Working on PPC date picker & calendar.
Implemented no-permissions view.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs | 26 |
1 files changed, 24 insertions, 2 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 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; /// <summary> /// Occurs when the application has started. @@ -102,12 +105,13 @@ namespace Tango.PPC.UI.PPCApplication /// <summary> /// Initializes a new instance of the <see cref="DefaultPPCApplicationManager"/> class. /// </summary> - 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); } + + /// <summary> + /// Enteres the application technician mode. + /// </summary> + public void EnterTechnicianMode() + { + _moduleLoader.AllModules.ToList().ForEach(x => x.OnTechnicianEntered()); + _notificationProvider.ShowInfo("Technician mode is now enabled."); + } + + /// <summary> + /// Exits the application technician mode. + /// </summary> + public void ExitTechnicianMode() + { + _moduleLoader.AllModules.ToList().ForEach(x => x.OnTechnicianExited()); + _notificationProvider.ShowInfo("Technician mode is now disabled."); + } } } |
