private void UpdateUISettingsValues(rsid.DeviceConfig deviceConfig, MainWindow.FlowMode flowMode, bool dumpingEnabled)
        {
            SecurityLevelHigh.IsChecked   = deviceConfig.securityLevel == rsid.DeviceConfig.SecurityLevel.High;
            SecurityLevelMedium.IsChecked = deviceConfig.securityLevel == rsid.DeviceConfig.SecurityLevel.Medium;
            //SecurityLevelRecognitionOnly.IsChecked = false;

            FaceSelectionPolicySingle.IsChecked = deviceConfig.faceSelectionPolicy == rsid.DeviceConfig.FaceSelectionPolicy.Single;
            FaceSelectionPolicyAll.IsChecked    = deviceConfig.faceSelectionPolicy == rsid.DeviceConfig.FaceSelectionPolicy.All;

            AlgoFlow_All.IsChecked             = deviceConfig.algoFlow == rsid.DeviceConfig.AlgoFlow.All;
            AlgoFlow_DetectionOnly.IsChecked   = deviceConfig.algoFlow == rsid.DeviceConfig.AlgoFlow.FaceDetectionOnly;
            AlgoFlow_RecognitionOnly.IsChecked = deviceConfig.algoFlow == rsid.DeviceConfig.AlgoFlow.RecognitionOnly;
            AlgoFlow_SpoofOnly.IsChecked       = deviceConfig.algoFlow == rsid.DeviceConfig.AlgoFlow.SpoofOnly;


            CameraRotation0.IsChecked   = deviceConfig.cameraRotation == rsid.DeviceConfig.CameraRotation.Rotation_0_Deg;
            CameraRotation180.IsChecked = deviceConfig.cameraRotation == rsid.DeviceConfig.CameraRotation.Rotation_180_Deg;

            ServerModeNo.IsChecked  = flowMode == MainWindow.FlowMode.Device;
            ServerModeYes.IsChecked = flowMode == MainWindow.FlowMode.Server;

            PreviewModeMJPEG_1080P.IsChecked = deviceConfig.previewMode == rsid.DeviceConfig.PreviewMode.MJPEG_1080P;
            PreviewModeMJPEG_720P.IsChecked  = deviceConfig.previewMode == rsid.DeviceConfig.PreviewMode.MJPEG_720P;
            PreviewModeRAW10_1080P.IsChecked = deviceConfig.previewMode == rsid.DeviceConfig.PreviewMode.RAW10_1080P;

            DumpingCheckBoxYes.IsChecked = dumpingEnabled;
        }
Пример #2
0
        void QueryUISettingsValues(out rsid.DeviceConfig deviceConfig, out MainWindow.FlowMode flowMode)
        {
            deviceConfig = new rsid.DeviceConfig();
            deviceConfig.securityLevel = rsid.DeviceConfig.SecurityLevel.Medium;
            if (SecurityLevelHigh.IsChecked.GetValueOrDefault())
            {
                deviceConfig.securityLevel = rsid.DeviceConfig.SecurityLevel.High;
            }
            else if (SecurityLevelRecognitionOnly.IsChecked.GetValueOrDefault())
            {
                deviceConfig.securityLevel = rsid.DeviceConfig.SecurityLevel.RecognitionOnly;
            }

            deviceConfig.cameraRotation = CameraRotation0.IsChecked.GetValueOrDefault() ? rsid.DeviceConfig.CameraRotation.Rotation_0_Deg : rsid.DeviceConfig.CameraRotation.Rotation_180_Deg;
            flowMode = ServerModeNo.IsChecked.GetValueOrDefault() ? MainWindow.FlowMode.Device : MainWindow.FlowMode.Server;

            if (PreviewModeVGA.IsChecked.GetValueOrDefault() == true)
            {
                deviceConfig.previewMode = rsid.DeviceConfig.PreviewMode.VGA;
            }
            //else if (PreviewModeFHDRect.IsChecked.GetValueOrDefault() == true)
            //{
            //    deviceConfig.previewMode = rsid.DeviceConfig.PreviewMode.FHD_Rect;
            //}
            else
            {
                deviceConfig.previewMode = rsid.DeviceConfig.PreviewMode.Dump;
            }

            //we in adv mode only if the adv options are enabled
            deviceConfig.advancedMode = PreviewModeVGA.IsEnabled;
        }
Пример #3
0
        private void UpdateUISettingsValues(rsid.DeviceConfig deviceConfig, MainWindow.FlowMode flowMode)
        {
            SecurityLevelHigh.IsChecked            = deviceConfig.securityLevel == rsid.DeviceConfig.SecurityLevel.High;
            SecurityLevelMedium.IsChecked          = deviceConfig.securityLevel == rsid.DeviceConfig.SecurityLevel.Medium;
            SecurityLevelRecognitionOnly.IsChecked = deviceConfig.securityLevel == rsid.DeviceConfig.SecurityLevel.RecognitionOnly;

            CameraRotation0.IsChecked   = deviceConfig.cameraRotation == rsid.DeviceConfig.CameraRotation.Rotation_0_Deg;
            CameraRotation180.IsChecked = deviceConfig.cameraRotation == rsid.DeviceConfig.CameraRotation.Rotation_180_Deg;

            ServerModeNo.IsChecked  = flowMode == MainWindow.FlowMode.Device;
            ServerModeYes.IsChecked = flowMode == MainWindow.FlowMode.Server;

            PreviewModeVGA.IsChecked = deviceConfig.previewMode == rsid.DeviceConfig.PreviewMode.VGA;
            //PreviewModeFHDRect.IsChecked = deviceConfig.previewMode == rsid.DeviceConfig.PreviewMode.FHD_Rect;
            PreviewModeDump.IsChecked = deviceConfig.previewMode == rsid.DeviceConfig.PreviewMode.Dump;
        }
Пример #4
0
 static extern Status rsid_query_device_config(IntPtr rsid_authenticator, ref DeviceConfig deviceConfig);
Пример #5
0
 public Status QueryDeviceConfig(out DeviceConfig result)
 {
     result = new DeviceConfig();
     return(rsid_query_device_config(_handle, ref result));
 }
Пример #6
0
 public Status SetDeviceConfig(DeviceConfig args)
 {
     return(rsid_set_device_config(_handle, ref args));
 }
        void QueryUISettingsValues(out rsid.DeviceConfig deviceConfig, out MainWindow.FlowMode flowMode, out bool dumpingEnabled)
        {
            deviceConfig = new rsid.DeviceConfig();
            // securiy level
            deviceConfig.securityLevel = rsid.DeviceConfig.SecurityLevel.Medium;
            if (SecurityLevelHigh.IsChecked.GetValueOrDefault())
            {
                deviceConfig.securityLevel = rsid.DeviceConfig.SecurityLevel.High;
            }

            // policy
            if (FaceSelectionPolicyAll.IsChecked.GetValueOrDefault())
            {
                deviceConfig.faceSelectionPolicy = rsid.DeviceConfig.FaceSelectionPolicy.All;
            }
            else
            {
                deviceConfig.faceSelectionPolicy = rsid.DeviceConfig.FaceSelectionPolicy.Single;
            }

            // algo flow
            if (AlgoFlow_All.IsChecked.GetValueOrDefault())
            {
                deviceConfig.algoFlow = rsid.DeviceConfig.AlgoFlow.All;
            }
            else if (AlgoFlow_DetectionOnly.IsChecked.GetValueOrDefault())
            {
                deviceConfig.algoFlow = rsid.DeviceConfig.AlgoFlow.FaceDetectionOnly;
            }
            else if (AlgoFlow_RecognitionOnly.IsChecked.GetValueOrDefault())
            {
                deviceConfig.algoFlow = rsid.DeviceConfig.AlgoFlow.RecognitionOnly;
            }
            else if (AlgoFlow_SpoofOnly.IsChecked.GetValueOrDefault())
            {
                deviceConfig.algoFlow = rsid.DeviceConfig.AlgoFlow.SpoofOnly;
            }

            // camera rotation
            deviceConfig.cameraRotation = CameraRotation0.IsChecked.GetValueOrDefault() ? rsid.DeviceConfig.CameraRotation.Rotation_0_Deg : rsid.DeviceConfig.CameraRotation.Rotation_180_Deg;

            // flow mode
            flowMode = ServerModeNo.IsChecked.GetValueOrDefault() ? MainWindow.FlowMode.Device : MainWindow.FlowMode.Server;

            // preview mode
            if (PreviewModeMJPEG_1080P.IsChecked.GetValueOrDefault())
            {
                deviceConfig.previewMode = rsid.DeviceConfig.PreviewMode.MJPEG_1080P;
            }
            else if (PreviewModeMJPEG_720P.IsChecked.GetValueOrDefault())
            {
                deviceConfig.previewMode = rsid.DeviceConfig.PreviewMode.MJPEG_720P;
            }
            else if (PreviewModeRAW10_1080P.IsChecked.GetValueOrDefault())
            {
                deviceConfig.previewMode = rsid.DeviceConfig.PreviewMode.RAW10_1080P;
            }

            // dump
            dumpingEnabled = DumpingCheckBoxYes.IsChecked.GetValueOrDefault();
        }