/// <summary> /// CardXID TextBox Text Changed Event. /// </summary> private void CardXIDTB_TextChanged(object sender, EventArgs e) { try { CardIDTB.TextChanged -= CardIDTB_TextChanged; if (String.IsNullOrWhiteSpace(CardXIDTB.Text)) { CardIDTB.Clear(); } else { CardIDTB.Text = Common.GetCardSn16to10(CardXIDTB.Text); } } catch (Exception err) { Common.WriteLog(DateTime.Now, EnmMsgType.Error, "System", "Delta.MPS.AccessSystem.BatchCardsForm", err.Message, err.StackTrace); MessageBox.Show(err.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { CardIDTB.TextChanged += CardIDTB_TextChanged; } }