From 89cbc7f6d1c87b15eae9a25993a027295d9faf4f Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Wed, 7 Aug 2024 20:11:54 -0500 Subject: [PATCH 1/4] Create resource file to save messages --- .../Common/Resources/Messages.Designer.cs | 63 +++++++++++ .../Common/Resources/Messages.resx | 101 ++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 src/Application/Common/Resources/Messages.Designer.cs create mode 100644 src/Application/Common/Resources/Messages.resx diff --git a/src/Application/Common/Resources/Messages.Designer.cs b/src/Application/Common/Resources/Messages.Designer.cs new file mode 100644 index 00000000..3d5feac2 --- /dev/null +++ b/src/Application/Common/Resources/Messages.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CTF.Application.Common.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Messages { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Messages() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CTF.Application.Common.Resources.Messages", typeof(Messages).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/src/Application/Common/Resources/Messages.resx b/src/Application/Common/Resources/Messages.resx new file mode 100644 index 00000000..4fdb1b6a --- /dev/null +++ b/src/Application/Common/Resources/Messages.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file From dd33646d3c5a08d24122be095d96b70008ba5ffa Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Wed, 7 Aug 2024 20:12:06 -0500 Subject: [PATCH 2/4] Update project file --- src/Application/CTF.Application.csproj | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Application/CTF.Application.csproj b/src/Application/CTF.Application.csproj index df64910f..138aba55 100644 --- a/src/Application/CTF.Application.csproj +++ b/src/Application/CTF.Application.csproj @@ -9,4 +9,19 @@ + + + True + True + Messages.resx + + + + + + PublicResXFileCodeGenerator + Messages.Designer.cs + + + From cfce68859f927d79beec4241c1dc2edd3fc2834f Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Wed, 7 Aug 2024 20:15:43 -0500 Subject: [PATCH 3/4] Change access modifier --- src/Application/Common/Resources/Messages.Designer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Application/Common/Resources/Messages.Designer.cs b/src/Application/Common/Resources/Messages.Designer.cs index 3d5feac2..c00b4dec 100644 --- a/src/Application/Common/Resources/Messages.Designer.cs +++ b/src/Application/Common/Resources/Messages.Designer.cs @@ -22,7 +22,7 @@ namespace CTF.Application.Common.Resources { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Messages { + internal class Messages { private static global::System.Resources.ResourceManager resourceMan; @@ -36,7 +36,7 @@ internal Messages() { /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { + internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CTF.Application.Common.Resources.Messages", typeof(Messages).Assembly); @@ -51,7 +51,7 @@ internal Messages() { /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { + internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } From cedefb5d744d34c6b0a43b166edc32618ab9eff5 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Wed, 7 Aug 2024 20:15:59 -0500 Subject: [PATCH 4/4] Update project file --- src/Application/CTF.Application.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application/CTF.Application.csproj b/src/Application/CTF.Application.csproj index 138aba55..7e16ea82 100644 --- a/src/Application/CTF.Application.csproj +++ b/src/Application/CTF.Application.csproj @@ -19,7 +19,7 @@ - PublicResXFileCodeGenerator + ResXFileCodeGenerator Messages.Designer.cs