aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-06-20 16:40:58 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-06-20 16:40:58 +0300
commita5de87ea9863c6e7053e09ed1c2eabf58285af48 (patch)
treef39ec628a4857a1e3e103cc47c91bbadaa67bcd2 /Software/Visual_Studio/PPC/Tango.PPC.UI/Converters
parenta495866908071d2204c8eab85dc0163308c5e53e (diff)
downloadTango-a5de87ea9863c6e7053e09ed1c2eabf58285af48.tar.gz
Tango-a5de87ea9863c6e7053e09ed1c2eabf58285af48.zip
PPC. Added Real Time Graph
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Converters')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/StatisticTabToVisibilityConverter.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/StatisticTabToVisibilityConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/StatisticTabToVisibilityConverter.cs
new file mode 100644
index 000000000..06c75a999
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/StatisticTabToVisibilityConverter.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+using static Tango.PPC.UI.ViewModels.MachineStatusViewVM;
+
+namespace Tango.PPC.UI.Converters
+{
+ public class StatisticTabToVisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ StatisticTab selected = (StatisticTab)Enum.Parse(typeof(StatisticTab), parameter.ToString());
+ StatisticTab statTab = (StatisticTab)value;
+
+ return statTab.Equals(selected) ? Visibility.Visible : Visibility.Hidden;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}