using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using Newtonsoft.Json.Linq;
|
using System.Xml;
|
using XImagingXhandler.XDAL;
|
using System.Data;
|
using System.Xml.Linq;
|
using XCommon;
|
|
namespace XCore
|
{
|
public class MethodFrame
|
{
|
public MethodFrame() { }
|
|
#region 将吸液设置的数据转化成xml节点
|
/// <summary>
|
/// 将吸液设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject AspirateMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将排液设置的数据转化成xml节点
|
/// <summary>
|
/// 将排液设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject DispenseMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将混合液体设置的数据转化成xml节点
|
/// <summary>
|
/// 将混合液体设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject MixMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将安装吸头设置的数据转化成xml节点
|
/// <summary>
|
/// 将安装吸头设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject LoadTipsMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将卸载吸头设置的数据转化成xml节点
|
/// <summary>
|
/// 将卸载吸头设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject UnloadMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将移动液体设置的数据转化成xml节点
|
/// <summary>
|
/// 将移动液体设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject FileMoveMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将设置通道的数据转化成xml节点
|
/// <summary>
|
/// 将设置通道的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject SetChannelMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将复位设置的数据转化成xml节点
|
/// <summary>
|
/// 将复位设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject HomeMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将抓板设置的数据转化成xml节点
|
/// <summary>
|
/// 将抓板设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject GrabMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将组合设置的数据转化成xml节点
|
/// <summary>
|
/// 将组合设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject CombineMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将暂停设置的数据转化成xml节点
|
/// <summary>
|
/// 将暂停设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject PauseMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 将备注设置的数据转化成xml节点
|
/// <summary>
|
/// 将备注设置的数据转化成xml节点
|
/// </summary>
|
/// <returns></returns>
|
public JObject RemarkMethodConfig()
|
{
|
return null;
|
}
|
#endregion
|
|
#region 获取所有方法对应再序列显示时的初始文字描述集合
|
public List<string> GenerateStringOfMethod()
|
{
|
List<string> strInfoList = new List<string>();
|
//开始
|
strInfoList.Add("方法序列的起点");
|
|
//结束
|
strInfoList.Add("方法序列的结束点");
|
|
//吸液
|
strInfoList.Add("参数:{台面位置:}{臂:}{吸头:}{孔位:}{体积:}{液体参数:}");
|
|
//排液
|
strInfoList.Add("参数:{台面位置:}{臂:}{吸头:}{孔位:}{体积:}{液体参数:}");
|
|
//加载吸头
|
strInfoList.Add("参数:{台面位置:}{臂:}{吸头:}{孔位:}");
|
|
//卸载吸头
|
strInfoList.Add("参数:{台面位置:}{臂:}");
|
|
//设置通道
|
strInfoList.Add("参数:{臂:}{通道:}");
|
|
//开始循环
|
strInfoList.Add("循环方法序列的起点");
|
|
//结束循环
|
strInfoList.Add("循环方法序列的结束点");
|
|
//开始组合
|
strInfoList.Add("组合方法序列的起点");
|
|
//结束组合
|
strInfoList.Add("组合方法序列的结束点");
|
|
//文件
|
strInfoList.Add("参数:{文件路径:}{源板列:}{源孔列:}{目标板列:}{目标孔列:}{体积列:}{液体参数:}{枪头参数:}");
|
|
//抓板转移
|
strInfoList.Add("参数:{臂:}{从台面位置:}{移动到台面位置:}{抓手抓位置:}");
|
|
//混合
|
strInfoList.Add("参数:{台面位置:}{臂:}{吸头:}{孔位:}{液体参数:}");
|
|
//暂停
|
strInfoList.Add("参数:{台面位置:}{臂:}{吸头:}{暂停时长:}{提示消息:}");
|
|
//振荡
|
strInfoList.Add("振荡参数:{转速:}{方向:}{时长:}加热参数:{温度:}{时长:}");
|
|
//复位
|
strInfoList.Add("复位:设备回到初始化为零的位置");
|
|
//备注
|
strInfoList.Add("备注:对工作方法流程和内容的解释说明等");
|
|
//拍照
|
strInfoList.Add("拍照:设置拍照控制的参数");
|
//挑选
|
strInfoList.Add("挑选:设置挑选控制的参数");
|
//涂布
|
strInfoList.Add("涂布:设置涂布控制的参数");
|
//涂布文件
|
strInfoList.Add("涂布文件:设置涂布文件数据");
|
//涂布报告
|
strInfoList.Add("涂布报告:设置涂布报告数据列");
|
//设置变量
|
strInfoList.Add("设置变量:设置控制变量数据");
|
return strInfoList;
|
}
|
#endregion
|
|
#region 根据吸液方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据吸液方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodAspirate">吸液属性对象</param>
|
/// <returns>吸液内容显示字符串</returns>
|
public string UpdateMethodListItemContent(MethodAspirate methodAspirate)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{台面位置:"+methodAspirate.positionText+"}{臂:"+methodAspirate.armText+"}{吸头:"+methodAspirate.labwaretipText+"}{孔位:"+methodAspirate.wellarray+"}{体积:"+methodAspirate.wellvolume+"}{液体参数:"+methodAspirate.liquididText+"}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成吸液方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNodeAspirate">吸液方法的xml节点</param>
|
/// <returns>吸液方法的xml节点属性对象</returns>
|
public MethodAspirate GenerateMethodAspirate(XmlNode xmlNodeAspirate)
|
{
|
MethodAspirate methodAspirate = new MethodAspirate();
|
methodAspirate.isrun = xmlNodeAspirate.SelectSingleNode("isrun").InnerText;
|
methodAspirate.status = xmlNodeAspirate.SelectSingleNode("status").InnerText;
|
methodAspirate.name = xmlNodeAspirate.SelectSingleNode("name").InnerText;
|
methodAspirate.label = xmlNodeAspirate.SelectSingleNode("label").InnerText;
|
methodAspirate.labwareText = xmlNodeAspirate.SelectSingleNode("labware/text").InnerText;
|
methodAspirate.labwareValue = xmlNodeAspirate.SelectSingleNode("labware/value").InnerText;
|
methodAspirate.positionText = xmlNodeAspirate.SelectSingleNode("position/text").InnerText;
|
methodAspirate.positionValue = xmlNodeAspirate.SelectSingleNode("position/value").InnerText;
|
methodAspirate.armText = xmlNodeAspirate.SelectSingleNode("arm/text").InnerText;
|
methodAspirate.armValue = xmlNodeAspirate.SelectSingleNode("arm/value").InnerText;
|
methodAspirate.labwaretipText = xmlNodeAspirate.SelectSingleNode("labwaretip/text").InnerText;
|
methodAspirate.labwaretipValue = xmlNodeAspirate.SelectSingleNode("labwaretip/value").InnerText;
|
methodAspirate.wellarray = xmlNodeAspirate.SelectSingleNode("wellarray").InnerText;
|
methodAspirate.mixvolume = Convert.ToDouble(xmlNodeAspirate.SelectSingleNode("mixvolume").InnerText);
|
methodAspirate.mixcount = Convert.ToInt32(xmlNodeAspirate.SelectSingleNode("mixcount").InnerText);
|
methodAspirate.wellvolume = Convert.ToDouble(xmlNodeAspirate.SelectSingleNode("wellvolume").InnerText);
|
methodAspirate.liquididText = xmlNodeAspirate.SelectSingleNode("liquidid/text").InnerText;
|
methodAspirate.liquididValue = xmlNodeAspirate.SelectSingleNode("liquidid/value").InnerText;
|
return methodAspirate;
|
}
|
#endregion
|
|
#region 根据排液方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据排液方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodDispense">排液属性对象</param>
|
/// <returns>排液内容显示字符串</returns>
|
public string UpdateMethodListItemContent(MethodDispense methodDispense)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{台面位置:" + methodDispense.positionText + "}{臂:" + methodDispense.armText + "}{吸头:" + methodDispense.labwaretipText + "}{孔位:" + methodDispense.wellarray + "}{体积:" + methodDispense.wellvolume + "}{液体参数:" + methodDispense.liquididText + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成排液方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">排液方法的xml节点</param>
|
/// <returns>排液方法的xml节点属性对象</returns>
|
public MethodDispense GenerateMethodDispense(XmlNode xmlNode)
|
{
|
MethodDispense methodDispense = new MethodDispense();
|
methodDispense.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodDispense.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodDispense.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodDispense.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodDispense.labwareText = xmlNode.SelectSingleNode("labware/text").InnerText;
|
methodDispense.labwareValue = xmlNode.SelectSingleNode("labware/value").InnerText;
|
methodDispense.positionText = xmlNode.SelectSingleNode("position/text").InnerText;
|
methodDispense.positionValue = xmlNode.SelectSingleNode("position/value").InnerText;
|
methodDispense.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodDispense.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
methodDispense.labwaretipText = xmlNode.SelectSingleNode("labwaretip/text").InnerText;
|
methodDispense.labwaretipValue = xmlNode.SelectSingleNode("labwaretip/value").InnerText;
|
methodDispense.wellarray = xmlNode.SelectSingleNode("wellarray").InnerText;
|
methodDispense.mixvolume = Convert.ToDouble(xmlNode.SelectSingleNode("mixvolume").InnerText);
|
methodDispense.mixcount = Convert.ToInt32(xmlNode.SelectSingleNode("mixcount").InnerText);
|
methodDispense.wellvolume = Convert.ToDouble(xmlNode.SelectSingleNode("wellvolume").InnerText);
|
methodDispense.isNull = Convert.ToBoolean(xmlNode.SelectSingleNode("isNull").InnerText);
|
methodDispense.liquididText = xmlNode.SelectSingleNode("liquidid/text").InnerText;
|
methodDispense.liquididValue = xmlNode.SelectSingleNode("liquidid/value").InnerText;
|
return methodDispense;
|
}
|
#endregion
|
|
#region 根据安装吸头方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据安装吸头方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodLoadTips">安装吸头属性对象</param>
|
/// <returns>安装吸头内容显示字符串</returns>
|
public string UpdateMethodListItemContent(MethodLoadTips methodLoadTips)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{台面位置:" + methodLoadTips.positionText + "}{臂:" + methodLoadTips.armText + "}{吸头:" + methodLoadTips.labwaretipText + "}{孔位:" + methodLoadTips.wellarray + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成安装吸头方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">安装吸头方法的xml节点</param>
|
/// <returns>安装吸头方法的xml节点属性对象</returns>
|
public MethodLoadTips GenerateMethodLoadTips(XmlNode xmlNode)
|
{
|
MethodLoadTips methodLoadTips = new MethodLoadTips();
|
methodLoadTips.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodLoadTips.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodLoadTips.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodLoadTips.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodLoadTips.labwareText = xmlNode.SelectSingleNode("labware/text").InnerText;
|
methodLoadTips.labwareValue = xmlNode.SelectSingleNode("labware/value").InnerText;
|
methodLoadTips.positionText = xmlNode.SelectSingleNode("position/text").InnerText;
|
methodLoadTips.positionValue = xmlNode.SelectSingleNode("position/value").InnerText;
|
methodLoadTips.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodLoadTips.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
methodLoadTips.labwaretipText = xmlNode.SelectSingleNode("labwaretip/text").InnerText;
|
methodLoadTips.labwaretipValue = xmlNode.SelectSingleNode("labwaretip/value").InnerText;
|
methodLoadTips.wellarray = xmlNode.SelectSingleNode("wellarray").InnerText;
|
return methodLoadTips;
|
}
|
#endregion
|
|
#region 根据卸载吸头方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据卸载吸头方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodUnloadTips">卸载吸头方法的属性对象</param>
|
/// <returns>卸载吸头内容显示字符串</returns>
|
public string UpdateMethodListItemContent(MethodUnloadTips methodUnloadTips)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{台面位置:" + methodUnloadTips.positionText + "}{臂:" + methodUnloadTips.armText + "}{吸头:" + methodUnloadTips.labwaretipText + "}{孔位:" + methodUnloadTips.wellarray + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成卸载吸头方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">卸载吸头方法的xml节点</param>
|
/// <returns>卸载吸头方法的xml节点属性对象</returns>
|
public MethodUnloadTips GenerateMethodUnLoadTips(XmlNode xmlNode)
|
{
|
MethodUnloadTips methodUnloadTips = new MethodUnloadTips();
|
methodUnloadTips.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodUnloadTips.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodUnloadTips.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodUnloadTips.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodUnloadTips.labwareText = xmlNode.SelectSingleNode("labware/text").InnerText;
|
methodUnloadTips.labwareValue = xmlNode.SelectSingleNode("labware/value").InnerText;
|
methodUnloadTips.positionText = xmlNode.SelectSingleNode("position/text").InnerText;
|
methodUnloadTips.positionValue = xmlNode.SelectSingleNode("position/value").InnerText;
|
methodUnloadTips.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodUnloadTips.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
methodUnloadTips.labwaretipText = xmlNode.SelectSingleNode("labwaretip/text").InnerText;
|
methodUnloadTips.labwaretipValue = xmlNode.SelectSingleNode("labwaretip/value").InnerText;
|
methodUnloadTips.wellarray = xmlNode.SelectSingleNode("wellarray").InnerText;
|
return methodUnloadTips;
|
}
|
#endregion
|
|
#region 根据设置通道方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据设置通道方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodSetChannel">设置通道方法的属性</param>
|
/// <returns>设置通道内容显示字符串</returns>
|
public string UpdateMethodListItemContent(MethodSetChannel methodSetChannel)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{臂:" + methodSetChannel.armText + "}{通道:" + methodSetChannel.ChannelText + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成设置通道方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">设置通道方法的xml节点</param>
|
/// <returns>设置通道方法的xml节点属性对象</returns>
|
public MethodSetChannel GenerateMethodSetChannel(XmlNode xmlNode)
|
{
|
MethodSetChannel methodSetChannel = new MethodSetChannel();
|
methodSetChannel.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodSetChannel.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodSetChannel.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodSetChannel.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodSetChannel.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodSetChannel.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
methodSetChannel.labwaretipText = xmlNode.SelectSingleNode("labwaretip/text").InnerText;
|
methodSetChannel.labwaretipValue = xmlNode.SelectSingleNode("labwaretip/value").InnerText;
|
methodSetChannel.ChannelText = xmlNode.SelectSingleNode("ChannelArray").InnerText;
|
return methodSetChannel;
|
}
|
#endregion
|
|
#region 根据循环方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据循环方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodLoop">循环方法的属性对象</param>
|
/// <returns>循环方法内容显示字符串</returns>
|
public string UpdateMethodListItemContent(MethodLoop methodLoop)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{循环变量:" + methodLoop.variableName + "}{初始值:" + methodLoop.variablesValue + "}{终止值:" + methodLoop.variableeValue + "}{增值:" + methodLoop.incrementValue + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成循环方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">循环方法的xml节点</param>
|
/// <returns>循环方法的xml节点属性对象</returns>
|
public MethodLoop GenerateMethodLoop(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 = xmlNode.SelectSingleNode("content").InnerText;
|
return methodLoop;
|
}
|
#endregion
|
|
#region 根据文件方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据文件方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodTransferFile">文件方法的属性对象</param>
|
/// <returns>文件方法的属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodTransferFile methodTransferFile)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{文件路径:" + methodTransferFile.filePath + "}{源板列:" + methodTransferFile.sourceLabware + "}{源孔列:" + methodTransferFile.sourceWell + "}{目标板列:" + methodTransferFile.destinationLabware + "}"
|
+"{目标孔列:"+methodTransferFile.destinationWell+"}{体积列:"+methodTransferFile.destVolume+"}{液体参数:"+methodTransferFile.liquididText+"}{枪头参数:"+methodTransferFile.changeToTipValue+"}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成文件方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNodeAspirate">文件方法的xml节点</param>
|
/// <returns>文件方法的xml节点属性对象</returns>
|
public MethodTransferFile GenerateMethodTransferFile(XmlNode xmlNode)
|
{
|
MethodTransferFile methodTransferFile = new MethodTransferFile();
|
methodTransferFile.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodTransferFile.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodTransferFile.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodTransferFile.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodTransferFile.filePath = xmlNode.SelectSingleNode("filePath").InnerText;
|
methodTransferFile.transferDataTable = GenerateTransferFileDataTable(xmlNode);//根据节点构建移液表
|
methodTransferFile.sourceLabware = xmlNode.SelectSingleNode("sourceLabware").InnerText;
|
methodTransferFile.sourceWell = xmlNode.SelectSingleNode("sourceWell").InnerText;
|
methodTransferFile.destinationLabware = xmlNode.SelectSingleNode("destinationLabware").InnerText;
|
methodTransferFile.destinationWell = xmlNode.SelectSingleNode("destinationWell").InnerText;
|
methodTransferFile.destVolume = xmlNode.SelectSingleNode("destVolume").InnerText;
|
//methodTransferFile.aspirateMixCount = xmlNode.SelectSingleNode("aspirateMixCount").InnerText;
|
//methodTransferFile.aspirateMixVolume = xmlNode.SelectSingleNode("aspirateMixVolume").InnerText;
|
//methodTransferFile.dispenseMixCount = xmlNode.SelectSingleNode("dispenseMixCount").InnerText;
|
//methodTransferFile.dispenseMixVolume = xmlNode.SelectSingleNode("dispenseMixVolume").InnerText;
|
methodTransferFile.jump0Volume = xmlNode.SelectSingleNode("jump0Volume").InnerText.ToLower() == "true" ? true : false;
|
methodTransferFile.liquididText = xmlNode.SelectSingleNode("liquidid/text").InnerText;
|
methodTransferFile.liquididValue = xmlNode.SelectSingleNode("liquidid/value").InnerText;
|
methodTransferFile.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodTransferFile.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
methodTransferFile.labwaretipText = xmlNode.SelectSingleNode("labwaretip/text").InnerText;
|
methodTransferFile.labwaretipValue = xmlNode.SelectSingleNode("labwaretip/value").InnerText;
|
//methodTransferFile.ChannelText = xmlNode.SelectSingleNode("ChannelText").InnerText;
|
//methodTransferFile.directionText = xmlNode.SelectSingleNode("direction/text").InnerText;
|
//methodTransferFile.directionValue = xmlNode.SelectSingleNode("direction/value").InnerText;
|
//methodTransferFile.changeToTipValue = xmlNode.SelectSingleNode("changeToTipValue").InnerText;
|
//methodTransferFile.transferModelValue = xmlNode.SelectSingleNode("transferModelValue").InnerText;
|
return methodTransferFile;
|
}
|
|
/// <summary>
|
/// 根据xml节点构建移液表
|
/// </summary>
|
/// <param name="xmlNode">xml节点对象</param>
|
/// <returns>移液表</returns>
|
public DataTable GenerateTransferFileDataTable(XmlNode xmlNode)
|
{
|
XmlNode xmlNodeList = xmlNode.SelectSingleNode("transferDataTable");
|
|
DataTable dt = new DataTable();
|
|
foreach(XmlNode xn in xmlNodeList.ChildNodes)// 列名称
|
{
|
DataColumn dc = new DataColumn();
|
dc.ColumnName = xn.Attributes["columnname"].Value.ToString();
|
dt.Columns.Add(dc);
|
}
|
|
for (int j = 0; j < xmlNodeList.ChildNodes[0].ChildNodes.Count; j++)//行
|
{
|
DataRow dr = dt.NewRow();
|
for (int i = 0; i < xmlNodeList.ChildNodes.Count; i++)//列
|
{
|
dr[i] = xmlNodeList.ChildNodes[i].ChildNodes[j].InnerText;
|
}
|
|
dt.Rows.Add(dr);
|
}
|
return dt;
|
}
|
#endregion
|
|
#region 根据抓板转移方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据抓板转移方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodGripTransport">抓板转移方法的实体属性对象</param>
|
/// <returns>抓板转移方法的属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodGripTransport methodGripTransport)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{臂:" + methodGripTransport.armText + "}{从台面位置:" + methodGripTransport.srcPositionText + "}{移动到台面位置:" + methodGripTransport.desPositionText + "}{抓手抓位置:" + methodGripTransport.gripModelText + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成抓板转移方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">抓板转移方法的xml节点</param>
|
/// <returns>抓板转移方法的xml节点属性对象</returns>
|
public MethodGripTransport GenerateMethodGripTransport(XmlNode xmlNode)
|
{
|
MethodGripTransport methodGripTransport = new MethodGripTransport();
|
methodGripTransport.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodGripTransport.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodGripTransport.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodGripTransport.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodGripTransport.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodGripTransport.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
methodGripTransport.srcPositionText = xmlNode.SelectSingleNode("sourceLattice/text").InnerText;
|
methodGripTransport.srcPositionValue = xmlNode.SelectSingleNode("sourceLattice/value").InnerText;
|
methodGripTransport.desPositionText = xmlNode.SelectSingleNode("destinationLattice/text").InnerText;
|
methodGripTransport.desPositionValue = xmlNode.SelectSingleNode("destinationLattice/value").InnerText;
|
methodGripTransport.gripModelText = xmlNode.SelectSingleNode("gripModel/text").InnerText;
|
methodGripTransport.gripModelValue = Convert.ToInt32(xmlNode.SelectSingleNode("gripModel/value").InnerText);
|
return methodGripTransport;
|
}
|
#endregion
|
|
#region 根据混合方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据混合方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodMixing">混合方法实体属性对象</param>
|
/// <returns>实体方法属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodMixing methodMixing)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{台面位置:" + methodMixing.positionText + "}{臂:" + methodMixing.armText + "}{吸头:" + methodMixing.labwaretipText + "}{孔位:" + methodMixing.wellarray + "}{液体参数:" + methodMixing.liquididText + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成吸液方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNodeAspirate">吸液方法的xml节点</param>
|
/// <returns>吸液方法的xml节点属性对象</returns>
|
public MethodMixing GenerateMethodMixing(XmlNode xmlNodeAspirate)
|
{
|
MethodMixing methodMixing = new MethodMixing();
|
methodMixing.isrun = xmlNodeAspirate.SelectSingleNode("isrun").InnerText;
|
methodMixing.status = xmlNodeAspirate.SelectSingleNode("status").InnerText;
|
methodMixing.name = xmlNodeAspirate.SelectSingleNode("name").InnerText;
|
methodMixing.label = xmlNodeAspirate.SelectSingleNode("label").InnerText;
|
methodMixing.labwareText = xmlNodeAspirate.SelectSingleNode("labware/text").InnerText;
|
methodMixing.labwareValue = xmlNodeAspirate.SelectSingleNode("labware/value").InnerText;
|
methodMixing.positionText = xmlNodeAspirate.SelectSingleNode("position/text").InnerText;
|
methodMixing.positionValue = xmlNodeAspirate.SelectSingleNode("position/value").InnerText;
|
methodMixing.armText = xmlNodeAspirate.SelectSingleNode("arm/text").InnerText;
|
methodMixing.armValue = xmlNodeAspirate.SelectSingleNode("arm/value").InnerText;
|
methodMixing.labwaretipText = xmlNodeAspirate.SelectSingleNode("labwaretip/text").InnerText;
|
methodMixing.labwaretipValue = xmlNodeAspirate.SelectSingleNode("labwaretip/value").InnerText;
|
methodMixing.wellarray = xmlNodeAspirate.SelectSingleNode("wellarray").InnerText;
|
methodMixing.mixvolume = Convert.ToDouble(xmlNodeAspirate.SelectSingleNode("mixvolume").InnerText);
|
methodMixing.mixcount = Convert.ToInt32(xmlNodeAspirate.SelectSingleNode("mixcount").InnerText);
|
methodMixing.liquididText = xmlNodeAspirate.SelectSingleNode("liquidid/text").InnerText;
|
methodMixing.liquididValue = xmlNodeAspirate.SelectSingleNode("liquidid/value").InnerText;
|
return methodMixing;
|
}
|
#endregion
|
|
#region 根据暂停方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据暂停方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodPauseMove">暂停方法实体属性对象</param>
|
/// <returns>暂停方法属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodPauseMove methodPauseMove)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{台面位置:" + methodPauseMove.positionText + "}{臂:" + methodPauseMove.armText + "}{吸头:" + methodPauseMove.labwaretipText + "}{暂停时长:" + methodPauseMove.pauseTime + "}{提示消息:" + methodPauseMove.pauseTipInfo + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成吸液方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">吸液方法的xml节点</param>
|
/// <returns>吸液方法的xml节点属性对象</returns>
|
public MethodPauseMove GenerateMethodPauseMove(XmlNode xmlNode)
|
{
|
MethodPauseMove methodPauseMove = new MethodPauseMove();
|
methodPauseMove.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodPauseMove.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodPauseMove.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodPauseMove.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodPauseMove.labwareText = xmlNode.SelectSingleNode("labware/text").InnerText;
|
methodPauseMove.labwareValue = xmlNode.SelectSingleNode("labware/value").InnerText;
|
methodPauseMove.positionText = xmlNode.SelectSingleNode("position/text").InnerText;
|
methodPauseMove.positionValue = xmlNode.SelectSingleNode("position/value").InnerText;
|
methodPauseMove.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodPauseMove.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
methodPauseMove.labwaretipText = xmlNode.SelectSingleNode("labwaretip/text").InnerText;
|
methodPauseMove.labwaretipValue = xmlNode.SelectSingleNode("labwaretip/value").InnerText;
|
methodPauseMove.pauseTime = xmlNode.SelectSingleNode("pauseTime").InnerText;
|
methodPauseMove.pauseTipInfo = xmlNode.SelectSingleNode("pauseTipInfo").InnerText;
|
return methodPauseMove;
|
}
|
#endregion
|
|
#region 根据振荡方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据振荡方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodShaker">振荡方法实体类对象</param>
|
/// <returns>振荡方法属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodShaker methodShaker)
|
{
|
string strResult = string.Empty;
|
strResult = "振荡参数:{转速:" + methodShaker.shakerSpeed + "}{方向:" + methodShaker.shakerDirectionText + "}{时长:" + methodShaker.shakerTime + "}加热参数:{温度:" + methodShaker.warmTemperature + "}{时长:" + methodShaker.warmTime + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成吸液方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">吸液方法的xml节点</param>
|
/// <returns>吸液方法的xml节点属性对象</returns>
|
public MethodShaker GenerateMethodShaker(XmlNode xmlNode)
|
{
|
MethodShaker methodShaker = new MethodShaker();
|
methodShaker.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodShaker.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodShaker.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodShaker.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodShaker.turnOnShaker = xmlNode.SelectSingleNode("turnOnShaker").InnerText;
|
methodShaker.shakerSpeed = xmlNode.SelectSingleNode("shakerSpeed").InnerText;
|
methodShaker.shakerDirectionText = xmlNode.SelectSingleNode("shakerDirectionText").InnerText;
|
methodShaker.shakerDirectionValue = xmlNode.SelectSingleNode("shakerDirectionValue").InnerText;
|
methodShaker.shakerTime = xmlNode.SelectSingleNode("shakerTime").InnerText;
|
methodShaker.turnOnWarm = xmlNode.SelectSingleNode("turnOnWarm").InnerText;
|
methodShaker.warmTemperature = xmlNode.SelectSingleNode("warmTemperature").InnerText;
|
methodShaker.warmTime = xmlNode.SelectSingleNode("warmTime").InnerText;
|
return methodShaker;
|
}
|
#endregion
|
|
#region 根据复位方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据复位方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodHome">复位方法实体类对象</param>
|
/// <returns>复位方法属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodHome methodHome)
|
{
|
string strResult = string.Empty;
|
strResult = "复位:{"+methodHome.name+"}设备回到初始化为零的位置";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成复位方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNodeAspirate">复位方法的xml节点</param>
|
/// <returns>复位方法的xml节点属性对象</returns>
|
public MethodHome GenerateMethodHome(XmlNode xmlNode)
|
{
|
MethodHome methodHome = new MethodHome();
|
methodHome.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodHome.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodHome.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodHome.label = xmlNode.SelectSingleNode("label").InnerText;
|
return methodHome;
|
}
|
#endregion
|
|
#region 根据备注方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据备注方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodRemark">备注方法实体类对象</param>
|
/// <returns>备注方法属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodRemark methodRemark)
|
{
|
string strResult = string.Empty;
|
strResult = "备注:{" + methodRemark.remark + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成备注方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">备注方法的xml节点</param>
|
/// <returns>备注方法的xml节点属性对象</returns>
|
public MethodRemark GenerateMethodRemark(XmlNode xmlNode)
|
{
|
MethodRemark methodRemark = new MethodRemark();
|
methodRemark.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodRemark.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodRemark.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodRemark.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodRemark.remark = xmlNode.SelectSingleNode("remark").InnerText;
|
return methodRemark;
|
}
|
#endregion
|
|
#region 根据拍照方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据拍照方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodRemark">拍照方法实体类对象</param>
|
/// <returns>拍照方法属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodTakePhoto methodTakePhoto)
|
{
|
string strResult = string.Empty;
|
strResult = "拍照参数:{参数模式:" + (methodTakePhoto.ismanualconfig == 1 ? "手动配置" : "自动配置") + "}{菌名:" +
|
methodTakePhoto.bacteriaids + "}{菌间隙:" + methodTakePhoto.gapValue + "mm}{挑选方式:" + (methodTakePhoto.identification==1?"手工":"自动") + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成备注方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">备注方法的xml节点</param>
|
/// <returns>备注方法的xml节点属性对象</returns>
|
public MethodTakePhoto GenerateMethodTakePhoto(XmlNode xmlNode)
|
{
|
MethodTakePhoto methodTakePhoto = new MethodTakePhoto();
|
methodTakePhoto.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodTakePhoto.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodTakePhoto.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodTakePhoto.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodTakePhoto.ismanualconfig = Convert.ToInt32(xmlNode.SelectSingleNode("ismanualconfig").InnerText);
|
methodTakePhoto.bacteriaids= xmlNode.SelectSingleNode("bacteriaids").InnerText;
|
methodTakePhoto.paramfilepath= xmlNode.SelectSingleNode("paramfilepath")==null?"": xmlNode.SelectSingleNode("paramfilepath").InnerText;
|
methodTakePhoto.gapValue = xmlNode.SelectSingleNode("gapValue").InnerText;
|
methodTakePhoto.identification= Convert.ToInt32(xmlNode.SelectSingleNode("identification").InnerText); // 识别方法:0:成像系统自动挑选菌落; 1:人工挑选菌落
|
return methodTakePhoto;
|
}
|
#endregion
|
|
#region 根据挑选方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据挑选方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodAspirate">挑选属性对象</param>
|
/// <returns>挑选内容显示字符串</returns>
|
public string UpdateMethodListItemContent(MethodChoice methodChoice)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{台面位置:" + methodChoice.positionText + "}{臂:" + methodChoice.armText + "}{挑菌头:" + methodChoice.labwaretipText + "}{菌落:" + methodChoice.bacteriaText + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成挑选方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNodeAspirate">挑选方法的xml节点</param>
|
/// <returns>挑选方法的xml节点属性对象</returns>
|
public MethodChoice GenerateMethodChoice(XmlNode xmlNodeChoice)
|
{
|
MethodChoice methodChoice = new MethodChoice();
|
methodChoice.isrun = xmlNodeChoice.SelectSingleNode("isrun").InnerText;
|
methodChoice.status = xmlNodeChoice.SelectSingleNode("status").InnerText;
|
methodChoice.name = xmlNodeChoice.SelectSingleNode("name").InnerText;
|
methodChoice.label = xmlNodeChoice.SelectSingleNode("label").InnerText;
|
methodChoice.labwareText = xmlNodeChoice.SelectSingleNode("labware/text").InnerText;
|
methodChoice.labwareValue = xmlNodeChoice.SelectSingleNode("labware/value").InnerText;
|
methodChoice.positionText = xmlNodeChoice.SelectSingleNode("position/text").InnerText;
|
methodChoice.positionValue = xmlNodeChoice.SelectSingleNode("position/value").InnerText;
|
methodChoice.armText = xmlNodeChoice.SelectSingleNode("arm/text").InnerText;
|
methodChoice.armValue = xmlNodeChoice.SelectSingleNode("arm/value").InnerText;
|
methodChoice.labwaretipText = xmlNodeChoice.SelectSingleNode("labwaretip/text").InnerText;
|
methodChoice.labwaretipValue = xmlNodeChoice.SelectSingleNode("labwaretip/value").InnerText;
|
methodChoice.bacteriaText = xmlNodeChoice.SelectSingleNode("bacteria/text").InnerText;
|
methodChoice.bacteriaValue = xmlNodeChoice.SelectSingleNode("bacteria/value").InnerText;
|
return methodChoice;
|
}
|
#endregion
|
|
#region 根据涂布方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据涂布方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodAspirate">涂布属性对象</param>
|
/// <returns>涂布内容显示字符串</returns>
|
public string UpdateMethodListItemContent(MethodCoating methodCoating)
|
{
|
string strResult = string.Empty;
|
//strResult = "参数:{台面位置:" + methodCoating.positionText + "}{臂:" + methodCoating.armText + "}{菌落:" + methodCoating.bacteriaText + "}{涂布方式:" + methodCoating.coatingmodeText + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成涂布方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNodeAspirate">涂布方法的xml节点</param>
|
/// <returns>涂布方法的xml节点属性对象</returns>
|
public MethodCoating GenerateMethodCoating(XmlNode xmlNodeCoating)
|
{
|
MethodCoating methodCoating = new MethodCoating();
|
methodCoating.isrun = xmlNodeCoating.SelectSingleNode("isrun").InnerText;
|
methodCoating.status = xmlNodeCoating.SelectSingleNode("status").InnerText;
|
methodCoating.name = xmlNodeCoating.SelectSingleNode("name").InnerText;
|
methodCoating.label = xmlNodeCoating.SelectSingleNode("label").InnerText;
|
methodCoating.labwareText = xmlNodeCoating.SelectSingleNode("labware/text").InnerText;
|
methodCoating.labwareValue = xmlNodeCoating.SelectSingleNode("labware/value").InnerText;
|
methodCoating.positionText = xmlNodeCoating.SelectSingleNode("position/text").InnerText;
|
methodCoating.positionValue = xmlNodeCoating.SelectSingleNode("position/value").InnerText;
|
methodCoating.armText = xmlNodeCoating.SelectSingleNode("arm/text").InnerText;
|
methodCoating.armValue = xmlNodeCoating.SelectSingleNode("arm/value").InnerText;
|
methodCoating.coatingmodeText = xmlNodeCoating.SelectSingleNode("coatingmode/text").InnerText;
|
methodCoating.coatingmodeValue = xmlNodeCoating.SelectSingleNode("coatingmode/value").InnerText;
|
return methodCoating;
|
}
|
#endregion
|
|
#region 根据涂布文件方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据涂布文件方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodTransferFile">涂布文件方法的属性对象</param>
|
/// <returns>涂布文件方法的属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodCoatingFile methodCoatingFile)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{文件路径:" + methodCoatingFile.filePath + "}{源板列:" + methodCoatingFile.sourceLabware + "}{源孔列:" + methodCoatingFile.sourceWell + "}{目标板列:" + methodCoatingFile.destinationLabware + "}"
|
+ "{目标孔列:" + methodCoatingFile.destinationWell + "}{菌名:" + methodCoatingFile.bacteriaText + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成涂布文件方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNodeAspirate">涂布文件方法的xml节点</param>
|
/// <returns>涂布文件方法的xml节点属性对象</returns>
|
public MethodCoatingFile GenerateMethodCoatingFile(XmlNode xmlNode)
|
{
|
MethodCoatingFile methodCoatingFile = new MethodCoatingFile();
|
methodCoatingFile.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodCoatingFile.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodCoatingFile.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodCoatingFile.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodCoatingFile.strIndex= xmlNode.SelectSingleNode("strIndex").InnerText;
|
string strchs = xmlNode.SelectSingleNode("channels").InnerText;
|
methodCoatingFile.channels = ComUtility.GetChannelsFromXml(strchs);
|
|
methodCoatingFile.beginLine = Convert.ToInt32(xmlNode.SelectSingleNode("beginLine").InnerText);
|
methodCoatingFile.filePath = xmlNode.SelectSingleNode("filePath").InnerText;
|
methodCoatingFile.transferDataTable = GenerateTransferFileDataTable(xmlNode);//根据节点构建移液表
|
methodCoatingFile.sourceLabware = xmlNode.SelectSingleNode("sourceLabware").InnerText;
|
methodCoatingFile.sourceWell = xmlNode.SelectSingleNode("sourceWell").InnerText;
|
methodCoatingFile.destinationLabware = xmlNode.SelectSingleNode("destinationLabware").InnerText;
|
methodCoatingFile.destinationWell = xmlNode.SelectSingleNode("destinationWell").InnerText;
|
methodCoatingFile.armText = xmlNode.SelectSingleNode("arm/text").InnerText;
|
methodCoatingFile.armValue = xmlNode.SelectSingleNode("arm/value").InnerText;
|
methodCoatingFile.bacteriaText = xmlNode.SelectSingleNode("bacteria/text").InnerText;
|
methodCoatingFile.bacteriaValue = xmlNode.SelectSingleNode("bacteria/value").InnerText;
|
methodCoatingFile.coatingModeValue= Convert.ToInt32(xmlNode.SelectSingleNode("coatingmodeValue").InnerText);
|
methodCoatingFile.choiceCategory = Convert.ToInt32(xmlNode.SelectSingleNode("choiceCategory").InnerText);
|
methodCoatingFile.coatingCount = Convert.ToInt32(xmlNode.SelectSingleNode("coatingCount").InnerText);
|
return methodCoatingFile;
|
}
|
#endregion
|
|
#region 根据涂布报告方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据涂布报告方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodTransferFile">涂布报告方法的属性对象</param>
|
/// <returns>涂布报告方法的属性内容字符串</returns>
|
public string UpdateMethodListItemContent(MethodCoatingReport methodCoatingReport)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{文件路径:" + methodCoatingReport.filePath + "}{文件名:"+ methodCoatingReport.fileName+ "}{文件后缀:"+ methodCoatingReport.filePostfix+ "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成涂布报告方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNodeAspirate">涂布报告方法的xml节点</param>
|
/// <returns>涂布报告方法的xml节点属性对象</returns>
|
public MethodCoatingReport GenerateMethodCoatingReport(XmlNode xmlNode)
|
{
|
MethodCoatingReport methodCoatingReport = new MethodCoatingReport();
|
methodCoatingReport.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodCoatingReport.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodCoatingReport.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodCoatingReport.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodCoatingReport.filePath = xmlNode.SelectSingleNode("filePath").InnerText;
|
methodCoatingReport.reportColumns = new List<ReportColumn>();
|
methodCoatingReport.reportColumns = GenerateReporColumnList(xmlNode);//根据节点构建移液表
|
methodCoatingReport.filePostfix = xmlNode.SelectSingleNode("filePostfix").InnerText;
|
methodCoatingReport.fileName = xmlNode.SelectSingleNode("fileName").InnerText;
|
return methodCoatingReport;
|
}
|
|
private List<ReportColumn> GenerateReporColumnList(XmlNode xmlNode)
|
{
|
List<ReportColumn> reportColumns= new List<ReportColumn>();
|
|
XmlNode xmlNode1 = xmlNode.SelectSingleNode("transferDataTable");
|
|
for (int j = 0; j < xmlNode1.ChildNodes[0].ChildNodes.Count; j++)
|
{
|
ReportColumn reportColumn = new ReportColumn();
|
reportColumn.reportcolumn_id = xmlNode1.ChildNodes[0].ChildNodes[j].InnerText;
|
reportColumn.reportcolumn_name = xmlNode1.ChildNodes[1].ChildNodes[j].InnerText;
|
reportColumn.reportcolumn_sname = xmlNode1.ChildNodes[2].ChildNodes[j].InnerText;
|
reportColumns.Add(reportColumn);
|
}
|
|
return reportColumns;
|
}
|
|
#endregion
|
|
#region 根据设置变量方法属性对象,构建流程列表中方法显示的文字内容
|
/// <summary>
|
/// 根据设置变量方法属性对象,构建流程列表中方法显示的文字内容
|
/// </summary>
|
/// <param name="methodSetVariable">设置变量方法的属性</param>
|
/// <returns>设置变量内容显示字符串</returns>
|
public string UpdateMethodListItemContent(MethodSetVariable methodSetVariable)
|
{
|
string strResult = string.Empty;
|
strResult = "参数:{变量:" + methodSetVariable.variablename + "}{值:" + methodSetVariable.variablevalue + "}";
|
return strResult;
|
}
|
|
/// <summary>
|
/// 生成设置变量方法的xml节点属性对象
|
/// </summary>
|
/// <param name="xmlNode">设置变量方法的xml节点</param>
|
/// <returns>设置变量方法的xml节点属性对象</returns>
|
public MethodSetVariable GenerateMethodSetVariable(XmlNode xmlNode)
|
{
|
MethodSetVariable methodSetVariable = new MethodSetVariable();
|
methodSetVariable.isrun = xmlNode.SelectSingleNode("isrun").InnerText;
|
methodSetVariable.status = xmlNode.SelectSingleNode("status").InnerText;
|
methodSetVariable.name = xmlNode.SelectSingleNode("name").InnerText;
|
methodSetVariable.label = xmlNode.SelectSingleNode("label").InnerText;
|
methodSetVariable.enablepopwin = xmlNode.SelectSingleNode("enablepopwin").InnerText.ToLower() == "true" ? true : false;
|
methodSetVariable.variablename = xmlNode.SelectSingleNode("variablename").InnerText;
|
methodSetVariable.variablevalue = xmlNode.SelectSingleNode("variablevalue").InnerText;
|
return methodSetVariable;
|
}
|
#endregion
|
|
#region 把数组内的元素转换成字符串输出
|
/// <summary>
|
/// 把数组内的元素转换成字符串输出
|
/// </summary>
|
/// <param name="arrayString">原始字符串数组</param>
|
/// <returns>字符串</returns>
|
public string TransferToStringFromArray(string[] arrayString)
|
{
|
string strResult=string.Empty;
|
foreach(string str in arrayString)
|
{
|
strResult = strResult + str+",";
|
}
|
strResult = strResult.Substring(0, strResult.Length - 1);
|
return strResult;
|
}
|
#endregion
|
|
#region 把字符串内的元素转换成数组输出
|
/// <summary>
|
/// 把数组内的元素转换成字符串输出
|
/// </summary>
|
/// <param name="arrayString">原始字符串</param>
|
/// <returns>字符串组数</returns>
|
public string[] TransferToArrayFromString(string ChannelString)
|
{
|
string[] strResult = new string[] { };
|
|
strResult = ChannelString.Split(',');
|
return strResult;
|
}
|
#endregion
|
}
|
}
|