/// <summary> /// 打开密码键盘 /// </summary> /// <param name="CardNo">卡号</param> public void Open(string CardNo) { sbBlock = new StringBuilder(); StringBuilder sbReturn = new StringBuilder(); StringBuilder sbFlag = new StringBuilder(); F10.SUNSON_OpenCom(Convert.ToInt32(Settings.PasswordKeyBoard_COM), 9600); F10.SUNSON_ActiveKey(0x00, 0x00, sbReturn); F10.SUNSON_SetAlgorithmParameter(0x02, 0x00, sbReturn); F10.SUNSON_SetAlgorithmParameter(0x01, 0x30, sbReturn); F10.SUNSON_SetAlgorithmParameter(0x05, 0x01, sbReturn); F10.SUNSON_SetAlgorithmParameter(0x04, 0x10, sbReturn); F10.SUNSON_LoadCardNumber(new StringBuilder(CardNo.Substring(CardNo.Length - 13, 12)), sbReturn); F10.SUNSON_UseEppPlainTextMode(0x02, sbReturn); F10.SUNSON_StartEpp(6, 0x01, 20, sbReturn); }
/// <summary> /// 关闭键盘 /// </summary> public void Close() { StringBuilder sbReturn = new StringBuilder(); F10.SUNSON_UseEppPlainTextMode(0x00, sbReturn); }