private void UpdateExpsoureControls()
        {
            uint uState = 0;

            MvApi.CameraGetAeState(m_hCamera, ref uState);

            if (uState == 1)
            {
                textBox_AnalogGain.Enabled   = false;
                textBox_ExposureTime.Enabled = false;
                trackBar_AnalogGain.Enabled  = false;
            }
            else
            {
                textBox_AnalogGain.Enabled   = true;
                textBox_ExposureTime.Enabled = true;
                trackBar_AnalogGain.Enabled  = true;

                int iAnalogGain = 0;
                MvApi.CameraGetAnalogGain(m_hCamera, ref iAnalogGain);

                trackBar_AnalogGain.Value = iAnalogGain;
                textBox_AnalogGain.Text   = iAnalogGain.ToString();

                double dCameraExpTime = 0;
                MvApi.CameraGetExposureTime(m_hCamera, ref dCameraExpTime);
                textBox_ExposureTime.Text = dCameraExpTime.ToString();
            }
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (m_hCamera <= 0 || m_bInited == false)
            {
                return;
            }

            uint AeMode = 0;

            MvApi.CameraGetAeState(m_hCamera, ref AeMode);

            if (AeMode == 1)
            {
                int    iGain    = 0;
                double dExpTime = 0;
                MvApi.CameraGetAnalogGain(m_hCamera, ref iGain);
                MvApi.CameraGetExposureTime(m_hCamera, ref dExpTime);
                textBox_AnalogGain.Text   = iGain.ToString();
                trackBar_AnalogGain.Value = iGain;
                textBox_ExposureTime.Text = dExpTime.ToString();
            }
        }