using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XImagingXhandler.XDAL;
using XCoreBLL.Resource;
namespace XCore
{
public class SetChannelBll
{
string strCurrentCulture = "";
public SetChannelBll()
{
strCurrentCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
}
#region 检查所有属性设置是否满足要求
///
/// 检查所有属性设置是否满足要求
///
/// 设置通道属性对象
/// 检查所有属性设置是否满足要求
public MethodPropertyInfo CheckProperty(MethodSetChannel methodSetChannel)
{
MethodPropertyInfo methodPropertyInfo = new MethodPropertyInfo();
if (strCurrentCulture == "zh-CN")
{
methodPropertyInfo.property_tips_info = SetChannelResourceCHS.tipsInfo.ToString();
if (methodSetChannel.labwaretipValue == null || methodSetChannel.labwaretipValue == "")
{
methodPropertyInfo.property_name_info = SetChannelResourceCHS.labwaretipText.ToString();
}
if (methodSetChannel.armValue == null || methodSetChannel.armValue == "")
{
methodPropertyInfo.property_name_info = SetChannelResourceCHS.armText.ToString();
}
if (methodSetChannel.ChannelText == null || methodSetChannel.ChannelText == "")
{
methodPropertyInfo.property_name_info = SetChannelResourceCHS.ChannelText.ToString();
}
}
else if (strCurrentCulture == "en-US")
{
methodPropertyInfo.property_tips_info = SetChannelResourceENU.tipsInfo.ToString();
if (methodSetChannel.labwaretipValue == null || methodSetChannel.labwaretipValue == "")
{
methodPropertyInfo.property_name_info = SetChannelResourceENU.labwaretipText.ToString();
}
if (methodSetChannel.armValue == null || methodSetChannel.armValue == "")
{
methodPropertyInfo.property_name_info = SetChannelResourceENU.armText.ToString();
}
if (methodSetChannel.ChannelText == null || methodSetChannel.ChannelText == "")
{
methodPropertyInfo.property_name_info = SetChannelResourceENU.ChannelText.ToString();
}
}
return methodPropertyInfo;
}
#endregion
}
}