Ejemplo n.º 1
0
        private void CaptureMode_SelectedIndexChanged(object sender, EventArgs e)
        {
            #region CaptureMode_SelectedIndexChanged
            int[] tmpCaptureModes = new int[15] {
                RS_SDK.RS_CAPTURE_DISABLED, RS_SDK.RS_CAPTURE_ROLL_FINGER, RS_SDK.RS_CAPTURE_FLAT_SINGLE_FINGER,
                RS_SDK.RS_CAPTURE_FLAT_TWO_FINGERS, RS_SDK.RS_CAPTURE_FLAT_LEFT_FOUR_FINGERS, RS_SDK.RS_CAPTURE_FLAT_RIGHT_FOUR_FINGERS,
                RS_SDK.RS_CAPTURE_FLAT_LEFT_PALM, RS_SDK.RS_CAPTURE_FLAT_RIGHT_PALM, RS_SDK.RS_CAPTURE_FLAT_SINGLE_FINGER_EX,
                RS_SDK.RS_CAPTURE_FLAT_TWO_FINGERS_EX, RS_SDK.RS_CAPTURE_FLAT_LEFT_SIDE_PALM, RS_SDK.RS_CAPTURE_FLAT_RIGHT_SIDE_PALM,
                RS_SDK.RS_CAPTURE_FLAT_LEFT_WRITERS_PALM, RS_SDK.RS_CAPTURE_FLAT_RIGHT_WRITERS_PALM, RS_SDK.RS_CAPTURE_FLAT_MANUAL
            };


            m_captureMode = Convert.ToInt16(param[0]);

            switch (m_captureMode)
            {
            case RS_SDK.RS_CAPTURE_FLAT_SINGLE_FINGER:
            case RS_SDK.RS_CAPTURE_FLAT_SINGLE_FINGER_EX:
                m_slapType    = RS_SDK.RS_SLAP_ONE_FINGER;
                m_fingerCount = 1;
                m_minCount    = 1;
                break;

            case RS_SDK.RS_CAPTURE_FLAT_TWO_FINGERS:
            case RS_SDK.RS_CAPTURE_FLAT_TWO_FINGERS_EX:
                m_slapType    = RS_SDK.RS_SLAP_TWO_THUMB;
                m_fingerCount = 2;
                m_minCount    = 2;
                break;

            case RS_SDK.RS_CAPTURE_FLAT_LEFT_FOUR_FINGERS:
                m_slapType    = RS_SDK.RS_SLAP_LEFT_FOUR;
                m_fingerCount = 4;
                m_minCount    = 4;
                break;

            case RS_SDK.RS_CAPTURE_FLAT_RIGHT_FOUR_FINGERS:
                m_slapType    = RS_SDK.RS_SLAP_RIGHT_FOUR;
                m_fingerCount = 4;
                m_minCount    = 4;
                break;

            default:
                break;
            }

            int[] nCaptDir = new int[3] {
                RS_SDK.RS_CAPTURE_DIRECTION_DEFAULT, RS_SDK.RS_CAPTURE_DIRECTION_LEFT, RS_SDK.RS_CAPTURE_DIRECTION_RIGHT
            };

            m_result = RS_SDK.RS_SetCaptureModeWithDir(deviceHandle, m_captureMode, nCaptDir[m_captureDir], 0, true);
            if (m_result != RS_SDK.RS_SUCCESS)
            {
                RS_SDK.RS_GetErrString(m_result, ref m_errorMsg);
                MsgPanel.Text = m_errorMsg;
                //CaptureMode.SelectedIndex = 0;
                m_bCaptureModeSelected = false;
                return;
            }
            #endregion
        }