diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/Converter/ConnectionTypeConverter.cs b/Sinvo.EplanHpD.Plugin.WPFUI/Converter/ConnectionTypeConverter.cs index 33a209e..f99244a 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/Converter/ConnectionTypeConverter.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/Converter/ConnectionTypeConverter.cs @@ -1,4 +1,5 @@ -using EPLAN.Harness.Core.Platform; + +using Sinvo.EplanHpD.Plugin.WPFUI.Enum; using Sinvo.EplanHpD.Plugin.WPFUI.Utils; using System; using System.Collections.Generic; @@ -14,11 +15,12 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.Converter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { + //if (!System.Enum.IsDefined(typeof(ConnectionType), (ConnectionType)value)) + //{ + // return false; + //} var flag = (ConnectionType)value; - if (!System.Enum.IsDefined(typeof(ConnectionType), flag)) - { - return false; - } + return flag == (ConnectionType)parameter; } diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/Converter/FlagEnumConverter.cs b/Sinvo.EplanHpD.Plugin.WPFUI/Converter/FlagEnumConverter.cs index bca7cb7..ca465c4 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/Converter/FlagEnumConverter.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/Converter/FlagEnumConverter.cs @@ -11,10 +11,10 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.Converter public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var flag = (WireFlagType)value; - if (!System.Enum.IsDefined(typeof(WireFlagType), flag)) - { - return false; - } + //if (!System.Enum.IsDefined(typeof(WireFlagType), flag)) + //{ + // return false; + //} return flag == (WireFlagType)parameter; } diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/Converter/NameTypeConverter.cs b/Sinvo.EplanHpD.Plugin.WPFUI/Converter/NameTypeConverter.cs index d02a94f..e0329dd 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/Converter/NameTypeConverter.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/Converter/NameTypeConverter.cs @@ -11,10 +11,10 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.Converter public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var flag = (ExportFileNameType)value; - if (!System.Enum.IsDefined(typeof(ExportFileNameType), flag)) - { - return false; - } + //if (!System.Enum.IsDefined(typeof(ExportFileNameType), flag)) + //{ + // return false; + //} return flag == (ExportFileNameType)parameter; }