diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-03-15 01:55:42 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-03-15 01:55:42 +0200 |
| commit | 96fe20a20e7c107473cefeda3b06950955952bec (patch) | |
| tree | 0c7efeb2a332eabdab4a551734eb94f4828aa381 /Software/Visual_Studio/Tango.SharedUI | |
| parent | bb82e09c0080cacec65512805ac88f6b3416c3f2 (diff) | |
| download | Tango-96fe20a20e7c107473cefeda3b06950955952bec.tar.gz Tango-96fe20a20e7c107473cefeda3b06950955952bec.zip | |
Improved Console.
Increased SignalR adapter connect timeout.
Implemented Tango.FileSystem !!!
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Converters/DateTimeUtcToLocalDateTime.cs | 30 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj | 3 |
2 files changed, 32 insertions, 1 deletions
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 @@ <Compile Include="Converters\ColorComponentToOpacityConverter.cs" /> <Compile Include="Converters\ColorToComponentsConverter.cs" /> <Compile Include="Converters\ColorToIntegerConverter.cs" /> + <Compile Include="Converters\DateTimeUtcToLocalDateTime.cs" /> <Compile Include="Converters\DateTimeUTCToShortDateConverter.cs" /> <Compile Include="Converters\DateTimeUTCToShortDateTimeConverter.cs" /> <Compile Include="Converters\DateTimeUTCToStringConverter.cs" /> @@ -253,7 +254,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file |
