Exemplo n.º 1
0
        private bool initDevice()
        {
            #region initDevice
            RSDeviceInfo deviceInfo = new RSDeviceInfo();

            m_result = RS_SDK.RS_InitDevice(DeviceList.SelectedIndex, ref deviceHandle);
            if (m_result != RS_SDK.RS_SUCCESS)
            {
                RS_SDK.RS_GetErrString(m_result, ref m_errorMsg);
                //MsgPanel.Text = m_errorMsg;
                MsgPanel.Text = "No se encontro lector";
                return(false);
            }

            //AutoCalibrate.Checked = true;
            if (!m_prevStopped)
            {
                if (_selectedPrevMode == PrevMode.directDraw)
                {
                    RS_SDK.RS_StopViewWindow(deviceHandle);
                }
            }
            m_prevStopped = true;

            //TimeoutTextBox.Text = Convert.ToString(0);
            //ReductionLevel.Text = Convert.ToString(100);

            //m_result = RS_SDK.RS_GetDeviceInfo(deviceHandle, ref deviceInfo);
            //if (m_result != RS_SDK.RS_SUCCESS)
            //{
            //    RS_SDK.RS_GetErrString(m_result, ref m_errorMsg);
            //    MsgPanel.Text = m_errorMsg;
            //    return false;
            //}

            //DeviceInfo.Text = System.Text.Encoding.ASCII.GetString(deviceInfo.productName);
            //DeviceID.Text = System.Text.Encoding.ASCII.GetString(deviceInfo.deviceID);
            //FirmwareInfo.Text = System.Text.Encoding.ASCII.GetString(deviceInfo.firmwareVersion);
            //FirmwareInfo.Text = System.Text.Encoding.ASCII.GetString(deviceInfo.firmwareVersion);
            //Hardwareinfo.Text = System.Text.Encoding.ASCII.GetString(deviceInfo.HardwareVersion);

            //InitDevice.Enabled = false;
            //ExitDevice.Enabled = true;

            //if (deviceInfo.deviceType != RS_SDK.RS_DEVICE_REALSCAN_F)
            //{
            //    ResetLCD.Enabled = false;
            //    DisplayLCD.Enabled = false;
            //}

            MsgPanel.Text = "El dispositivo se encuentra inicializado";
            return(true);

            #endregion
        }
Exemplo n.º 2
0
 public static extern int RS_GetDeviceInfo(int deviceHandle, ref RSDeviceInfo deviceInfo);