public MainWindow() { try { InitializeComponent(); Title += " v" + Assembly.GetExecutingAssembly().GetName().Version; //use any assembly versions RedirectAssembly("Dermalog.Afis.ImageContainer"); RedirectAssembly("Dermalog.Imaging.Capturing"); RedirectAssembly("Dermalog.AFIS.FourprintSegmentation"); RedirectAssembly("Dermalog.AFIS.TwoPprintSegmentation"); RedirectAssembly("Dermalog.Afis.NistQualityCheck"); RedirectAssembly("Dermalog.Afis.FingerCode3"); DisplayMessage("Loading user database"); _afis = new LocalAFIS(); //lbStorage.Content = "Storage: " + _afis.StoragePath; //lbStorage.ToolTip = _afis.StoragePath; //UpdateUserList(); EnableGUI(false); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); MessageBox.Show(ex.Message + "\n" + ex.StackTrace, "ERROR"); Close(); } }
public EnrollmentWindow(FPScanner fpScanner, LocalAFIS afis) { InitializeComponent(); xamlButtonEnroll.IsEnabled = false; _fpScanner = fpScanner; _afis = afis; }
private void xamlMenuItemReset_Click(object sender, RoutedEventArgs e) { try { StopCapturing(); System.IO.Directory.Delete(_afis.StoragePath, true); _afis = new LocalAFIS(); //UpdateUserList(); ResetGUI(); }catch (Exception ex) { DisplayError(ex.Message); } }
public MainForm(FPScanner __fpScanner) { // InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false; _fpScanner = __fpScanner; //connect_Device(); try { InitializeComponent(); this.Text += " v" + Assembly.GetExecutingAssembly().GetName().Version; //use any assembly versions RedirectAssembly("Dermalog.Imaging.Capturing"); RedirectAssembly("Dermalog.AFIS.FourprintSegmentation"); RedirectAssembly("Dermalog.AFIS.TwoPprintSegmentation"); RedirectAssembly("Dermalog.Afis.NistQualityCheck"); RedirectAssembly("Dermalog.AFIS.FingerCode3"); _afis = new LocalAFIS(); DisplayMessage("Loading user database"); lbStorage.Text = "Storage: " + _afis.StoragePath; toolTip1.SetToolTip(lbStorage, _afis.StoragePath); //lbStorage.ToolTip = _afis.StoragePath; UpdateUserList(); EnableGUI(false); } catch (Exception ex) { //Console.WriteLine(ex.StackTrace); MessageBox.Show(ex.Message + "\n" + ex.StackTrace, "ERROR"); //Close(); //DisplayError(ex.Message + "\n" + ex.StackTrace); lst_msg.Items.Insert(0, ex.Message); } }
public void connect_Device() { // CloseScanner(); Thread.Sleep(1000); //string deviceName = "FG_ZF10"; DeviceIdentity selectedDI = DeviceIdentity.FG_ZF10; //Get selected Frame-Grabber //DeviceIdentity selectedDI = (DeviceIdentity)xamlListBoxFG.SelectedItem; //Get selected Frame-Grabber //this.SelectedDeviceIdentity = selectedDI; DeviceInformations[] dinfos = FPScanner.GetAttachedDevices(selectedDI); //Get all Fingerprint Scanners DeviceInformations dinfo = dinfos.First(); DeviceInfos di = new DeviceInfos(dinfo.index, dinfo.name); FingerPrintScanner = FPScanner.GetFPScanner(selectedDI, di.Index); _fpScanner = FingerPrintScanner; //use any assembly versions RedirectAssembly("Dermalog.Imaging.Capturing"); RedirectAssembly("Dermalog.AFIS.FourprintSegmentation"); RedirectAssembly("Dermalog.AFIS.TwoPprintSegmentation"); RedirectAssembly("Dermalog.Afis.NistQualityCheck"); RedirectAssembly("Dermalog.AFIS.FingerCode3"); _afis = new LocalAFIS(); //// DisplayMessage("Loading user database"); // // lbStorage.Text = "Storage: " + _afis.StoragePath; // //toolTip1.SetToolTip(lbStorage, _afis.StoragePath); // //lbStorage.ToolTip = _afis.StoragePath; UpdateUserList(); EnableGUI(false); Thread.Sleep(500); }