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 Aceptar(BuscarNUC Window) { if (ScannerMessage == "Procesando... ") { return; } //if (SelectedInterconexion != null) //{ _IsSucceed = true; Window.Close(); //} }
private void Cerrar(BuscarNUC Window) { _IsSucceed = false; Window.Close(); }