| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 | using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Data;namespace Aitex.Core.UI.Converters{    public class LayoutRecipeModeStatusConverter : IValueConverter    {        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)        {            if (value == null)                return false;            bool result =false;            if (value.ToString() == parameter.ToString())                result = true;            else                result = false;            return result;        }        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)        {            return parameter.ToString();        }    }    public class LayoutRecipeModeStatusConverterVisibility : IValueConverter    {        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)        {            if (value == null)                return false;            bool result = false;            if (parameter.ToString().Contains(value.ToString()))                result = true;            else                result = false;            return result?Visibility.Visible:Visibility.Hidden;        }        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)        {            return parameter.ToString();        }    }}
 |