29 lines
859 B
C#
29 lines
859 B
C#
|
|
using MainShell.Common;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Globalization;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
using System.Windows.Data;
|
|||
|
|
|
|||
|
|
namespace MainShell.Converter
|
|||
|
|
{
|
|||
|
|
public class BondingPathModeToBoolConverter : IValueConverter
|
|||
|
|
{
|
|||
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
BondingPathMode speedMode = (BondingPathMode)value;
|
|||
|
|
int mode = System.Convert.ToInt32(parameter.ToString());
|
|||
|
|
|
|||
|
|
return mode == (int)speedMode ? true : false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
int mode = System.Convert.ToInt32(parameter.ToString());
|
|||
|
|
return (BondingPathMode)mode;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|