From 96fe20a20e7c107473cefeda3b06950955952bec Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 15 Mar 2020 01:55:42 +0200 Subject: Improved Console. Increased SignalR adapter connect timeout. Implemented Tango.FileSystem !!! --- .../Converters/DateTimeUtcToLocalDateTime.cs | 30 ++++++++++++++++++++++ .../Tango.SharedUI/Tango.SharedUI.csproj | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Software/Visual_Studio/Tango.SharedUI/Converters/DateTimeUtcToLocalDateTime.cs (limited to 'Software/Visual_Studio/Tango.SharedUI') diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/DateTimeUtcToLocalDateTime.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/DateTimeUtcToLocalDateTime.cs new file mode 100644 index 000000000..7ce4a6532 --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/DateTimeUtcToLocalDateTime.cs @@ -0,0 +1,30 @@ +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 DateTimeUtcToLocalDateTime : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + try + { + return ((DateTime)value).ToLocalTime(); + } + catch + { + return value; + } + } + + 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 834e9e1fe..4764d0eac 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj +++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj @@ -99,6 +99,7 @@ + @@ -253,7 +254,7 @@ - + \ No newline at end of file -- cgit v1.3.1