From ae1cfd30f1efbd385eac04b3d02fa1ed161058a3 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 17 Dec 2018 16:43:40 +0200 Subject: Add AppButtons to PPC. Implemented Stop & Start job app buttons! --- .../Converters/IsNullToVisibilityConverter.cs | 24 ++++++++++++++++++++++ .../Tango.SharedUI/Tango.SharedUI.csproj | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Software/Visual_Studio/Tango.SharedUI/Converters/IsNullToVisibilityConverter.cs (limited to 'Software/Visual_Studio/Tango.SharedUI') diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/IsNullToVisibilityConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/IsNullToVisibilityConverter.cs new file mode 100644 index 000000000..4ce6d2f36 --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/IsNullToVisibilityConverter.cs @@ -0,0 +1,24 @@ +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; + +namespace Tango.SharedUI.Converters +{ + public class IsNullToVisibilityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return value != null ? Visibility.Visible : Visibility.Collapsed; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj index 04147e866..65aaf2a6f 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj +++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj @@ -102,6 +102,7 @@ + @@ -231,7 +232,7 @@ - + \ No newline at end of file -- cgit v1.3.1