Reorganize and Add UserManager

This commit is contained in:
2021-01-23 10:52:10 +01:00
parent 6148956bc6
commit 5fe7edcb4c
12 changed files with 215 additions and 206 deletions

View File

@@ -0,0 +1,53 @@
using NStack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terminal.Gui;
namespace Akari.Provider.WaveshareUART.Views
{
public class FingerprintDialog : Dialog
{
public string ErrorTitle { get; set; }
public string ErrorMessage { get; set; }
public FingerprintDialog(string errorTitle, string errorMessage) : base(errorTitle, 60, 7)
{
ErrorTitle = errorTitle;
ErrorMessage = errorMessage;
ColorScheme = Colors.ColorSchemes["Menu"];
}
public void Show()
{
var label = new Label("Please place your finger flat on the sensor")
{
X = Pos.Center(),
Y = Pos.Center(),
Height = 1
};
Add(label);
Application.Run(this);
}
public void Cancel()
{
Application.MainLoop.Invoke(() => Application.RequestStop());
}
public void CancelAndShowError()
{
Application.MainLoop.Invoke(() =>
{
MessageBox.ErrorQuery(ErrorTitle, ErrorMessage, "Ok");
Application.RequestStop();
});
}
}
}