using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows;
using HandyControl.Tools;

namespace 智慧物流软件系统
{
    /// <summary>
    /// 权限转换器
    /// </summary>
    public class AuthVisHidConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (DesignerHelper.IsInDesignMode)
                return Visibility.Visible;

            return AuthConverter.IsAuth(parameter) ? Visibility.Visible : Visibility.Hidden;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
