From 082f9cb34029b7aee197daf4e3bcb69d062998f6 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 6 Jul 2025 09:02:44 -0500 Subject: [PATCH] Add Title to some import dialog prompts --- PKHeX.Core/Util/MessageStrings.cs | 5 +++++ .../Subforms/Save Editors/Gen6/SAV_SecretBase.cs | 1 + .../Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs | 12 ++++++------ .../Subforms/Save Editors/Gen8/SAV_BlockDump8.cs | 2 ++ .../Subforms/Save Editors/Gen8/SAV_FlagWork8b.cs | 1 + .../Subforms/Save Editors/SAV_EventFlags.cs | 1 + .../Subforms/Save Editors/SAV_EventFlags2.cs | 1 + .../Subforms/Save Editors/SAV_EventWork.cs | 1 + 8 files changed, 18 insertions(+), 6 deletions(-) diff --git a/PKHeX.Core/Util/MessageStrings.cs b/PKHeX.Core/Util/MessageStrings.cs index 391066bef..fabf4c2a6 100644 --- a/PKHeX.Core/Util/MessageStrings.cs +++ b/PKHeX.Core/Util/MessageStrings.cs @@ -65,6 +65,11 @@ public static class MessageStrings public static string MsgFileLoadSaveSelectVersion { get; set; } = "Select the version."; public static string MsgFileLoadSaveSelectGame { get; set; } = "Select a game to edit."; public static string MsgFileLoadSaveMultiple { get; set; } = "Multiple games detected"; + + public static string MsgFileLoadSelectFileSave { get; set; } = "Select a save file..."; + public static string MsgFileLoadSelectFileBlock { get; set; } = "Select a save block file..."; + public static string MsgFileLoadSelectFileSecretBase { get; set; } = "Select a Secret Base file..."; + public static string MsgFileGameCubeBad { get; set; } = "Invalid or corrupted GC Memory Card. Aborting."; public static string MsgFileGameCubeDuplicate { get; set; } = "GC Memory Card with duplicated game save files. Aborting."; public static string MsgFileGameCubeNoGames { get; set; } = "GC Memory Card without any Pokémon save file. Aborting."; diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_SecretBase.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_SecretBase.cs index 0f207b2a8..2624c9ef8 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_SecretBase.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_SecretBase.cs @@ -386,6 +386,7 @@ private void SetGenderLabel(byte gender) private void B_Import_Click(object sender, EventArgs e) { using var ofd = new OpenFileDialog(); + ofd.Title = MsgFileLoadSelectFileSecretBase; if (ofd.ShowDialog() != DialogResult.OK) return; diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs index 4d475a353..209e3fe31 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs @@ -213,16 +213,16 @@ private void B_ExportGoFiles_Click(object sender, EventArgs e) private void B_Import_Click(object sender, EventArgs e) { - using var sfd = new OpenFileDialog(); - sfd.Filter = GoFilter; - sfd.FilterIndex = 0; - sfd.RestoreDirectory = true; + using var ofd = new OpenFileDialog(); + ofd.Filter = GoFilter; + ofd.FilterIndex = 0; + ofd.RestoreDirectory = true; // Export - if (sfd.ShowDialog() != DialogResult.OK) + if (ofd.ShowDialog() != DialogResult.OK) return; - string path = sfd.FileName; + string path = ofd.FileName; ImportGP1From(path); } diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_BlockDump8.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_BlockDump8.cs index 088972779..ec972dd8b 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_BlockDump8.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_BlockDump8.cs @@ -202,6 +202,7 @@ private SCBlockExportOption GetExportOption() private void B_LoadOld_Click(object sender, EventArgs e) { using var ofd = new OpenFileDialog(); + ofd.Title = MessageStrings.MsgFileLoadSaveSelectGame; ofd.FileName = "main"; if (ofd.ShowDialog() != DialogResult.OK) return; @@ -261,6 +262,7 @@ private static void ImportSelectBlock(SCBlock blockTarget) var key = blockTarget.Key; var data = blockTarget.Data; using var ofd = new OpenFileDialog(); + ofd.Title = MessageStrings.MsgFileLoadSelectFileBlock; ofd.FileName = $"{key:X8}.bin"; if (ofd.ShowDialog() != DialogResult.OK) return; diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_FlagWork8b.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_FlagWork8b.cs index 1bb55f2e6..2476eccc1 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_FlagWork8b.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_FlagWork8b.cs @@ -236,6 +236,7 @@ private void ChangeSAV() private void OpenSAV(object sender, EventArgs e) { using var ofd = new OpenFileDialog(); + ofd.Title = MessageStrings.MsgFileLoadSaveSelectGame; if (ofd.ShowDialog() == DialogResult.OK) LoadSAV(sender, ofd.FileName); } diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags.cs index 133bf2ed6..c76f043f1 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags.cs @@ -274,6 +274,7 @@ private void ChangeSAV(object sender, EventArgs e) private void OpenSAV(object sender, EventArgs e) { using var ofd = new OpenFileDialog(); + ofd.Title = MsgFileLoadSaveSelectGame; if (ofd.ShowDialog() == DialogResult.OK) LoadSAV(sender, ofd.FileName); } diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags2.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags2.cs index 8d28d825c..b787d2a04 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags2.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_EventFlags2.cs @@ -273,6 +273,7 @@ private void ChangeSAV(object sender, EventArgs e) private void OpenSAV(object sender, EventArgs e) { using var ofd = new OpenFileDialog(); + ofd.Title = MsgFileLoadSaveSelectGame; if (ofd.ShowDialog() == DialogResult.OK) LoadSAV(sender, ofd.FileName); } diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_EventWork.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_EventWork.cs index d7acee394..e0dde1c72 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/SAV_EventWork.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_EventWork.cs @@ -228,6 +228,7 @@ private void ChangeSAV() private void OpenSAV(object sender, EventArgs e) { using var ofd = new OpenFileDialog(); + ofd.Title = MessageStrings.MsgFileLoadSaveSelectGame; if (ofd.ShowDialog() == DialogResult.OK) LoadSAV(sender, ofd.FileName); }