void OnWorkSpaceScaned(BarCodeHook.BarCodes barCode) { string matchBarCode = BarCodeHelper.GetMatchBarCode(barCode.BarCode); setBarCodeTxt.Text = string.Empty; if (matchBarCode.StartsWith("BCB")) { UserBase userInfo = UserBaseHelper.GetUserByBarCode(matchBarCode); searchdata(userInfo); } else if (matchBarCode.StartsWith("BCC")) { //定位到指定包 dgv_01.ClearSelection(); setBarCodeTxt.Text = matchBarCode; foreach (DataGridViewRow item in dgv_01.Rows) { if (item.Cells["set_code"] != null && item.Cells["set_code"].Value.ToString() == matchBarCode) { item.Selected = true; //rexxie需要考虑是否直接弹出手动处理 //tsm_hand_Click(null, null); break; } } } }
private void ShowInfo(BarCodeHook.BarCodes barCode) { if (this.InvokeRequired) { this.BeginInvoke(new ShowInfoDelegate(ShowInfo), new object[] { barCode }); } else { //txtBarCode.Text = barCode.IsValid ? barCode.BarCode : ""; if (this.barMainContainer.SelectedDockContainerItem.Tag is BaseForm && barCode.IsValid) { (this.barMainContainer.SelectedDockContainerItem.Tag as BaseForm).doBarCode(barCode.BarCode); } } }
void OnWorkSpaceScaned(BarCodeHook.BarCodes barCode) { string matchBarCode = BarCodeHelper.GetMatchBarCode(barCode.BarCode); if (matchBarCode.StartsWith("BCB")) { searchdata(matchBarCode); } else if (matchBarCode.StartsWith("BCC")) { //定位到指定包 foreach (DataGridViewRow item in dgv_01.Rows) { if (item.Cells["set_code"] != null && item.Cells["set_code"].Value.ToString() == matchBarCode) { item.Selected = true; //rexxie需要考虑是否直接弹出手动处理 tsm_hand_Click(null, null); break; } } } }
void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) { this.ShowInfo(barCode); }