-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
1,267 additions
and
106 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file added
BIN
+2.61 KB
...CreatingUser/.vs/CreatingUser/FileContentIndex/00a080aa-66f8-46e4-b7f0-9307c3086880.vsidx
Binary file not shown.
Binary file added
BIN
+2.3 KB
...CreatingUser/.vs/CreatingUser/FileContentIndex/3bd2430f-863b-4ccb-a900-878990c6e8fb.vsidx
Binary file not shown.
Binary file added
BIN
+21.2 KB
...CreatingUser/.vs/CreatingUser/FileContentIndex/5a6d3c33-f610-4975-a48a-eb88a4504124.vsidx
Binary file not shown.
Binary file added
BIN
+22.4 KB
...CreatingUser/.vs/CreatingUser/FileContentIndex/6ed6c591-1bb0-49b1-8bb5-97bea378bd46.vsidx
Binary file not shown.
Binary file added
BIN
+6.41 KB
...CreatingUser/.vs/CreatingUser/FileContentIndex/8dacb92c-238f-4def-935a-ad6838fbc19b.vsidx
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net7.0-windows</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<UseWindowsForms>true</UseWindowsForms> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<LangVersion>preview</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="SSDCourseworkTooling" Version="1.0.1-alpha1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<Compile Update="formLogin.cs"> | ||
<SubType>Form</SubType> | ||
</Compile> | ||
<Compile Update="formMenu.cs"> | ||
<SubType>Form</SubType> | ||
</Compile> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.7.34024.191 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreatingUser", "CreatingUser.csproj", "{3E8D6BED-1EF6-4DC6-BCC6-419A30A45CCC}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{3E8D6BED-1EF6-4DC6-BCC6-419A30A45CCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3E8D6BED-1EF6-4DC6-BCC6-419A30A45CCC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3E8D6BED-1EF6-4DC6-BCC6-419A30A45CCC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3E8D6BED-1EF6-4DC6-BCC6-419A30A45CCC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {14667289-F38E-4788-92A4-6E362DD8FA72} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
global using State = System.Collections.Generic.Dictionary<System.Collections.Generic.IEnumerable<StateSystem.StateType>, object?>; | ||
global using Password = (string Hashed, byte[] Salt); | ||
global using FormSystem; | ||
global using static FormSystem.FormManager; | ||
global using StateSystem; | ||
global using static StateSystem.StateType; | ||
global using static StateSystem.StateHelper; | ||
global using UserSystem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace CreatingUser; | ||
|
||
internal static class Program | ||
{ | ||
/// <summary> | ||
/// The main entry point for the application. | ||
/// </summary> | ||
[STAThread] | ||
static void Main() | ||
{ | ||
// To customize application configuration such as set high DPI settings or default font, | ||
// see https://aka.ms/applicationconfiguration. | ||
ApplicationConfiguration.Initialize(); | ||
FormManager.Start<formLogin>(); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
examples/CreatingUser/bin/Debug/net7.0-windows/CreatingUser.deps.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"runtimeTarget": { | ||
"name": ".NETCoreApp,Version=v7.0", | ||
"signature": "" | ||
}, | ||
"compilationOptions": {}, | ||
"targets": { | ||
".NETCoreApp,Version=v7.0": { | ||
"CreatingUser/1.0.0": { | ||
"dependencies": { | ||
"SSDCourseworkTooling": "1.0.1-alpha1" | ||
}, | ||
"runtime": { | ||
"CreatingUser.dll": {} | ||
} | ||
}, | ||
"Newtonsoft.Json/13.0.3": { | ||
"runtime": { | ||
"lib/net6.0/Newtonsoft.Json.dll": { | ||
"assemblyVersion": "13.0.0.0", | ||
"fileVersion": "13.0.3.27908" | ||
} | ||
} | ||
}, | ||
"SSDCourseworkTooling/1.0.1-alpha1": { | ||
"dependencies": { | ||
"Newtonsoft.Json": "13.0.3" | ||
}, | ||
"runtime": { | ||
"lib/net7.0-windows7.0/SSDCourseworkTooling.dll": { | ||
"assemblyVersion": "1.0.1.0", | ||
"fileVersion": "1.0.1.0" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"libraries": { | ||
"CreatingUser/1.0.0": { | ||
"type": "project", | ||
"serviceable": false, | ||
"sha512": "" | ||
}, | ||
"Newtonsoft.Json/13.0.3": { | ||
"type": "package", | ||
"serviceable": true, | ||
"sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==", | ||
"path": "newtonsoft.json/13.0.3", | ||
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512" | ||
}, | ||
"SSDCourseworkTooling/1.0.1-alpha1": { | ||
"type": "package", | ||
"serviceable": true, | ||
"sha512": "sha512-rdZMtnUQNz1b3GFt9JV+gBirxU0bZttlo2t9Bp4IOxuRc4oIrCAv0H92gTt8LB5qbIaUZ1JIBrWl79hTzjfOtQ==", | ||
"path": "ssdcourseworktooling/1.0.1-alpha1", | ||
"hashPath": "ssdcourseworktooling.1.0.1-alpha1.nupkg.sha512" | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
examples/CreatingUser/bin/Debug/net7.0-windows/CreatingUser.runtimeconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"runtimeOptions": { | ||
"tfm": "net7.0", | ||
"frameworks": [ | ||
{ | ||
"name": "Microsoft.NETCore.App", | ||
"version": "7.0.0" | ||
}, | ||
{ | ||
"name": "Microsoft.WindowsDesktop.App", | ||
"version": "7.0.0" | ||
} | ||
] | ||
} | ||
} |
Binary file not shown.
Binary file added
BIN
+31 KB
examples/CreatingUser/bin/Debug/net7.0-windows/SSDCourseworkTooling.dll
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
namespace CreatingUser; | ||
|
||
public partial class formLogin : Form | ||
{ | ||
private const string _correctUsername = "user"; | ||
private const string _correctPassword = "password"; | ||
public formLogin() | ||
{ | ||
InitializeComponent(); | ||
lblDetailsIncorrect.Hide(); | ||
} | ||
|
||
private void btnRegister_Click(object sender, EventArgs e) | ||
{ | ||
string username = txtBoxUsername.Text; | ||
string password = txtBoxPassword.Text; | ||
|
||
if (username != _correctUsername) | ||
{ | ||
lblDetailsIncorrect.Show(); | ||
return; | ||
} | ||
|
||
if(password != _correctPassword) | ||
{ | ||
lblDetailsIncorrect.Show(); | ||
return; | ||
} | ||
|
||
// User is added to global state automatically | ||
var _ = User.From(username, password); | ||
|
||
Trigger<formMenu>(); | ||
} | ||
} |
Oops, something went wrong.