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
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
using DataEntity;
using DataEntity.Share;
using DataRWDAL;
using DriverLib.Engine;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml;
using XCommon;
using XCommon.Log;
using XCore;
using XHandler.Controls.Run.Com;
using XHandler.View;
using XHandler.View.Liquids;
using XHandler.View.MethodProperty;
using XImagingXhandler.XDAL;
using static HxEnum.OperationTypeEnum;
 
namespace XHandler.Controls
{
    public class MixingControl
    {
        string strCurrentCulture = "";
        WellCalc wellCalc = new WellCalc();
        LatticeBll latticeBll = new LatticeBll();
        MixingBll mixingBll = new MixingBll();
        public RunWnd launchView = null;
        LiquidAccuracyBll liquidAccuracyBll = new LiquidAccuracyBll();
 
        public MixingControl(string strCurrentCulture)
        {
            this.strCurrentCulture = strCurrentCulture;
        }
 
        #region 执行混合,返回结果字符串
        /// <summary>
        /// 执行混合,返回结果字符串
        /// </summary>
        /// <param name="latticesNode">板位节点信息</param>
        /// <param name="methodNode">装载方法属性节点对象</param>
        /// <param name="currentLengthOfTip">加载枪头后多出出来的长度</param>
        /// <param name="zAxisVal">z轴安全距离</param>
        /// <param name="isSimulator">0:连接谁;1:仿真</param>
        /// <returns></returns>
        public bool ExecuteMixing(XmlNode latticesNode, XmlNode methodNode, float currentLengthOfTip, 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
 
            if (currentLengthOfTip == 0f)//枪上没有Tip不允许吸液
            {
                if (strCurrentCulture.Equals("zh-CN"))
                {
                    launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.MachineRunResource.strWithTipInfo.ToString());
                }
                else
                {
                    launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: it seems without loaded tip! please check!");
                }
                result = false;
                return result;
            }
 
            #region 数据准备 
            string labwareText = methodNode.SelectSingleNode("labware/text").InnerText;
            string strLabwareid = methodNode.SelectSingleNode("labware/value").InnerText;
            string channelNums = methodNode.SelectSingleNode("channels").InnerText;
            string armName = methodNode.SelectSingleNode("arm/text").InnerText;
            string armId = methodNode.SelectSingleNode("arm/value").InnerText;
            string latticenum = methodNode.SelectSingleNode("position/text").InnerText;
            string strWells = methodNode.SelectSingleNode("wellarray").InnerText;
            bool enableSingleWellvolume = methodNode.SelectSingleNode("enableSingleWellvolume").InnerText.ToLower() == "true" ? true : false;
            //每孔体积
            List<DropdownName> dropdownNames = new List<DropdownName>();
            var drops = methodNode.SelectNodes("SingleWellvolume");
            if (drops != null)
            {
                foreach (XmlNode x in drops)
                {
                    DropdownName d = new DropdownName();
                    d.dropdown_id = x.SelectSingleNode("channel").InnerText;
                    d.dropdown_name = x.SelectSingleNode("name").InnerText;
                    dropdownNames.Add(d);
                }
            }
 
            //double wellvolume = Convert.ToDouble(methodNode.SelectSingleNode("wellvolume").InnerText);
            string liquididText = methodNode.SelectSingleNode("liquidid/text").InnerText;
            string liquididValue = methodNode.SelectSingleNode("liquidid/value").InnerText;
            string liquidrangeidText = methodNode.SelectSingleNode("liquidrangeid/text").InnerText;
            string liquidrangeidValue = methodNode.SelectSingleNode("liquidrangeid/value").InnerText;
            string liquidpidText = methodNode.SelectSingleNode("liquidpid/text").InnerText;
            string liquidpidValue = methodNode.SelectSingleNode("liquidpid/value").InnerText;
            //bool enableMix = methodNode.SelectSingleNode("enableMix").InnerText.ToLower() == "true" ? true : false;
            double mixvolume = Convert.ToDouble(methodNode.SelectSingleNode("mixvolume").InnerText);
            int mixcount = Convert.ToInt32(methodNode.SelectSingleNode("mixcount").InnerText);
            string mixAspiratePositionText = methodNode.SelectSingleNode("mixAspiratePosition/text").InnerText;
            string mixAspiratePositionValue = methodNode.SelectSingleNode("mixAspiratePosition/value").InnerText;
            double mixAspirateDistance = Convert.ToDouble(methodNode.SelectSingleNode("mixAspirateDistance").InnerText);
            double mixAspirateSpeed = Convert.ToDouble(methodNode.SelectSingleNode("mixAspirateSpeed").InnerText);
            double beforeAirpAxisVal = 0d;//Convert.ToDouble(methodNode.SelectSingleNode("beforeAirpAxisVal").InnerText);
 
            string mixDispensePositionText = methodNode.SelectSingleNode("mixDispensePosition/text").InnerText;
            string mixDispensePositionValue = methodNode.SelectSingleNode("mixDispensePosition/value").InnerText;
            double mixDispenseDistance = Convert.ToDouble(methodNode.SelectSingleNode("mixDispenseDistance").InnerText);
            double mixDispenseSpeed = Convert.ToDouble(methodNode.SelectSingleNode("mixDispenseSpeed").InnerText);
 
            bool enableLiquidSensor = methodNode.SelectSingleNode("enableLiquidSensor").InnerText.ToLower() == "true" ? true : false;
            int liquidSensorCount = Convert.ToInt32(methodNode.SelectSingleNode("liquidSensorCount").InnerText);
            double liquidSensorDistance = Convert.ToDouble(methodNode.SelectSingleNode("liquidSensorDistance").InnerText);
            double liquidSensorEndDistance = Convert.ToDouble(methodNode.SelectSingleNode("liquidSensorEndDistance").InnerText);
            double liquidSensorSpeed = Convert.ToDouble(methodNode.SelectSingleNode("liquidSensorSpeed").InnerText);
            double liquidSensorRadio = Convert.ToDouble(methodNode.SelectSingleNode("liquidSensorRadio").InnerText);
            string liquidSensorDisIdText = methodNode.SelectSingleNode("liquidSensorDisId/text").InnerText;
            string liquidSensorDisIdValue = methodNode.SelectSingleNode("liquidSensorDisId/value").InnerText;
            bool enableLiquidFollow = methodNode.SelectSingleNode("enableLiquidFollow").InnerText.ToLower() == "true" ? true : false;
            int liquidFollowType = Convert.ToInt32(methodNode.SelectSingleNode("liquidFollowType/value").InnerText);
            string liquidFollowTypeName = methodNode.SelectSingleNode("liquidFollowType/text").InnerText;
            double liquidFollowSpeed = Convert.ToDouble(methodNode.SelectSingleNode("liquidFollowSpeed").InnerText);
            double liquidFollowDistance = Convert.ToDouble(methodNode.SelectSingleNode("liquidFollowDistance").InnerText);
            double liquidFollowArea = Convert.ToDouble(methodNode.SelectSingleNode("liquidFollowArea").InnerText);
 
            bool enableSensorBlock = methodNode.SelectSingleNode("enableSensorBlock").InnerText.ToLower() == "true" ? true : false;
            double liquidSensorBlockDistance = Convert.ToDouble(methodNode.SelectSingleNode("liquidSensorBlockDistance").InnerText);
            string liquidSensorBlockDisIdText = methodNode.SelectSingleNode("liquidSensorBlockDisId/text").InnerText;
            string liquidSensorBlockDisIdValue = methodNode.SelectSingleNode("liquidSensorBlockDisId/value").InnerText;
            #endregion
 
            #region 数据验证
            if (channelNums == "")
            {
                if (strCurrentCulture.Equals("zh-CN"))
                {
                    launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler:" + Properties.MachineRunResource.strWithoutChannel.ToString());
                }
                else
                {
                    launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler:Channel wasn't set, please check!");
                }
                result = false;
                return result;
            }
 
            string[] wells = new string[] { };
            string wellVariable = string.Empty;
            if (!string.IsNullOrEmpty(strWells))
            {
                //判断是否包含等号,如果是包含等号的,则是变量控制孔位
                if (strWells.Contains(","))
                {
                    wells = strWells.Split(',');
                }
                else if (strWells.Contains("="))
                {
 
                }
            }
 
            string[] chs = channelNums.Split(',');
            if (strWells.Contains(","))
            {
                if (chs.Length != wells.Length)
                {
                    if (strCurrentCulture.Equals("zh-CN"))
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler:" + Properties.MachineRunResource.strOverWell.ToString());
                    }
                    else
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler:Total of channel isn't same with total of wells, please check!");
                    }
                    result = false;
                    return result;
                }
            }
            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;
                    }
                }
            }
 
            Labware labwares = LabwareDB.GetLabware(strLabwareid);
            // 给孔位排序
            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));
                //for (int i = 0; i < launchView.gloadVariable.Count; i++)
                //{
                //    Variable v = launchView.gloadVariable.Peek();
                //    if (strvariable == v.variablename)
                //    {
                //        variable = v;
                //        break;
                //    }
                //}
                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)//没有查找到变量名,看看是不是表达式,并求出表达式值
                {
                    //for (int i = 0; i < launchView.gloadVariable.Count; i++)
                    //{
                    //    Variable v = launchView.gloadVariable.Peek();
                    //    if (strvariable.Contains(v.variablename))
                    //    {
                    //        variable = v;
                    //        break;
                    //    }
                    //}
                    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>();
                if (chs.Length == 8)
                {
                    for (int i = 0; i < labwares.number_row; i++)
                    {
                        string rowName = ComUtility.GetRowChar(i);
                        string rowWellName = rowName + variable.variablecurval;
                        sortWellName.Add(rowWellName);
                    }
                    wells = sortWellName.ToArray();
                }
                else if (chs.Length > 1 && chs.Length < 8)
                {
                    // 根据枪头通道计算在第几个孔位
                    int startNum = chs.Length * (Convert.ToInt32(variable.variablecurval) - 1);
                    int columnCount = (int)(Math.Ceiling((double)startNum / (double)labwares.number_row));
                    int totalCount = (int)labwares.number_row * columnCount;
 
                    // 选中列剩余多少个孔
                    int leftCount = totalCount - startNum;
                    int startRowNum = (int)labwares.number_row - leftCount;
                    if (leftCount == chs.Length)
                    {
                        for (int i = startRowNum; i < labwares.number_row; i++)
                        {
                            string rowName = ComUtility.GetRowChar(i);
                            string rowWellName = rowName + columnCount.ToString();
                            sortWellName.Add(rowWellName);
                        }
                    }
                    else
                    {
                        for (int i = startRowNum; i < labwares.number_row; i++)
                        {
                            string rowName = ComUtility.GetRowChar(i);
                            string rowWellName = rowName + columnCount.ToString();
                            sortWellName.Add(rowWellName);
                        }
                        for (int i = 0; i < chs.Length - leftCount; i++)
                        {
                            string rowName = ComUtility.GetRowChar(i);
                            string rowWellName = rowName + (columnCount + 1).ToString();
                            sortWellName.Add(rowWellName);
                        }
                    }
                    wells = sortWellName.ToArray();
                }
                else if (chs.Length == 1)
                {
                    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();
            if (Shared.ChannelCount > 1)
            {
                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 = latticesNode.SelectSingleNode("platform[lattice_id='" + xmlLatticeId.ToString() + "']");
                if (latticeXn != null)
                {
                    labwares.labware_sname = latticeXn.SelectNodes("labware")[0].SelectSingleNode("labware_sname").InnerText;
                }
                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
 
            try
            {
                string[] charray = chs;
                // 获取板位信息
                Lattice slattice = LatticeDB.GetLatticeDataByIdFromdb(lattice.lattice_id);
                // 获取板位孔的坐标数据
                List<TipsTable> dtWells = ControlCom.GenerateWellCoordinate(labwares, lattice);
                // 液体参数
                Liquid liquid = LiquidDB.GetALiquidFromdb(liquidpidValue);
                // 根据循环处理孔位
                TipsTable tipsTable = dtWells.SingleOrDefault(t => t.lattice_id.Equals(lattice.lattice_id)
                                                                && t.labware_id.Equals(strLabwareid)
                                                                && t.wellname.Equals(wells[0]));
 
                if (tipsTable == null)
                {
                    if (strCurrentCulture.Equals("zh-CN"))
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunMixResource.strWithoutWellInfo.ToString());
                    }
                    else
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: the well on lattice of mixing liquid is wrong! please check!");
                    }
                    result = false;
                    return result;
                }
                if (Shared.ChannelCount.Equals(96))
                {
                    if (labwares.labware_type_id.Equals("3"))
                    {
                        if (!wells.Contains("A1") )
                        {
                            if (strCurrentCulture.Equals("zh-CN"))
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunMixResource.strWithoutWellInfo.ToString());
                            }
                            else
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: the wells on lattice of mixing liquid is wrong! please check!");
                            }
                            result = false;
                            return result;
                        }
                    }
                    else
                    {
                        if (!wells.Contains("A1") || !wells.Length.Equals(96))
                        {
                            if (strCurrentCulture.Equals("zh-CN"))
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunMixResource.strWithoutWellInfo.ToString());
                            }
                            else
                            {
                                launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: the wells on lattice of mixing liquid is wrong! please check!");
                            }
                            result = false;
                            return result;
                        }
                    }
                }
                tipsTable.lattice_num = lattice.lattice_num;
 
                #region 单通道
                if (Shared.ChannelCount == 1)
                {
                    #region MixMParam
                    MixMParam mixMParam = new MixMParam();
                    mixMParam.armId = Convert.ToInt32(methodNode.SelectSingleNode("arm/value").InnerText);
                    mixMParam.basezAxisVal = zAxisVal;
                    mixMParam.liquidVolumeType = (int)Convert.ToInt32(liquid.liquid_volume_type);
                    mixMParam.wellzAxisVal = (float)liquid.well_top_length;
                    mixMParam.xAxisVal = tipsTable.axis_b_X;
                    mixMParam.yAxisVal = tipsTable.axis_b_Y;
 
                    // 如果有吸液位置高度的话,则减少高度
                    //float zVal = tipsTable.axis_b_Z - (float)liquid.aspirate_well_bottom_length;
                    float zVal = 0f;
                    if (liquid.aspirate_well_bottom_length != "")
                    {
                        string[] zOffsiteArray = liquid.aspirate_well_bottom_length.Split(',');
                        if (labwares.labware_type_id.Equals("4"))
                        {
                            if (labwares.labware_tubeshelf_type == 1)
                            {
                                ObservableCollection<LabwareWellInfo> labwareWellInfoList = DataRWDAL.LabwareDB.GetSpecialLabwareWellInfo(labwares.labware_id);
                                LabwareWellInfo currentWellInfo = labwareWellInfoList.FirstOrDefault(x => x.labware_well_name.Equals(tipsTable.wellname));
                                Labware currentWellLabware = DataRWDAL.LabwareDB.GetLabware(currentWellInfo.well_labware_id);
 
                                zVal = tipsTable.axis_b_Z - (float)Convert.ToDouble(zOffsiteArray[0]) - ((float)currentWellLabware.labware_height-(float)currentWellLabware.well_height);
                            }
                            else
                            {
                                zVal = tipsTable.axis_b_Z - (float)Convert.ToDouble(zOffsiteArray[0])- ControlCom.CalculateWellBottomThickness(labwares.piled_script);
                            }
                        }
                        else
                        {
                            zVal = tipsTable.axis_b_Z - (float)Convert.ToDouble(zOffsiteArray[0]);
                        }
                    }
                    mixMParam.zAxisVal = zVal < 0 ? 0 : zVal;
 
                    mixMParam.mixAspiratePositionValue = Convert.ToInt32(mixAspiratePositionValue);
                    mixMParam.mixAspiratePositionText = mixAspiratePositionText;
                    if (mixAspiratePositionValue == "0")//liquid
                    {
                    }
                    else if (mixAspiratePositionValue == "1")//top
                    {
                        mixMParam.mixAspirateDistance = ((float)labwares.well_height - (float)mixAspirateDistance);
                    }
                    else if (mixAspiratePositionValue == "2")//bottom
                    {
                        mixMParam.mixAspirateDistance = (float)mixAspirateDistance;
                    }
                    mixMParam.mixAspirateSpeed = (float)Convert.ToDouble(mixAspirateSpeed);
                    mixMParam.mixDispensePositionValue = Convert.ToInt32(mixDispensePositionValue);
                    mixMParam.mixDispensePositionText = mixDispensePositionText;
                    if (mixDispensePositionValue == "0")//liquid
                    {
                    }
                    else if (mixDispensePositionValue == "1")//top
                    {
                        mixMParam.mixDispenseDistance = ((float)labwares.well_height - (float)mixDispenseDistance);
                    }
                    else if (mixDispensePositionValue == "2")//bottom
                    {
                        mixMParam.mixDispenseDistance = (float)mixDispenseDistance;
                    }
                    mixMParam.mixDispenseSpeed = (float)Convert.ToDouble(mixDispenseSpeed);
 
                    mixMParam.mixvolume = (float)mixvolume;
                    mixMParam.mixCount = mixcount;
                    beforeAirpAxisVal = liquid.before_aspirate_volume;
                    mixMParam.beforeAirpAxisVal = (float)beforeAirpAxisVal;
                    #endregion
 
                    launchView.UpdateLabwareWells(tipsTable, wells, 2);
                    launchView.SetWaitOne();//暂停
 
                    ret = mixingBll.ExecuteMix(mixMParam, isSimulator);
                }
                #endregion
 
                #region 多通道(排除96通道)
                else if (Shared.ChannelCount > 1&&!Shared.ChannelCount.Equals(96))
                {
                    #region MixMParamSH
                    MixMParamSH mixMParam = new MixMParamSH();
                    mixMParam.armId = Convert.ToInt32(armId);
                    mixMParam.basezAxisVal = zAxisVal;
                    mixMParam.liquidVolumeType = (int)Convert.ToInt32((liquid.liquid_volume_type != null ? "1" : liquid.liquid_volume_type));
                    //mixMParam.wellzAxisVal = (float)liquid.well_top_length;
                    if (labwares.labware_type_id.Equals("4"))
                    {
                        mixMParam.wellzAxisVal = tipsTable.axis_b_Z - ((float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).labware_height);
                    }
                    else
                    {
                        mixMParam.wellzAxisVal = tipsTable.axis_b_Z - ((float)labwares.well_height);// - (float)liquid.well_top_length) ;
                    }
                    mixMParam.mixAspiratePositionValue = Convert.ToInt32(mixAspiratePositionValue);
                    mixMParam.mixAspiratePositionText = mixAspiratePositionText;
                    if (labwares.labware_type_id.Equals("4"))
                    {
                        if (mixAspiratePositionValue == "0")//liquid
                        {
                        }
                        else if (mixAspiratePositionValue == "1")//top
                        {
                            mixMParam.mixAspirateDistance = ((float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).well_height - (float)mixAspirateDistance);
                        }
                        else if (mixAspiratePositionValue == "2")//bottom
                        {
                            mixMParam.mixAspirateDistance = (float)mixAspirateDistance;
                        }
                    }
                    else
                    {
                        if (mixAspiratePositionValue == "0")//liquid
                        {
                        }
                        else if (mixAspiratePositionValue == "1")//top
                        {
                            mixMParam.mixAspirateDistance = ((float)labwares.well_height - (float)mixAspirateDistance);
                        }
                        else if (mixAspiratePositionValue == "2")//bottom
                        {
                            mixMParam.mixAspirateDistance = (float)mixAspirateDistance;
                        }
                    }
                    mixMParam.mixAspirateSpeed = (float)Convert.ToDouble(mixAspirateSpeed);
                    mixMParam.mixDispensePositionValue = Convert.ToInt32(mixDispensePositionValue);
                    mixMParam.mixDispensePositionText = mixDispensePositionText;
                    if (labwares.labware_type_id.Equals("4"))
                    {
                        if (mixDispensePositionValue == "0")//liquid
                        {
 
                        }
                        else if (mixDispensePositionValue == "1")//top
                        {
                            mixMParam.mixDispenseDistance = ((float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).well_height - (float)mixDispenseDistance);
                        }
                        else if (mixDispensePositionValue == "2")//bottom
                        {
                            mixMParam.mixDispenseDistance = (float)mixDispenseDistance;
                        }
                    }
                    else
                    {
                        if (mixDispensePositionValue == "0")//liquid
                        {
                        }
                        else if (mixDispensePositionValue == "1")//top
                        {
                            mixMParam.mixDispenseDistance = ((float)labwares.well_height - (float)mixDispenseDistance);
                        }
                        else if (mixDispensePositionValue == "2")//bottom
                        {
                            mixMParam.mixDispenseDistance = (float)mixDispenseDistance;
                        }
                    }
                    mixMParam.mixDispenseSpeed = (float)Convert.ToDouble(mixDispenseSpeed);
                    mixMParam.mixvolume = (float)mixvolume;
                    mixMParam.mixCount = mixcount;
                    beforeAirpAxisVal = liquid.before_aspirate_volume;
                    mixMParam.beforeAirpAxisVal = (float)beforeAirpAxisVal;
                    mixMParam.xAxisVal = tipsTable.axis_b_X;
                    mixMParam.yAxisVal = tipsTable.axis_b_Y;
 
                    mixMParam.isSurvey = enableLiquidSensor;
                    if (mixMParam.isSurvey == true)
                    {
                        if (labwares.labware_type_id.Equals("4"))
                        {
                            Labware centrifugalLabware = ControlCom.GetCentrifugalLabwer(labwares.piled_script);
                            mixMParam.surveyInitzVal = tipsTable.axis_b_Z - ((float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).labware_height - (float)liquidSensorDistance);
                            mixMParam.surveyMaxzVal = tipsTable.axis_b_Z - ((float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).labware_height - (float)liquidSensorEndDistance);
                            mixMParam.surveySpeed = (float)liquidSensorSpeed;
 
                            mixMParam.wellzAxisVal = tipsTable.axis_b_Z - ((float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).labware_height);
                            mixMParam.wellBottomzAxisVal = tipsTable.axis_b_Z - ((float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).labware_height - (float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).well_height);
                            mixMParam.surveyFailHandleType = Convert.ToInt32(liquidSensorDisIdValue);
                            if (enableLiquidFollow)
                            {
                                mixMParam.followupType = liquidFollowType;
                                mixMParam.followupSpeed = (float)liquidFollowSpeed;
                                mixMParam.followupDistance = (float)liquidFollowDistance;
                                float area = 0.0f;
                                if (labwares.well_shape == (int)WellSharpe.Round)
                                {
                                    area = (float)(Math.PI * (float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).well_mouth_radius * (float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).well_mouth_radius);
                                }
                                else if (labwares.well_shape == (int)WellSharpe.Rectangle)
                                {
                                    area = (float)((float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).well_top_x * (float)ControlCom.GetCentrifugalLabwer(labwares.piled_script).well_top_y);
                                }
                                mixMParam.sectionalArea = area;
                            }
                            else
                            {
 
                            }
                        }
                        else
                        {
                            mixMParam.surveyRetryCount = liquidSensorCount;
                            mixMParam.surveyInitzVal = tipsTable.axis_b_Z - ((float)labwares.well_height - (float)liquidSensorDistance);
                            mixMParam.surveyMaxzVal = tipsTable.axis_b_Z - ((float)labwares.well_height - (float)liquidSensorEndDistance);
                            mixMParam.surveySpeed = (float)liquidSensorSpeed;
                            //aspirateMParam.surveyCoefficient =;
                            mixMParam.wellzAxisVal = tipsTable.axis_b_Z - ((float)labwares.well_height);// - (float)liquid.well_top_length);
                            mixMParam.wellBottomzAxisVal = tipsTable.axis_b_Z;
                            mixMParam.surveyFailHandleType = Convert.ToInt32(liquidSensorDisIdValue);
                            if (enableLiquidFollow)
                            {
                                //mixMParam.followupType = liquidFollowType;
                                mixMParam.followupSpeed = (float)liquidFollowSpeed;
                                mixMParam.followupDistance = (float)liquidFollowDistance;
                                float area = 0.0f;
                                if (labwares.well_shape == (int)WellSharpe.Round)
                                {
                                    area = (float)(Math.PI * labwares.well_mouth_radius * labwares.well_mouth_radius);
                                }
                                else if (labwares.well_shape == (int)WellSharpe.Rectangle)
                                {
                                    area = (float)(labwares.well_top_x * labwares.well_top_y);
                                }
                                mixMParam.sectionalArea = area;
                            }
                            else
                            {
 
                            }
                        }
                    }
                    else
                    {
 
                    }
 
                    // 如果有吸液位置高度的话,则减少高度
                    //float zVal = tipsTable.axis_b_Z - (float)liquid.aspirate_well_bottom_length;
                    float zVal = 0f;
                    if (liquid.aspirate_well_bottom_length != "")
                    {
                        string[] zOffsiteArray = liquid.aspirate_well_bottom_length.Split(',');
                        zVal = tipsTable.axis_b_Z - (float)Convert.ToDouble(zOffsiteArray[0]);
                        if (liquid.aspirate_position_type == 0)//液面开始探测时用,
                        {
                            zVal = tipsTable.axis_b_Z - (float)labwares.well_height;
                        }
                        else if (liquid.aspirate_position_type == 1)//孔口
                        {
                            zVal = mixMParam.wellzAxisVal + (float)Convert.ToDouble(liquid.aspirate_well_bottom_length);
                        }
                        else if (liquid.aspirate_position_type == 2)//孔底
                        {
                            if (labwares.labware_type_id.Equals("4"))
                            {
                                zVal = tipsTable.axis_b_Z - (float)Convert.ToDouble(liquid.aspirate_well_bottom_length) - ControlCom.CalculateWellBottomThickness(labwares.piled_script);
                            }
                            else
                            {
                                zVal = tipsTable.axis_b_Z - (float)Convert.ToDouble(liquid.aspirate_well_bottom_length);
                            }
                        }
                    }
                    float[] fzAxisVal = new float[charray.Length];
                    for (int i = 0; i < charray.Length; i++)
                    {
                        fzAxisVal[i] = zVal < 0 ? 0 : zVal;
                    }
 
                    mixMParam.zAxisVal = fzAxisVal;
                    mixMParam.yChannelGapVal = (float)labwares.a1_b1_distance;
                    #endregion
 
                    launchView.UpdateLabwareWells(tipsTable, wells, 2);
                    if (strCurrentCulture.Equals("zh-CN"))
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler:" + Properties.MachineRunResource.strProgress.ToString() + Properties.RunMixResource.strMixingExecute.ToString());
                    }
                    else
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】> Xhandler:progress: Aspirate is executing,please wait for a moment.");
                    }
 
                    launchView.SetWaitOne();//暂停
                    ret = mixingBll.ExecuteMix(mixMParam, isSimulator);
                }
                #endregion
 
                #region 96通道
                else if (Shared.ChannelCount.Equals(96))
                {
                    #region MixMParam
                    MixMParam mixMParam = new MixMParam();
                    mixMParam.armId = Convert.ToInt32(methodNode.SelectSingleNode("arm/value").InnerText);
                    mixMParam.basezAxisVal = zAxisVal;
                    mixMParam.liquidVolumeType = (int)Convert.ToInt32(liquid.liquid_volume_type);
                    mixMParam.wellzAxisVal = (float)liquid.well_top_length;
                    mixMParam.xAxisVal = tipsTable.axis_b_X;
                    mixMParam.yAxisVal = tipsTable.axis_b_Y;
 
                    // 如果有吸液位置高度的话,则减少高度
                    //float zVal = tipsTable.axis_b_Z - currentLengthOfTip - (float)liquid.aspirate_well_bottom_length;
                    float zVal = 0f;
                    if (liquid.aspirate_well_bottom_length != "")
                    {
                        string[] zOffsiteArray = liquid.aspirate_well_bottom_length.Split(',');
                        zVal = tipsTable.axis_b_Z - (float)Convert.ToDouble(zOffsiteArray[0]);
                    }
                    mixMParam.zAxisVal = zVal < 0 ? 0 : zVal;
 
                    mixMParam.mixAspiratePositionValue = Convert.ToInt32(mixAspiratePositionValue);
                    mixMParam.mixAspiratePositionText = mixAspiratePositionText;
                    if (mixAspiratePositionValue == "0")//liquid
                    {
                    }
                    else if (mixAspiratePositionValue == "1")//top
                    {
                        mixMParam.mixAspirateDistance = ((float)labwares.well_height - (float)mixAspirateDistance);
                    }
                    else if (mixAspiratePositionValue == "2")//bottom
                    {
                        mixMParam.mixAspirateDistance = (float)mixAspirateDistance;
                    }
                    mixMParam.mixAspirateSpeed = (float)Convert.ToDouble(mixAspirateSpeed);
                    mixMParam.mixDispensePositionValue = Convert.ToInt32(mixDispensePositionValue);
                    mixMParam.mixDispensePositionText = mixDispensePositionText;
                    if (mixDispensePositionValue == "0")//liquid
                    {
                    }
                    else if (mixDispensePositionValue == "1")//top
                    {
                        mixMParam.mixDispenseDistance = ((float)labwares.well_height - (float)mixDispenseDistance);
                    }
                    else if (mixDispensePositionValue == "2")//bottom
                    {
                        mixMParam.mixDispenseDistance = (float)mixDispenseDistance;
                    }
                    mixMParam.mixDispenseSpeed = (float)Convert.ToDouble(mixDispenseSpeed);
 
                    mixMParam.mixvolume = (float)mixvolume;
                    mixMParam.mixCount = mixcount;
                    beforeAirpAxisVal = liquid.before_aspirate_volume;
                    mixMParam.beforeAirpAxisVal = (float)beforeAirpAxisVal;
                    #endregion
 
                    launchView.UpdateLabwareWells(tipsTable, wells, 2);
                    launchView.SetWaitOne();//暂停
 
                    ret = mixingBll.ExecuteMix(mixMParam, isSimulator);
                }
                #endregion
 
                string strWell = string.Join(",", wells);
 
                #region 错误处理
                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.RunMixResource.strMixFail.ToString() + ret.AlarmInfo + "孔 " + strWell + "板位 " + methodNode.SelectSingleNode("position / text").InnerText);
                    }
                    else
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress: mixing liquid is fail from " + strWell + " well on " + methodNode.SelectSingleNode("position / text").InnerText + " lattice! error information:" + ret.AlarmInfo);
                        //launchView.addDataIntoReport(tipsTable, labwares.labware_sname, mixvolume.ToString(), wells, "block", "");
                    }
 
                    OperateDialog plsConfirmOper = null;
                    if (!launchView.isRemotingOper)
                    {
                        System.Windows.Application.Current.Dispatcher.Invoke(new Action(() =>
                        {
                            plsConfirmOper = new OperateDialog(strCurrentCulture.Equals("zh-CN") ? Properties.RunMixResource.strFailWhatToDo : "mixing liquid is fail! What do you want to do?");
                            plsConfirmOper.ShowDialog();
                        }));
                    }
 
                    if (plsConfirmOper != null && plsConfirmOper.OperMark == NodeOperationTypeEnum.Retry)           // 重试
                    {
                        result = ExecuteMixing(latticesNode, methodNode, currentLengthOfTip, zAxisVal, isSimulator);
                        return result;
                    }
                    else if (plsConfirmOper != null && plsConfirmOper.OperMark == NodeOperationTypeEnum.Cancel)     // 终止
                    {
                        if (strCurrentCulture.Equals("zh-CN"))
                        {
                            launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress + Properties.RunMixResource.strLoadTipWasStopped);
                        }
                        else
                        {
                            launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress:mixing liquid was stopped!");
                        }
                        result = false;
                        return result;
                    }
                    else if (plsConfirmOper != null && plsConfirmOper.OperMark == NodeOperationTypeEnum.Continue)   // 跳过
                    {
                        if (strCurrentCulture.Equals("zh-CN"))
                        {
                            launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strProgress + Properties.RunMixResource.strLoadTipWasSkipped);
                        }
                        else
                        {
                            launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress:mixing liquid was skipped!");
                        }
                    }
                }
                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.RunMixResource.strMixSuccess.ToString() + " 体积 " + mixvolume + "ul 孔 " + strWell + " 板 " + methodNode.SelectSingleNode("position / text").InnerText);
                    }
                    else
                    {
                        launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】progress:mixing " + mixvolume + "ul liquid is success from " + strWell + " well on " + methodNode.SelectSingleNode("position / text").InnerText + " lattice!");
                        launchView.UpdateLabwareWells(tipsTable, wells, 1);
                        //launchView.addDataIntoReport(tipsTable, labwares.labware_sname, mixvolume.ToString(), wells, "pass", "");
                    }
                }
                #endregion
 
                if (strCurrentCulture.Equals("zh-CN"))
                {
                    launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】" + Properties.MachineRunResource.strEnd.ToString());
                }
                else
                {
                    launchView.AddLogs("【" + DateTime.Now.ToString("HH:mm:ss:fff") + "】>Xhandler: 【" + methodNode.SelectSingleNode("name").InnerText + "】complete;");
                }
                
 
            }
            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;
            }
 
            return result;
        }
        #endregion
 
        #region 根据输入的行数,取得对应的字符串名称
        /// <summary>
        /// 
        /// </summary>
        /// <param name="col"></param>
        /// <param name="iaddVal">要加上的值</param>
        /// <returns></returns>
        private static string GetNextColumnChar(int col, int iaddVal)
        {
            var a = (col + 1 - 65) / 26;
 
            if (a > 0) return GetNextColumnChar(a - 1, iaddVal) + (char)(col + iaddVal);
 
            return ((char)(col + iaddVal)).ToString();
        }
        #endregion
 
        #region 转换孔位行符号为行号
        private int GetNumByWellLine(string noWell)
        {
            int num = 0;
            num = Convert.ToInt32(noWell) - 64;
            return num;
        }
        #endregion
    }
}