aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2020-02-26 18:25:52 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2020-02-26 18:25:52 +0200
commitafb6bbb2123932b3562e1af993eb847d8147bf58 (patch)
treea2c458a077551af5be35a729c4e6d976a92b9387 /Software/Visual_Studio/Tango.SharedUI
parent61f2658295193dca0fdaa58744925d90bd2f4044 (diff)
downloadTango-afb6bbb2123932b3562e1af993eb847d8147bf58.tar.gz
Tango-afb6bbb2123932b3562e1af993eb847d8147bf58.zip
Major Changes Regarding RML & SPOOL parameters changes!
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Converters/EmptyStringToNullConverter.cs31
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj3
2 files changed, 33 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/EmptyStringToNullConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/EmptyStringToNullConverter.cs
new file mode 100644
index 000000000..8d62178c7
--- /dev/null
+++ b/Software/Visual_Studio/Tango.SharedUI/Converters/EmptyStringToNullConverter.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Tango.SharedUI.Converters
+{
+ public class EmptyStringToNullConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null)
+ {
+ if (String.IsNullOrWhiteSpace(value.ToString()))
+ {
+ return null;
+ }
+ }
+
+ return value;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj
index dddaa750c..092afd777 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj
+++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj
@@ -100,6 +100,7 @@
<Compile Include="Converters\DateTimeUTCToStringConverter.cs" />
<Compile Include="Converters\DisplayMemberPathConverter.cs" />
<Compile Include="Converters\DoubleToIntConverter.cs" />
+ <Compile Include="Converters\EmptyStringToNullConverter.cs" />
<Compile Include="Converters\EnumToBooleanConverter.cs" />
<Compile Include="Converters\EnumToDescriptionConverter.cs" />
<Compile Include="Converters\EnumToItemsSourceConverter.cs" />
@@ -243,7 +244,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file