Exemple #1
0
        /// <summary>
        /// 试剂1探测余量
        /// </summary>
        private void ResidueR1()
        {
            if (this.gridView1.SelectedRowsCount > 0)
            {
                if (SendNetworkCommandEvent != null)
                {
                    Command cmd = MachineInfo.GetCommandByName("RGTPanel1VolScan");

                    string pos = "";

                    for (int i = 0; i < this.gridView1.SelectedRowsCount; i++)
                    {
                        int    selectedHandle = this.gridView1.GetSelectedRows()[i];
                        string position       = this.gridView1.GetRowCellValue(selectedHandle, "试剂1位置").ToString().Trim();

                        if (position == "" || position == null)
                        {
                            continue;
                        }
                        else
                        {
                            pos += position + "|";
                        }
                    }

                    if (pos == "")
                    {
                        return;
                    }



                    cmd.Para  = "1:" + pos.TrimEnd('|');
                    cmd.State = 1;
                    var ResidueR1Thread = new Thread(() =>
                    {
                        //发送命令
                        SendNetworkCommandEvent(cmd);
                    });
                    ResidueR1Thread.IsBackground = true;
                    ResidueR1Thread.Start();
                }
            }
            else
            {
                MessageBoxDraw.ShowMsg("请选择待检测余量的项目!", MsgType.Warning);
            }
        }