aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI/Converters
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2024-06-20 11:46:02 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2024-06-20 11:46:02 +0300
commit0460a54eb73a3943a9d363e7cce38b8d9009bc4b (patch)
tree6e0423ffa358d6a562764f99d110df1623f47a1a /Software/Visual_Studio/Tango.SharedUI/Converters
parent7b0ed51c91baf1257fce45699221a0f1a096ce72 (diff)
downloadTango-0460a54eb73a3943a9d363e7cce38b8d9009bc4b.tar.gz
Tango-0460a54eb73a3943a9d363e7cce38b8d9009bc4b.zip
Jerrycan change impl.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Converters')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs
index 567d79c5a..40ca35684 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs
@@ -37,7 +37,21 @@ namespace Tango.SharedUI.Converters
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new NotImplementedException();
+ try
+ {
+ if ((bool)value)
+ {
+ return Enum.Parse(targetType, parameter.ToString());
+ }
+ else
+ {
+ throw new NotImplementedException();
+ }
+ }
+ catch
+ {
+ throw new NotImplementedException();
+ }
}
}
}