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.
75 lines
2.2 KiB
75 lines
2.2 KiB
|
2 years ago
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.Globalization;
|
||
|
|
using System.Linq;
|
||
|
|
using System.Text;
|
||
|
|
using System.Threading.Tasks;
|
||
|
|
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
|
||
|
|
{
|
||
|
|
return "未知类型";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
/// <summary>
|
||
|
|
/// </summary>
|
||
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||
|
|
{
|
||
|
|
return null;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|