diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-06-20 11:46:02 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-06-20 11:46:02 +0300 |
| commit | 0460a54eb73a3943a9d363e7cce38b8d9009bc4b (patch) | |
| tree | 6e0423ffa358d6a562764f99d110df1623f47a1a /Software/Visual_Studio/Tango.SharedUI/Converters | |
| parent | 7b0ed51c91baf1257fce45699221a0f1a096ce72 (diff) | |
| download | Tango-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.cs | 16 |
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(); + } } } } |
