37 lines
1012 B
C#
37 lines
1012 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace DM_Weight.Converter
|
|
{
|
|
/// <summary>
|
|
/// 标定页面抽屉按钮是否可用
|
|
/// </summary>
|
|
public class DrawerBtnVisiConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
string[] strBtnNumber = ConfigurationManager.AppSettings["WeightDrawerNumber"]?.ToString().Split(',');
|
|
if(strBtnNumber.Contains(parameter.ToString()))
|
|
{
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|