Beispiel #1
0
        private void _changeSettings(FLIRCameraSettingsEventArgs oldSettings, FLIRCameraSettingsEventArgs newSettings)
        {
            if (newSettings.MinTemperature != oldSettings.MinTemperature)
            {
                Settings.MinTemperature = newSettings.MinTemperature;
            }
            if (newSettings.MaxTemperature != oldSettings.MaxTemperature)
            {
                Settings.MaxTemperature = newSettings.MaxTemperature;
            }
            if (newSettings.SelectedFrameRate != oldSettings.SelectedFrameRate && Settings.FrameRateSupported)
            {
                Settings.SelectedFrameRate = newSettings.SelectedFrameRate;
            }
            if (newSettings.SelectedResolution != oldSettings.SelectedResolution && Settings.ResolutionSupported)
            {
                Console.WriteLine("METEC Camera Setting resolution");
                Settings.SelectedResolution = newSettings.SelectedResolution;
            }
            if (newSettings.HighSensitivity != oldSettings.HighSensitivity && Settings.HighSensitivitySupported)
            {
                Settings.HighSensitivity = newSettings.HighSensitivity;
            }
            if (newSettings.ObjectDistance != oldSettings.ObjectDistance)
            {
                Settings.ObjectDistance = newSettings.ObjectDistance;
            }
            if (newSettings.TemperatureRange.Minimum != oldSettings.TemperatureRange.Minimum || newSettings.TemperatureRange.Maximum != oldSettings.TemperatureRange.Maximum)
            {
                Settings.TemperatureRange = newSettings.TemperatureRange;
            }

            _logger.Info("METEC Camera", String.Format("New settings applied to camera {0}:\r\n{1}", Index, newSettings.ToString()));
        }
 private void _manager_SettingsChanged(object sender, FLIRCameraSettingsEventArgs settings)
 {
     _logger.Debug("METEC Recorder", "Camera settings changed");
     if (SettingsChanged != null)
     {
         SettingsChanged(sender, settings);
     }
 }
Beispiel #3
0
        public void ApplySettings(object sender, FLIRCameraSettingsEventArgs settings)
        {
            if (settings.ApplyToAll)
            {
                _logger.Info("Camera Manager", "Applying settings to all cameras");
                _cameras.Values.ToList().ForEach(camera => camera.ChangeSettings(settings));
            }
            else
            {
                _logger.Info("Camera Manager", String.Format("Applying settings to camera: {0}", settings.Index));
                _cameras[settings.Index].ChangeSettings(settings);
            }

            if (SettingsChanged != null)
            {
                SettingsChanged(this, settings);
            }
        }
        public void Initialize(FLIRCameraSettingsEventArgs settings)
        {
            _settings = settings;
            this.Text = String.Format("Camera {0}", _settings.Index);


            if (!_settings.HighSensitivitySupported)
            {
                lowSensitivityButton.Checked = true;
                sensitivityGroup.Enabled     = false;
            }
            else
            {
                highSensitivityButton.Checked = _settings.HighSensitivity;
            }

            SetFrameRates(settings.FrameRateList, _settings.SelectedFrameRate);
            SetResolutions(settings.ResolutionList, _settings.SelectedResolution);

            minTemperatureBox.Text = _settings.MinTemperature.ToString();
            maxTemperatureBox.Text = _settings.MaxTemperature.ToString();
        }
        public FLIRCameraSettingsEventArgs GetSettings()
        {
            var settings = new FLIRCameraSettingsEventArgs
            {
                Index                    = Index,
                ApplyToAll               = false,
                MinTemperature           = MinTemperature,
                MaxTemperature           = MaxTemperature,
                FrameRateSupported       = FrameRateSupported,
                FrameRateList            = FrameRateList,
                SelectedFrameRate        = SelectedFrameRate,
                ResolutionSupported      = ResolutionSupported,
                ResolutionList           = ResolutionList,
                SelectedResolution       = SelectedResolution,
                HighSensitivitySupported = HighSensitivitySupported,
                HighSensitivity          = HighSensitivity,
                ObjectDistance           = ObjectDistance,
                TemperatureRange         = TemperatureRange
            };

            return(settings);
        }
 private void _recorder_SettingsChanged(object sender, FLIRCameraSettingsEventArgs settings)
 {
     // UpdateCameraListView();
     _settingsChanged = true;
 }
Beispiel #7
0
 public void ChangeSettings(FLIRCameraSettingsEventArgs oldSettings, FLIRCameraSettingsEventArgs newSettings)
 {
     _changeSettings(oldSettings, newSettings);
 }
Beispiel #8
0
 // Change camera settings
 public void ChangeSettings(FLIRCameraSettingsEventArgs newSettings)
 {
     _changeSettings(Settings.GetSettings(), newSettings);
 }
 public FLIRCameraSettingsForm(FLIRCameraSettingsEventArgs settings)
 {
     InitializeComponent();
     Initialize(settings);
 }