Add Title to some import dialog prompts

This commit is contained in:
Kurt
2025-07-06 09:02:44 -05:00
parent 89ada33e24
commit 082f9cb340
8 changed files with 18 additions and 6 deletions

View File

@@ -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.";

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}