using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using System.Xml;
|
using XCommon;
|
using XCore;
|
using XImagingXhandler.XDAL;
|
using DataEntity;
|
using DriverLib.Engine;
|
|
namespace XCoreBLL
|
{
|
public class SwitchLidBll
|
{
|
string strCurrentCulture = "";
|
WellCalc wellCalc = new WellCalc();
|
LatticeBll latticeBll = new LatticeBll();
|
|
public SwitchLidBll()
|
{
|
strCurrentCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
|
}
|
|
public MethodSwitchLid GenerateMethodSwitchLidDataByXmlNode(XmlNode xmlNode)
|
{
|
MethodSwitchLid methodSwitchLid = new MethodSwitchLid();
|
methodSwitchLid.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodSwitchLid.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodSwitchLid.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodSwitchLid.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodSwitchLid.strIndex = xmlNode.SelectSingleNode("strIndex").InnerText;
|
methodSwitchLid.labwareText = xmlNode.SelectSingleNode("labware/text").InnerText;
|
methodSwitchLid.labwareValue = xmlNode.SelectSingleNode("labware/value").InnerText;
|
methodSwitchLid.positionText = xmlNode.SelectSingleNode("position/text").InnerText;
|
methodSwitchLid.positionValue = xmlNode.SelectSingleNode("position/value").InnerText;
|
methodSwitchLid.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodSwitchLid.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
methodSwitchLid.wellarray = xmlNode.SelectSingleNode("wellarray").InnerText;
|
methodSwitchLid.switchState= Convert.ToInt32(xmlNode.SelectSingleNode("switchState").InnerText);
|
methodSwitchLid.switchSpeed = Convert.ToDouble(xmlNode.SelectSingleNode("switchSpeed").InnerText);
|
methodSwitchLid.numOfCircle = Convert.ToDouble(xmlNode.SelectSingleNode("numOfCircle").InnerText);
|
return methodSwitchLid;
|
}
|
|
public HxResult ExecuteSwitchLid(ScrewTubeCapMParam screwTubeCapMParam,int modeVal, bool isSimulator = false)
|
{
|
HxResult ret = new HxResult();
|
if (!isSimulator)
|
{
|
if (modeVal == 0)
|
{
|
ret = MethodAction.Instance.OpenTubeCap(screwTubeCapMParam);//开盖
|
}
|
else
|
{
|
ret = MethodAction.Instance.CloseTubeCap(screwTubeCapMParam);//关盖
|
}
|
}
|
else
|
{
|
CommonBll.DoSimulateDelay();
|
ret.Result = ResultType.Success;
|
}
|
|
return ret;
|
}
|
}
|
}
|