Пример #1
0
        void RxRspEventReceived(object sender, ProtocolEventArg e)
        {
            //if (this.IsDisposed)
            //    return;

            if (this.Dispatcher.CheckAccess())
            {
                __ParseRsp(e.Protocol);
                return;
            }

            Dispatcher.Invoke(new Action(delegate()
            {
                __ParseRsp(e.Protocol);
            }));
        }
Пример #2
0
        void RxRspEventReceived(object sender, ProtocolEventArg e)
        {
            if (this.IsDisposed)
            {
                return;
            }

            if (!this.InvokeRequired)
            {
                __ParseRsp(e.Protocol);
                return;
            }

            this.Invoke(new MethodInvoker(delegate()
            {
                __ParseRsp(e.Protocol);
            }));
        }
Пример #3
0
        void adx_RxRspParsed(object sender, ProtocolEventArg e)
        {
            this.BeginInvoke(new MethodInvoker(delegate()
            {
                //-----异步返回代码----
                //ShowResultState(ByteArrayToHexString(e.Protocol.ToArray()));
                //-------------------

                //-----主动上送-------
                switch (e.Protocol.Code)
                {
                case PassiveRcp.RCP_CMD_ISO6B_IDEN:
                case PassiveRcp.RCP_CMD_EPC_IDEN:
                    if (e.Protocol.Length > 0 && e.Protocol.Type == 0x32)
                    {
                        ShowResultState(ByteArrayToHexString(e.Protocol.Payload, 1, e.Protocol.Length - 1));
                    }
                    break;
                }
                //-------------------
            }));
        }