public void Start() { status = SystemStatus.STARTING; UIStatus(this, new UIStatusEventArgs(status.ToString())); try { pdr = new PassportDetailReader(); } catch (Exception ex) { MessageBox.Show("An error occured: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); status = SystemStatus.IDLE; UIStatus(this, new UIStatusEventArgs(status.ToString())); return; } mainThread = new Thread(PassportCheck); mainThread.Start(); }
public PassportDetailReader() { singleton = this; dbm = new DatabaseManager(); }