コード例 #1
0
        // PDTS 1064
        /// <summary>
        /// Handles the MagneticCardReader's CardSwiped event.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">An MagneticCardSwipeArgs object that contains the
        /// event data.</param>
        void CardSwiped(object sender, MagneticCardSwipeArgs e)
        {
            if (ContainsFocus && m_cardSearchRadio.Checked)
            {
                // Put the card number in the number box.
                m_detectedSwipe   = true;
                m_cardNumber.Text = e.CardData;

                // Perform the search
                SearchClick(this, new EventArgs());
            }
        }
コード例 #2
0
        // PDTS 1064
        /// <summary>
        /// Handles the MagneticCardReader's CardSwiped event.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">A MagneticCardSwipeArgs object that contains the
        /// event data.</param>
        void CardSwiped(object sender, MagneticCardSwipeArgs e)
        {
            if (ContainsFocus)
            {
                // Store the card data.
                m_detectedSwipe   = true;
                m_cardData.Length = 0;
                m_cardData.Append(e.CardData);
                m_MatchedFilter = e.MatchFilter;

                DialogResult = DialogResult.OK;
                Close();
            }
        }