diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-13 20:02:59 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-13 20:02:59 +0200 |
| commit | 69c55f54ee7217f16419049a311ce437d3c19157 (patch) | |
| tree | 2c0c25115e07ad4eba5dd4bb4c150fe6d1f0c702 /Software/Visual_Studio/Tango.SharedUI | |
| parent | 7b371c15dfb48c5182bbb704b5ea1ff1385b1d30 (diff) | |
| download | Tango-69c55f54ee7217f16419049a311ce437d3c19157.tar.gz Tango-69c55f54ee7217f16419049a311ce437d3c19157.zip | |
Fixed issue with PPC WIFI connection profiles.
Implemented OS restart after first setup.
Prevented PPC updater crashes without restarting PPC.
Implemented restarting system view on PPC.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs | 43 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj | 3 |
2 files changed, 45 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs new file mode 100644 index 000000000..567d79c5a --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToBooleanConverter.cs @@ -0,0 +1,43 @@ +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 EnumToBooleanConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (parameter != null) + { + if (parameter is String) + { + if (parameter.ToString().Contains(",")) + { + String[] values = parameter.ToString().Split(','); + return values.Contains(value.ToString()) ? true : false; + } + else + { + return value.ToString() == parameter.ToString() ? true : false; + } + } + else + { + return value == parameter ? true : false; + } + } + + return false; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj index be03e3a60..048edca82 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj +++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj @@ -96,6 +96,7 @@ <Compile Include="Converters\DateTimeUTCToStringConverter.cs" /> <Compile Include="Converters\DisplayMemberPathConverter.cs" /> <Compile Include="Converters\DoubleToIntConverter.cs" /> + <Compile Include="Converters\EnumToBooleanConverter.cs" /> <Compile Include="Converters\EnumToDescriptionConverter.cs" /> <Compile Include="Converters\EnumToItemsSourceConverter.cs" /> <Compile Include="Converters\EnumToVisibilityConverter.cs" /> @@ -232,7 +233,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file |
