diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-17 09:41:41 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-17 09:41:41 +0200 |
| commit | 9562ca15079cdbf2bcfd11c8c8def4a8e4573a78 (patch) | |
| tree | 480bb5f4a49a398d789197006e66ca76d78ff007 /Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs | |
| parent | fc23da7f3510cce58308841eefb96d59868317ff (diff) | |
| parent | d8d1128887089087578286f37561dc8942726ba4 (diff) | |
| download | Tango-9562ca15079cdbf2bcfd11c8c8def4a8e4573a78.tar.gz Tango-9562ca15079cdbf2bcfd11c8c8def4a8e4573a78.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs')
| -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."); + } } } |
