Example #1
0
        private void exit_Device()
        {
            #region exit_Device
            if (!m_prevStopped)
            {
                if (_selectedPrevMode == PrevMode.directDraw)
                {
                    m_result = RS_SDK.RS_StopViewWindow(deviceHandle);
                    if (m_result != RS_SDK.RS_SUCCESS)
                    {
                        RS_SDK.RS_GetErrString(m_result, ref m_errorMsg);
                        MsgPanel.Text = m_errorMsg;
                        return;
                    }
                }

                m_prevStopped = true;
            }

            m_result = RS_SDK.RS_ExitDevice(deviceHandle);

            if (m_result != RS_SDK.RS_SUCCESS)
            {
                RS_SDK.RS_GetErrString(m_result, ref m_errorMsg);
                MsgPanel.Text = m_errorMsg;
                return;
            }
            //CaptureMode.SelectedIndex = 0;
            //Callback.SelectedIndex = 0;

            //DeviceInfo.Text = "";
            //FirmwareInfo.Text = "";
            //DeviceID.Text = "";
            //FirmwareInfo.Text = "";
            //Hardwareinfo.Text = "";
            //ImageSize.Text = "";

            //InitSDK.Enabled = true;
            //InitDevice.Enabled = false;
            //ExitDevice.Enabled = false;
            //StartCapture.Enabled = false;
            //StopCapture.Enabled = false;
            //TakeManual.Enabled = false;
            //TakeAuto.Enabled = false;
            //ResetLCD.Enabled = false;
            //DisplayLCD.Enabled = false;

            //ResetLCD.Enabled = true;
            //DisplayLCD.Enabled = true;

            //MsgPanel.Text = "The device is disconnected successfully";
            #endregion
        }