コード例 #1
0
ファイル: frmMain.cs プロジェクト: xxdoc/vb600
        private void btnStart_Click(object sender, EventArgs e)
        {
            #region codes ========================================
            if (m_bOpen)
            {
                if (!m_bStart)
                {
                    m_bStart = true;
                    ErrorMessage(0, 0, "Inventorying...");
                    btnStart.Text = "Parar";

                    lstView.Items.Clear();

                    RFID_INVENTORY stInventory    = new RFID_INVENTORY();
                    ACCESS_STATUS  stAccessStatus = new ACCESS_STATUS();

                    //operation in Non-blocking mode
                    stInventory.hWnd = this.Handle;
                    //stInventory.lpfnStartProc = new CallbackDelegate(InvStartProc);
                    //stInventory.lpfnStopProc = new CallbackDelegate(InvStopProc);
                    stInventory.lpfnStopProc = m_fnStopProc;

                    R1000Reader.RFIDInventory(stInventory, ref stAccessStatus, false, 0);
                }
                else
                {
                    R1000Reader.RFIDAbortOperation();
                    //StopInventory();
                }
            }//end if (m_bOpen)
            #endregion //end codes
        }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: xxdoc/vb600
        private void TriggerProc(object sender, TriggerEventArgs args)
        {
            #region codes ========================================
            if (m_bOpen && !m_bStart)
            {
                m_bStart = true;
                RFID_INVENTORY stInventory = new RFID_INVENTORY();

                ACCESS_STATUS stAccessStatus = new ACCESS_STATUS();

                //operation in Non-blocking mode
                //stInventory.lpfnStartProc = new CallbackDelegate(InvStartProc);
                //stInventory.lpfnStopProc = new CallbackDelegate(InvStopProc);
                stInventory.lpfnStopProc = m_fnStopProc;
                R1000Reader.RFIDInventory(stInventory, ref stAccessStatus, false, 0);
            }
            scanTrigger.DoneTrigger();
            #endregion //end codes
        }