Misc clean

replace Friendship control click to match shortcut description (used to
do nothing)
Remove some duplicate translation strings
fix gameselect string formatting
apparently systemsounds changed in a recent win10 update, Question is
now silent?? Exclamation is now the same as Asterisk (same as Beep?) Use
hand instead of Exclamation.
only use asterisk for notifications
This commit is contained in:
Kurt
2019-02-11 22:39:12 -08:00
parent 309633a214
commit e82b4de657
5 changed files with 12 additions and 12 deletions

View File

@@ -48,7 +48,6 @@ public static class MessageStrings
public static string MsgFileLoadFailAuto { get; set; } = "An error occurred while attempting to auto-load your save file.";
public static string MsgFileLoadFailAutoAdvise { get; set; } = "It is advised to manually remove bad filenames from the folder.";
public static string MsgFileLoadFailAutoCause { get; set; } = "This is likely caused by Homebrew creating invalid filenames.";
public static string MsgFileLoadVersionSelect { get; set; } = "Select version.";
public static string MsgFileLoadVersionDetect { get; set; } = "Generation {0} Save File detected.";
public static string MsgFileLoadEncrypted { get; set; } = "PKHeX only edits decrypted save files.";
public static string MsgFileLoadEncryptedFail { get; set; } = "This save file is not decrypted.";
@@ -57,7 +56,6 @@ public static class MessageStrings
public static string MsgFileLoadIncompatible { get; set; } = "Binary is not compatible with save file.";
public static string MsgFileLoadSaveFail { get; set; } = "The data file is not a valid save file.";
public static string MsgFileLoadSaveDetected { get; set; } = "Save File Detected.";
public static string MsgFileLoadSaveLoadFail { get; set; } = "Invalid save file loaded. Aborting.";
public static string MsgFileLoadSaveDetectReload { get; set; } = "Open save file from the following location?";
public static string MsgFileLoadSaveSelectVersion { get; set; } = "Select the version.";

View File

@@ -505,8 +505,8 @@ private void SetCountrySubRegion(ComboBox CB, string type)
// Prompted Updates of PKM //
private void ClickFriendship(object sender, EventArgs e)
{
if (ModifierKeys == Keys.Control) // prompt to reset
TB_Friendship.Text = pkm.CurrentFriendship.ToString();
if (ModifierKeys == Keys.Control) // clear
TB_Friendship.Text = "0";
else
TB_Friendship.Text = TB_Friendship.Text == "255" ? pkm.PersonalInfo.BaseFriendship.ToString() : "255";
}
@@ -643,6 +643,7 @@ private void ClickBall(object sender, EventArgs e)
}
frm.Controls.Add(flp);
frm.ShowDialog();
frm.Dispose();
}
private void ClickShinyLeaf(object sender, EventArgs e) => ShinyLeaf.CheckAll(ModifierKeys != Keys.Control);

View File

@@ -669,8 +669,7 @@ private static GameVersion SelectMemoryCardSaveGame(SAV3GCMemoryCard MC)
if (MC.HasXD) games.Add(new ComboItem { Text = MsgGameXD, Value = (int)GameVersion.XD });
if (MC.HasRSBOX) games.Add(new ComboItem { Text = MsgGameRSBOX, Value = (int)GameVersion.RSBOX });
WinFormsUtil.Alert(MsgFileLoadSaveMultiple, MsgFileLoadSaveSelectGame);
var dialog = new SAV_GameSelect(games);
var dialog = new SAV_GameSelect(games, MsgFileLoadSaveMultiple, MsgFileLoadSaveSelectGame);
dialog.ShowDialog();
return dialog.Result;
}
@@ -754,7 +753,7 @@ private bool OpenSAV(SaveFile sav, string path)
Menu_ShowdownExportParty.Visible = sav.HasParty;
Menu_ShowdownExportCurrentBox.Visible = sav.HasBox;
SystemSounds.Beep.Play();
SystemSounds.Asterisk.Play();
return true;
}
@@ -855,7 +854,8 @@ private static bool SanityCheckSAV(ref SaveFile sav)
{
var g = new[] { GameVersion.R, GameVersion.S, GameVersion.E, GameVersion.FR, GameVersion.LG };
var games = g.Select(z => GameInfo.VersionDataSource.First(v => v.Value == (int)z));
var dialog = new SAV_GameSelect(games, MsgFileLoadVersionDetect, MsgFileLoadVersionSelect);
var msg = string.Format(MsgFileLoadVersionDetect, $"3 ({s3.Version})");
var dialog = new SAV_GameSelect(games, msg, MsgFileLoadSaveSelectVersion);
dialog.ShowDialog();
sav = SaveUtil.GetG3SaveOverride(sav, dialog.Result);
@@ -868,10 +868,11 @@ private static bool SanityCheckSAV(ref SaveFile sav)
{
string fr = GameInfo.GetVersionName(GameVersion.FR);
string lg = GameInfo.GetVersionName(GameVersion.LG);
string dual = "{0}/{1} " + MsgFileLoadSaveDetected;
string dual = "{1}/{2} " + MsgFileLoadVersionDetect;
var g = new[] { GameVersion.FR, GameVersion.LG };
var games = g.Select(z => GameInfo.VersionDataSource.First(v => v.Value == (int)z));
var dialog = new SAV_GameSelect(games, string.Format(dual, fr, lg), MsgFileLoadSaveSelectVersion);
var msg = string.Format(dual, "3", fr, lg);
var dialog = new SAV_GameSelect(games, msg, MsgFileLoadSaveSelectVersion);
dialog.ShowDialog();
var pt = SaveUtil.GetG3Personal(dialog.Result);

View File

@@ -434,7 +434,7 @@ private void HexTextBox_TextChanged(object sender, EventArgs e)
editing = true;
((TextBox)sender).Text = t;
editing = false;
System.Media.SystemSounds.Beep.Play();
System.Media.SystemSounds.Asterisk.Play();
}
if (sender == TB_UsedFlags)
{

View File

@@ -61,7 +61,7 @@ internal static DialogResult Error(string friendlyMessage, Exception exception)
/// <returns>The <see cref="DialogResult"/> associated with the dialog.</returns>
internal static DialogResult Error(params string[] lines)
{
System.Media.SystemSounds.Exclamation.Play();
System.Media.SystemSounds.Hand.Play();
string msg = string.Join(Environment.NewLine + Environment.NewLine, lines);
return MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}