Reorganize and Add UserManager
This commit is contained in:
43
WaveshareUARTProvider.cs
Normal file
43
WaveshareUARTProvider.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Akari.Provider.WaveshareUART.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WaveshareUARTFingerprintSensor;
|
||||
|
||||
namespace Akari.Provider.WaveshareUART
|
||||
{
|
||||
public class WaveshareUARTProvider
|
||||
{
|
||||
public const string SettingsFilePath = "settings.txt";
|
||||
|
||||
public static WaveshareUARTProvider Instance { get; }
|
||||
|
||||
static WaveshareUARTProvider()
|
||||
{
|
||||
Instance = new WaveshareUARTProvider();
|
||||
}
|
||||
|
||||
public UsersManager UsersManager { get; }
|
||||
public FingerprintSensor FingerprintSensor { get; private set; }
|
||||
|
||||
private WaveshareUARTProvider()
|
||||
{
|
||||
UsersManager = new UsersManager();
|
||||
}
|
||||
|
||||
public void InitSensor()
|
||||
{
|
||||
FingerprintSensor = new FingerprintSensor(File.ReadAllText(SettingsFilePath));
|
||||
|
||||
FingerprintSensor.Start();
|
||||
}
|
||||
|
||||
internal void FingerprintLoop()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user