private void btn_Ok_Click(object sender, EventArgs e) { if (!RegexStringLayer.CheckMatch(txt_Data.Text, @"^[0-9a-fA-F]{" + DataLen.ToString() + @"}$")) { MessageBox.Show("请输入一个" + DataLen.ToString() + "位的16进制值!"); return; } DialogResult = DialogResult.OK; szDumpData = txt_Data.Text.ToUpper(); Close(); }
private void btn_Add_Click(object sender, EventArgs e) { if (!RegexStringLayer.CheckMatch(txt_Key.Text, @"^[0-9a-fA-F]{12}$")) { MessageBox.Show("请输入一个12位的16进制KEY值!"); return; } ListViewItem lvi = new ListViewItem(txt_Key.Text); lv_KeyList.Items.Add(lvi); txt_Key.Text = ""; }
private void btn_WriteId_Click(object sender, EventArgs e) { if (!RegexStringLayer.CheckMatch(txt_Id.Text, @"^[0-9a-fA-F]{8}$")) { MessageBox.Show("请输入一个8位的16进制UID值!"); return; } if (pl.AsyncStart("nfc/nfc-mfsetuid.exe", "-f " + txt_Id.Text) == false) { MessageBox.Show("已存在工作线程"); } }