/// <summary> /// 样本、试剂仓扫描条形码 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mbStartScan_Click(object sender, EventArgs e) { if (getOPID != null && !getOPID()) { MessageBoxDraw.ShowMsg("机器正在运行中,不能进行条码扫描!", MsgType.OK); return; } else { int[] count = this.gridView1.GetSelectedRows(); if (count.Length > 0) { for (int i = 0; i < count.Length; i++) { if (count[i] <= 40) { ScanBarcodePosInfo samp = new ScanBarcodePosInfo(); samp.Disk = 1; samp.Position = count[i] + 1; //new Form1().SMPPositions.Enqueue(samp); ScanBarcodePostEvent(samp); } else { } } } else { MessageBoxDraw.ShowMsg("请选择要扫描的位置!", MsgType.OK); return; } //new Form1().SMPBarcodeSignal.Set(); SMPBarcodeSignalEvent(); } }
/// <summary> /// 发送扫码样本仓要的位置和盘号委托事件 /// </summary> /// <param name="s"></param> public void ScanBarcodePostEvent_Event(ScanBarcodePosInfo s) { this.ScanBarcodePostEvent(s); }