aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-26 18:02:02 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-26 18:02:02 +0200
commitd3b9770dd5e1d34e9433a115cbed5ef1a53546f6 (patch)
tree0c3a48ae71edc947956c10fea8a411ad80564f34 /Software/Visual_Studio/PPC/Tango.PPC.UI
parent6fb22273d15ed476ccbd3820de6af9bc0deee793 (diff)
downloadTango-d3b9770dd5e1d34e9433a115cbed5ef1a53546f6.tar.gz
Tango-d3b9770dd5e1d34e9433a115cbed5ef1a53546f6.zip
Working on PPC event notifications.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs9
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml2
3 files changed, 10 insertions, 3 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 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;
/// <summary>
/// Occurs when the application has started.
@@ -99,10 +102,12 @@ namespace Tango.PPC.UI.PPCApplication
/// <summary>
/// Initializes a new instance of the <see cref="DefaultPPCApplicationManager"/> class.
/// </summary>
- 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)
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs
index 4bf83242f..11751d822 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs
@@ -68,10 +68,10 @@ namespace Tango.PPC.UI
TangoIOC.Default.Register<IPPCModuleLoader, DefaultPPCModuleLoader>();
TangoIOC.Default.Register<INavigationManager, DefaultNavigationManager>();
TangoIOC.Default.Register<IMachineProvider, DefaultMachineProvider>();
+ TangoIOC.Default.Register<IEventLogger, DefaultEventLogger>();
TangoIOC.Default.Register<IPPCApplicationManager, DefaultPPCApplicationManager>();
TangoIOC.Default.Register<ExternalBridgeScanner, ExternalBridgeScanner>();
TangoIOC.Default.Register<IDiagnosticsFrameProvider, DefaultDiagnosticsFrameProvider>();
- TangoIOC.Default.Register<IEventLogger, DefaultEventLogger>();
TangoIOC.Default.Register<IPPCExternalBridgeService, PPCExternalBridgeService>();
TangoIOC.Default.Register<IMachineSetupManager, MachineSetupManager>();
TangoIOC.Default.Register<IMachineUpdateManager, MachineUpdateManager>();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
index 4ca7e39ec..8d438aa8f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
@@ -32,7 +32,7 @@
<DataTemplate>
<touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="0" Command="{Binding PressedCommand}" components:TransformationHelper.TransformWhenPressed="False">
<DockPanel>
- <touch:TouchIconButton DockPanel.Dock="Right" Background="Transparent" Padding="20" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="60" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="White" />
+ <touch:TouchIconButton Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}" DockPanel.Dock="Right" Background="Transparent" Padding="20" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="60" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="White" />
<ContentControl Content="{Binding Converter={StaticResource ItemBaseConverter}}"/>
</DockPanel>
</touch:TouchButton>