private void button8_Click(object sender, EventArgs e) { this.txtData.Text = ""; try { if (string.IsNullOrEmpty(txtNum.Text)) { foreach (string s in this.textBox2.Text.Split('\r')) { string st = s.Replace("\n", ""); if (string.IsNullOrEmpty(st)) { continue; } string str = RFIDHelper.ReadData(st, RFIDResources.my_pwd); str = RFIDHelper.ReadData(st, RFIDResources.default_pwd); this.txtData.Text += str + Environment.NewLine; } } else { string str = RFIDHelper.ReadData(this.textBox2.Text.Trim(), RFIDResources.my_pwd, Convert.ToInt32(txtNum.Text)); this.txtData.Text = str; } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void button10_Click(object sender, EventArgs e) { try { string str = RFIDHelper.ReadData(this.txt_bq.Text.Trim(), RFIDResources.default_pwd); this.txtData.Text = str; } catch (Exception ex) { Console.WriteLine(ex.Message); } }