Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################

/.vs
/PS5 NOR Modifier/bin/
/PS5 NOR Modifier/obj/
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################

#IDE
.vs/
.idea/

# build folders
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
[Xx]64/
[Xx]86/
[Bb]uild/
bld/
[Bb]in/
[Oo]bj/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
44 changes: 44 additions & 0 deletions PS5 NOR Modifier.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PS5 NOR Modifier", "PS5 NOR Modifier\PS5 NOR Modifier.csproj", "{BBBF9E78-9480-436A-92F1-B5B8943BCDEF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFiles", "SolutionFiles", "{1AC636D7-87A9-40A2-8008-AD282DA5D185}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
.gitignore = .gitignore
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UART-CL By TheCod3r", "UART-CL By TheCod3r\UART-CL By TheCod3r\UART-CL By TheCod3r.csproj", "{5FA52746-F93B-4DF4-8BBE-970D5C744AFF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{2437D9F4-EC35-400C-9D98-AA510B1DAD3B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{D9AD1813-3D4C-4CD9-82F2-1A56BCA2B0E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UART.Core", "UART.Core\UART.Core.csproj", "{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UART.Core.Tests", "UART.Core.Tests\UART.Core.Tests.csproj", "{5B44A453-8C97-4024-8701-4C4AA5E7EB0D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,11 +37,39 @@ Global
{BBBF9E78-9480-436A-92F1-B5B8943BCDEF}.Release|Any CPU.Build.0 = Release|Any CPU
{BBBF9E78-9480-436A-92F1-B5B8943BCDEF}.Release|x86.ActiveCfg = Release|x86
{BBBF9E78-9480-436A-92F1-B5B8943BCDEF}.Release|x86.Build.0 = Release|x86
{5FA52746-F93B-4DF4-8BBE-970D5C744AFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FA52746-F93B-4DF4-8BBE-970D5C744AFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FA52746-F93B-4DF4-8BBE-970D5C744AFF}.Debug|x86.ActiveCfg = Debug|Any CPU
{5FA52746-F93B-4DF4-8BBE-970D5C744AFF}.Debug|x86.Build.0 = Debug|Any CPU
{5FA52746-F93B-4DF4-8BBE-970D5C744AFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FA52746-F93B-4DF4-8BBE-970D5C744AFF}.Release|Any CPU.Build.0 = Release|Any CPU
{5FA52746-F93B-4DF4-8BBE-970D5C744AFF}.Release|x86.ActiveCfg = Release|Any CPU
{5FA52746-F93B-4DF4-8BBE-970D5C744AFF}.Release|x86.Build.0 = Release|Any CPU
{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD}.Debug|x86.ActiveCfg = Debug|Any CPU
{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD}.Debug|x86.Build.0 = Debug|Any CPU
{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD}.Release|Any CPU.Build.0 = Release|Any CPU
{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD}.Release|x86.ActiveCfg = Release|Any CPU
{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD}.Release|x86.Build.0 = Release|Any CPU
{5B44A453-8C97-4024-8701-4C4AA5E7EB0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B44A453-8C97-4024-8701-4C4AA5E7EB0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B44A453-8C97-4024-8701-4C4AA5E7EB0D}.Debug|x86.ActiveCfg = Debug|Any CPU
{5B44A453-8C97-4024-8701-4C4AA5E7EB0D}.Debug|x86.Build.0 = Debug|Any CPU
{5B44A453-8C97-4024-8701-4C4AA5E7EB0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B44A453-8C97-4024-8701-4C4AA5E7EB0D}.Release|Any CPU.Build.0 = Release|Any CPU
{5B44A453-8C97-4024-8701-4C4AA5E7EB0D}.Release|x86.ActiveCfg = Release|Any CPU
{5B44A453-8C97-4024-8701-4C4AA5E7EB0D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {406F6CF1-EBE8-4A32-86BA-26B4FEDF751B}
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{AC5043E7-B7B2-45A1-8FCD-1B935DD93BCD} = {2437D9F4-EC35-400C-9D98-AA510B1DAD3B}
{5B44A453-8C97-4024-8701-4C4AA5E7EB0D} = {D9AD1813-3D4C-4CD9-82F2-1A56BCA2B0E6}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions PS5 NOR Modifier.sln.DotSettings.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABinaryReader_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003FPeterBannon_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fc6c22e897169c8836caca1070e0f86ae0c748f520e9eb8fa0c23d34387799d5_003FBinaryReader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AComboBox_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003FPeterBannon_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fef1699f7714e2b5efaf7e614326a3e927d5f9c34dd853a4b82b0a993d665eb9_003FComboBox_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpMessageInvoker_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003FPeterBannon_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fa896cce21937d3d1575b4abd80b0695c2a13f346d646c16955871bf4d37_003FHttpMessageInvoker_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANativeWindow_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003FPeterBannon_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F32ca50429b143dd4887097bb82be4132c75a91b0668a93f8b139b74d4274757c_003FNativeWindow_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARegex_002EReplace_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003FPeterBannon_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F693debb33a49368a79bad88ed20159e775ac1a0fc51364d5b579992a2cb1e_003FRegex_002EReplace_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
12 changes: 12 additions & 0 deletions PS5 NOR Modifier/Configuration/InMemoryConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using UART.Core.Configuration;

namespace PS5_NOR_Modifier.Configuration;

public class InMemoryConfiguration
{
public static IEnumerable<KeyValuePair<string, string?>> Configuration = new Dictionary<string, string?>
{
{Constants.UartDbFilePathKey, "errorDB.xml"},
{Constants.UartSourceUrlKey, "http://uartcodes.com/xml.php"},
};
}
47 changes: 47 additions & 0 deletions PS5 NOR Modifier/Dialogs/MessageBoxNotificationHandler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using PS5_NOR_Modifier.Extensions;
using UART.Core.Abstractions;
using UART.Core.Models;

namespace PS5_NOR_Modifier.Dialogs;

public class MessageBoxNotificationHandler : INotificationHandler
{
public void HandleMessage(Notification notificationDetails)
{
MessageBox.Show(
notificationDetails.Message,
notificationDetails.Title,
notificationDetails.Type.ToMessageBoxButtons(),
notificationDetails.Type.ToMessageBoxIcon());
}

public void HandleQuestion(Question question)
{
DialogResult result = MessageBox.Show(
question.Message,
question.Title,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);

if (result == DialogResult.Yes && question.OnYes != null)
question.OnYes.Invoke();

if (result == DialogResult.No && question.OnNo != null)
question.OnNo.Invoke();
}

public async Task HandleQuestion(AsyncQuestion asyncQuestion)
{
DialogResult result = MessageBox.Show(
asyncQuestion.Message,
asyncQuestion.Title,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);

if (result == DialogResult.Yes && asyncQuestion.OnYes != null)
await asyncQuestion.OnYes.Invoke();

if (result == DialogResult.No && asyncQuestion.OnNo != null)
await asyncQuestion.OnNo.Invoke();
}
}
31 changes: 31 additions & 0 deletions PS5 NOR Modifier/Extensions/NotificationTypeExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using UART.Core.Models;

namespace PS5_NOR_Modifier.Extensions;

public static class NotificationTypeExtensions
{
public static MessageBoxButtons ToMessageBoxButtons(this NotificationType notificationType)
{
switch (notificationType)
{
default:
return MessageBoxButtons.OK;

}
}

public static MessageBoxIcon ToMessageBoxIcon(this NotificationType notificationType)
{
switch (notificationType)
{
case NotificationType.Error:
return MessageBoxIcon.Error;
case NotificationType.Warning:
return MessageBoxIcon.Warning;
case NotificationType.Information:
return MessageBoxIcon.Information;
default:
return MessageBoxIcon.None;
}
}
}
17 changes: 17 additions & 0 deletions PS5 NOR Modifier/Extensions/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using PS5_NOR_Modifier.Configuration;

namespace PS5_NOR_Modifier.Extensions;

public static class ServiceCollectionExtensions
{
public static IServiceCollection AddInMemoryConfiguration(this IServiceCollection services)
{
var cfgBuilder = new ConfigurationBuilder();
cfgBuilder.AddInMemoryCollection(InMemoryConfiguration.Configuration);
var cfg = cfgBuilder.Build();
services.AddSingleton<IConfiguration>(cfg);
return services;
}
}
2 changes: 1 addition & 1 deletion PS5 NOR Modifier/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading