aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-09-05 13:39:40 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-09-05 13:39:40 +0300
commit332be5196027097bcd6c0ffb8f988f1493c5437c (patch)
tree287922e71873314152804e816341fd6f57888eb9 /Software/Visual_Studio/Tango.SharedUI
parentcbe023d4bf6a1556deee770db4f6a7d1d2fa3af4 (diff)
downloadTango-332be5196027097bcd6c0ffb8f988f1493c5437c.tar.gz
Tango-332be5196027097bcd6c0ffb8f988f1493c5437c.zip
Changed machine studio version display to include build number (3 components).
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Converters/VersionToShortVersionConverter.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/VersionToShortVersionConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/VersionToShortVersionConverter.cs
index d56460c2d..18c23b941 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Converters/VersionToShortVersionConverter.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/Converters/VersionToShortVersionConverter.cs
@@ -12,15 +12,22 @@ namespace Tango.SharedUI.Converters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
+ int components = 2;
+
+ if (parameter != null)
+ {
+ int.TryParse(parameter.ToString(), out components);
+ }
+
if (value != null)
{
if (value is Version)
{
- return (value as Version).ToString(2);
+ return (value as Version).ToString(components);
}
else if (value is String)
{
- return Version.Parse(value.ToString()).ToString(2);
+ return Version.Parse(value.ToString()).ToString(components);
}
}