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; }