56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
![]() |
using System;
|
|||
|
using System.Globalization;
|
|||
|
using System.Windows.Data;
|
|||
|
using DI_Electrical.ViewModels;
|
|||
|
|
|||
|
namespace DI_Electrical.Helper.Converter
|
|||
|
{
|
|||
|
public class RadGridViewRowToBoolConverter : IValueConverter
|
|||
|
{
|
|||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
{
|
|||
|
SignalManagementInfo smif = value as SignalManagementInfo;
|
|||
|
if (smif != null)
|
|||
|
{
|
|||
|
if (smif.Status.Equals("deleted") || smif.Status.Equals("Confirmed"))
|
|||
|
{
|
|||
|
return true;
|
|||
|
}
|
|||
|
if (smif.type.Equals("信号"))
|
|||
|
{
|
|||
|
switch (parameter.ToString())
|
|||
|
{
|
|||
|
case "关联的电缆信息":
|
|||
|
case "关联的通道信息":
|
|||
|
return true;
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
switch (parameter.ToString())
|
|||
|
{
|
|||
|
case "组别":
|
|||
|
case "编码":
|
|||
|
case "信号类型":
|
|||
|
case "Min":
|
|||
|
case "Max":
|
|||
|
case "单位":
|
|||
|
case "CODE":
|
|||
|
case "设备名":
|
|||
|
case "关联的电缆信息":
|
|||
|
case "关联的通道信息":
|
|||
|
return true;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
{
|
|||
|
throw new NotImplementedException();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|