gotta integrate saving to the sqlite database

This commit is contained in:
Taarly 2025-04-15 09:31:25 +02:00
parent 7d89cf2e87
commit e3232e4bee
3 changed files with 7 additions and 7 deletions

View File

@ -2,5 +2,7 @@ namespace Project.Persistence;
public class CheckLogin
{
public void CompareLogins()
{
}
}

View File

@ -3,10 +3,8 @@ namespace Project.Persistence;
public static class SaveNewLogin
{
private static readonly string FilePath = "C:/Users/lowns/desktop/users.txt";
public static void SaveUser(CreateLogin user)
public static void SaveUser(string username, string password, string email)
{
var line = $"{user.NewLoginName}:{user.NewMasterPassword}:{user.NewEmail}";
File.AppendAllLines(FilePath, new[] { line });
}
}

View File

@ -27,8 +27,8 @@ public partial class NewLogin : Window
string password = NewLoginPasswordBox.Text?.Trim();
string email = NewLoginEmailBox.Text?.Trim();
var user = new CreateLogin(username, password, email);
SaveNewLogin.SaveUser(user);
//var user = new CreateLogin(username, password, email);
//SaveNewLogin.SaveUser(user);
NewLoginUsernameBox.Text = "";