private void Button_Click(object sender, RoutedEventArgs e) { byte[] idcard = Encoding.GetEncoding("GBK").GetBytes("370111111111111115"); byte[] req = MakerTCPFrame.GetInstance().PackData(MsgId.X000A, "123456789012", idcard); byte[] request = new byte[req.Length - 2]; Array.Copy(req, 1, request, 0, req.Length - 2); new ParserTCPFrame().Parser(request); }
private void Button_Click_1(object sender, RoutedEventArgs e) { byte[] body = new byte[34]; byte[] idcard = Encoding.GetEncoding("GBK").GetBytes("370111111111111115"); Array.Copy(idcard, 0, body, 0, idcard.Length); body[32] = 0x01; body[33] = 0x00; byte[] req = MakerTCPFrame.GetInstance().PackData(MsgId.X0007, "123456789012", body); byte[] request = new byte[req.Length - 2]; Array.Copy(req, 1, request, 0, req.Length - 2); new ParserTCPFrame().Parser(request); }