/// <summary> /// search epc /// </summary> void ReadID() { if (this.cbAnticollision.Checked) { flagAnti = 0x01; iniAntiQ = (byte)int.Parse(this.cbqvalue.Text); } else { flagAnti = 0x00; } if (this._btReadReadID.Text == "Start") { this._btReadReadID.Text = "Stop"; this._btClearReadID.Enabled = false; this.cbAnticollision.Enabled = false; ClearReadID(); run = true; } else { try { if (_lvReadID.Items.Count != 0) { ws_alias.cero_codeWS ws = new ws_alias.cero_codeWS(); codes_alias.Codes codes = new codes_alias.Codes(); string codes_string = codes.Convert_Array_String(_lvReadID.Items); ws.insertar_codigos_conteo_temp(codes_string, this.Id_usuario); _lvReadID.Items.Clear(); } } catch (Exception) { MessageBox.Show("Eroor, No hay Conexion con el Servidor"); } this._lbSumTagsReadID.Text = "0"; this._btReadReadID.Text = "Start"; this._btClearReadID.Enabled = true; this.cbAnticollision.Enabled = true; run = false; } if (run) { //MessageBox.Show("Reading Mode:" + flagAnti + ",Q" + iniAntiQ); canReceive = UHF.UHFInventory(flagAnti, iniAntiQ); if (canReceive) { //open UII receiving thread if (thrReceiveUii == null) { thrReceiveUii = new System.Threading.Thread(ReceiveUiiProc); thrReceiveUii.IsBackground = true; thrReceiveUii.Start(); } else { thrReceiveUii.Start(); } } } else { //close UII receiving thread if (thrReceiveUii != null) { thrReceiveUii.Abort(); thrReceiveUii = null; } //stop get UHF.UHFStopGet(); } }
public frmMain() { InitializeComponent(); this.CodigoWS = new codigo_alias.CodigoWS(); this.ws = new ws_alias.cero_codeWS(); }