You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
3.2 KiB
92 lines
3.2 KiB
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
namespace formula_manage.ConvertMoels
|
|
{
|
|
internal class IonSQLConvert : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
string stuff_ion = System.Convert.ToString(value);
|
|
if (stuff_ion == "0")//类型
|
|
{
|
|
return "分散";
|
|
}
|
|
else
|
|
{
|
|
if (stuff_ion == "1")
|
|
{
|
|
return "酸性";
|
|
}
|
|
else
|
|
{
|
|
if (stuff_ion == "2")
|
|
{
|
|
return "活性";
|
|
}
|
|
else
|
|
{
|
|
if (stuff_ion == "3")
|
|
{
|
|
return "中性";
|
|
}
|
|
else
|
|
{
|
|
if (stuff_ion == "4")
|
|
{
|
|
return "硫化";
|
|
}
|
|
else
|
|
{
|
|
if (stuff_ion == "5")
|
|
{
|
|
return "阳离子";
|
|
}
|
|
else
|
|
{
|
|
if (stuff_ion == "6")
|
|
{
|
|
return "阴离子";
|
|
}
|
|
else
|
|
{
|
|
if (stuff_ion == "7")
|
|
{
|
|
return "非离子";
|
|
}
|
|
else
|
|
{
|
|
if (stuff_ion == "8")
|
|
{
|
|
return "酞菁";
|
|
}
|
|
else
|
|
{
|
|
if (stuff_ion == "9")
|
|
{
|
|
return "直接";
|
|
}
|
|
|
|
else
|
|
{
|
|
return "未知类型";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// </summary>
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|