Add fingerprints reset on first start
This commit is contained in:
@@ -17,6 +17,7 @@ namespace Akari.Provider.WaveshareUART.Views
|
||||
private Label _serialPortLabel;
|
||||
private Label _comparisonLevelLabel;
|
||||
private Label _userCountLabel;
|
||||
private bool _needToClear;
|
||||
|
||||
public TUIManager()
|
||||
{
|
||||
@@ -105,11 +106,23 @@ namespace Akari.Provider.WaveshareUART.Views
|
||||
// Init Sensor
|
||||
if (!File.Exists(SettingsFilePath))
|
||||
{
|
||||
_needToClear = true;
|
||||
|
||||
Application.Run(new SettingsDisplay());
|
||||
}
|
||||
|
||||
Provider.InitSensor();
|
||||
|
||||
if (_needToClear)
|
||||
{
|
||||
if (!Provider.FingerprintSensor.DeleteAllUsers())
|
||||
{
|
||||
MessageBox.ErrorQuery("Provider", "Can't clear registered fingerprints, check if the sensor is working correctly", "Ok");
|
||||
}
|
||||
|
||||
_needToClear = false;
|
||||
}
|
||||
|
||||
// Update gui
|
||||
UpdateSerialPort();
|
||||
UpdateUserCount();
|
||||
|
||||
Reference in New Issue
Block a user