private void timer1_Tick(object sender, EventArgs e)
        {
            //FrmMain.cardInfoStruct.CardNo = dd.Read();
            //FrmMain.cardInfoStruct.CardNo = "002000000024153734";
            CardSLE_302H cardsle_302h = new CardSLE_302H(this);

            FrmMain.cardInfoStruct = cardsle_302h.Read();
            if (FrmMain.cardInfoStruct.CardNo != string.Empty && FrmMain.cardInfoStruct.CardNo.Length > 0)
            {
                //MyMsg.MsgInfo(FrmMain.cardInfoStruct.CardNo);
                //FrmMain.cardInfoStruct.CardNo = "002000000024153734";// "001000776394154179";
                backgroundWorker1.RunWorkerAsync();
                //FrmMain.cardInfoStruct.CardNo = aa;
                timer1.Stop();
                this.top1.timer1.Stop();
            }
        }
 private void txtInputCard_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)13)
     {
         CardSLE_302H cardsle_302h = new CardSLE_302H(this);
         FrmMain.cardInfoStruct = cardsle_302h.Read();
         //FrmMain.cardInfoStruct.CardNo = txtInputCard.Text.Trim();
         if (FrmMain.cardInfoStruct.CardNo != string.Empty && FrmMain.cardInfoStruct.CardNo.Length > 0)
         {
             //MyMsg.MsgInfo(FrmMain.cardInfoStruct.CardNo);
             //FrmMain.cardInfoStruct.CardNo = "002000000024153734";// "001000776394154179";
             backgroundWorker1.RunWorkerAsync();
             //FrmMain.cardInfoStruct.CardNo = aa;
             timer1.Stop();
             this.top1.timer1.Stop();
         }
     }
 }