schangxiang@126.com
2025-11-04 f5ed29dc26c7cd952d56ec5721a2efc43cd25992
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
using DataEntity;
using DataEntity.Share;
using DataRWDAL;
using DriverLib.Engine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using XCommon;
using XCommon.Log;
using XCore;
using XCoreBLL;
using XHandler.Controls.Run.Com;
using XHandler.View;
using XImagingXhandler.XDAL;
 
namespace XHandler.Controls
{
    /// <summary>
    /// 泵加液运行处理
    /// </summary>
    public class PumpDispenseControl
    {
        string strCurrentCulture = "";
        WellCalc wellCalc = new WellCalc();
        LatticeBll latticeBll = new LatticeBll();
        PumpDispenseBll pumpDispenseBll = new PumpDispenseBll();
        public RunWnd launchView = null;
        LiquidAccuracyBll liquidAccuracyBll = new LiquidAccuracyBll();
 
        public PumpDispenseControl(string strCurrentCulture)
        {
            this.strCurrentCulture = strCurrentCulture;
        }
 
        #region 执行吸液,返回结果字符串
        /// <summary>
        /// 执行吸液,返回结果字符串
        /// </summary>
        /// <param name="xmlEnv">板位节点信息</param>
        /// <param name="methodNode">装载方法属性节点对象</param>
        /// <param name="zAxisVal">z轴安全距离</param>
        /// <param name="isSimulator">0:连接谁;1:仿真</param>
        /// <returns></returns>
        public bool ExecutePumpDispense(XmlNode xmlEnv, XmlNode methodNode, float zAxisVal, bool isSimulator)
        {
            bool result = true;
            HxResult ret = new HxResult();
            if (launchView._cancelSource.IsCancellationRequested)
            {
                result = false;
                return result;
            }
 
            #region Start Log
            if (strCurrentCulture.Equals("zh-CN"))
            {
                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strStart.ToString());
            }
            else
            {
                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】start:");
            }
            #endregion
 
            #region 数据准备 
            string labwareText = methodNode.SelectSingleNode("labware/text").InnerText;
            string strLabwareid = methodNode.SelectSingleNode("labware/value").InnerText;
            string armName = methodNode.SelectSingleNode("arm/text").InnerText;
            string armId = methodNode.SelectSingleNode("arm/value").InnerText;
            string latticenum = methodNode.SelectSingleNode("position/text").InnerText;
            //string latticeId=
            string strWells = methodNode.SelectSingleNode("wellarray").InnerText;
 
            // 每泵参数
            List<Pump> pumpParams = new List<Pump>();
            var drops = methodNode.SelectNodes("pump");
            if (drops != null)
            {
                foreach (XmlNode x in drops)
                {
                    Pump d = new Pump();
                    d.name = x.SelectSingleNode("name").InnerText;
                    d.volume = Convert.ToDouble(x.SelectSingleNode("volume").InnerText);
                    d.liquidValue = x.SelectSingleNode("liquidid/value").InnerText;
                    d.liquidText = x.SelectSingleNode("liquidid/text").InnerText;
                    d.liquidRSValue = x.SelectSingleNode("liquidrangeid/value").InnerText;
                    d.liquidRSText = x.SelectSingleNode("liquidrangeid/text").InnerText;
                    d.liquidTypeValue = x.SelectSingleNode("liquidtypeid/value").InnerText;
                    d.liquidTypeText = x.SelectSingleNode("liquidtypeid/text").InnerText;
                    pumpParams.Add(d);
                }
            }
            #endregion
 
            #region 数据验证
            Labware labwares = LabwareDB.GetLabware(strLabwareid);
 
            string[] wells = new string[] { };
            string wellVariable = string.Empty;
            if (!string.IsNullOrEmpty(strWells))
            {
                //判断是否包含等号,如果是包含等号的,则是变量控制孔位
                if (strWells.Contains(","))
                {
                    wells = strWells.Split(',');
                }
                else if (strWells.Contains("="))
                {
                }
            }
 
            else if (strWells.Contains("="))
            {
                wellVariable = strWells.Substring(strWells.LastIndexOf('=') + 1, (strWells.Length - strWells.LastIndexOf('=') - 1));
 
                Variable variable = new Variable();
                // 从当前变量字典中取出变量的值
                for (int i = 0; i < launchView.gloadVariable.Count; i++)
                {
                    Variable v = launchView.gloadVariable.Peek();
 
                    if (v.variablename == wellVariable)
                    {
                        variable = v;
                        break;
                    }
                }
            }
 
 
            // 给孔位排序
            if (strWells.Contains(','))
            {
                string suffix = wells[0].Substring(1, wells[0].Length - 1);
                List<string> sortWellName = new List<string>();
 
                if (Shared.ChannelCount == 1)
                {
                    for (int i = 0; i < labwares.number_row; i++)
                    {
                        string rowName = ComUtility.GetRowChar(i);
                        string rowWellName = rowName + suffix;
                        if (wells.Contains(rowWellName))
                        {
                            sortWellName.Add(rowWellName);
                        }
                    }
                    wells = sortWellName.ToArray();
                }
                else if (Shared.ChannelCount > 1)
                {
                    #region Del
                    //List<string> sortWellNameSH = new List<string>();//用来按列的孔位名称
 
                    ////上海的移液枪正常排列,A1,B1,C1,D1,E1,F1,G1,H1
                    //for (int j = 1; j < labwares.number_column; j++)
                    //{
                    //    int countWell = 0;//当前选择的孔位数量
                    //    sortWellNameSH.Clear();
                    //    for (int i = 0; i < labwares.number_row; i++)
                    //    {
                    //        string rowName = ComUtility.GetRowChar(i);//创建行号
                    //        string rowWellName = rowName + j;
                    //        if (wells.Contains(rowWellName))
                    //        {
                    //            sortWellNameSH.Add(rowWellName);
                    //            countWell++;
                    //        }
                    //    }
 
                    //    if (wells.Length == countWell && countWell == chs.Length)
                    //    {
                    //        wells = sortWellNameSH.ToArray();
                    //        break;
                    //    }
                    //    else
                    //    {
                    //        if (strCurrentCulture.Equals("zh-CN"))
                    //        {
                    //            launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler:" + Properties.MachineRunResource.strError.ToString() + Properties.RunAspirateResource.strChannelMatch.ToString());
                    //        }
                    //        else
                    //        {
                    //            launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler:Channels aren't match with these wells, please check!");
                    //        }
                    //        result = false;
                    //        return result;
                    //    }
                    //}
                    #endregion
                }
            }
            else if (!string.IsNullOrEmpty(strWells) &&
                !strWells.Contains(',') &&
                !strWells.Contains("="))        // 只有一个孔位
            {
                wells = new string[] { strWells };
            }
            else if (strWells.Contains("="))    // 利用循环
            {
                Variable variable = new Variable();
                string strvariable = strWells.Substring(strWells.LastIndexOf('=') + 1, (strWells.Length - strWells.LastIndexOf('=') - 1));
                Variable globalVariable = null;
                globalVariable = ControlCom.SearchGlobalVariable(launchView, strvariable);
                if (!string.IsNullOrEmpty(globalVariable.variablename))
                {
                    variable = globalVariable;
                }
 
                if (variable.variablename.Equals(string.Empty) && strvariable.Length >= 1)//没有查找到变量名,看看是不是表达式,并求出表达式值
                {
                    Stack<Variable> stackTem = new Stack<Variable>();//临时存储变量过得对象
                    int totalLoop = launchView.gloadVariable.Count;
                    // 从当前变量字典中取出变量的值
                    for (int i = 0; i < totalLoop; i++)
                    {
                        Variable v = launchView.gloadVariable.Pop();         //取出最近的一个匹配变量   
                        stackTem.Push(v);
 
                        if (strvariable.Contains(v.variablename))
                        {
                            variable = v;
                            break;
                        }
                    }
                    int totalLoopTem = stackTem.Count;
                    for (int i = 0; i < totalLoopTem; i++)
                    {
                        Variable v = stackTem.Pop();
                        launchView.gloadVariable.Push(v);
                    }
 
                    Microsoft.JScript.Vsa.VsaEngine ve = Microsoft.JScript.Vsa.VsaEngine.CreateEngine();
                    string strExpress = strvariable.Replace(variable.variablename, variable.variablecurval);
                    variable.variablecurval = Microsoft.JScript.Eval.JScriptEvaluate(strExpress, ve).ToString();
                }
 
                List<string> sortWellName = new List<string>();
 
                for (int j = 1; j <= labwares.number_column; j++)
                {
                    for (int i = 0; i < labwares.number_row; i++)
                    {
                        string rowName = ComUtility.GetRowChar(i);
 
                        string rowWellName = rowName + j;
                        sortWellName.Add(rowWellName);
                    }
                }
                wells = new string[1];
                wells[0] = sortWellName[Convert.ToInt32(variable.variablecurval) - 1];
            }
 
            // 判断方法中的板位和板子是否能对应上设置的台面
            Lattice lattice = new Lattice();
 
            TabletopTemplate tabletopTemplate = TabletopTemplateDB.GetCurrentAppTabletopTemplateCollectionFromdb();  //增加台面模板判断
            if (tabletopTemplate == null)
            {
                lattice = LatticeDB.GetLatticeDataByIdFromdb(latticenum, Convert.ToInt32(armId), Shared.SoftwareInformation.software_device_number);
            }
            else
            {
                lattice = LatticeDB.GetLatticeDataByLatticeNumAndTempIdFromdb(latticenum, Convert.ToInt32(armId), Shared.SoftwareInformation.software_device_number, tabletopTemplate.tabletopid);
            }
            int xmlLatticeId = Convert.ToInt32(latticenum.Substring(1));//ControlCom.GetLatticeId(Convert.ToInt32(lattice.lattice_id), false);
 
            var latticeXn = xmlEnv.SelectSingleNode("platform[lattice_id='" + xmlLatticeId.ToString() + "']");
            if (latticeXn != null)
            {
                labwares.labware_sname = latticeXn.SelectNodes("labware")[0].SelectSingleNode("labware_sname").InnerText;
            }
            else
            {
                if (lattice.is_trash.Equals(1))
                {
 
                }
                else
                {
                    if (strCurrentCulture.Equals("zh-CN"))
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunAspirateResource.strWithoutLattice.ToString());
                    }
                    else
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: the lattice of aspirate liquid is wrong! please check!");
                    }
                    result = false;
                    return result;
                }
            }
            #endregion
 
            #region 执行构建
            try
            {
                // 获取当前台面的板子吸液列的坐标
                Lattice slattice = DataRWDAL.LatticeDB.GetLatticeDataByIdFromdb(lattice.lattice_id);
 
                if (lattice.is_trash.Equals(1))
                {
                    // 获取板位孔的坐标数据
                    //List<TipsTable> dtWells = ControlCom.GenerateWellCoordinate(labwares, slattice);
 
                    //根据循环处理孔位
                    //TipsTable tipsTable = null;
                    //tipsTable = dtWells.SingleOrDefault(t => t.lattice_id.Equals(lattice.lattice_id)
                    //                                                && t.labware_id.Equals(strLabwareid)
                    //                                                && t.wellname.Equals(wells[0]));
 
                    if (armName == "泵臂")
                    {
                        AddLiquidMParamSH addLiquidMParamSH = new AddLiquidMParamSH();
 
                        addLiquidMParamSH.armId = Convert.ToInt32(armId);
 
                        int[] channels = new int[pumpParams.Count];
                        float[] fVolumes = new float[pumpParams.Count];
                        float[] xVals = new float[pumpParams.Count];
                        float[] yVals = new float[pumpParams.Count];
                        addLiquidMParamSH.channelId = channels;
                        addLiquidMParamSH.channelCount = pumpParams.Count;
                        Liquid liquid = null;
                        for (int i = 0; i < pumpParams.Count; i++)
                        {
                            channels[i] = Convert.ToInt32(pumpParams[i].name.Substring(pumpParams[i].name.Length - 1, 1));
                            fVolumes[i] = (float)Convert.ToDouble(pumpParams[i].volume);
                            xVals[i] = (float)lattice.lattice_X + 60f;
                            yVals[i] = (float)lattice.lattice_X + 60f;
 
                            // 液体参数
                            liquid = LiquidDB.GetALiquidFromdb(pumpParams[i].liquidValue);
 
                        }
 
                        addLiquidMParamSH.volume = fVolumes;
                        addLiquidMParamSH.xAxisVal = xVals;
                        addLiquidMParamSH.yAxisVal = yVals;
                        addLiquidMParamSH.zAxisVal = (float)lattice.lattice_Z - 50f;
                        addLiquidMParamSH.speed = (float)liquid.dispense_speed;
                        addLiquidMParamSH.addLiquidAfterDelay = liquid.after_dispense_delay;
                        addLiquidMParamSH.basezAxisVal = 0;
                        launchView.SetWaitOne();//暂停
 
                        ret = pumpDispenseBll.ExecutePumpDispense(addLiquidMParamSH, isSimulator);
                        System.Threading.Thread.Sleep(3000);
                        //更新孔位颜色
 
                        if (ret.Result != ResultType.Success)
                        {
                            if (strCurrentCulture.Equals("zh-CN"))
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunDispenseResource.strDispenseFail.ToString() + ret.AlarmInfo + " 板位 " + lattice.lattice_num);
                                LoggerRunHelper.InfoLog("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunDispenseResource.strDispenseFail.ToString() + ret.AlarmInfo + " 板位 " + lattice.lattice_num);
                            }
                            else
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: dispense of pump was failed on trash bin lattice! Error info:" + ret.AlarmInfo);
                                LoggerRunHelper.InfoLog("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: dispense of pump was failed on trash bin lattice! Error info:" + ret.AlarmInfo);
                            }
                            result = false;
                            return result;
                        }
                        else
                        {
                            if (strCurrentCulture.Equals("zh-CN"))
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunDispenseResource.strDispenseSuccess.ToString() + " 板位 " + lattice.lattice_num);
                                LoggerRunHelper.InfoLog("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunDispenseResource.strDispenseSuccess.ToString() + " 板位 " + lattice.lattice_num);
                            }
                            else
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress:Aspirate was successful on " + lattice.lattice_num + " lattice!");
                                LoggerRunHelper.InfoLog("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress:Aspirate was successful on "  + lattice.lattice_num + " lattice!");
                            }
                        }
                    }
                }
                else
                {
                    // 获取板位孔的坐标数据
                    List<TipsTable> dtWells = ControlCom.GenerateWellCoordinate(labwares, slattice);
 
                    //根据循环处理孔位
                    TipsTable tipsTable = null;
                    tipsTable = dtWells.SingleOrDefault(t => t.lattice_id.Equals(lattice.lattice_id)
                                                                    && t.labware_id.Equals(strLabwareid)
                                                                    && t.wellname.Equals(wells[0]));
                    tipsTable.axis_b_Z = tipsTable.axis_b_Z + ControlCom.CurrentLengthOfTip;//被减的枪头要加回来
                    if (armName == "泵臂")
                    {
                        AddLiquidMParamSH addLiquidMParamSH = new AddLiquidMParamSH();
 
                        addLiquidMParamSH.armId = Convert.ToInt32(armId);
 
                        int[] channels = new int[pumpParams.Count];
                        float[] fVolumes = new float[pumpParams.Count];
                        float[] xVals = new float[pumpParams.Count];
                        float[] yVals = new float[pumpParams.Count];
                        addLiquidMParamSH.channelId = channels;
                        addLiquidMParamSH.channelCount = pumpParams.Count;
                        Liquid liquid = null;
                        for (int i = 0; i < pumpParams.Count; i++)
                        {
                            channels[i] = Convert.ToInt32(pumpParams[i].name.Substring(pumpParams[i].name.Length - 1, 1));
                            fVolumes[i] = (float)Convert.ToDouble(pumpParams[i].volume);
                            xVals[i] = (float)tipsTable.axis_b_X;
                            yVals[i] = (float)tipsTable.axis_b_Y;
 
                            // 液体参数
                            liquid = LiquidDB.GetALiquidFromdb(pumpParams[i].liquidValue);
 
                        }
 
                        addLiquidMParamSH.volume = fVolumes;
                        addLiquidMParamSH.xAxisVal = xVals;
                        addLiquidMParamSH.yAxisVal = yVals;
                        addLiquidMParamSH.zAxisVal = tipsTable.axis_b_Z-(float)labwares.labware_height;
                        addLiquidMParamSH.speed = (float)liquid.dispense_speed;
                        addLiquidMParamSH.addLiquidAfterDelay = liquid.after_dispense_delay;
                        addLiquidMParamSH.basezAxisVal = 0;
                        launchView.SetWaitOne();//暂停
 
                        launchView.UpdateLabwareWells(tipsTable, wells, 2);
                        ret = pumpDispenseBll.ExecutePumpDispense(addLiquidMParamSH, isSimulator);
                        System.Threading.Thread.Sleep(500);
                        //更新孔位颜色
                        launchView.UpdateLabwareWells(tipsTable, wells, 3);
 
                        if (ret.Result != ResultType.Success)
                        {
                            string channelTxt = string.Join(",", channels);
                            launchView.addDataIntoReport("泵" + channelTxt, addLiquidMParamSH.volume[0].ToString(), new string[1] { tipsTable.wellname }, "0");//来源泵
                            launchView.addFinishDataIntoReport(tipsTable, slattice.lattice_num, addLiquidMParamSH.volume[0].ToString(), new string[1] { tipsTable.wellname }, "0", new string[1] { "" });//目标孔
 
                            if (strCurrentCulture.Equals("zh-CN"))
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunDispenseResource.strDispenseFail.ToString() + ret.AlarmInfo + " 孔 " + tipsTable.wellname + " 板位 " + slattice.lattice_num);
                                LoggerRunHelper.InfoLog("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunDispenseResource.strDispenseFail.ToString() + ret.AlarmInfo + " 孔 " + tipsTable.wellname + " 板位 " + slattice.lattice_num);
                            }
                            else
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: Aspirate was failed on " + tipsTable.wellname + " of " + slattice.lattice_num + " lattice! Error info:" + ret.AlarmInfo);
                                LoggerRunHelper.InfoLog("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: Aspirate was failed on " + tipsTable.wellname + " of " + slattice.lattice_num + " lattice! Error info:" + ret.AlarmInfo);
                            }
                            result = false;
                            return result;
                        }
                        else
                        {
                            string channelTxt = string.Join(",", channels);
                            launchView.addDataIntoReport("泵" + channelTxt, addLiquidMParamSH.volume[0].ToString(), new string[1] { tipsTable.wellname }, "1");//来源泵
                            launchView.addFinishDataIntoReport(tipsTable, slattice.lattice_num, addLiquidMParamSH.volume[0].ToString(), new string[1] { tipsTable.wellname }, "1", new string[1] { "" });//目标孔
 
                            if (strCurrentCulture.Equals("zh-CN"))
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunDispenseResource.strDispenseSuccess.ToString() + " 孔 " + tipsTable.wellname + " 板位 " + slattice.lattice_num);
                                LoggerRunHelper.InfoLog("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunDispenseResource.strDispenseSuccess.ToString() + " 孔 " + tipsTable.wellname + " 板位 " + slattice.lattice_num);
                            }
                            else
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress:Aspirate was successful on " + tipsTable.wellname + " of " + slattice.lattice_num + " lattice!");
                                LoggerRunHelper.InfoLog("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress:Aspirate was successful on " + tipsTable.wellname + " of " + slattice.lattice_num + " lattice!");
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LoggerHelper.ErrorLog("ERROR:", ex);
                if (strCurrentCulture.Equals("zh-CN"))
                {
                    launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strError.ToString() + " 源 " + ex.Source + " 错误信息 " + ex.Message + ";");
                }
                else
                {
                    launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】error:source:" + ex.Source + ";error:" + ex.Message + ";");
                }
                result = false;
            }
 
            #endregion
 
            return result;
        }
        #endregion
    }
}