using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using XImagingXhandler.XDAL;
|
using XCoreBLL.Resource;
|
using System.Xml;
|
using System.Web.UI.WebControls;
|
using System.Xml.Linq;
|
|
namespace XCore
|
{
|
public class LoopBll
|
{
|
string strCurrentCulture = "";
|
public LoopBll()
|
{
|
strCurrentCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
|
}
|
|
public MethodLoop GenerateMethodLoopDataByXmlNode(XmlNode xmlNode)
|
{
|
MethodLoop methodLoop = new MethodLoop();
|
|
methodLoop.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodLoop.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodLoop.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodLoop.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodLoop.variableName = xmlNode.SelectSingleNode("variableName").InnerText;
|
methodLoop.variablesValue = xmlNode.SelectSingleNode("variablesValue").InnerText;
|
methodLoop.variableeValue = xmlNode.SelectSingleNode("variableeValue").InnerText;
|
methodLoop.incrementValue = xmlNode.SelectSingleNode("incrementValue").InnerText;
|
//methodLoop.content = "";
|
return methodLoop;
|
}
|
|
#region 检查所有属性设置是否满足要求
|
/// <summary>
|
/// 检查所有属性设置是否满足要求
|
/// </summary>
|
/// <param name="methodAspirate">循环属性对象</param>
|
/// <returns>检查所有属性设置是否满足要求</returns>
|
public MethodPropertyInfo CheckProperty(MethodLoop methodLoop)
|
{
|
MethodPropertyInfo methodPropertyInfo = new MethodPropertyInfo();
|
|
if (strCurrentCulture == "zh-CN")
|
{
|
methodPropertyInfo.property_tips_info = LoopResourceCHS.tipsInfo.ToString();
|
|
if (methodLoop.variableName == null || methodLoop.variableName == "")
|
{
|
methodPropertyInfo.property_name_info = LoopResourceCHS.variableName.ToString();
|
}
|
if (methodLoop.variablesValue == null || methodLoop.variablesValue == "")
|
{
|
methodPropertyInfo.property_name_info = LoopResourceCHS.variablesValue.ToString();
|
}
|
if (methodLoop.variableeValue == null || methodLoop.variableeValue == "")
|
{
|
methodPropertyInfo.property_name_info = LoopResourceCHS.variableeValue.ToString();
|
}
|
if (methodLoop.incrementValue == null || methodLoop.incrementValue == "")
|
{
|
methodPropertyInfo.property_name_info = LoopResourceCHS.incrementValue.ToString();
|
}
|
}
|
else if (strCurrentCulture == "en-US")
|
{
|
methodPropertyInfo.property_tips_info = LoopResourceENU.tipsInfo.ToString();
|
|
if (methodLoop.variableName == null || methodLoop.variableName == "")
|
{
|
methodPropertyInfo.property_name_info = LoopResourceENU.variableName.ToString();
|
}
|
if (methodLoop.variablesValue == null || methodLoop.variablesValue == "")
|
{
|
methodPropertyInfo.property_name_info = LoopResourceENU.variablesValue.ToString();
|
}
|
if (methodLoop.variableeValue == null || methodLoop.variableeValue == "")
|
{
|
methodPropertyInfo.property_name_info = LoopResourceENU.variableeValue.ToString();
|
}
|
if (methodLoop.incrementValue == null || methodLoop.incrementValue == "")
|
{
|
methodPropertyInfo.property_name_info = LoopResourceENU.incrementValue.ToString();
|
}
|
}
|
return methodPropertyInfo;
|
}
|
#endregion
|
}
|
}
|