From f0efc231c545ae8725caeed53162c6a2db477e9e Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Tue, 14 May 2024 15:04:16 +0200 Subject: [PATCH] =?UTF-8?q?Projektdateien=20hinzuf=C3=BCgen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OwnChar.sln | 25 +++++++++++++++++++++++++ OwnChar/Model/Character.cs | 7 +++++++ OwnChar/Model/Property.cs | 9 +++++++++ OwnChar/Model/PropertyCategory.cs | 7 +++++++ OwnChar/Model/PropertyList.cs | 6 ++++++ OwnChar/Model/UserAccount.cs | 16 ++++++++++++++++ OwnChar/Model/UserProfile.cs | 7 +++++++ OwnChar/OwnChar.csproj | 13 +++++++++++++ 8 files changed, 90 insertions(+) create mode 100644 OwnChar.sln create mode 100644 OwnChar/Model/Character.cs create mode 100644 OwnChar/Model/Property.cs create mode 100644 OwnChar/Model/PropertyCategory.cs create mode 100644 OwnChar/Model/PropertyList.cs create mode 100644 OwnChar/Model/UserAccount.cs create mode 100644 OwnChar/Model/UserProfile.cs create mode 100644 OwnChar/OwnChar.csproj diff --git a/OwnChar.sln b/OwnChar.sln new file mode 100644 index 0000000..08abfba --- /dev/null +++ b/OwnChar.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34714.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OwnChar", "OwnChar\OwnChar.csproj", "{9BD8A604-CB80-4D79-B90E-051083654B2D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9BD8A604-CB80-4D79-B90E-051083654B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9BD8A604-CB80-4D79-B90E-051083654B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9BD8A604-CB80-4D79-B90E-051083654B2D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9BD8A604-CB80-4D79-B90E-051083654B2D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C773C9EB-A7A1-4575-9AF7-CDC5347FBF81} + EndGlobalSection +EndGlobal diff --git a/OwnChar/Model/Character.cs b/OwnChar/Model/Character.cs new file mode 100644 index 0000000..7f34b39 --- /dev/null +++ b/OwnChar/Model/Character.cs @@ -0,0 +1,7 @@ +namespace OwnChar.Model +{ + public class Character + { + public PropertyList Properties { get; set; } = []; + } +} diff --git a/OwnChar/Model/Property.cs b/OwnChar/Model/Property.cs new file mode 100644 index 0000000..8c4e899 --- /dev/null +++ b/OwnChar/Model/Property.cs @@ -0,0 +1,9 @@ +namespace OwnChar.Model +{ + public class Property(string name) + { + public string Name { get; set; } = name; + public PropertyCategory? Category { get; set; } + public object? Value { get; set; } + } +} diff --git a/OwnChar/Model/PropertyCategory.cs b/OwnChar/Model/PropertyCategory.cs new file mode 100644 index 0000000..c1b43d8 --- /dev/null +++ b/OwnChar/Model/PropertyCategory.cs @@ -0,0 +1,7 @@ +namespace OwnChar.Model +{ + public class PropertyCategory(string name) + { + public string Name { get; set; } = name; + } +} diff --git a/OwnChar/Model/PropertyList.cs b/OwnChar/Model/PropertyList.cs new file mode 100644 index 0000000..08b1ee4 --- /dev/null +++ b/OwnChar/Model/PropertyList.cs @@ -0,0 +1,6 @@ +namespace OwnChar.Model +{ + public class PropertyList : List + { + } +} diff --git a/OwnChar/Model/UserAccount.cs b/OwnChar/Model/UserAccount.cs new file mode 100644 index 0000000..3d8f357 --- /dev/null +++ b/OwnChar/Model/UserAccount.cs @@ -0,0 +1,16 @@ +using Pilz.Cryptography; + +namespace OwnChar.Model +{ + public class UserAccount(string email, string username, SecureString password, string? displayName) + { + public UserProfile Profile { get; set; } = new(string.IsNullOrWhiteSpace(displayName) ? username : displayName); + public string Username { get; set; } = username; + public string Email { get; set; } = email; + public SecureString Password { get; set; } = password; + + public UserAccount(string email, string username, SecureString password) : this(email, username, password, username) + { + } + } +} diff --git a/OwnChar/Model/UserProfile.cs b/OwnChar/Model/UserProfile.cs new file mode 100644 index 0000000..5ad12db --- /dev/null +++ b/OwnChar/Model/UserProfile.cs @@ -0,0 +1,7 @@ +namespace OwnChar.Model +{ + public class UserProfile(string name) + { + public string Name { get; set; } = name; + } +} diff --git a/OwnChar/OwnChar.csproj b/OwnChar/OwnChar.csproj new file mode 100644 index 0000000..ccf8ed2 --- /dev/null +++ b/OwnChar/OwnChar.csproj @@ -0,0 +1,13 @@ + + + + net8.0 + enable + enable + + + + + + +