private void OnLoad(BuscarNUC Window) { Window.Closed += (s, e) => { try { if (OnProgress == null) { return; } if (!_IsSucceed) { Imputado = null; } OnProgress.Abort(); CancelCaptureAndCloseReader(OnCaptured); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar buscar por nuc", ex); } }; if (CurrentReader != null) { CurrentReader.Dispose(); CurrentReader = null; } CurrentReader = Readers[0]; if (CurrentReader == null) { return; } if (!OpenReader()) { Window.Close(); } if (!StartCaptureAsync(OnCaptured)) { Window.Close(); } OnProgress = new Thread(() => InvokeDelegate(Window)); Application.Current.Dispatcher.Invoke((System.Action)(delegate { ScannerMessage = "Capture Huella"; ColorMessage = new SolidColorBrush(Colors.Green); })); }
private void OnLoad(object sender) { try { Error = "Cargando servicios de lectura"; var _view = (AutenticacionView)(sender); CrearListaImagenes(); if (CurrentReader != null) { CurrentReader.Dispose(); CurrentReader = null; } CurrentReader = Readers[0]; if (CurrentReader == null) { CapturaFalladaDigitalPersona = true; setAutenticaContrasena(); CmdOkHabilitado = true; Error = "El lector de huella no se encuentra conectado"; return; } _view.Closed += (s, e) => { OnProgress.Abort(); CancelCaptureAndCloseReader(OnCaptured); }; if (!OpenReader()) { setAutenticaContrasena(); CapturaFalladaDigitalPersona = true; CmdOkHabilitado = true; Error = "No se puede accesar al lector de huella"; } if (!StartCaptureAsync(OnCaptured)) { setAutenticaContrasena(); CapturaFalladaDigitalPersona = true; CmdOkHabilitado = true; Error = "No se puede iniciar la aunteticación por huella"; } Error = string.Empty; OnProgress = new Thread(() => InvokeDelegate(_view)); } catch { } }
private void OnLoad(LoginView Window) { try { if (CurrentReader != null) { CurrentReader.Dispose(); CurrentReader = null; } CurrentReader = Readers[0]; if (CurrentReader == null) { return; } Window.Closed += (s, e) => { OnProgress.Abort(); CancelCaptureAndCloseReader(OnCaptured); }; if (!OpenReader()) { Window.Close(); } if (!StartCaptureAsync(OnCaptured)) { Window.Close(); } OnProgress = new Thread(() => InvokeDelegate(Window)); } catch { } }
private void OnLoad(LoginView Window) { try { XMLCentros(); //Asignamos usuarios temporales UsuarioBaseDatos(); //Validamos si esta habilitado el biometrico de la pantalla ValidacionesBiometrico(); ObtenerPassWord(); #region Comentado //GlobalVar.gArea = Convert.ToInt16(ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).AppSettings.Settings["EquipoArea"].Value); //LstCentro = LstCentro ?? new ObservableCollection<CENTRO>(new cCentro().ObtenerTodos()); //LstCentro.Insert(0, new CENTRO() { ID_CENTRO = -1, DESCR = Resources.General.seleccione }); #endregion TBPwd = Window.tbPassword; OriginalHeight = Window.Height; if (CurrentReader != null) { CurrentReader.Dispose(); CurrentReader = null; } CurrentReader = Readers[0]; if (CurrentReader == null) { return; } Window.Closed += (s, e) => { try { OnProgress.Abort(); CancelCaptureAndCloseReader(OnCaptured); } catch (Exception ex) { var trace = new System.Diagnostics.StackTrace(ex, true); Trace.WriteLine("\n>>>[Ubicación del Problema]"); Trace.WriteLine("Clase: " + trace.GetFrame((trace.FrameCount - 1)).GetMethod().ReflectedType.FullName); Trace.WriteLine("Metodo: " + trace.GetFrame((trace.FrameCount - 1)).GetMethod().Name); Trace.WriteLine("Linea: " + trace.GetFrame((trace.FrameCount - 1)).GetFileLineNumber()); Trace.WriteLine("Columna: " + trace.GetFrame((trace.FrameCount - 1)).GetFileColumnNumber()); Trace.WriteLine(ex.Message + " " + (ex.InnerException != null ? ex.InnerException.InnerException.Message : "")); } }; if (!OpenReader()) { Window.Close(); } if (!StartCaptureAsync(OnCaptured)) { Window.Close(); } OnProgress = new Thread(() => InvokeDelegate(Window)); } catch (Exception ex) { var trace = new System.Diagnostics.StackTrace(ex, true); Trace.WriteLine("\n>>>[Ubicación del Problema]"); Trace.WriteLine("Clase: " + trace.GetFrame((trace.FrameCount - 1)).GetMethod().ReflectedType.FullName); Trace.WriteLine("Metodo: " + trace.GetFrame((trace.FrameCount - 1)).GetMethod().Name); Trace.WriteLine("Linea: " + trace.GetFrame((trace.FrameCount - 1)).GetFileLineNumber()); Trace.WriteLine("Columna: " + trace.GetFrame((trace.FrameCount - 1)).GetFileColumnNumber()); Trace.WriteLine(ex.Message + " " + (ex.InnerException != null ? ex.InnerException.InnerException.Message : "")); StaticSourcesViewModel.ShowMessageError(res.General.algo_paso, res.ControlPenales.Login.LoginViewModel.error_login, ex); } }
private void OnLoad(LeerCustodioEdificio Window) { #region [Huellas Digitales] var myDoubleAnimation = new DoubleAnimation(); myDoubleAnimation.From = 0; myDoubleAnimation.To = 185; myDoubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(1.3)); myDoubleAnimation.AutoReverse = true; myDoubleAnimation.RepeatBehavior = RepeatBehavior.Forever; Storyboard.SetTargetName(myDoubleAnimation, "Ln"); Storyboard.SetTargetProperty(myDoubleAnimation, new PropertyPath(Canvas.TopProperty)); var myStoryboard = new Storyboard(); myStoryboard.Children.Add(myDoubleAnimation); myStoryboard.Begin(Window.Ln); ColorNIPAprobacion = new SolidColorBrush(Colors.DarkBlue); MensajeNipAprobacion = "Capture NIP"; MarkCheck = "🔍"; ImagenPlaceHolder = new Imagenes(); ImagenCustodio = ImagenPlaceHolder.getImagenPerson(); #endregion Window.Closed += (s, e) => { try { if (OnProgress == null) { return; } if (!IsSucceded) { SelectedRegistroCustodio = null; } OnProgress.Abort(); CancelCaptureAndCloseReader(OnCaptured); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar búsqueda", ex); } }; if (CurrentReader != null) { CurrentReader.Dispose(); CurrentReader = null; } CurrentReader = Readers[0]; if (CurrentReader == null) { return; } if (!OpenReader()) { Window.Close(); } if (!StartCaptureAsync(OnCaptured)) { Window.Close(); } OnProgress = new Thread(() => InvokeDelegate(Window)); Application.Current.Dispatcher.Invoke((System.Action)(delegate { ScannerMessage = "Capture Huella"; ColorMensaje = new SolidColorBrush(Colors.Green); ColorNIPAprobacion = new SolidColorBrush(Colors.DarkBlue); })); GuardandoHuellas = true; }
public void OnLoad(BusquedaHuellaVisita Window) { SelectedFinger = enumTipoBiometrico.INDICE_DERECHO; HuellasImputadosVisitas = ObtenerHuellasImputados(); FondoBackSpaceNIP = new SolidColorBrush(Colors.Green); FondoLimpiarNIP = new SolidColorBrush(Colors.Crimson); NIPBuscar = ""; ColorAprobacionNIP = new SolidColorBrush(Colors.DarkBlue); CheckMark = "🔍"; ScannerMessage = "Capture Huella\nen el lector"; var placeholder = new Imagenes().getImagenPerson(); ColorAprobacion = new SolidColorBrush(Colors.Green); ProgressRingVisible = Visibility.Collapsed; ImagenEvaluacion = new Imagenes().getImagenHuella(); ScannerMessageVisible = true; ImagenEvaluacionVisible = Readers.Count > 0; TextoIncidenciaFalsoPositivo = "SIN OBSERVACIONES"; Window.Closed += (s, e) => { try { if (OnProgress == null) { return; } if (!IsSucceed) { //SelectedCustodio = null; OnProgress.Abort(); } CancelCaptureAndCloseReader(OnCaptured); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar la lectura de las huellas", ex); } }; if (CurrentReader != null) { CurrentReader.Dispose(); CurrentReader = null; } CurrentReader = Readers[0]; if (CurrentReader == null) { return; } if (!OpenReader()) { Window.Close(); } if (!StartCaptureAsync(OnCaptured)) { Window.Close(); } OnProgress = new Thread(() => InvokeDelegate(Window)); }
private void OnLoad(BuscarPorHuellaYNipView Window) { try { BuscarPor = enumTipoPersona.IMPUTADO; ListResultado = null; PropertyImage = null; FotoRegistro = new Imagenes().getImagenPerson(); TextNipBusqueda = string.Empty; #region [Huellas Digitales] var myDoubleAnimation = new DoubleAnimation(); myDoubleAnimation.From = 0; myDoubleAnimation.To = 185; myDoubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(1.3)); myDoubleAnimation.AutoReverse = true; myDoubleAnimation.RepeatBehavior = RepeatBehavior.Forever; Storyboard.SetTargetName(myDoubleAnimation, "Ln"); Storyboard.SetTargetProperty(myDoubleAnimation, new PropertyPath(Canvas.TopProperty)); var myStoryboard = new Storyboard(); myStoryboard.Children.Add(myDoubleAnimation); myStoryboard.Begin(Window.Ln); #endregion Window.Closed += (s, e) => { try { if (OnProgress == null) { return; } if (!_IsSucceed) { SelectRegistro = null; } OnProgress.Abort(); CancelCaptureAndCloseReader(OnCaptured); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar busqueda", ex); } }; if (CurrentReader != null) { CurrentReader.Dispose(); CurrentReader = null; } CurrentReader = Readers[0]; if (CurrentReader == null) { return; } if (!OpenReader()) { Window.Close(); } if (!StartCaptureAsync(OnCaptured)) { Window.Close(); } OnProgress = new Thread(() => InvokeDelegate(Window)); Application.Current.Dispatcher.Invoke((System.Action)(delegate { ScannerMessage = "Capture Huella"; ColorMessage = new SolidColorBrush(Colors.Green); })); GuardandoHuellas = true; } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar los datos de la busqueda por huella.", ex); } }