aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI/Converters/ByteArrayToFileSizeConverter.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-28 20:16:11 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-28 20:16:11 +0200
commitac3c227bb5d12339fee6fb4c243f3a5f67217915 (patch)
treebbafb0da5b25aeedda13b2ab89c4fbc36da45608 /Software/Visual_Studio/Tango.SharedUI/Converters/ByteArrayToFileSizeConverter.cs
parentc86a3bd32bf6d561fecf662b53b49749d2989b88 (diff)
downloadTango-ac3c227bb5d12339fee6fb4c243f3a5f67217915.tar.gz
Tango-ac3c227bb5d12339fee6fb4c243f3a5f67217915.zip
Working on machine studio storage !
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Converters/ByteArrayToFileSizeConverter.cs')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Converters/ByteArrayToFileSizeConverter.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/ByteArrayToFileSizeConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/ByteArrayToFileSizeConverter.cs
index 91cf57c4f..5a2975535 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Converters/ByteArrayToFileSizeConverter.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/Converters/ByteArrayToFileSizeConverter.cs
@@ -16,7 +16,14 @@ namespace Tango.SharedUI.Converters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- return BytesToString((long)value);
+ if (value != null)
+ {
+ return BytesToString(System.Convert.ToInt64(value));
+ }
+ else
+ {
+ return null;
+ }
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)