首次提交:添加src文件夹代码
This commit is contained in:
32
Cowain.Bake.BLL/Converter/ProcessParamIdConvertor.cs
Normal file
32
Cowain.Bake.BLL/Converter/ProcessParamIdConvertor.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using Prism.Ioc;
|
||||
|
||||
namespace Cowain.Bake.BLL.Converter
|
||||
{
|
||||
public class ProcessParamIdConvertor : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is int val)
|
||||
{
|
||||
var p = MyAppContainer.Current.Resolve<MemoryDataProvider>().GetProcessParam(val);
|
||||
if (null == p)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return p.ProcessParamName;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user