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 PumpDispenseBll
|
{
|
string strCurrentCulture = "";
|
WellCalc wellCalc = new WellCalc();
|
LatticeBll latticeBll = new LatticeBll();
|
|
public PumpDispenseBll()
|
{
|
strCurrentCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
|
}
|
|
public MethodPumpDispese GenerateMethodPumpDispenseDataByXmlNode(XmlNode xmlNode)
|
{
|
MethodPumpDispese methodPumpDispese = new MethodPumpDispese();
|
|
methodPumpDispese.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodPumpDispese.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodPumpDispese.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodPumpDispese.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodPumpDispese.strIndex = xmlNode.SelectSingleNode("strIndex").InnerText;
|
methodPumpDispese.labwareText = xmlNode.SelectSingleNode("labware/text").InnerText;
|
methodPumpDispese.labwareValue = xmlNode.SelectSingleNode("labware/value").InnerText;
|
methodPumpDispese.positionText = xmlNode.SelectSingleNode("position/text").InnerText;
|
methodPumpDispese.positionValue = xmlNode.SelectSingleNode("position/value").InnerText;
|
methodPumpDispese.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodPumpDispese.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
//methodPumpDispese.headType = xmlNode.SelectSingleNode("headType").InnerText;
|
|
methodPumpDispese.wellarray = xmlNode.SelectSingleNode("wellarray").InnerText;
|
|
XmlNodeList xnList = xmlNode.SelectNodes("pump");
|
List<Pump> list = new List<Pump>();
|
foreach (XmlNode xn in xnList)
|
{
|
Pump pump = new Pump();
|
pump.name = xn.SelectSingleNode("name").InnerText;
|
pump.volume = Convert.ToDouble(xn.SelectSingleNode("volume").InnerText);
|
pump.liquidText = xn.SelectSingleNode("liquidid/text").InnerText;
|
pump.liquidValue = xn.SelectSingleNode("liquidid/value").InnerText;
|
pump.liquidRSText = xn.SelectSingleNode("liquidrangeid/text").InnerText;
|
pump.liquidRSValue = xn.SelectSingleNode("liquidrangeid/value").InnerText;
|
pump.liquidTypeText = xn.SelectSingleNode("liquidtypeid/text").InnerText;
|
pump.liquidTypeValue = xn.SelectSingleNode("liquidtypeid/value").InnerText;
|
list.Add(pump);
|
}
|
methodPumpDispese.pumpParams = list;
|
|
return methodPumpDispese;
|
}
|
|
public HxResult ExecutePumpDispense(AddLiquidMParamSH addLiquidMParamSH, bool isSimulator = false)
|
{
|
HxResult ret = new HxResult();
|
if (!isSimulator)
|
{
|
ret = MethodAction.Instance.AddLiquid(addLiquidMParamSH);
|
}
|
else
|
{
|
CommonBll.DoSimulateDelay();
|
ret.Result = ResultType.Success;
|
}
|
|
return ret;
|
}
|
}
|
}
|