From c7af174de5406fa5743b63cf28fdbcd7d09913c8 Mon Sep 17 00:00:00 2001 From: Taarly Date: Mon, 14 Apr 2025 16:59:18 +0200 Subject: [PATCH] fixed naming conventions --- Project.Model/CreateLogin.cs | 12 ++++++------ Project.Model/Entry.cs | 10 +++++----- Project.Model/LoginCredentials.cs | 4 ++-- .../{UserStorage.cs => NewLoginStorage.cs} | 4 ++-- Project.View/NewLogin/NewLogin.axaml.cs | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) rename Project.Persistence/{UserStorage.cs => NewLoginStorage.cs} (68%) diff --git a/Project.Model/CreateLogin.cs b/Project.Model/CreateLogin.cs index 6f53131..cd7fac3 100644 --- a/Project.Model/CreateLogin.cs +++ b/Project.Model/CreateLogin.cs @@ -2,14 +2,14 @@ namespace Project.Model; public class CreateLogin { - public string newLoginname { get; set; } - public string newMasterpassword { get; set; } - public string newEmail { get; set; } + public string NewLoginName { get; set; } + public string NewMasterPassword { get; set; } + public string NewEmail { get; set; } public CreateLogin(string username, string password, string email) { - newLoginname = username; - newMasterpassword = password; - newEmail = email; + NewLoginName = username; + NewMasterPassword = password; + NewEmail = email; } } \ No newline at end of file diff --git a/Project.Model/Entry.cs b/Project.Model/Entry.cs index 3d7cab9..93dd559 100644 --- a/Project.Model/Entry.cs +++ b/Project.Model/Entry.cs @@ -2,9 +2,9 @@ public class Entry { - public string? entryname; - public string? username; - public string? password; - public string? url; - public string? note; + public string? Entryname; + public string? Username; + public string? Password; + public string? Url; + public string? Note; } diff --git a/Project.Model/LoginCredentials.cs b/Project.Model/LoginCredentials.cs index 485405a..9ec4425 100644 --- a/Project.Model/LoginCredentials.cs +++ b/Project.Model/LoginCredentials.cs @@ -4,6 +4,6 @@ namespace Project.Model; public class LoginCredentials { - public string? loginname { get; set; } - public string? masterpassword { get; set; } + public string? LoginName { get; set; } + public string? MasterPassword { get; set; } } \ No newline at end of file diff --git a/Project.Persistence/UserStorage.cs b/Project.Persistence/NewLoginStorage.cs similarity index 68% rename from Project.Persistence/UserStorage.cs rename to Project.Persistence/NewLoginStorage.cs index b516767..158a783 100644 --- a/Project.Persistence/UserStorage.cs +++ b/Project.Persistence/NewLoginStorage.cs @@ -1,12 +1,12 @@ using Project.Model; namespace Project.Persistence; -public static class UserStorage +public static class NewLoginStorage { private static readonly string FilePath = "C:/Users/lowns/desktop/users.txt"; public static void SaveUser(CreateLogin user) { - var line = $"{user.newLoginname}:{user.newMasterpassword}:{user.newEmail}"; + var line = $"{user.NewLoginName}:{user.NewMasterPassword}:{user.NewEmail}"; File.AppendAllLines(FilePath, new[] { line }); } } diff --git a/Project.View/NewLogin/NewLogin.axaml.cs b/Project.View/NewLogin/NewLogin.axaml.cs index e01503c..623e9aa 100644 --- a/Project.View/NewLogin/NewLogin.axaml.cs +++ b/Project.View/NewLogin/NewLogin.axaml.cs @@ -28,7 +28,7 @@ public partial class NewLogin : Window string email = NewLoginEmailBox.Text?.Trim(); var user = new CreateLogin(username, password, email); - UserStorage.SaveUser(user); + NewLoginStorage.SaveUser(user); NewLoginUsernameBox.Text = "";