From 8202cf488ffb7e85ff4d5eb8468dc97d12d54735 Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Fri, 9 Jan 2026 20:11:30 +0900 Subject: [PATCH 01/11] Add localization support for English and Japanese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implemented comprehensive localization infrastructure using .NET resource files (.resx) to support multiple languages with proper separation of concerns. Changes: - Created Strings.resx (English) and Strings.ja.resx (Japanese) - Auto-generated Strings.Designer.cs for type-safe resource access - Added GetLocalizedString() methods to all enum extensions: * ThemeExtension.GetLocalizedString() * RunnerExtension.GetLocalizedString() * FPSMaxLimitExtension.GetLocalizedString() - Updated ContextMenuManager to use localized strings for: * All menu items (Runners, Theme, Settings, etc.) * Balloon tip messages * Warning dialogs - Updated EndlessGameForm window title Architecture: - All UI strings centralized in Strings.resx files - Existing GetString() methods preserved for internal logic - New GetLocalizedString() methods for UI display - Language automatically detected from system culture - Type-safe: compile-time checking prevents typos Japanese translations: - Runners → ランナー - Theme → テーマ - Settings → 設定 - Cat → 猫, Parrot → オウム, Horse → 馬 - All menu items and messages fully translated 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- RunCat365/ContextMenuManager.cs | 32 ++- RunCat365/EndlessGameForm.cs | 3 +- RunCat365/FPSMaxLimit.cs | 13 ++ RunCat365/Properties/Strings.Designer.cs | 257 +++++++++++++++++++++++ RunCat365/Properties/Strings.ja.resx | 139 ++++++++++++ RunCat365/Properties/Strings.resx | 139 ++++++++++++ RunCat365/Runner.cs | 13 ++ RunCat365/Theme.cs | 13 ++ 8 files changed, 591 insertions(+), 18 deletions(-) create mode 100644 RunCat365/Properties/Strings.Designer.cs create mode 100644 RunCat365/Properties/Strings.ja.resx create mode 100644 RunCat365/Properties/Strings.resx diff --git a/RunCat365/ContextMenuManager.cs b/RunCat365/ContextMenuManager.cs index d240e91f..6724da2f 100644 --- a/RunCat365/ContextMenuManager.cs +++ b/RunCat365/ContextMenuManager.cs @@ -14,6 +14,7 @@ using RunCat365.Properties; using System.ComponentModel; +using Strings = RunCat365.Properties.Strings; namespace RunCat365 { @@ -43,9 +44,9 @@ Action onExit systemInfoMenu.Text = "-\n-\n-\n-\n-"; systemInfoMenu.Enabled = false; - var runnersMenu = new CustomToolStripMenuItem("Runners"); + var runnersMenu = new CustomToolStripMenuItem(Strings.Menu_Runners); runnersMenu.SetupSubMenusFromEnum( - r => r.GetString(), + r => r.GetLocalizedString(), (parent, sender, e) => { HandleMenuItemSelection( @@ -60,9 +61,9 @@ Action onExit r => GetRunnerThumbnailBitmap(getSystemTheme(), r) ); - var themeMenu = new CustomToolStripMenuItem("Theme"); + var themeMenu = new CustomToolStripMenuItem(Strings.Menu_Theme); themeMenu.SetupSubMenusFromEnum( - t => t.GetString(), + t => t.GetLocalizedString(), (parent, sender, e) => { HandleMenuItemSelection( @@ -77,9 +78,9 @@ Action onExit _ => null ); - var fpsMaxLimitMenu = new CustomToolStripMenuItem("FPS Max Limit"); + var fpsMaxLimitMenu = new CustomToolStripMenuItem(Strings.Menu_FPSMaxLimit); fpsMaxLimitMenu.SetupSubMenusFromEnum( - f => f.GetString(), + f => f.GetLocalizedString(), (parent, sender, e) => { HandleMenuItemSelection( @@ -93,20 +94,20 @@ Action onExit _ => null ); - var launchAtStartupMenu = new CustomToolStripMenuItem("Launch at startup") + var launchAtStartupMenu = new CustomToolStripMenuItem(Strings.Menu_LaunchAtStartup) { Checked = getLaunchAtStartup() }; launchAtStartupMenu.Click += (sender, e) => HandleStartupMenuClick(sender, toggleLaunchAtStartup); - var settingsMenu = new CustomToolStripMenuItem("Settings"); + var settingsMenu = new CustomToolStripMenuItem(Strings.Menu_Settings); settingsMenu.DropDownItems.AddRange( themeMenu, fpsMaxLimitMenu, launchAtStartupMenu ); - var endlessGameMenu = new CustomToolStripMenuItem("Endless Game"); + var endlessGameMenu = new CustomToolStripMenuItem(Strings.Menu_EndlessGame); endlessGameMenu.Click += (sender, e) => ShowOrActivateGameWindow(getSystemTheme); var appVersionMenu = new CustomToolStripMenuItem( @@ -116,16 +117,16 @@ Action onExit Enabled = false }; - var repositoryMenu = new CustomToolStripMenuItem("Open Repository"); + var repositoryMenu = new CustomToolStripMenuItem(Strings.Menu_OpenRepository); repositoryMenu.Click += (sender, e) => openRepository(); - var informationMenu = new CustomToolStripMenuItem("Information"); + var informationMenu = new CustomToolStripMenuItem(Strings.Menu_Information); informationMenu.DropDownItems.AddRange( appVersionMenu, repositoryMenu ); - var exitMenu = new CustomToolStripMenuItem("Exit"); + var exitMenu = new CustomToolStripMenuItem(Strings.Menu_Exit); exitMenu.Click += (sender, e) => onExit(); var contextMenuStrip = new ContextMenuStrip(new Container()); @@ -213,7 +214,7 @@ private static void HandleStartupMenuClick(object? sender, Func togg } catch (InvalidOperationException ex) { - MessageBox.Show(ex.Message, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); + MessageBox.Show(ex.Message, Strings.Message_Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } @@ -237,10 +238,7 @@ private void ShowOrActivateGameWindow(Func getSystemTheme) internal void ShowBalloonTip() { - var message = "App has launched. " + - "If the icon is not on the taskbar, it has been omitted, " + - "so please move it manually and pin it."; - notifyIcon.ShowBalloonTip(5000, "RunCat 365", message, ToolTipIcon.Info); + notifyIcon.ShowBalloonTip(5000, "RunCat 365", Strings.Message_AppLaunched, ToolTipIcon.Info); } internal void AdvanceFrame() diff --git a/RunCat365/EndlessGameForm.cs b/RunCat365/EndlessGameForm.cs index 6085d4bf..2373e7b4 100644 --- a/RunCat365/EndlessGameForm.cs +++ b/RunCat365/EndlessGameForm.cs @@ -14,6 +14,7 @@ using RunCat365.Properties; using FormsTimer = System.Windows.Forms.Timer; +using Strings = RunCat365.Properties.Strings; namespace RunCat365 { @@ -40,7 +41,7 @@ internal EndlessGameForm(Theme systemTheme) FormBorderStyle = FormBorderStyle.FixedDialog; MaximizeBox = false; StartPosition = FormStartPosition.CenterScreen; - Text = "Endless Game"; + Text = Strings.Window_EndlessGame; Icon = Resources.AppIcon; BackColor = systemTheme == Theme.Light ? Color.Gainsboro : Color.Gray; diff --git a/RunCat365/FPSMaxLimit.cs b/RunCat365/FPSMaxLimit.cs index 03ef3a98..08aeb051 100644 --- a/RunCat365/FPSMaxLimit.cs +++ b/RunCat365/FPSMaxLimit.cs @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +using RunCat365.Properties; using System.Diagnostics.CodeAnalysis; namespace RunCat365 @@ -38,6 +39,18 @@ internal static string GetString(this FPSMaxLimit fpsMaxLimit) }; } + internal static string GetLocalizedString(this FPSMaxLimit fpsMaxLimit) + { + return fpsMaxLimit switch + { + FPSMaxLimit.FPS40 => Strings.FPS_40, + FPSMaxLimit.FPS30 => Strings.FPS_30, + FPSMaxLimit.FPS20 => Strings.FPS_20, + FPSMaxLimit.FPS10 => Strings.FPS_10, + _ => "", + }; + } + internal static float GetRate(this FPSMaxLimit fPSMaxLimit) { return fPSMaxLimit switch diff --git a/RunCat365/Properties/Strings.Designer.cs b/RunCat365/Properties/Strings.Designer.cs new file mode 100644 index 00000000..111f3082 --- /dev/null +++ b/RunCat365/Properties/Strings.Designer.cs @@ -0,0 +1,257 @@ +//------------------------------------------------------------------------------ +// +// 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 RunCat365.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// 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("RunCat365.Properties.Strings", typeof(Strings).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 string similar to 40fps. + /// + internal static string FPS_10 { + get { + return ResourceManager.GetString("FPS_10", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 20fps. + /// + internal static string FPS_20 { + get { + return ResourceManager.GetString("FPS_20", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 30fps. + /// + internal static string FPS_30 { + get { + return ResourceManager.GetString("FPS_30", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 40fps. + /// + internal static string FPS_40 { + get { + return ResourceManager.GetString("FPS_40", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endless Game. + /// + internal static string Menu_EndlessGame { + get { + return ResourceManager.GetString("Menu_EndlessGame", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exit. + /// + internal static string Menu_Exit { + get { + return ResourceManager.GetString("Menu_Exit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to FPS Max Limit. + /// + internal static string Menu_FPSMaxLimit { + get { + return ResourceManager.GetString("Menu_FPSMaxLimit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Information. + /// + internal static string Menu_Information { + get { + return ResourceManager.GetString("Menu_Information", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Launch at startup. + /// + internal static string Menu_LaunchAtStartup { + get { + return ResourceManager.GetString("Menu_LaunchAtStartup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open Repository. + /// + internal static string Menu_OpenRepository { + get { + return ResourceManager.GetString("Menu_OpenRepository", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Runners. + /// + internal static string Menu_Runners { + get { + return ResourceManager.GetString("Menu_Runners", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings. + /// + internal static string Menu_Settings { + get { + return ResourceManager.GetString("Menu_Settings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Theme. + /// + internal static string Menu_Theme { + get { + return ResourceManager.GetString("Menu_Theme", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to App has launched. If the icon is not on the taskbar, it has been omitted, so please move it manually and pin it.. + /// + internal static string Message_AppLaunched { + get { + return ResourceManager.GetString("Message_AppLaunched", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Warning. + /// + internal static string Message_Warning { + get { + return ResourceManager.GetString("Message_Warning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cat. + /// + internal static string Runner_Cat { + get { + return ResourceManager.GetString("Runner_Cat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Horse. + /// + internal static string Runner_Horse { + get { + return ResourceManager.GetString("Runner_Horse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parrot. + /// + internal static string Runner_Parrot { + get { + return ResourceManager.GetString("Runner_Parrot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dark. + /// + internal static string Theme_Dark { + get { + return ResourceManager.GetString("Theme_Dark", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Light. + /// + internal static string Theme_Light { + get { + return ResourceManager.GetString("Theme_Light", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to System. + /// + internal static string Theme_System { + get { + return ResourceManager.GetString("Theme_System", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endless Game. + /// + internal static string Window_EndlessGame { + get { + return ResourceManager.GetString("Window_EndlessGame", resourceCulture); + } + } + } +} diff --git a/RunCat365/Properties/Strings.ja.resx b/RunCat365/Properties/Strings.ja.resx new file mode 100644 index 00000000..faecf41b --- /dev/null +++ b/RunCat365/Properties/Strings.ja.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + ランナー + + + テーマ + + + FPS上限 + + + スタートアップに登録 + + + 設定 + + + エンドレスゲーム + + + 情報 + + + リポジトリを開く + + + 終了 + + + + + システム + + + ライト + + + ダーク + + + + + + + + オウム + + + + + + + + 40fps + + + 30fps + + + 20fps + + + 10fps + + + + + アプリが起動しました。タスクバーにアイコンが表示されていない場合は、省略されているので手動で移動してピン留めしてください。 + + + 警告 + + + + + エンドレスゲーム + + diff --git a/RunCat365/Properties/Strings.resx b/RunCat365/Properties/Strings.resx new file mode 100644 index 00000000..eda538c3 --- /dev/null +++ b/RunCat365/Properties/Strings.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + Runners + + + Theme + + + FPS Max Limit + + + Launch at startup + + + Settings + + + Endless Game + + + Information + + + Open Repository + + + Exit + + + + + System + + + Light + + + Dark + + + + + Cat + + + Parrot + + + Horse + + + + + 40fps + + + 30fps + + + 20fps + + + 10fps + + + + + App has launched. If the icon is not on the taskbar, it has been omitted, so please move it manually and pin it. + + + Warning + + + + + Endless Game + + diff --git a/RunCat365/Runner.cs b/RunCat365/Runner.cs index 4d6dcc66..4da2d238 100644 --- a/RunCat365/Runner.cs +++ b/RunCat365/Runner.cs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +using RunCat365.Properties; + namespace RunCat365 { enum Runner @@ -34,6 +36,17 @@ internal static string GetString(this Runner runner) }; } + internal static string GetLocalizedString(this Runner runner) + { + return runner switch + { + Runner.Cat => Strings.Runner_Cat, + Runner.Parrot => Strings.Runner_Parrot, + Runner.Horse => Strings.Runner_Horse, + _ => "", + }; + } + internal static int GetFrameNumber(this Runner runner) { return runner switch diff --git a/RunCat365/Theme.cs b/RunCat365/Theme.cs index fd8658eb..21f42c37 100644 --- a/RunCat365/Theme.cs +++ b/RunCat365/Theme.cs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +using RunCat365.Properties; + namespace RunCat365 { enum Theme @@ -33,5 +35,16 @@ internal static string GetString(this Theme theme) _ => "", }; } + + internal static string GetLocalizedString(this Theme theme) + { + return theme switch + { + Theme.System => Strings.Theme_System, + Theme.Light => Strings.Theme_Light, + Theme.Dark => Strings.Theme_Dark, + _ => "", + }; + } } } From af334d05c73139e6ba746bfae4671300a4707366 Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 14:42:04 +0900 Subject: [PATCH 02/11] Fixed a bug where players could no longer change runners. Co-Authored-By: Claude Sonnet 4.5 --- RunCat365/ContextMenuManager.cs | 7 ++++++- RunCat365/CustomToolStripMenuItem.cs | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RunCat365/ContextMenuManager.cs b/RunCat365/ContextMenuManager.cs index 6724da2f..47774d86 100644 --- a/RunCat365/ContextMenuManager.cs +++ b/RunCat365/ContextMenuManager.cs @@ -165,7 +165,12 @@ Action assignValueAction childItem.Checked = false; } item.Checked = true; - if (tryParseMethod(item.Text, out T parsedValue)) + + if (item.Tag is T tagValue) + { + assignValueAction(tagValue); + } + else if (tryParseMethod(item.Text, out T parsedValue)) { assignValueAction(parsedValue); } diff --git a/RunCat365/CustomToolStripMenuItem.cs b/RunCat365/CustomToolStripMenuItem.cs index c87ca92c..1f3b89fd 100644 --- a/RunCat365/CustomToolStripMenuItem.cs +++ b/RunCat365/CustomToolStripMenuItem.cs @@ -26,8 +26,9 @@ internal CustomToolStripMenuItem(string? text) : base(text) Font = new Font("Consolas", 9F, FontStyle.Regular); } - private CustomToolStripMenuItem(string? text, Image? image, bool isChecked, EventHandler? onClick) : base(text, image, onClick) + private CustomToolStripMenuItem(string? text, Image? image, object? tag, bool isChecked, EventHandler? onClick) : base(text, image, onClick) { + Tag = tag; Checked = isChecked; Font = new Font("Consolas", 9F, FontStyle.Regular); } @@ -88,6 +89,7 @@ internal void SetupSubMenusFromEnum( var item = new CustomToolStripMenuItem( entityName, iconImage, + value, isChecked(value), (sender, e) => onClick(this, sender, e) ); From 012a3494564066b4b88d0d719a6d502f7b8432e5 Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 14:42:41 +0900 Subject: [PATCH 03/11] I've included system information in the localization scope. Co-Authored-By: Claude Sonnet 4.5 --- RunCat365/CPURepository.cs | 12 +-- RunCat365/MemoryRepository.cs | 10 ++- RunCat365/NetworkRepository.cs | 8 +- RunCat365/Properties/Strings.Designer.cs | 99 ++++++++++++++++++++++++ RunCat365/Properties/Strings.ja.resx | 35 +++++++++ RunCat365/Properties/Strings.resx | 35 +++++++++ RunCat365/StorageRepository.cs | 9 ++- 7 files changed, 193 insertions(+), 15 deletions(-) diff --git a/RunCat365/CPURepository.cs b/RunCat365/CPURepository.cs index 01f4c555..77c551ea 100644 --- a/RunCat365/CPURepository.cs +++ b/RunCat365/CPURepository.cs @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +using RunCat365.Properties; using System.Diagnostics; +using Strings = RunCat365.Properties.Strings; namespace RunCat365 { @@ -28,17 +30,17 @@ internal static class CPUInfoExtension { internal static string GetDescription(this CPUInfo cpuInfo) { - return $"CPU: {cpuInfo.Total:f1}%"; + return $"{Strings.SystemInfo_CPU}: {cpuInfo.Total:f1}%"; } internal static List GenerateIndicator(this CPUInfo cpuInfo) { var resultLines = new List { - $"CPU: {cpuInfo.Total:f1}%", - $" ├─ User: {cpuInfo.User:f1}%", - $" ├─ Kernel: {cpuInfo.Kernel:f1}%", - $" └─ Available: {cpuInfo.Idle:f1}%" + $"{Strings.SystemInfo_CPU}: {cpuInfo.Total:f1}%", + $" ├─ {Strings.SystemInfo_User}: {cpuInfo.User:f1}%", + $" ├─ {Strings.SystemInfo_Kernel}: {cpuInfo.Kernel:f1}%", + $" └─ {Strings.SystemInfo_Available}: {cpuInfo.Idle:f1}%" }; return resultLines; } diff --git a/RunCat365/MemoryRepository.cs b/RunCat365/MemoryRepository.cs index d256cf1c..7f728a66 100644 --- a/RunCat365/MemoryRepository.cs +++ b/RunCat365/MemoryRepository.cs @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +using RunCat365.Properties; using System.Runtime.InteropServices; +using Strings = RunCat365.Properties.Strings; namespace RunCat365 { @@ -30,10 +32,10 @@ internal static List GenerateIndicator(this MemoryInfo memoryInfo) { var resultLines = new List { - $"Memory: {memoryInfo.MemoryLoad}%", - $" ├─ Total: {memoryInfo.TotalMemory.ToByteFormatted()}", - $" ├─ Used: {memoryInfo.UsedMemory.ToByteFormatted()}", - $" └─ Available: {memoryInfo.AvailableMemory.ToByteFormatted()}" + $"{Strings.SystemInfo_Memory}: {memoryInfo.MemoryLoad}%", + $" ├─ {Strings.SystemInfo_Total}: {memoryInfo.TotalMemory.ToByteFormatted()}", + $" ├─ {Strings.SystemInfo_Used}: {memoryInfo.UsedMemory.ToByteFormatted()}", + $" └─ {Strings.SystemInfo_Available}: {memoryInfo.AvailableMemory.ToByteFormatted()}" }; return resultLines; } diff --git a/RunCat365/NetworkRepository.cs b/RunCat365/NetworkRepository.cs index 28ed19c6..73b10dfe 100644 --- a/RunCat365/NetworkRepository.cs +++ b/RunCat365/NetworkRepository.cs @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +using RunCat365.Properties; using System.Net.NetworkInformation; +using Strings = RunCat365.Properties.Strings; namespace RunCat365 { @@ -27,9 +29,9 @@ internal static class NetworkInfoExtension internal static List GenerateIndicator(this NetworkInfo networkInfo) { return [ - $"Network:", - $" ├─ Sent: {FormatSpeed(networkInfo.SentSpeed)}", - $" └─ Received: {FormatSpeed(networkInfo.ReceivedSpeed)}" + $"{Strings.SystemInfo_Network}:", + $" ├─ {Strings.SystemInfo_Sent}: {FormatSpeed(networkInfo.SentSpeed)}", + $" └─ {Strings.SystemInfo_Received}: {FormatSpeed(networkInfo.ReceivedSpeed)}" ]; } diff --git a/RunCat365/Properties/Strings.Designer.cs b/RunCat365/Properties/Strings.Designer.cs index 111f3082..cbc48b58 100644 --- a/RunCat365/Properties/Strings.Designer.cs +++ b/RunCat365/Properties/Strings.Designer.cs @@ -253,5 +253,104 @@ internal static string Window_EndlessGame { return ResourceManager.GetString("Window_EndlessGame", resourceCulture); } } + + /// + /// Looks up a localized string similar to CPU. + /// + internal static string SystemInfo_CPU { + get { + return ResourceManager.GetString("SystemInfo_CPU", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User. + /// + internal static string SystemInfo_User { + get { + return ResourceManager.GetString("SystemInfo_User", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kernel. + /// + internal static string SystemInfo_Kernel { + get { + return ResourceManager.GetString("SystemInfo_Kernel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Available. + /// + internal static string SystemInfo_Available { + get { + return ResourceManager.GetString("SystemInfo_Available", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Memory. + /// + internal static string SystemInfo_Memory { + get { + return ResourceManager.GetString("SystemInfo_Memory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Total. + /// + internal static string SystemInfo_Total { + get { + return ResourceManager.GetString("SystemInfo_Total", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Used. + /// + internal static string SystemInfo_Used { + get { + return ResourceManager.GetString("SystemInfo_Used", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Storage. + /// + internal static string SystemInfo_Storage { + get { + return ResourceManager.GetString("SystemInfo_Storage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Network. + /// + internal static string SystemInfo_Network { + get { + return ResourceManager.GetString("SystemInfo_Network", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sent. + /// + internal static string SystemInfo_Sent { + get { + return ResourceManager.GetString("SystemInfo_Sent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Received. + /// + internal static string SystemInfo_Received { + get { + return ResourceManager.GetString("SystemInfo_Received", resourceCulture); + } + } } } diff --git a/RunCat365/Properties/Strings.ja.resx b/RunCat365/Properties/Strings.ja.resx index faecf41b..5b62c9a2 100644 --- a/RunCat365/Properties/Strings.ja.resx +++ b/RunCat365/Properties/Strings.ja.resx @@ -136,4 +136,39 @@ エンドレスゲーム + + + + CPU + + + ユーザー + + + カーネル + + + 使用可能 + + + メモリ + + + 合計 + + + 使用中 + + + ストレージ + + + ネットワーク + + + 送信 + + + 受信 + diff --git a/RunCat365/Properties/Strings.resx b/RunCat365/Properties/Strings.resx index eda538c3..44bb5b6c 100644 --- a/RunCat365/Properties/Strings.resx +++ b/RunCat365/Properties/Strings.resx @@ -136,4 +136,39 @@ Endless Game + + + + CPU + + + User + + + Kernel + + + Available + + + Memory + + + Total + + + Used + + + Storage + + + Network + + + Sent + + + Received + diff --git a/RunCat365/StorageRepository.cs b/RunCat365/StorageRepository.cs index 6521ebb3..fd1042c3 100644 --- a/RunCat365/StorageRepository.cs +++ b/RunCat365/StorageRepository.cs @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +using RunCat365.Properties; +using Strings = RunCat365.Properties.Strings; + namespace RunCat365 { enum Drive @@ -57,7 +60,7 @@ internal static List GenerateIndicator(this List storageInf { var resultLines = new List { - "Storage:" + $"{Strings.SystemInfo_Storage}:" }; if (storageInfoList.Count == 0) return resultLines; @@ -70,8 +73,8 @@ internal static List GenerateIndicator(this List storageInf var childIndent = isLastItem ? " " : " │ "; var percentage = ((double)info.UsedSpaceSize / info.TotalSize) * 100.0; resultLines.Add($"{parentPrefix}{info.Drive.GetString()}: {percentage:f1}%"); - resultLines.Add($"{childIndent} ├─ Used: {info.UsedSpaceSize.ToByteFormatted()}"); - resultLines.Add($"{childIndent} └─ Available: {info.AvailableSpaceSize.ToByteFormatted()}"); + resultLines.Add($"{childIndent} ├─ {Strings.SystemInfo_Used}: {info.UsedSpaceSize.ToByteFormatted()}"); + resultLines.Add($"{childIndent} └─ {Strings.SystemInfo_Available}: {info.AvailableSpaceSize.ToByteFormatted()}"); } return resultLines; From 8be179e11906be5775b5e0ad10cc2d78af61b1aa Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 15:19:28 +0900 Subject: [PATCH 04/11] Migrated to TreeFormatter --- RunCat365/CPURepository.cs | 8 +++---- RunCat365/MemoryRepository.cs | 8 +++---- RunCat365/NetworkRepository.cs | 6 ++--- RunCat365/StorageRepository.cs | 10 ++++---- RunCat365/TreeFormatter.cs | 42 ++++++++++++++++++++++++++++++++++ 5 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 RunCat365/TreeFormatter.cs diff --git a/RunCat365/CPURepository.cs b/RunCat365/CPURepository.cs index 77c551ea..59e35902 100644 --- a/RunCat365/CPURepository.cs +++ b/RunCat365/CPURepository.cs @@ -37,10 +37,10 @@ internal static List GenerateIndicator(this CPUInfo cpuInfo) { var resultLines = new List { - $"{Strings.SystemInfo_CPU}: {cpuInfo.Total:f1}%", - $" ├─ {Strings.SystemInfo_User}: {cpuInfo.User:f1}%", - $" ├─ {Strings.SystemInfo_Kernel}: {cpuInfo.Kernel:f1}%", - $" └─ {Strings.SystemInfo_Available}: {cpuInfo.Idle:f1}%" + TreeFormatter.CreateRoot($"{Strings.SystemInfo_CPU}: {cpuInfo.Total:f1}%"), + TreeFormatter.CreateNode($"{Strings.SystemInfo_User}: {cpuInfo.User:f1}%", false), + TreeFormatter.CreateNode($"{Strings.SystemInfo_Kernel}: {cpuInfo.Kernel:f1}%", false), + TreeFormatter.CreateNode($"{Strings.SystemInfo_Available}: {cpuInfo.Idle:f1}%", true) }; return resultLines; } diff --git a/RunCat365/MemoryRepository.cs b/RunCat365/MemoryRepository.cs index 7f728a66..adaa43e5 100644 --- a/RunCat365/MemoryRepository.cs +++ b/RunCat365/MemoryRepository.cs @@ -32,10 +32,10 @@ internal static List GenerateIndicator(this MemoryInfo memoryInfo) { var resultLines = new List { - $"{Strings.SystemInfo_Memory}: {memoryInfo.MemoryLoad}%", - $" ├─ {Strings.SystemInfo_Total}: {memoryInfo.TotalMemory.ToByteFormatted()}", - $" ├─ {Strings.SystemInfo_Used}: {memoryInfo.UsedMemory.ToByteFormatted()}", - $" └─ {Strings.SystemInfo_Available}: {memoryInfo.AvailableMemory.ToByteFormatted()}" + TreeFormatter.CreateRoot($"{Strings.SystemInfo_Memory}: {memoryInfo.MemoryLoad}%"), + TreeFormatter.CreateNode($"{Strings.SystemInfo_Total}: {memoryInfo.TotalMemory.ToByteFormatted()}", false), + TreeFormatter.CreateNode($"{Strings.SystemInfo_Used}: {memoryInfo.UsedMemory.ToByteFormatted()}", false), + TreeFormatter.CreateNode($"{Strings.SystemInfo_Available}: {memoryInfo.AvailableMemory.ToByteFormatted()}", true) }; return resultLines; } diff --git a/RunCat365/NetworkRepository.cs b/RunCat365/NetworkRepository.cs index 73b10dfe..299e631b 100644 --- a/RunCat365/NetworkRepository.cs +++ b/RunCat365/NetworkRepository.cs @@ -29,9 +29,9 @@ internal static class NetworkInfoExtension internal static List GenerateIndicator(this NetworkInfo networkInfo) { return [ - $"{Strings.SystemInfo_Network}:", - $" ├─ {Strings.SystemInfo_Sent}: {FormatSpeed(networkInfo.SentSpeed)}", - $" └─ {Strings.SystemInfo_Received}: {FormatSpeed(networkInfo.ReceivedSpeed)}" + TreeFormatter.CreateRoot($"{Strings.SystemInfo_Network}:"), + TreeFormatter.CreateNode($"{Strings.SystemInfo_Sent}: {FormatSpeed(networkInfo.SentSpeed)}", false), + TreeFormatter.CreateNode($"{Strings.SystemInfo_Received}: {FormatSpeed(networkInfo.ReceivedSpeed)}", true) ]; } diff --git a/RunCat365/StorageRepository.cs b/RunCat365/StorageRepository.cs index fd1042c3..b9a9cd5d 100644 --- a/RunCat365/StorageRepository.cs +++ b/RunCat365/StorageRepository.cs @@ -60,7 +60,7 @@ internal static List GenerateIndicator(this List storageInf { var resultLines = new List { - $"{Strings.SystemInfo_Storage}:" + TreeFormatter.CreateRoot($"{Strings.SystemInfo_Storage}:") }; if (storageInfoList.Count == 0) return resultLines; @@ -69,12 +69,10 @@ internal static List GenerateIndicator(this List storageInf { var info = storageInfoList[i]; var isLastItem = (i == storageInfoList.Count - 1); - var parentPrefix = isLastItem ? " └─ " : " ├─ "; - var childIndent = isLastItem ? " " : " │ "; var percentage = ((double)info.UsedSpaceSize / info.TotalSize) * 100.0; - resultLines.Add($"{parentPrefix}{info.Drive.GetString()}: {percentage:f1}%"); - resultLines.Add($"{childIndent} ├─ {Strings.SystemInfo_Used}: {info.UsedSpaceSize.ToByteFormatted()}"); - resultLines.Add($"{childIndent} └─ {Strings.SystemInfo_Available}: {info.AvailableSpaceSize.ToByteFormatted()}"); + resultLines.Add(TreeFormatter.CreateNode($"{info.Drive.GetString()}: {percentage:f1}%", isLastItem)); + resultLines.Add(TreeFormatter.CreateNestedNode($"{Strings.SystemInfo_Used}: {info.UsedSpaceSize.ToByteFormatted()}", isLastItem, false)); + resultLines.Add(TreeFormatter.CreateNestedNode($"{Strings.SystemInfo_Available}: {info.AvailableSpaceSize.ToByteFormatted()}", isLastItem, true)); } return resultLines; diff --git a/RunCat365/TreeFormatter.cs b/RunCat365/TreeFormatter.cs new file mode 100644 index 00000000..a4bdc339 --- /dev/null +++ b/RunCat365/TreeFormatter.cs @@ -0,0 +1,42 @@ +// Copyright 2025 Takuto Nakamura +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace RunCat365 +{ + internal static class TreeFormatter + { + private const string BranchMiddle = " ├─ "; + private const string BranchLast = " └─ "; + private const string IndentContinue = " │ "; + private const string IndentLast = " "; + + internal static string CreateRoot(string content) + { + return content; + } + + internal static string CreateNode(string content, bool isLast) + { + var prefix = isLast ? BranchLast : BranchMiddle; + return $"{prefix}{content}"; + } + + internal static string CreateNestedNode(string content, bool parentIsLast, bool isLast) + { + var indent = parentIsLast ? IndentLast : IndentContinue; + var prefix = isLast ? BranchLast : BranchMiddle; + return $"{indent}{prefix}{content}"; + } + } +} From 8cbee28ae57867393393db7961b6a125e8cbfcdf Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 15:35:00 +0900 Subject: [PATCH 05/11] Specify language manually if debug building. --- RunCat365/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RunCat365/Program.cs b/RunCat365/Program.cs index 77298686..c5843d17 100644 --- a/RunCat365/Program.cs +++ b/RunCat365/Program.cs @@ -15,6 +15,7 @@ using Microsoft.Win32; using RunCat365.Properties; using System.Diagnostics; +using System.Globalization; using FormsTimer = System.Windows.Forms.Timer; namespace RunCat365 @@ -24,6 +25,11 @@ internal static class Program [STAThread] static void Main() { + #if DEBUG + // Specify language manually. + CultureInfo.CurrentUICulture = new CultureInfo("en-US"); + #endif + // Terminate RunCat365 if there's any existing instance. using var procMutex = new Mutex(true, "_RUNCAT_MUTEX", out var result); if (!result) return; From a9ba0e361a3e60aafd02d659da7475aaf70a78f1 Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 16:06:07 +0900 Subject: [PATCH 06/11] Update Strings.ja.resx --- RunCat365/Properties/Strings.ja.resx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RunCat365/Properties/Strings.ja.resx b/RunCat365/Properties/Strings.ja.resx index 5b62c9a2..bfcbe386 100644 --- a/RunCat365/Properties/Strings.ja.resx +++ b/RunCat365/Properties/Strings.ja.resx @@ -67,10 +67,10 @@ テーマ - FPS上限 + FPSの上限 - スタートアップに登録 + スタートアップ時に起動 設定 @@ -101,13 +101,13 @@ - + ネコ オウム - + 早馬 From 8098d44497571ed2ecfbd7781ceb0e5c63ab57c5 Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 16:10:41 +0900 Subject: [PATCH 07/11] Remove FPS localization since 'fps' is a universal technical term Co-Authored-By: Claude Opus 4.5 --- RunCat365/ContextMenuManager.cs | 2 +- RunCat365/FPSMaxLimit.cs | 13 ------------- RunCat365/Properties/Strings.ja.resx | 14 -------------- RunCat365/Properties/Strings.resx | 14 -------------- 4 files changed, 1 insertion(+), 42 deletions(-) diff --git a/RunCat365/ContextMenuManager.cs b/RunCat365/ContextMenuManager.cs index 47774d86..297be925 100644 --- a/RunCat365/ContextMenuManager.cs +++ b/RunCat365/ContextMenuManager.cs @@ -80,7 +80,7 @@ Action onExit var fpsMaxLimitMenu = new CustomToolStripMenuItem(Strings.Menu_FPSMaxLimit); fpsMaxLimitMenu.SetupSubMenusFromEnum( - f => f.GetLocalizedString(), + f => f.GetString(), (parent, sender, e) => { HandleMenuItemSelection( diff --git a/RunCat365/FPSMaxLimit.cs b/RunCat365/FPSMaxLimit.cs index 08aeb051..03ef3a98 100644 --- a/RunCat365/FPSMaxLimit.cs +++ b/RunCat365/FPSMaxLimit.cs @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -using RunCat365.Properties; using System.Diagnostics.CodeAnalysis; namespace RunCat365 @@ -39,18 +38,6 @@ internal static string GetString(this FPSMaxLimit fpsMaxLimit) }; } - internal static string GetLocalizedString(this FPSMaxLimit fpsMaxLimit) - { - return fpsMaxLimit switch - { - FPSMaxLimit.FPS40 => Strings.FPS_40, - FPSMaxLimit.FPS30 => Strings.FPS_30, - FPSMaxLimit.FPS20 => Strings.FPS_20, - FPSMaxLimit.FPS10 => Strings.FPS_10, - _ => "", - }; - } - internal static float GetRate(this FPSMaxLimit fPSMaxLimit) { return fPSMaxLimit switch diff --git a/RunCat365/Properties/Strings.ja.resx b/RunCat365/Properties/Strings.ja.resx index bfcbe386..76c91265 100644 --- a/RunCat365/Properties/Strings.ja.resx +++ b/RunCat365/Properties/Strings.ja.resx @@ -110,20 +110,6 @@ 早馬 - - - 40fps - - - 30fps - - - 20fps - - - 10fps - - アプリが起動しました。タスクバーにアイコンが表示されていない場合は、省略されているので手動で移動してピン留めしてください。 diff --git a/RunCat365/Properties/Strings.resx b/RunCat365/Properties/Strings.resx index 44bb5b6c..c4463bf6 100644 --- a/RunCat365/Properties/Strings.resx +++ b/RunCat365/Properties/Strings.resx @@ -110,20 +110,6 @@ Horse - - - 40fps - - - 30fps - - - 20fps - - - 10fps - - App has launched. If the icon is not on the taskbar, it has been omitted, so please move it manually and pin it. From 8773acceaa43826b38403eed53b12742278fae6f Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 16:37:51 +0900 Subject: [PATCH 08/11] Add localization for Endless Game UI strings Co-Authored-By: Claude Opus 4.5 --- RunCat365/EndlessGameForm.cs | 6 +++--- RunCat365/Properties/Strings.ja.resx | 11 +++++++++++ RunCat365/Properties/Strings.resx | 11 +++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/RunCat365/EndlessGameForm.cs b/RunCat365/EndlessGameForm.cs index 2373e7b4..d42858a4 100644 --- a/RunCat365/EndlessGameForm.cs +++ b/RunCat365/EndlessGameForm.cs @@ -216,7 +216,7 @@ private void RenderScene(object? sender, PaintEventArgs e) Alignment = StringAlignment.Far, LineAlignment = StringAlignment.Center }; - g.DrawString($"Score: {score}", font15, brush, new Rectangle(20, 0, 560, 50), stringFormat); + g.DrawString($"{Strings.Game_Score}: {score}", font15, brush, new Rectangle(20, 0, 560, 50), stringFormat); } roads.Take(20).Select((road, index) => new { road, index }).ToList().ForEach( @@ -241,10 +241,10 @@ private void RenderScene(object? sender, PaintEventArgs e) using Font font18 = new("Courier New", 18, FontStyle.Bold); using Brush brush = new SolidBrush(textColor); - var message = "Press space to play."; + var message = Strings.Game_PressSpaceToPlay; if (status == GameStatus.GameOver) { - message = "GAME OVER\n\n" + message; + message = $"{Strings.Game_GameOver}\n\n{message}"; } var stringFormat = new StringFormat { diff --git a/RunCat365/Properties/Strings.ja.resx b/RunCat365/Properties/Strings.ja.resx index 76c91265..f63750ea 100644 --- a/RunCat365/Properties/Strings.ja.resx +++ b/RunCat365/Properties/Strings.ja.resx @@ -123,6 +123,17 @@ エンドレスゲーム + + + スコア + + + スペースキーでスタート + + + ゲームオーバー + + CPU diff --git a/RunCat365/Properties/Strings.resx b/RunCat365/Properties/Strings.resx index c4463bf6..c51fc29d 100644 --- a/RunCat365/Properties/Strings.resx +++ b/RunCat365/Properties/Strings.resx @@ -123,6 +123,17 @@ Endless Game + + + Score + + + Press space to play. + + + GAME OVER + + CPU From b21ec3b90e418c496f411e9959ea36841d349eac Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 16:43:20 +0900 Subject: [PATCH 09/11] Update Strings.Designer.cs --- RunCat365/Properties/Strings.Designer.cs | 27 ++++++++---------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/RunCat365/Properties/Strings.Designer.cs b/RunCat365/Properties/Strings.Designer.cs index cbc48b58..2c6b9905 100644 --- a/RunCat365/Properties/Strings.Designer.cs +++ b/RunCat365/Properties/Strings.Designer.cs @@ -57,38 +57,29 @@ internal Strings() { } /// - /// Looks up a localized string similar to 40fps. + /// Looks up a localized string similar to GAME OVER. /// - internal static string FPS_10 { + internal static string Game_GameOver { get { - return ResourceManager.GetString("FPS_10", resourceCulture); + return ResourceManager.GetString("Game_GameOver", resourceCulture); } } /// - /// Looks up a localized string similar to 20fps. + /// Looks up a localized string similar to Press space to play.. /// - internal static string FPS_20 { + internal static string Game_PressSpaceToPlay { get { - return ResourceManager.GetString("FPS_20", resourceCulture); + return ResourceManager.GetString("Game_PressSpaceToPlay", resourceCulture); } } /// - /// Looks up a localized string similar to 30fps. + /// Looks up a localized string similar to Score. /// - internal static string FPS_30 { + internal static string Game_Score { get { - return ResourceManager.GetString("FPS_30", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 40fps. - /// - internal static string FPS_40 { - get { - return ResourceManager.GetString("FPS_40", resourceCulture); + return ResourceManager.GetString("Game_Score", resourceCulture); } } From 9f1f7bdf758e6e8a6c8edd4c0618bd4000ffe3ff Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 16:48:36 +0900 Subject: [PATCH 10/11] Fixed Font in Endless Game --- RunCat365/EndlessGameForm.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RunCat365/EndlessGameForm.cs b/RunCat365/EndlessGameForm.cs index d42858a4..29a51651 100644 --- a/RunCat365/EndlessGameForm.cs +++ b/RunCat365/EndlessGameForm.cs @@ -208,7 +208,7 @@ private void RenderScene(object? sender, PaintEventArgs e) var textColor = systemTheme == Theme.Light ? Color.Black : Color.White; var g = e.Graphics; - using (Font font15 = new("Courier New", 15)) + using (Font font15 = new("Consolas", 15)) using (Brush brush = new SolidBrush(textColor)) { var stringFormat = new StringFormat @@ -239,12 +239,12 @@ private void RenderScene(object? sender, PaintEventArgs e) using Brush fillBrush = new SolidBrush(Color.FromArgb(77, 0, 0, 0)); g.FillRectangle(fillBrush, new Rectangle(0, 0, 600, 250)); - using Font font18 = new("Courier New", 18, FontStyle.Bold); + using Font font18 = new("Segoe UI", 16, FontStyle.Bold); using Brush brush = new SolidBrush(textColor); var message = Strings.Game_PressSpaceToPlay; if (status == GameStatus.GameOver) { - message = $"{Strings.Game_GameOver}\n\n{message}"; + message = $"{Strings.Game_GameOver}\n{message}"; } var stringFormat = new StringFormat { From 5d3c6129822616193770a42167fe1dfca2bf3747 Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sat, 10 Jan 2026 17:28:42 +0900 Subject: [PATCH 11/11] Removed unnecessary using --- RunCat365/CPURepository.cs | 1 - RunCat365/ContextMenuManager.cs | 1 - RunCat365/EndlessGameForm.cs | 1 - RunCat365/MemoryRepository.cs | 1 - RunCat365/NetworkRepository.cs | 1 - RunCat365/StorageRepository.cs | 1 - 6 files changed, 6 deletions(-) diff --git a/RunCat365/CPURepository.cs b/RunCat365/CPURepository.cs index 59e35902..1ef92102 100644 --- a/RunCat365/CPURepository.cs +++ b/RunCat365/CPURepository.cs @@ -14,7 +14,6 @@ using RunCat365.Properties; using System.Diagnostics; -using Strings = RunCat365.Properties.Strings; namespace RunCat365 { diff --git a/RunCat365/ContextMenuManager.cs b/RunCat365/ContextMenuManager.cs index 297be925..81591f21 100644 --- a/RunCat365/ContextMenuManager.cs +++ b/RunCat365/ContextMenuManager.cs @@ -14,7 +14,6 @@ using RunCat365.Properties; using System.ComponentModel; -using Strings = RunCat365.Properties.Strings; namespace RunCat365 { diff --git a/RunCat365/EndlessGameForm.cs b/RunCat365/EndlessGameForm.cs index 29a51651..09c96005 100644 --- a/RunCat365/EndlessGameForm.cs +++ b/RunCat365/EndlessGameForm.cs @@ -14,7 +14,6 @@ using RunCat365.Properties; using FormsTimer = System.Windows.Forms.Timer; -using Strings = RunCat365.Properties.Strings; namespace RunCat365 { diff --git a/RunCat365/MemoryRepository.cs b/RunCat365/MemoryRepository.cs index adaa43e5..0675a177 100644 --- a/RunCat365/MemoryRepository.cs +++ b/RunCat365/MemoryRepository.cs @@ -14,7 +14,6 @@ using RunCat365.Properties; using System.Runtime.InteropServices; -using Strings = RunCat365.Properties.Strings; namespace RunCat365 { diff --git a/RunCat365/NetworkRepository.cs b/RunCat365/NetworkRepository.cs index 299e631b..bfc0fdc5 100644 --- a/RunCat365/NetworkRepository.cs +++ b/RunCat365/NetworkRepository.cs @@ -14,7 +14,6 @@ using RunCat365.Properties; using System.Net.NetworkInformation; -using Strings = RunCat365.Properties.Strings; namespace RunCat365 { diff --git a/RunCat365/StorageRepository.cs b/RunCat365/StorageRepository.cs index b9a9cd5d..1195615c 100644 --- a/RunCat365/StorageRepository.cs +++ b/RunCat365/StorageRepository.cs @@ -13,7 +13,6 @@ // limitations under the License. using RunCat365.Properties; -using Strings = RunCat365.Properties.Strings; namespace RunCat365 {