aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI/Converters
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-02 10:44:57 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-02 10:44:57 +0300
commit3499090dce4acc5b5d4bbb02f07f138950790b25 (patch)
tree1f78b36e8805eb9c1429c863dfd8ae043b1ef668 /Software/Visual_Studio/Tango.SharedUI/Converters
parent9e979a9b18727fdc9f128da5a7d2347dff2d0705 (diff)
downloadTango-3499090dce4acc5b5d4bbb02f07f138950790b25.tar.gz
Tango-3499090dce4acc5b5d4bbb02f07f138950790b25.zip
Implemented new version display in machine studio.
Added release notes to machine studio update center.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Converters')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Converters/VersionToShortVersionConverter.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/VersionToShortVersionConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/VersionToShortVersionConverter.cs
new file mode 100644
index 000000000..d56460c2d
--- /dev/null
+++ b/Software/Visual_Studio/Tango.SharedUI/Converters/VersionToShortVersionConverter.cs
@@ -0,0 +1,35 @@
+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 VersionToShortVersionConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null)
+ {
+ if (value is Version)
+ {
+ return (value as Version).ToString(2);
+ }
+ else if (value is String)
+ {
+ return Version.Parse(value.ToString()).ToString(2);
+ }
+ }
+
+ return "Unknown";
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}