Exemplo n.º 1
0
        private void _radioGroupAntiFlick_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (!_isInit)
                {
                    XCamera cam = XCamera.GetInstance();
                    switch (_radioGroupAntiFlick.SelectedIndex)
                    {
                    case 0:              //直流
                        cam.SetAntiFlickState(false);
                        break;

                    case 1:             //50Hz
                        cam.SetAntiFlickState(true);
                        cam.SetLightFrequency(emDSLightFrequency.LIGHT_FREQUENCY_50HZ);
                        break;

                    case 2:             //60Hz
                        cam.SetAntiFlickState(true);
                        cam.SetLightFrequency(emDSLightFrequency.LIGHT_FREQUENCY_60HZ);
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (System.Exception ex)
            {
                _logger.Error(ex.Message);
            }
        }