From bf40501d42c26b3e4357800f57d4c19c09ae3788 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 12 Mar 2023 09:57:22 +0200 Subject: VFT dialog Eureka. Added converter. --- .../Dialogs/VectorFineTuningDialog.xaml | 2 +- .../Converters/IsEurekaToBooleanConverter.cs | 32 ++++++++++++++++++++++ .../PPC/Tango.PPC.Common/Resources/Merged.xaml | 1 + .../PPC/Tango.PPC.Common/Tango.PPC.Common.csproj | 3 +- 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/Converters/IsEurekaToBooleanConverter.cs (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml index b967ddec2..0e72c6aa0 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml @@ -15,7 +15,7 @@ mc:Ignorable="d" Background="{StaticResource TangoMidBackgroundBrush}" d:DesignHeight="1280" d:DesignWidth="800" Width="750" Height="1200" - d:DataContext="{d:DesignInstance Type=vm:VectorFineTuningDialogVM, IsDesignTimeCreatable=False}" > + d:DataContext="{d:DesignInstance Type=vm:VectorFineTuningDialogVM, IsDesignTimeCreatable=False}" touch:TouchPanelEureka.MakeEurekaFullScreen="True"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Converters/IsEurekaToBooleanConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Converters/IsEurekaToBooleanConverter.cs new file mode 100644 index 000000000..3596a86be --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Converters/IsEurekaToBooleanConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using Tango.Core.DI; +using Tango.PPC.Common.Build; + +namespace Tango.PPC.Common.Converters +{ + public class IsEurekaToBooleanConverter : IValueConverter + { + private static BuildType? _buildType = null; + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (_buildType == null) + { + _buildType = TangoIOC.Default.GetInstance().BuildType; + } + + return _buildType == BuildType.Eureka; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml index 780941f66..6c8afc57a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -71,6 +71,7 @@ +