diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d458f0a..c6e5f9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,24 +6,19 @@ on: jobs: build: runs-on: windows-latest - steps: - name: Checkout code - uses: actions/checkout@v4 - + uses: actions/checkout@v3 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v3 with: - dotnet-version: '9.0.x' - - # Build with --self-contained false - - name: Build Rusty Hearts Launcher (No Self-Contained) - run: dotnet publish ./RHLauncher.sln --configuration Release --self-contained false --runtime win-x64 /p:PublishSingleFile=true /p:PublishDir=./publish/RustyHearts-Launcher_framework-dependent - - - name: Zip output files (No Self-Contained) - run: Compress-Archive -Path "./publish/RustyHearts-Launcher_framework-dependent" -DestinationPath RustyHearts-Launcher.zip + dotnet-version: '7.0.x' + - name: Build + run: dotnet publish --configuration Release --self-contained false --runtime win-x86 /p:PublishSingleFile=true + - name: Zip output file + run: Compress-Archive -Path ./bin/Release/net7.0-windows7.0/win-x86/publish/Launcher.exe -DestinationPath Launcher.zip - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: Launcher - path: RustyHearts-Launcher.zip + path: Launcher.zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e27a54a..8e03385 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,50 +3,42 @@ on: workflow_dispatch: release: types: [created] - jobs: build: runs-on: windows-latest - steps: - name: Checkout code - uses: actions/checkout@v4 - + uses: actions/checkout@v2 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v1 with: - dotnet-version: '9.0.x' - - # Build with --self-contained false - - name: Build Rusty Hearts Launcher (No Self-Contained) - run: dotnet publish ./RHLauncher.sln --configuration Release --self-contained false --runtime win-x64 /p:PublishSingleFile=true /p:PublishDir=./publish/RustyHearts-Launcher_framework-dependent - - - name: Zip output files (No Self-Contained) - run: Compress-Archive -Path "./publish/RustyHearts-Launcher_framework-dependent" -DestinationPath RustyHearts-Launcher-Framework-Dependent.zip - - # Build with --self-contained true - - name: Build Rusty Hearts Launcher (Self-Contained) - run: dotnet publish ./RHLauncher.sln --configuration Release --self-contained true --runtime win-x64 /p:PublishSingleFile=false /p:PublishDir=./publish/RustyHearts-Launcher_self-contained - - - name: Zip output files (Self-Contained) - run: Compress-Archive -Path "./publish/RustyHearts-Launcher_self-contained" -DestinationPath RustyHearts-Launcher-SelfContained.zip - - - name: Get version from compiled assembly + dotnet-version: '7.0.x' + - name: Get version from .csproj file id: version - run: | - $version = (Get-Command "./publish/RustyHearts-Launcher_self-contained/Launcher.dll").FileVersionInfo.FileVersion - echo "::set-output name=version::$version" - # Create Release and Upload Assets using softprops/action-gh-release - - name: Create GitHub Release and Upload Assets - uses: softprops/action-gh-release@v2 + run: | + echo "::set-output name=version::$(grep -m1 -o '[^<]*' RHLauncher.csproj | sed 's///')" + - name: Build + run: dotnet publish --configuration Release --self-contained false --runtime win-x86 /p:PublishSingleFile=true + - name: Zip output file + run: Compress-Archive -Path ./bin/Release/net7.0-windows7.0/win-x86/publish/Launcher.exe -DestinationPath Launcher.zip + - name: Create Release + id: create_release + uses: actions/create-release@v1 with: - tag_name: v${{ steps.version.outputs.version }} - body: Automated pre-release created by GitHub Actions. - draft: true - prerelease: true - files: | - ./RustyHearts-Launcher-Framework-Dependent.zip - ./RustyHearts-Launcher-SelfContained.zip + tag_name: ${{ steps.version.outputs.version }} + release_name: v${{ steps.version.outputs.version }} + body: Automated release created by GitHub Actions. + draft: false + prerelease: false env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Launcher.zip + asset_name: Launcher.zip + asset_content_type: application/zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/App.config b/App.config deleted file mode 100644 index 49cc43e..0000000 --- a/App.config +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/DynamicLib/NativeMethod.cs b/DynamicLib/NativeMethod.cs new file mode 100644 index 0000000..f117459 --- /dev/null +++ b/DynamicLib/NativeMethod.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Runtime.InteropServices; + +public static class NativeMethod +{ + [DllImport("kernel32.dll", EntryPoint = "LoadLibrary")] + public static extern int LoadLibrary( + [MarshalAs(UnmanagedType.LPStr)] string lpLibFileName); + + [DllImport("kernel32.dll", EntryPoint = "GetProcAddress")] + public static extern IntPtr GetProcAddress(int hModule, + [MarshalAs(UnmanagedType.LPStr)] string lpProcName); + + [DllImport("kernel32.dll", EntryPoint = "FreeLibrary")] + public static extern bool FreeLibrary(int hModule); +} diff --git a/DynamicLib/ResourceDll.Designer.cs b/DynamicLib/ResourceDll.Designer.cs new file mode 100644 index 0000000..b547827 --- /dev/null +++ b/DynamicLib/ResourceDll.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// 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 RHLauncher.DynamicLib { + 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()] + internal class ResourceDll { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal ResourceDll() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RHLauncher.DynamicLib.ResourceDll", typeof(ResourceDll).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)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] ZlibDll { + get { + object obj = ResourceManager.GetObject("ZlibDll", resourceCulture); + return ((byte[])(obj)); + } + } + } +} diff --git a/DynamicLib/ResourceDll.resx b/DynamicLib/ResourceDll.resx new file mode 100644 index 0000000..82ce6ee --- /dev/null +++ b/DynamicLib/ResourceDll.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ZlibDll.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/DynamicLib/ZLibDll.cs b/DynamicLib/ZLibDll.cs new file mode 100644 index 0000000..9b32186 --- /dev/null +++ b/DynamicLib/ZLibDll.cs @@ -0,0 +1,41 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.IO; +using RHLauncher.DynamicLib; + +public static class ZLibDll +{ + + //[DllImport("ZlibDll.dll", CallingConvention = CallingConvention.Cdecl)] + //public static extern int Decompress(byte[] compressed_buffer, int compressed_size, byte[] decompressed_buffer, ref int decompressed_size); + + public delegate int DecompressDelegate(byte[] compressed_buffer, int compressed_size, byte[] decompressed_buffer, ref int decompressed_size); + public static DecompressDelegate? Decompress = null; + + //[DllImport("ZlibDll.dll", CallingConvention = CallingConvention.Cdecl)] + //public static extern int Compress(byte[] decompressed_buffer, int decompressed_size, byte[] compressed_buffer, ref int compressed_size); + public delegate int CompressDelegate(byte[] decompressed_buffer, int decompressed_size, byte[] compressed_buffer, ref int compressed_size); + public static CompressDelegate? Compress = null; + + static ZLibDll() + { + byte[] libBuffer = ResourceDll.ZlibDll; + string dllPath = Path.Combine(Path.GetTempPath(), "ZlibDll.dll"); + try + { + File.WriteAllBytes(dllPath, libBuffer); + } + catch { } + + int hModule = NativeMethod.LoadLibrary(dllPath); + if (hModule == 0) return; + + IntPtr intPtr = NativeMethod.GetProcAddress(hModule, "Decompress"); + Decompress = (DecompressDelegate)Marshal.GetDelegateForFunctionPointer(intPtr, typeof(DecompressDelegate)); + + intPtr = NativeMethod.GetProcAddress(hModule, "Compress"); + Compress = (CompressDelegate)Marshal.GetDelegateForFunctionPointer(intPtr, typeof(CompressDelegate)); + } +} \ No newline at end of file diff --git a/DynamicLib/ZlibDll.dll b/DynamicLib/ZlibDll.dll new file mode 100644 index 0000000..5269e36 Binary files /dev/null and b/DynamicLib/ZlibDll.dll differ diff --git a/Program.cs b/Program.cs index 51e8d65..37ccff8 100644 --- a/Program.cs +++ b/Program.cs @@ -7,13 +7,11 @@ However, it requires further development to improve functionality and ensure stability. Please check the GitHub repository for updates. */ -using RHLauncher.RHLauncher.i8n; - namespace RHLauncher { internal static class Program { - private static readonly Mutex mutex = new(false, "RHLauncher"); + private static readonly Mutex mutex = new(false, "Launcher"); /// /// The main entry point for the application. /// @@ -31,7 +29,7 @@ namespace RHLauncher } else { - MessageBox.Show(LocalizedStrings.LauncherAlreadyRunning, LocalizedStrings.Error); + MessageBox.Show("Only one instance of the launcher can run at a time."); } } } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index acb6e82..3b41298 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -60,6 +60,166 @@ namespace RHLauncher.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap bg { + get { + object obj = ResourceManager.GetObject("bg", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_close_active { + get { + object obj = ResourceManager.GetObject("button_close_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_close_down { + get { + object obj = ResourceManager.GetObject("button_close_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_close_normal { + get { + object obj = ResourceManager.GetObject("button_close_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_login_active { + get { + object obj = ResourceManager.GetObject("button_login_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_login_down { + get { + object obj = ResourceManager.GetObject("button_login_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_login_normal { + get { + object obj = ResourceManager.GetObject("button_login_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_minimize_active { + get { + object obj = ResourceManager.GetObject("button_minimize_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_minimize_down { + get { + object obj = ResourceManager.GetObject("button_minimize_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_minimize_normal { + get { + object obj = ResourceManager.GetObject("button_minimize_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_register_active { + get { + object obj = ResourceManager.GetObject("button_register_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_register_down { + get { + object obj = ResourceManager.GetObject("button_register_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap button_register_normal { + get { + object obj = ResourceManager.GetObject("button_register_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ChangePwwnd_button_email_active { + get { + object obj = ResourceManager.GetObject("ChangePwwnd_button_email_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ChangePwwnd_button_email_down { + get { + object obj = ResourceManager.GetObject("ChangePwwnd_button_email_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ChangePwwnd_button_email_normal { + get { + object obj = ResourceManager.GetObject("ChangePwwnd_button_email_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -149,5 +309,265 @@ namespace RHLauncher.Properties { return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap help_panel_bkg { + get { + object obj = ResourceManager.GetObject("help_panel_bkg", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap launchbutton_bkg_active { + get { + object obj = ResourceManager.GetObject("launchbutton_bkg_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap launchbutton_bkg_down { + get { + object obj = ResourceManager.GetObject("launchbutton_bkg_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap launchbutton_bkg_normal { + get { + object obj = ResourceManager.GetObject("launchbutton_bkg_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap launcher_bg { + get { + object obj = ResourceManager.GetObject("launcher_bg", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap launchoptionbutton_active { + get { + object obj = ResourceManager.GetObject("launchoptionbutton_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap launchoptionbutton_down { + get { + object obj = ResourceManager.GetObject("launchoptionbutton_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap launchoptionbutton_normal { + get { + object obj = ResourceManager.GetObject("launchoptionbutton_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap list_button_hover { + get { + object obj = ResourceManager.GetObject("list_button_hover", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap list_button_normal { + get { + object obj = ResourceManager.GetObject("list_button_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap login_bg { + get { + object obj = ResourceManager.GetObject("login_bg", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap menubutton_bkg_active { + get { + object obj = ResourceManager.GetObject("menubutton_bkg_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap menubutton_bkg_down { + get { + object obj = ResourceManager.GetObject("menubutton_bkg_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap menubutton_bkg_normal { + get { + object obj = ResourceManager.GetObject("menubutton_bkg_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap message_bkg { + get { + object obj = ResourceManager.GetObject("message_bkg", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap messagewnd_button_ok_active { + get { + object obj = ResourceManager.GetObject("messagewnd_button_ok_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap messagewnd_button_ok_down { + get { + object obj = ResourceManager.GetObject("messagewnd_button_ok_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap messagewnd_button_ok_normal { + get { + object obj = ResourceManager.GetObject("messagewnd_button_ok_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Registerwnd_button_continue_active { + get { + object obj = ResourceManager.GetObject("Registerwnd_button_continue_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Registerwnd_button_continue_down { + get { + object obj = ResourceManager.GetObject("Registerwnd_button_continue_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Registerwnd_button_continue_normal { + get { + object obj = ResourceManager.GetObject("Registerwnd_button_continue_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Registerwndwnd_button_sendemail_active { + get { + object obj = ResourceManager.GetObject("Registerwndwnd_button_sendemail_active", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Registerwndwnd_button_sendemail_down { + get { + object obj = ResourceManager.GetObject("Registerwndwnd_button_sendemail_down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Registerwndwnd_button_sendemail_normal { + get { + object obj = ResourceManager.GetObject("Registerwndwnd_button_sendemail_normal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap tips_error { + get { + object obj = ResourceManager.GetObject("tips_error", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap tips_ok { + get { + object obj = ResourceManager.GetObject("tips_ok", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 67f83aa..487d1fd 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -118,6 +118,54 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\bg\bg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_close_active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_close_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_close_normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_login_active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_login_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_login_normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_minimize_active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_minimize_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_minimize_normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_register_active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_register_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\button_register_normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\ChangePwwnd.button.email.active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\ChangePwwnd.button.email.down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\ChangePwwnd.button.email.normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\bg\character_select_cut_angela.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -145,4 +193,82 @@ ..\Resources\bg\character_select_cut_tude.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\bg\help_panel_bkg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\launchbutton_bkg_active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\launchbutton_bkg_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\launchbutton_bkg_normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bg\launcher_bg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\launchoptionbutton_active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\launchoptionbutton_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\launchoptionbutton_normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\list_button_hover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\list_button_normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bg\login_bg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\menubutton_bkg_active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\menubutton_bkg_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\menubutton_bkg_normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\messagewnd.button.ok.active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\messagewnd.button.ok.down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\messagewnd.button.ok.normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bg\message_bkg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\Registerwndwnd.button.sendemail.active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\Registerwndwnd.button.sendemail.down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\Registerwndwnd.button.sendemail.normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\Registerwnd.button.continue.active.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\Registerwnd.button.continue.down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\buttons\Registerwnd.button.continue.normal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\tips_error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\tips_ok.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..bf7e3b0 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 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 RHLauncher.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..049245f --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,6 @@ + + + + + + diff --git a/README.md b/README.md index 91e76ed..c88a0f0 100644 --- a/README.md +++ b/README.md @@ -10,26 +10,22 @@ ## Introduction Rusty Hearts Launcher is a custom launcher for the Rusty Hearts game client. It provides several features, including self-updating, automatic game updates, account registration, and a news window. -## Preview -![image](screenshoots/preview-01.png) -![image](screenshoots/preview-02.png) -![image](screenshoots/preview-03.png) -![image](screenshoots/preview-04.png) -![image](screenshoots/preview-ko.png) - ## Table of Contents * [Features](#features) * [Setup](#setup) * [Prerequisites for Building Locally/Development](#prerequisites-for-building-locallydevelopment) * [System Requirements for Ready-to-use build](#system-requirements-for-ready-to-use-build) +* [Preview](#preview) * [License](#license) -* [Building](#building) +* [Contributing](#contributing) +* [FAQ](#faq) * [Credits](#credits) +* [Support](#support) +* [Roadmap](#roadmap) ## Features -* Game Download: The launcher can download and install the client. -* Game Update: The launcher can automatically download and install game updates. * Self-updating: The launcher can automatically update itself to the latest version. +* Automatic game update: The launcher can automatically download and install updates. * Register account: Users can register a new account/change the password directly from the launcher. * News window: The launcher displays the latest news and updates about the game. @@ -37,72 +33,71 @@ Rusty Hearts Launcher is a custom launcher for the Rusty Hearts game client. It The launcher require the [Rusty Hearts API](https://github.com/JuniorDark/RustyHearts-API) to work. See the api documentation for instructions on setup. ### API URL -In order for the launcher to work it need to be conected to the api. To change the URL address of the launcher API open the Config.ini (it will be created when opening the launcher for the first time). + +In order for the launcher to work it need to be conected to the api. To change the URL address of the launcher API open the config.ini (it will be created when opening the launcher for the first time). The default URL for the api can be changed on IniFile.cs ### Client region -The client region can be set on Config.ini or in the Config menu +The client region can be set on Service on config.ini -* **Jpn** (SEGA) - Full api support * **usa** (PWE) - Full api support * **chn** (Xunlei) - Only launcher support ### Launcher self-update + In order for the launcher to automatically update itself, you need to use the launcher_info.ini in the `launcher_update` directory of the api. This file specifies the version of the launcher. After each update of the launcher, you need to change the version in the ini, as well in the launcher executable file. -### Client download -In order to download the client, you need to use the `client\download` directory of the api. - -The tool for creating the client files is available in the repository: https://github.com/JuniorDark/RustyHearts-MIPTool - ### Client patch + In order to create client patches, you need to use the `patch` directory of the api. The tool for creating the patch files is available in the repository: https://github.com/JuniorDark/RustyHearts-MIPTool -### Launcher Language -The launcher language can be changed on `Lang` on Config.ini or in the Config menu - -* **en** - English (en-US) default language -* **ko** - Korean ("ko-KR) (Machine Translated) - ### Launcher customization -If you want to add a new language create a LocalizedStrings..resx with for the desired language. The english strings can be found on LocalizedStrings.resx resource file. +If you want to change the text on the launcher the strings can be found on LocalizedStrings.resx resource file. -If you want to change the text on the buttons/images used in the launcher you can use the Photoshop .psd files included in the PSD Resources.rar +If you want to change the text on the buttons/images used in the launcher you can use the Photoshop .psd files included in the Resources.rar -## Prerequisites for Development -* Visual Studio 2022 (Any Edition - 17.12 or later) -* Windows 10 SDK or Windows 11 SDK via Visual Studio Installer -* .NET Core 9 SDK (9.0.100 or later) +## Prerequisites for Building Locally/Development +The launcher is built in .NET 7 and as such, the packages listed below are required to create a local and development build of the launcher. Furthermore, it uses many submodules and packages outside of this, which will automatically be loaded when the user sets up a local environment of the application. +* Visual Studio 2022 (Any Edition - 17.4 or later) +* Windows 10 SDK (10.0.19043.0) or Windows 11 SDK (10.0.22000.0) via Visual Studio Installer +* .NET: [.NET Core 7 SDK (7.0.100 or later)](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) -## Building +## System Requirements for Ready-to-use build +* OS: Windows 10 1809 Update (build 17763) or later / Windows 11 (Any builds) +* Architecture: x64/AMD64 -If you wish to build the project yourself, follow these steps: - -### Step 1 - -Install the [.NET 9.0 (or higher) SDK](https://dotnet.microsoft.com/download/dotnet/9.0). -Make sure your SDK version is higher or equal to the required version specified. - -### Step 2 - -Either use `git clone https://github.com/JuniorDark/RustyHearts-Launcher` on the command line to clone the repository or use Code --> Download zip button to get the files. - -### Step 3 - -To build Rusty Hearts Launcher, open a command prompt inside the project directory. -You can quickly access it on Windows by holding shift in File Explorer, then right clicking and selecting `Open command window here`. -Then type the following command: `dotnet build -c Release`. - -The built files will be found in the newly created `bin` build directory. +## Preview +![image](screenshoots/preview-01.png) +![image](screenshoots/preview-02.png) +![image](screenshoots/preview-03.png) +![image](screenshoots/preview-04.png) ## License This project is licensed under the terms found in [`LICENSE-0BSD`](LICENSE). +## Contributing +Contributions from the community are welcome! If you encounter a bug or have a feature request, please submit an issue on GitHub. If you would like to contribute code, please fork the repository and submit a pull request. + +## FAQ +* Q: How do I report a bug? + * A: Please submit an issue on GitHub with a detailed description of the bug and steps to reproduce it. +* Q: How do I request a new feature? + * A: Please submit an issue on GitHub with a detailed description of the feature and why it would be useful. +* Q: How do I contribute code? + * A: Please fork the repository, make your changes, and submit a pull request. + ## Credits The following third-party libraries, tools, and resources are used in this project: * [Microsoft.Web.WebView2](https://www.nuget.org/packages/Microsoft.Web.WebView2) * [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json) -* [WindowsAPICodePack](https://www.nuget.org/packages/WindowsAPICodePack) + +## Support +If you need help with the launcher, please submit an issue on GitHub. + +## Roadmap +* Add support for client download/repair +* Improve performance and stability +* Add support for additional languages diff --git a/RHLauncher.Forms/ChangePwdForm.Designer.cs b/RHLauncher.ChangePwd/ChangePwd.Designer.cs similarity index 90% rename from RHLauncher.Forms/ChangePwdForm.Designer.cs rename to RHLauncher.ChangePwd/ChangePwd.Designer.cs index 276d14a..f0a3d0e 100644 --- a/RHLauncher.Forms/ChangePwdForm.Designer.cs +++ b/RHLauncher.ChangePwd/ChangePwd.Designer.cs @@ -1,6 +1,6 @@ namespace RHLauncher { - partial class ChangePwdForm + partial class ChangePwd { /// /// Required designer variable. @@ -29,7 +29,7 @@ private void InitializeComponent() { components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChangePwdForm)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChangePwd)); CloseButton = new Button(); imageListCloseBtn = new ImageList(components); MinimizeButton = new Button(); @@ -67,9 +67,6 @@ SubTitleLabelS2 = new Label(); TitleLabelS2 = new Label(); imageListTips = new ImageList(components); - imageListSendEmailBtn_ko = new ImageList(components); - imageListContinueBtn_ko = new ImageList(components); - imageListOKBtn_ko = new ImageList(components); Stage1Panel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)EmailPictureBox).BeginInit(); ((System.ComponentModel.ISupportInitialize)CodePictureBox).BeginInit(); @@ -95,9 +92,9 @@ CloseButton.TabIndex = 9; CloseButton.UseVisualStyleBackColor = false; CloseButton.Click += CloseButton_Click; - CloseButton.MouseDown += Button_MouseDown; - CloseButton.MouseLeave += Button_MouseLeave; - CloseButton.MouseHover += Button_MouseHover; + CloseButton.MouseDown += CloseButton_OnMouseDown; + CloseButton.MouseLeave += CloseButton_MouseLeave; + CloseButton.MouseHover += CloseButton_MouseHover; // // imageListCloseBtn // @@ -125,9 +122,9 @@ MinimizeButton.TabIndex = 8; MinimizeButton.UseVisualStyleBackColor = false; MinimizeButton.Click += MinimizeButton_Click; - MinimizeButton.MouseDown += Button_MouseDown; - MinimizeButton.MouseLeave += Button_MouseLeave; - MinimizeButton.MouseHover += Button_MouseHover; + MinimizeButton.MouseDown += MinimizeButton_OnMouseDown; + MinimizeButton.MouseLeave += MinimizeButton_MouseLeave; + MinimizeButton.MouseHover += MinimizeButton_MouseHover; // // imageListMinBtn // @@ -180,9 +177,9 @@ ContinueButtonS1.TabIndex = 16; ContinueButtonS1.UseVisualStyleBackColor = false; ContinueButtonS1.Click += ContinueButtonS1_Click; - ContinueButtonS1.MouseDown += Button_MouseDown; - ContinueButtonS1.MouseLeave += Button_MouseLeave; - ContinueButtonS1.MouseHover += Button_MouseHover; + ContinueButtonS1.MouseDown += ContinueButtonS1_OnMouseDown; + ContinueButtonS1.MouseLeave += ContinueButtonS1_MouseLeave; + ContinueButtonS1.MouseHover += ContinueButtonS1_MouseHover; // // imageListContinueBtn // @@ -242,9 +239,9 @@ SendEmailButton.TabIndex = 21; SendEmailButton.UseVisualStyleBackColor = false; SendEmailButton.Click += SendEmailButton_Click; - SendEmailButton.MouseDown += Button_MouseDown; - SendEmailButton.MouseLeave += Button_MouseLeave; - SendEmailButton.MouseHover += Button_MouseHover; + SendEmailButton.MouseDown += SendEmailButton_OnMouseDown; + SendEmailButton.MouseLeave += SendEmailButton_MouseLeave; + SendEmailButton.MouseHover += SendEmailButton_MouseHover; // // imageListSendEmailBtn // @@ -506,7 +503,6 @@ ReturnLabelS2.AutoEllipsis = true; ReturnLabelS2.AutoSize = true; ReturnLabelS2.BackColor = Color.Transparent; - ReturnLabelS2.Cursor = Cursors.Hand; ReturnLabelS2.Font = new Font("Segoe UI", 10F, FontStyle.Bold, GraphicsUnit.Point); ReturnLabelS2.ForeColor = Color.Gainsboro; ReturnLabelS2.ImeMode = ImeMode.NoControl; @@ -517,8 +513,8 @@ ReturnLabelS2.Text = "< Return"; ReturnLabelS2.TextAlign = ContentAlignment.TopCenter; ReturnLabelS2.Click += ReturnLabel_Click; - ReturnLabelS2.MouseLeave += Label_MouseLeave; - ReturnLabelS2.MouseHover += Label_MouseHover; + ReturnLabelS2.MouseLeave += ReturnLabelS2_MouseLeave; + ReturnLabelS2.MouseHover += ReturnLabelS2_MouseHover; // // OkButtonS2 // @@ -536,9 +532,9 @@ OkButtonS2.TabIndex = 26; OkButtonS2.UseVisualStyleBackColor = false; OkButtonS2.Click += OkButtonS2_Click; - OkButtonS2.MouseDown += Button_MouseDown; - OkButtonS2.MouseLeave += Button_MouseLeave; - OkButtonS2.MouseHover += Button_MouseHover; + OkButtonS2.MouseDown += OkButtonS2_OnMouseDown; + OkButtonS2.MouseLeave += OkButtonS2_MouseLeave; + OkButtonS2.MouseHover += OkButtonS2_MouseHover; // // PasswordTextBox // @@ -598,39 +594,12 @@ imageListTips.Images.SetKeyName(0, "tips_error.png"); imageListTips.Images.SetKeyName(1, "tips_ok.png"); // - // imageListSendEmailBtn_ko - // - imageListSendEmailBtn_ko.ColorDepth = ColorDepth.Depth32Bit; - imageListSendEmailBtn_ko.ImageStream = (ImageListStreamer)resources.GetObject("imageListSendEmailBtn_ko.ImageStream"); - imageListSendEmailBtn_ko.TransparentColor = Color.Transparent; - imageListSendEmailBtn_ko.Images.SetKeyName(0, "ChangePwwnd_button_email_normal_ko.png"); - imageListSendEmailBtn_ko.Images.SetKeyName(1, "ChangePwwnd_button_email_active_ko.png"); - imageListSendEmailBtn_ko.Images.SetKeyName(2, "ChangePwwnd_button_email_down_ko.png"); - // - // imageListContinueBtn_ko - // - imageListContinueBtn_ko.ColorDepth = ColorDepth.Depth32Bit; - imageListContinueBtn_ko.ImageStream = (ImageListStreamer)resources.GetObject("imageListContinueBtn_ko.ImageStream"); - imageListContinueBtn_ko.TransparentColor = Color.Transparent; - imageListContinueBtn_ko.Images.SetKeyName(0, "Registerwnd_button_continue_normal_ko.png"); - imageListContinueBtn_ko.Images.SetKeyName(1, "Registerwnd_button_continue_active_ko.png"); - imageListContinueBtn_ko.Images.SetKeyName(2, "Registerwnd_button_continue_down_ko.png"); - // - // imageListOKBtn_ko - // - imageListOKBtn_ko.ColorDepth = ColorDepth.Depth32Bit; - imageListOKBtn_ko.ImageStream = (ImageListStreamer)resources.GetObject("imageListOKBtn_ko.ImageStream"); - imageListOKBtn_ko.TransparentColor = Color.Transparent; - imageListOKBtn_ko.Images.SetKeyName(0, "messagewnd.button.ok.normal.png"); - imageListOKBtn_ko.Images.SetKeyName(1, "messagewnd.button.ok.active.png"); - imageListOKBtn_ko.Images.SetKeyName(2, "messagewnd.button.ok.down.png"); - // - // ChangePwdForm + // ChangePwd // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; BackColor = Color.Black; - BackgroundImage = (Image)resources.GetObject("$this.BackgroundImage"); + BackgroundImage = Properties.Resources.bg; BackgroundImageLayout = ImageLayout.Center; ClientSize = new Size(800, 571); Controls.Add(CloseButton); @@ -640,7 +609,7 @@ DoubleBuffered = true; FormBorderStyle = FormBorderStyle.None; Icon = (Icon)resources.GetObject("$this.Icon"); - Name = "ChangePwdForm"; + Name = "ChangePwd"; StartPosition = FormStartPosition.CenterScreen; Text = "Change Password"; FormClosing += ChangePwd_FormClosing; @@ -695,8 +664,5 @@ private Label TimerLabel; private ImageList imageListContinueBtn; private Label PwdStrengthLabel; - private ImageList imageListSendEmailBtn_ko; - private ImageList imageListContinueBtn_ko; - private ImageList imageListOKBtn_ko; } } \ No newline at end of file diff --git a/RHLauncher.Forms/ChangePwdForm.cs b/RHLauncher.ChangePwd/ChangePwd.cs similarity index 65% rename from RHLauncher.Forms/ChangePwdForm.cs rename to RHLauncher.ChangePwd/ChangePwd.cs index 173ec41..f5b4280 100644 --- a/RHLauncher.Forms/ChangePwdForm.cs +++ b/RHLauncher.ChangePwd/ChangePwd.cs @@ -1,27 +1,24 @@ -using Newtonsoft.Json; +using RHLauncher.Helper; +using RHLauncher.RHLauncher; using RHLauncher.RHLauncher.Helper; -using RHLauncher.RHLauncher.i8n; using System.Text.RegularExpressions; namespace RHLauncher { - public partial class ChangePwdForm : Form + public partial class ChangePwd : Form { private RegistryHandler registryHandler = new(); - private readonly string SendPasswordCodeUrl = Configuration.Default.SendPasswordCodeUrl; - private readonly string VerifyCodeUrl = Configuration.Default.VerifyCodeUrl; - private readonly string ChangePasswordUrl = Configuration.Default.ChangePasswordUrl; - private readonly string Lang = Configuration.Default.Lang; - private List