diff --git a/PKHeX.Core/Editing/Program/Settings/SoundSettings.cs b/PKHeX.Core/Editing/Program/Settings/SoundSettings.cs
index 57cae2813..aedc16b6d 100644
--- a/PKHeX.Core/Editing/Program/Settings/SoundSettings.cs
+++ b/PKHeX.Core/Editing/Program/Settings/SoundSettings.cs
@@ -4,6 +4,10 @@ public sealed class SoundSettings
{
[LocalizedDescription("Play Sound when loading a new Save File")]
public bool PlaySoundSAVLoad { get; set; } = true;
+
[LocalizedDescription("Play Sound when popping up Legality Report")]
public bool PlaySoundLegalityCheck { get; set; } = true;
+
+ [LocalizedDescription("Play Sound when performing any other action that would be reasonable to sound alert.")]
+ public bool PlaySoundOther { get; set; } = true;
}
diff --git a/PKHeX.Drawing.PokeSprite/Util/TypeColor.cs b/PKHeX.Drawing.PokeSprite/Util/TypeColor.cs
index 1ae55d861..372e5f615 100644
--- a/PKHeX.Drawing.PokeSprite/Util/TypeColor.cs
+++ b/PKHeX.Drawing.PokeSprite/Util/TypeColor.cs
@@ -11,35 +11,73 @@ namespace PKHeX.Drawing.PokeSprite;
public static class TypeColor
{
///
- /// Gets the color of a .
+ /// Gets the color of a , based on mainline sprite colors.
///
/// Type to get the color of.
/// Color of the type.
///
- public static Color GetTypeSpriteColor(byte type) => ((MoveType)type).GetTypeSpriteColor();
+ public static Color GetTypeSpriteColor(byte type)
+ => ((MoveType)type).GetTypeSpriteColor();
- public static Color GetTypeSpriteColor(this MoveType type) => type switch
+ ///
+ /// Gets the color of a , based on mainline sprite colors.
+ ///
+ /// Type to get the color of.
+ /// Color of the type.
+ ///
+ public static Color GetTypeSpriteColorChampions(byte type)
+ => ((MoveType)type).GetTypeSpriteColorChampions();
+
+ extension(MoveType type)
{
- Normal => Color.FromArgb(159, 161, 159),
- Fighting => Color.FromArgb(255, 128, 000),
- Flying => Color.FromArgb(129, 185, 239),
- Poison => Color.FromArgb(143, 065, 203),
- Ground => Color.FromArgb(145, 081, 033),
- Rock => Color.FromArgb(175, 169, 129),
- Bug => Color.FromArgb(145, 161, 025),
- Ghost => Color.FromArgb(112, 065, 112),
- Steel => Color.FromArgb(096, 161, 184),
- Fire => Color.FromArgb(230, 040, 041),
- Water => Color.FromArgb(041, 128, 239),
- Grass => Color.FromArgb(063, 161, 041),
- Electric => Color.FromArgb(250, 192, 000),
- Psychic => Color.FromArgb(239, 065, 121),
- Ice => Color.FromArgb(063, 216, 255),
- Dragon => Color.FromArgb(080, 097, 225),
- Dark => Color.FromArgb(080, 065, 063),
- Fairy => Color.FromArgb(239, 113, 239),
- _ => throw new ArgumentOutOfRangeException(nameof(type), type, null),
- };
+ ///
+ public Color GetTypeSpriteColor() => type switch
+ {
+ Normal => Color.FromArgb(159, 161, 159),
+ Fighting => Color.FromArgb(255, 128, 000),
+ Flying => Color.FromArgb(129, 185, 239),
+ Poison => Color.FromArgb(143, 065, 203),
+ Ground => Color.FromArgb(145, 081, 033),
+ Rock => Color.FromArgb(175, 169, 129),
+ Bug => Color.FromArgb(145, 161, 025),
+ Ghost => Color.FromArgb(112, 065, 112),
+ Steel => Color.FromArgb(096, 161, 184),
+ Fire => Color.FromArgb(230, 040, 041),
+ Water => Color.FromArgb(041, 128, 239),
+ Grass => Color.FromArgb(063, 161, 041),
+ Electric => Color.FromArgb(250, 192, 000),
+ Psychic => Color.FromArgb(239, 065, 121),
+ Ice => Color.FromArgb(063, 216, 255),
+ Dragon => Color.FromArgb(080, 097, 225),
+ Dark => Color.FromArgb(080, 065, 063),
+ Fairy => Color.FromArgb(239, 113, 239),
+ _ => throw new ArgumentOutOfRangeException(nameof(type), type, null),
+ };
+
+ ///
+ public Color GetTypeSpriteColorChampions() => type switch
+ {
+ Normal => Color.FromArgb(0x99, 0x99, 0x99),
+ Fighting => Color.FromArgb(0xff, 0xa2, 0x02),
+ Flying => Color.FromArgb(0x95, 0xc9, 0xff),
+ Poison => Color.FromArgb(0x99, 0x4d, 0xcf),
+ Ground => Color.FromArgb(0xab, 0x79, 0x39),
+ Rock => Color.FromArgb(0xbc, 0xb8, 0x89),
+ Bug => Color.FromArgb(0x9f, 0xa4, 0x24),
+ Ghost => Color.FromArgb(0x6e, 0x45, 0x70),
+ Steel => Color.FromArgb(0x6a, 0xae, 0xd3),
+ Fire => Color.FromArgb(0xff, 0x61, 0x2c),
+ Water => Color.FromArgb(0x29, 0x92, 0xff),
+ Grass => Color.FromArgb(0x42, 0xbf, 0x24),
+ Electric => Color.FromArgb(0xff, 0xdb, 0x00),
+ Psychic => Color.FromArgb(0xff, 0x63, 0x7f),
+ Ice => Color.FromArgb(0x42, 0xd8, 0xff),
+ Dragon => Color.FromArgb(0x54, 0x62, 0xd6),
+ Dark => Color.FromArgb(0x4f, 0x47, 0x47),
+ Fairy => Color.FromArgb(0xff, 0xb1, 0xff),
+ _ => throw new ArgumentOutOfRangeException(nameof(type), type, null),
+ };
+ }
///
/// Color to show for a of .
diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs
index ce3305c4f..de342aa2e 100644
--- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs
+++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs
@@ -249,7 +249,7 @@ public bool EditsComplete
if (ModifierKeys == (Keys.Control | Keys.Shift | Keys.Alt))
return true; // Override
- System.Media.SystemSounds.Exclamation.Play();
+ WinFormsUtil.Exclamation();
return false;
}
}
diff --git a/PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs b/PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs
index cea92ad59..f8f9f6ff2 100644
--- a/PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs
+++ b/PKHeX.WinForms/Controls/SAV Editor/BoxEditor.cs
@@ -373,13 +373,13 @@ public void SeekNext(Func searchFilter, bool reverse = false)
if (!SearchUtil.TrySeekNext(SAV, searchFilter, out var result, box, slot, reverse))
{
// Not found
- System.Media.SystemSounds.Exclamation.Play();
+ WinFormsUtil.Exclamation();
return;
}
CurrentBox = result.Box;
BoxPokeGrid.Entries[result.Slot].Focus();
_lastSearchResult = result;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.cs b/PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.cs
index 23dd58189..dd22b61b9 100644
--- a/PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.cs
+++ b/PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.cs
@@ -40,7 +40,7 @@ private void ClickView(object sender, EventArgs e)
{
var info = GetSenderInfo(sender);
if (info.IsEmpty())
- { System.Media.SystemSounds.Asterisk.Play(); return; }
+ { WinFormsUtil.Asterisk(); return; }
Manager.Hover.Stop();
var pk = Editor.Slots.Get(info.Slot);
@@ -80,7 +80,7 @@ private void ClickDelete(object sender, EventArgs e)
{
var info = GetSenderInfo(sender);
if (info.IsEmpty())
- { System.Media.SystemSounds.Asterisk.Play(); return; }
+ { WinFormsUtil.Asterisk(); return; }
var sav = info.View.SAV;
var pk = sav.BlankPKM;
diff --git a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs
index fd0d46773..ee104ed3d 100644
--- a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs
+++ b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs
@@ -475,7 +475,7 @@ public void FinishBoxManipulation(string message, bool all, int count)
if (!string.IsNullOrWhiteSpace(message))
WinFormsUtil.Alert(message + $" ({count})");
else
- SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void ClickBoxDouble(object sender, MouseEventArgs e)
@@ -969,7 +969,7 @@ private void ClickVerifyStoredEntities(object sender, EventArgs e)
var localization = LegalityLocalizationSet.GetLocalization(Main.CurrentLanguage);
var msg = bulk.Report(localization);
WinFormsUtil.SetClipboardText(msg);
- SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
// File I/O
diff --git a/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs b/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs
index 403a23511..e16442457 100644
--- a/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs
+++ b/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs
@@ -142,7 +142,7 @@ public void DragDrop(object? sender, DragEventArgs e)
var info = GetSlotInfo(pb);
if (!info.CanWriteTo() || Drag.Info.Source?.CanWriteTo() == false)
{
- SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
e.Effect = DragDropEffects.Copy;
Drag.Reset();
return;
diff --git a/PKHeX.WinForms/MainWindow/Main.cs b/PKHeX.WinForms/MainWindow/Main.cs
index 4bc9c8889..64af758cd 100644
--- a/PKHeX.WinForms/MainWindow/Main.cs
+++ b/PKHeX.WinForms/MainWindow/Main.cs
@@ -373,6 +373,7 @@ private void ReloadProgramSettings(PKHeXSettings settings, bool skipCore = false
}
SpriteBuilder.LoadSettings(settings.Sprite);
WinFormsUtil.AddSaveFileExtensions(settings.Backup.OtherSaveFileExtensions);
+ WinFormsUtil.Quiet = !settings.Sounds.PlaySoundOther;
}
private void MainMenuBoxLoad(object sender, EventArgs e)
@@ -503,7 +504,7 @@ private void OpenQuick(string path)
{
if (!CanFocus)
{
- SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
return;
}
OpenFromPath(path);
@@ -1075,12 +1076,12 @@ private void ExportQRFromTabs()
private void ClickLegality(object? sender, EventArgs e)
{
if (!PKME_Tabs.EditsComplete)
- { SystemSounds.Hand.Play(); return; }
+ { WinFormsUtil.Hand();return; }
var pk = PreparePKM();
if (pk.Species == 0 || !pk.ChecksumValid)
- { SystemSounds.Hand.Play(); return; }
+ { WinFormsUtil.Hand(); return; }
var la = new LegalityAnalysis(pk, C_SAV.SAV.Personal);
PKME_Tabs.UpdateLegality(la);
@@ -1132,7 +1133,7 @@ private void DisplayLegalityReport(LegalityAnalysis la)
var enc = la.EncounterOriginal.GetTextLines(Settings.Display.ExportLegalityVerboseProperties);
var msg = verboseReport + Environment.NewLine + Environment.NewLine + string.Join(Environment.NewLine, enc);
WinFormsUtil.SetClipboardText(msg);
- SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
};
page.Buttons.Add(clipboard);
}
diff --git a/PKHeX.WinForms/Subforms/BoxExporter.cs b/PKHeX.WinForms/Subforms/BoxExporter.cs
index 3e67b0750..de48e2e55 100644
--- a/PKHeX.WinForms/Subforms/BoxExporter.cs
+++ b/PKHeX.WinForms/Subforms/BoxExporter.cs
@@ -46,7 +46,7 @@ private void B_Export_Click(object sender, EventArgs e)
int ctr = BoxExport.Export(SAV, folder, namer, settings);
if (settings.Notify == BoxExportNofify.Silent)
{
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
return;
}
diff --git a/PKHeX.WinForms/Subforms/EntitySearchSetup.cs b/PKHeX.WinForms/Subforms/EntitySearchSetup.cs
index 4318dde56..65e262866 100644
--- a/PKHeX.WinForms/Subforms/EntitySearchSetup.cs
+++ b/PKHeX.WinForms/Subforms/EntitySearchSetup.cs
@@ -108,13 +108,13 @@ private void B_Search_Click(object? sender, EventArgs e)
SearchFilter = UC_EntitySearch.GetFilter(RTB_Instructions.Text);
SearchRequested?.Invoke(this, EventArgs.Empty);
B_Next.Visible = B_Previous.Visible = true;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Reset_Click(object? sender, EventArgs e)
{
ForceReset();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Add_Click(object? sender, EventArgs e)
diff --git a/PKHeX.WinForms/Subforms/SAV_Database.cs b/PKHeX.WinForms/Subforms/SAV_Database.cs
index 3a9ae512d..dc98cc00a 100644
--- a/PKHeX.WinForms/Subforms/SAV_Database.cs
+++ b/PKHeX.WinForms/Subforms/SAV_Database.cs
@@ -175,7 +175,7 @@ private void ClickView(object sender, EventArgs e)
int index = PKXBOXES.IndexOf(pb);
if (!GetShiftedIndex(ref index))
{
- System.Media.SystemSounds.Exclamation.Play();
+ WinFormsUtil.Exclamation();
return;
}
@@ -207,7 +207,7 @@ private void ClickDelete(object sender, EventArgs e)
int index = PKXBOXES.IndexOf(pb);
if (!GetShiftedIndex(ref index))
{
- System.Media.SystemSounds.Exclamation.Play();
+ WinFormsUtil.Exclamation();
return;
}
@@ -243,7 +243,7 @@ private void ClickDelete(object sender, EventArgs e)
L_Count.Text = string.Format(Counter, Results.Count);
slotSelected = -1;
FillPKXBoxes(SCR_Box.Value);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void ClickSet(object sender, EventArgs e)
@@ -296,7 +296,7 @@ private void ResetFilters(object sender, EventArgs e)
RTB_Instructions.Clear();
if (sender != this)
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void GenerateDBReport(object sender, EventArgs e)
@@ -534,7 +534,7 @@ private async void B_Search_Click(object sender, EventArgs e)
WinFormsUtil.Alert(MsgDBSearchNone);
}
SetResults(results); // updates Count Label as well.
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_Search.Enabled = true;
}
catch
diff --git a/PKHeX.WinForms/Subforms/SAV_Encounters.cs b/PKHeX.WinForms/Subforms/SAV_Encounters.cs
index 541583fe8..ceb2c3be5 100644
--- a/PKHeX.WinForms/Subforms/SAV_Encounters.cs
+++ b/PKHeX.WinForms/Subforms/SAV_Encounters.cs
@@ -133,13 +133,13 @@ private void PG_Criteria_PropertyValueChanged(object s, PropertyValueChangedEven
private void CriteriaReset_Click(object? sender, EventArgs e)
{
UpdateCriteriaPropertyGrid(EncounterCriteria.Unrestricted);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void CriteriaFromTabs_Click(object? sender, EventArgs e)
{
UpdateCriteriaPropertyGrid(BuildCriteriaFromTabs());
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private EncounterCriteria BuildCriteriaFromTabs()
@@ -211,13 +211,13 @@ private void ClickView(object sender, EventArgs e)
int index = PKXBOXES.IndexOf(pb);
if (index >= RES_MAX)
{
- System.Media.SystemSounds.Exclamation.Play();
+ WinFormsUtil.Exclamation();
return;
}
index += SCR_Box.Value * RES_MIN;
if (index >= Results.Count)
{
- System.Media.SystemSounds.Exclamation.Play();
+ WinFormsUtil.Exclamation();
return;
}
@@ -304,7 +304,7 @@ private void ResetFilters(object sender, EventArgs e)
foreach (var chk in TypeFilters.Controls.OfType())
chk.Checked = true;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
protected override void OnShown(EventArgs e)
@@ -482,7 +482,7 @@ private async void B_Search_Click(object sender, EventArgs e)
WinFormsUtil.Alert(MsgDBSearchNone);
SetResults(results); // updates Count Label as well.
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_Search.Enabled = true;
EncounterMovesetGenerator.ResetFilters();
}
diff --git a/PKHeX.WinForms/Subforms/SAV_MysteryGiftDB.cs b/PKHeX.WinForms/Subforms/SAV_MysteryGiftDB.cs
index 4825dadea..ae385fe07 100644
--- a/PKHeX.WinForms/Subforms/SAV_MysteryGiftDB.cs
+++ b/PKHeX.WinForms/Subforms/SAV_MysteryGiftDB.cs
@@ -196,13 +196,13 @@ private int GetSenderIndex(object sender)
int index = PKXBOXES.IndexOf(pb);
if (index >= RES_MAX)
{
- System.Media.SystemSounds.Exclamation.Play();
+ WinFormsUtil.Exclamation();
return -1;
}
index += SCR_Box.Value * RES_MIN;
if (index >= Results.Count)
{
- System.Media.SystemSounds.Exclamation.Play();
+ WinFormsUtil.Exclamation();
return -1;
}
return index;
@@ -252,7 +252,7 @@ private void ResetFilters(object sender, EventArgs e)
RTB_Instructions.Clear();
if (sender != this)
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void LoadDatabase()
@@ -368,7 +368,7 @@ private void B_Search_Click(object sender, EventArgs e)
WinFormsUtil.Alert(MsgDBSearchNone);
SetResults([..results]); // updates Count Label as well.
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void UpdateScroll(object sender, ScrollEventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen2/SAV_Misc2.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen2/SAV_Misc2.cs
index 86d570958..02acb0fdd 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen2/SAV_Misc2.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen2/SAV_Misc2.cs
@@ -33,6 +33,6 @@ private void B_VirtualConsoleGSBall_Click(object sender, EventArgs e)
// Can be moved between VC and GB era, and can be a quick way to enable the event on either.
SAV.EnableGSBallMobileEvent();
B_VirtualConsoleGSBall.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_HallOfFame3.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_HallOfFame3.cs
index 8e71d35f6..ef2314d82 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_HallOfFame3.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_HallOfFame3.cs
@@ -181,6 +181,6 @@ private void B_ImportParty_Click(object sender, EventArgs e)
}
UpdateSprite();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_RTC3.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_RTC3.cs
index 649af5b6e..b3fa74cf4 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_RTC3.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_RTC3.cs
@@ -71,12 +71,12 @@ private void B_Reset_Click(object sender, EventArgs e)
{
NUD_IDay.Value = NUD_IHour.Value = NUD_IMinute.Value = NUD_ISecond.Value = 0;
NUD_EDay.Value = NUD_EHour.Value = NUD_EMinute.Value = NUD_ESecond.Value = 0;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_BerryFix_Click(object sender, EventArgs e)
{
NUD_EDay.Value = Math.Max((2 * 366) + 2, NUD_EDay.Value); // advance
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_SecretBase3.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_SecretBase3.cs
index 4ae4f3792..a4d49db5d 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_SecretBase3.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen3/SAV_SecretBase3.cs
@@ -208,7 +208,7 @@ private void B_UpdateTrainer_Click(object sender, EventArgs e)
secret.RegistryStatus = CHK_Registered.Checked ? 1 : 0;
LB_Bases.DisplayMember = null!;
LB_Bases.DisplayMember = nameof(SecretBase3.OriginalTrainerName);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_UpdatePKM_Click(object sender, EventArgs e)
@@ -226,7 +226,7 @@ private void B_UpdatePKM_Click(object sender, EventArgs e)
pkm.Level = Convert.ToByte(NUD_Level.Value);
pkm.EVAll = Convert.ToByte(NUD_EVs.Value);
secret.Team = pkmteam; // save changes
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Cancel_Click(object sender, EventArgs e) => Close();
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen4/PokeGear4Editor.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen4/PokeGear4Editor.cs
index bf2f86946..d2f446318 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen4/PokeGear4Editor.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen4/PokeGear4Editor.cs
@@ -28,21 +28,21 @@ private void B_GiveAll_Click(object sender, EventArgs e)
{
SAV.PokeGearUnlockAllCallers();
RefreshList();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_GiveAllNoTrainers_Click(object sender, EventArgs e)
{
SAV.PokeGearUnlockAllCallersNoTrainers();
RefreshList();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_DeleteAll_Click(object sender, EventArgs e)
{
SAV.PokeGearClearAllCallers();
RefreshList();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void PG_Rolodex_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_BattlePass.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_BattlePass.cs
index ead517441..5a537e312 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_BattlePass.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_BattlePass.cs
@@ -264,7 +264,7 @@ private void ClickSet(object sender, EventArgs e)
return;
PKM pk = View.PreparePKM();
if (pk.Species == 0)
- { System.Media.SystemSounds.Asterisk.Play(); return; }
+ { WinFormsUtil.Asterisk(); return; }
var index = GetSenderIndex(sender);
var sav = SAV;
@@ -298,7 +298,7 @@ private void ClickDelete(object sender, EventArgs e)
var index = GetSenderIndex(sender);
var pk = CurrentPass.GetPartySlotAtIndex(index);
if (pk.Species == 0)
- { System.Media.SystemSounds.Asterisk.Play(); return; }
+ { WinFormsUtil.Asterisk(); return; }
SaveCurrent(CurrentPass);
CurrentPass.DeletePartySlot(index);
@@ -576,7 +576,7 @@ private void B_Import_Click(object sender, EventArgs e)
data.CopyTo(CurrentPass.Data);
LoadCurrent(CurrentPass);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Export_Click(object sender, EventArgs e)
@@ -611,7 +611,7 @@ private void SwapSlots(bool down)
var other = index + (down ? 1 : -1);
if ((uint)other >= LB_Passes.Items.Count)
{
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
return;
}
SaveCurrent(CurrentPass);
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs
index a6240459e..30c397895 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs
@@ -281,7 +281,7 @@ private void B_GiveAll_Click(object sender, EventArgs e)
// foreach (CheckBox c in Apps) c.Checked = true;
for (int i = 0; i < CLB_Poketch.Items.Count; i++)
CLB_Poketch.SetItemChecked(i, true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void TAB_Poketch_DragEnter(object? sender, DragEventArgs? e)
@@ -800,7 +800,7 @@ private void OnBAllSealsLegalOnClick(object sender, EventArgs e)
{
bool setUnreleasedIndexes = sender == B_AllSealsIllegal;
SetAllSeals(setUnreleasedIndexes);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
#endregion
@@ -872,7 +872,7 @@ private void OnBAllAccessoriesLegalOnClick(object sender, EventArgs e)
{
bool setUnreleasedIndexes = sender == B_AllAccessoriesIllegal;
SetAllAccessories(setUnreleasedIndexes);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
#endregion
@@ -946,7 +946,7 @@ private void OnBAllBackdropsLegalOnClick(object sender, EventArgs e)
{
bool setUnreleasedIndexes = sender == B_AllBackdropsIllegal;
SetAllBackdrops(setUnreleasedIndexes);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
#endregion
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Pokedex4.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Pokedex4.cs
index acf7af6e9..ce8c9a8e9 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Pokedex4.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Pokedex4.cs
@@ -244,7 +244,7 @@ private void ModifyAll(object sender, EventArgs e)
SAV.Dex.ModifyAll(i, args, lang);
GetEntry();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void CHK_Seen_CheckedChanged(object sender, EventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_DLC5.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_DLC5.cs
index f00b05a12..179773840 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_DLC5.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_DLC5.cs
@@ -163,7 +163,7 @@ private bool ImportFile(string extension, string name, int expectSize, out byte[
if (data.Length == otherSize)
Array.Resize(ref data, expectSize);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
LastImportedFile = ofd.FileName;
return true;
}
@@ -233,7 +233,7 @@ private void B_ImportPNGCGear_Click(object sender, EventArgs e)
PB_CGearBackground.Image = CGearImage.GetBitmap(bg); // regenerate rather than reuse input
B_ExportCGB.Enabled = B_ExportPNG.Enabled = true;
if (CheckResult(result, out msg))
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
else
WinFormsUtil.Alert(msg);
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Misc5.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Misc5.cs
index 11cfc1d1d..c1ad6ea9d 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Misc5.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Misc5.cs
@@ -631,7 +631,7 @@ private void B_RandForest_Click(object sender, EventArgs e)
ChangeArea(this, EventArgs.Empty); // refresh
NUD_Unlocked.Value = 8;
CHK_Area9.Checked = true;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private static List GetGenderChoices(ushort species)
@@ -922,7 +922,7 @@ private void B_ObtainAllMedals_Click(object sender, EventArgs e)
{
var now = EncounterDate.GetDateNDS();
b2w2.Medals.ObtainAll(now, unread: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
@@ -988,6 +988,6 @@ private void B_UnlockAllProps_Click(object sender, EventArgs e)
{
SAV.Musical.UnlockAllMusicalProps();
B_UnlockAllProps.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Pokedex5.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Pokedex5.cs
index ff97ef818..e12df9697 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Pokedex5.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen5/SAV_Pokedex5.cs
@@ -240,7 +240,7 @@ private void B_GiveAll_Click(object sender, EventArgs e)
var language = (LanguageID)SAV.Language;
Dex.GiveAll(species, ModifierKeys != Keys.Alt, ModifierKeys.HasFlag(Keys.Shift), language, ModifierKeys.HasFlag(Keys.Control));
GetEntry(skipFormRepop: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Modify_Click(object sender, EventArgs e)
@@ -262,7 +262,7 @@ private void ModifyAll(object sender, EventArgs e)
if (sender == mnuCaughtAll || sender == mnuComplete)
Dex.CaughtAll(language, allLanguages: ModifierKeys.HasFlag(Keys.Control));
GetEntry(skipFormRepop: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void UpdateDisplayedForm(object sender, ItemCheckEventArgs e)
@@ -299,6 +299,6 @@ private void ModifyAllForms(object sender, EventArgs e)
else if (sender == mnuFormAll)
Dex.SetFormsSeen(shinyToo: ModifierKeys.HasFlag(Keys.Shift));
GetEntry(skipFormRepop: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs
index 6bab5dcd4..2beac6f1b 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs
@@ -233,7 +233,7 @@ private void MoveBox(object sender, EventArgs e)
editing = renamingBox = true;
if (!MoveItem(dir))
{
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
else if (!SAV.SwapBox(index, index + dir)) // valid but locked
{
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs
index 6eda9f55b..af1c8bf23 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexORAS.cs
@@ -235,7 +235,7 @@ private void B_GiveAll_Click(object sender, EventArgs e)
var language = (LanguageID)SAV.Language;
Zukan.GiveAll(species, ModifierKeys != Keys.Alt, ModifierKeys.HasFlag(Keys.Shift), language, ModifierKeys.HasFlag(Keys.Control));
GetEntry(skipFormRepop: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
if (Zukan.GetCaught(species) && Zukan.GetCountSeen(species) == 0)
MT_Seen.Text = 1.ToString();
@@ -273,7 +273,7 @@ private void ModifyAll(object sender, EventArgs e)
if (sender == mnuCaughtAll || sender == mnuComplete)
Zukan.CaughtAll(language, allLanguages: ModifierKeys.HasFlag(Keys.Control));
GetEntry(skipFormRepop: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void UpdateDisplayedForm(object sender, ItemCheckEventArgs e)
@@ -309,6 +309,6 @@ private void ModifyAllForms(object sender, EventArgs e)
else if (sender == mnuFormAll)
Zukan.SetFormsSeen(shinyToo: ModifierKeys.HasFlag(Keys.Shift));
GetEntry(skipFormRepop: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs
index 1305a820b..e677f79a0 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_PokedexXY.cs
@@ -239,7 +239,7 @@ private void B_GiveAll_Click(object sender, EventArgs e)
var language = (LanguageID)SAV.Language;
Zukan.GiveAll(species, ModifierKeys != Keys.Alt, ModifierKeys.HasFlag(Keys.Shift), language, ModifierKeys.HasFlag(Keys.Control));
GetEntry(skipFormRepop: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Modify_Click(object sender, EventArgs e)
@@ -261,7 +261,7 @@ private void ModifyAll(object sender, EventArgs e)
if (sender == mnuCaughtAll || sender == mnuComplete)
Zukan.CaughtAll(language, allLanguages: ModifierKeys.HasFlag(Keys.Control));
GetEntry(skipFormRepop: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void UpdateDisplayedForm(object sender, ItemCheckEventArgs e)
@@ -298,6 +298,6 @@ private void ModifyAllForms(object sender, EventArgs e)
else if (sender == mnuFormAll)
Zukan.SetFormsSeen(shinyToo: ModifierKeys.HasFlag(Keys.Shift));
GetEntry(skipFormRepop: true);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_SecretBase.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_SecretBase.cs
index 2624c9ef8..5802940df 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_SecretBase.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_SecretBase.cs
@@ -406,7 +406,7 @@ private void B_Import_Click(object sender, EventArgs e)
sb.Load(obj);
ReloadSecretBaseList();
LoadCurrent(sb);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Export_Click(object sender, EventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.cs
index e7da83480..47b68970b 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.cs
@@ -327,7 +327,7 @@ private void GiveAllAccessories(object sender, EventArgs e)
if (SAV is SAV6XY xy)
{
xy.Blocks.Fashion.UnlockAllAccessories();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Capture7GG.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Capture7GG.cs
index d42dcaf89..7327c1433 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Capture7GG.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Capture7GG.cs
@@ -123,7 +123,7 @@ private void B_Modify_Click(object sender, EventArgs e)
Captured.SetAllTransferred((uint)NUD_SpeciesTransferred.Value, Dex);
GetEntry();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_SumTotal_Click(object sender, EventArgs e)
@@ -131,7 +131,7 @@ private void B_SumTotal_Click(object sender, EventArgs e)
SetEntry();
NUD_TotalCaptured.Value = Captured.CalculateTotalCaptured();
NUD_TotalTransferred.Value = Captured.CalculateTotalTransferred();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private static void ToggleMax(NumericUpDown nud) => nud.Value = (nud.Value != nud.Maximum) ? nud.Maximum : 0;
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_FestivalPlaza.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_FestivalPlaza.cs
index 862cad94e..f86bf21d0 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_FestivalPlaza.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_FestivalPlaza.cs
@@ -474,7 +474,7 @@ private void HexTextBox_TextChanged(object sender, EventArgs e)
editing = true;
((TextBox)sender).Text = t;
editing = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
if (sender == TB_UsedFlags)
{
@@ -765,6 +765,6 @@ private void B_AgentGlass_Click(object sender, EventArgs e)
return;
SAV.Fashion.GiveAgentSunglasses();
B_AgentGlass.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Pokebean.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Pokebean.cs
index 893f862ea..def0b63e7 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Pokebean.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Pokebean.cs
@@ -62,14 +62,14 @@ private void B_All_Click(object sender, EventArgs e)
{
SAV.ResortSave.FillBeans();
LoadValues();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_None_Click(object sender, EventArgs e)
{
SAV.ResortSave.ClearBeans();
LoadValues();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Save_Click(object sender, EventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexGG.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexGG.cs
index 9bc727fc7..921ce7c64 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexGG.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexGG.cs
@@ -377,7 +377,7 @@ private void ModifyAll(object sender, EventArgs e)
GetEntry();
allModifying = false;
LB_Species.SelectedIndex = 0;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void ClearAll(object sender)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs
index af9b02066..bbcb48a03 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_PokedexSM.cs
@@ -298,7 +298,7 @@ private void ModifyAll(object sender, EventArgs e)
allModifying = false;
LB_Forms.Enabled = LB_Forms.Visible = true;
LB_Species.SelectedIndex = 0;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void ClearAll(object sender)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs
index 024a0cf91..4d477216b 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7.cs
@@ -552,7 +552,7 @@ private void B_Fashion_Click(object sender, EventArgs e)
default:
return;
}
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private string? UpdateTip(int index)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs
index 7774fff5b..ca8d17603 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_Trainer7GG.cs
@@ -191,7 +191,7 @@ private void B_ExportGoSummary_Click(object sender, EventArgs e)
return;
}
WinFormsUtil.SetClipboardText(string.Join(Environment.NewLine, summary));
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_ExportGoFiles_Click(object sender, EventArgs e)
@@ -296,7 +296,7 @@ private void B_ImportGoFiles_Click(object sender, EventArgs e)
ctr++;
}
UpdateGoSummary((int)NUD_GoIndex.Value);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void NUD_GoIndex_ValueChanged(object sender, EventArgs e) => UpdateGoSummary((int)NUD_GoIndex.Value);
@@ -321,7 +321,7 @@ private void B_DeleteAll_Click(object sender, EventArgs e)
Park.DeleteAll();
UpdateGoSummary((int)NUD_GoIndex.Value);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_DeleteGo_Click(object sender, EventArgs e)
@@ -331,19 +331,19 @@ private void B_DeleteGo_Click(object sender, EventArgs e)
index = Math.Clamp(index, 0, max);
Park[index] = new GP1();
UpdateGoSummary((int)NUD_GoIndex.Value);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_AllTrainerTitles_Click(object sender, EventArgs e)
{
SAV.Blocks.EventWork.UnlockAllTitleFlags();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_AllFashionItems_Click(object sender, EventArgs e)
{
SAV.Blocks.FashionPlayer.UnlockAllAccessoriesPlayer();
SAV.Blocks.FashionStarter.UnlockAllAccessoriesStarter();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.cs
index f92b402d0..733e08ebd 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_ZygardeCell.cs
@@ -82,7 +82,7 @@ private void B_GiveAll_Click(object sender, EventArgs e)
if (SAV is not SAV7USUM)
NUD_CellsTotal.Value += added;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
#region locations -- lazy
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.cs
index bf3619cb2..e1009c219 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Misc8b.cs
@@ -48,56 +48,56 @@ private void SaveMain()
private void B_Spiritomb_Click(object sender, EventArgs e)
{
Unlocker.UnlockSpiritomb();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_Spiritomb.Enabled = Unlocker.UnlockReadySpiritomb;
}
private void B_Shaymin_Click(object sender, EventArgs e)
{
Unlocker.UnlockShaymin();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_Shaymin.Enabled = Unlocker.UnlockReadyShaymin;
}
private void B_Darkrai_Click(object sender, EventArgs e)
{
Unlocker.UnlockDarkrai();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_Darkrai.Enabled = Unlocker.UnlockReadyDarkrai;
}
private void B_Arceus_Click(object sender, EventArgs e)
{
Unlocker.UnlockArceus();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_Arceus.Enabled = Unlocker.UnlockReadyArceus;
}
private void B_DialgaPalkia_Click(object sender, EventArgs e)
{
Unlocker.UnlockBoxLegend();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_DialgaPalkia.Enabled = Unlocker.UnlockReadyBoxLegend;
}
private void B_Roamer_Click(object sender, EventArgs e)
{
Unlocker.RespawnRoamer();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_Roamer.Enabled = Unlocker.ResetReadyRoamerMesprit || Unlocker.ResetReadyRoamerCresselia;
}
private void B_Zones_Click(object sender, EventArgs e)
{
Unlocker.UnlockZones();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_Zones.Enabled = false;
}
private void B_DefeatEyecatch_Click(object sender, EventArgs e)
{
SAV.BattleTrainer.DefeatAll();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_DefeatEyecatch.Enabled = false;
B_RebattleEyecatch.Enabled = true;
}
@@ -105,7 +105,7 @@ private void B_DefeatEyecatch_Click(object sender, EventArgs e)
private void B_RebattleEyecatch_Click(object sender, EventArgs e)
{
SAV.BattleTrainer.RebattleAll();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_RebattleEyecatch.Enabled = false;
B_DefeatEyecatch.Enabled = true;
}
@@ -113,7 +113,7 @@ private void B_RebattleEyecatch_Click(object sender, EventArgs e)
private void B_Fashion_Click(object sender, EventArgs e)
{
Unlocker.UnlockFashion();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
B_Fashion.Enabled = false;
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Poffin8b.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Poffin8b.cs
index b21436dd4..e548d005f 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Poffin8b.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Poffin8b.cs
@@ -212,7 +212,7 @@ private void B_All_Click(object sender, EventArgs e)
poffin.FlavorSpicy = poffin.FlavorBitter = poffin.FlavorDry = poffin.FlavorSour = poffin.FlavorSweet = 0xFF;
}
LoadItems(AllItems);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_None_Click(object sender, EventArgs e)
@@ -220,7 +220,7 @@ private void B_None_Click(object sender, EventArgs e)
foreach (var poffin in AllItems)
poffin.ToNull();
LoadItems(AllItems);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Save_Click(object sender, EventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexBDSP.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexBDSP.cs
index fa410d6fa..f27bc48e6 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexBDSP.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexBDSP.cs
@@ -182,7 +182,7 @@ private void ModifyAll(object sender, EventArgs e)
Zukan.CompleteDex(ModifierKeys == Keys.Control);
GetEntry();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void ModifyAllForms(object sender, EventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexLA.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexLA.cs
index b11224c65..31b5d2f8d 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexLA.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexLA.cs
@@ -471,7 +471,7 @@ private void B_Report_Click(object sender, EventArgs e)
GetEntry(lastIndex, lastForm);
ResumeLayout();
Editing = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_AdvancedResearch_Click(object sender, EventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexSWSH.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexSWSH.cs
index 627541baa..87124b7c0 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexSWSH.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_PokedexSWSH.cs
@@ -200,7 +200,7 @@ private void B_GiveAll_Click(object sender, EventArgs e)
bool shiny = ModifierKeys == Keys.Shift;
var species = Indexes[lastIndex].Species;
Dex.SetDexEntryAll(species, shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(lastIndex);
}
@@ -214,7 +214,7 @@ private void SeenNone(object sender, EventArgs e)
{
SetEntry(lastIndex);
Dex.SeenNone();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(lastIndex);
}
@@ -223,7 +223,7 @@ private void SeenAll(object sender, EventArgs e)
SetEntry(lastIndex);
bool shiny = ModifierKeys == Keys.Shift;
Dex.SeenAll(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(lastIndex);
}
@@ -231,7 +231,7 @@ private void CaughtNone(object sender, EventArgs e)
{
SetEntry(lastIndex);
Dex.CaughtNone();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(lastIndex);
}
@@ -240,7 +240,7 @@ private void CaughtAll(object sender, EventArgs e)
SetEntry(lastIndex);
bool shiny = ModifierKeys == Keys.Shift;
Dex.CaughtAll(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(lastIndex);
}
@@ -249,7 +249,7 @@ private void CompleteDex(object sender, EventArgs e)
SetEntry(lastIndex);
bool shiny = ModifierKeys == Keys.Shift;
Dex.CompleteDex(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(lastIndex);
}
@@ -257,7 +257,7 @@ private void ChangeAllCounts(object sender, EventArgs e)
{
SetEntry(lastIndex);
Dex.SetAllBattledCount((uint)NUD_Battled.Value);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(lastIndex);
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_SealStickers8b.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_SealStickers8b.cs
index ff5a9e52c..135ad57aa 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_SealStickers8b.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_SealStickers8b.cs
@@ -137,7 +137,7 @@ private void B_All_Click(object sender, EventArgs e)
cells[3].Value = total.ToString();
cells[4].Value = true;
}
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_None_Click(object sender, EventArgs e)
@@ -148,7 +148,7 @@ private void B_None_Click(object sender, EventArgs e)
cells[2].Value = cells[3].Value = 0.ToString();
cells[4].Value = false;
}
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Save_Click(object sender, EventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Trainer8.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Trainer8.cs
index a8a3b7288..a8084fbca 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Trainer8.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Trainer8.cs
@@ -258,14 +258,14 @@ private void ChangeTitleScreenIndex(object sender, EventArgs e)
private void B_CopyFromPartyToTrainerCard_Click(object sender, EventArgs e)
{
SAV.Blocks.TrainerCard.SetPartyData();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
ChangeTrainerCardIndex(this, EventArgs.Empty);
}
private void B_CopyFromPartyToTitleScreen_Click(object sender, EventArgs e)
{
SAV.Blocks.TitleScreen.SetPartyData();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
ChangeTitleScreenIndex(this, EventArgs.Empty);
}
@@ -307,7 +307,7 @@ private void B_Fashion_Click(object sender, EventArgs e)
default:
return;
}
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void ResetAppearance()
@@ -326,6 +326,6 @@ private void B_ResetAppearance_Click(object sender, EventArgs e)
private void B_GetAllDiglett_Click(object sender, EventArgs e)
{
SAV.UnlockAllDiglett();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Underground8b.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Underground8b.cs
index daf28bf53..d7ded6edb 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Underground8b.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_Underground8b.cs
@@ -140,7 +140,7 @@ private void B_All_Click(object sender, EventArgs e)
var item = AllItems[index];
cells[3].Value = item.MaxValue.ToString();
}
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_None_Click(object sender, EventArgs e)
@@ -152,7 +152,7 @@ private void B_None_Click(object sender, EventArgs e)
cells[4].Value = true;
cells[5].Value = false;
}
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Save_Click(object sender, EventArgs e)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Donut9a.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Donut9a.cs
index 9410f7945..2f988de74 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Donut9a.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Donut9a.cs
@@ -147,7 +147,7 @@ private void RandomizeAll(object sender, EventArgs e)
Donuts.SetAllRandomLv3();
ReloadDonutNames();
GetEntry(lastIndex);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void CloneCurrent(object sender, EventArgs e)
@@ -155,7 +155,7 @@ private void CloneCurrent(object sender, EventArgs e)
SetEntry(lastIndex);
Donuts.CloneAllFromIndex(lastIndex);
ReloadDonutNames();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void ShinyAssortment(object sender, EventArgs e)
@@ -163,7 +163,7 @@ private void ShinyAssortment(object sender, EventArgs e)
Donuts.SetAllAsShinyTemplate();
ReloadDonutNames();
GetEntry(lastIndex);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void GenerateRandom(object sender, EventArgs e)
@@ -178,7 +178,7 @@ internal void GenerateRandomDonuts(ReadOnlySpan flavorOptions, int start,
Donuts.SetRandomShinyTemplateRange(flavorOptions, start, end);
ReloadDonutNames();
GetEntry(lastIndex);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_Reset_Click(object sender, EventArgs e) => DonutEditor.Reset();
@@ -193,7 +193,7 @@ private void B_ImportClick(object sender, EventArgs e)
DonutEditor.LoadDonut(current);
DonutFlavorProfile.LoadFromDonut(current);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private static bool TryLoadDonut(Span data)
@@ -241,7 +241,7 @@ private void DragoutDrop(object? sender, DragEventArgs? e)
ImportDonutFromPath(data, files[0]);
DonutEditor.LoadDonut(current);
DonutFlavorProfile.LoadFromDonut(current);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
e.Effect = DragDropEffects.Copy;
Cursor = DefaultCursor;
@@ -277,7 +277,7 @@ private void B_Export_Click(object sender, EventArgs e)
foreach (var b in data)
sb.Append($"{b:X2} ");
Clipboard.SetText(sb.ToString().TrimEnd());
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
return;
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Fashion9.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Fashion9.cs
index d48570977..8d23d294c 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Fashion9.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Fashion9.cs
@@ -263,7 +263,7 @@ private void B_SetAllOwned_Click(object sender, EventArgs e)
var current = GetEditor(TC_Features.SelectedTab!);
current.SetAllOwned(state);
}
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
@@ -502,7 +502,7 @@ public void SetAllOwned(bool state)
FashionItem9a.ModifyAll(Block.Data, z => z.IsOwned = state);
Load();
Grid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void LoadItem(int index, FashionItem9a item)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Pokedex9a.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Pokedex9a.cs
index c2f058ad2..408bbc1bd 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Pokedex9a.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Pokedex9a.cs
@@ -319,7 +319,7 @@ private void B_GiveAll_Click(object sender, EventArgs e)
bool shiny = ModifierKeys == Keys.Shift;
var species = GetSpecies(lastIndex);
Dex.SetDexEntryAll(species, shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -334,7 +334,7 @@ private void SeenNone(object sender, EventArgs e)
var species = GetSpecies(lastIndex);
SetEntry(species);
Dex.SeenNone();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -344,7 +344,7 @@ private void SeenAll(object sender, EventArgs e)
SetEntry(species);
bool shiny = ModifierKeys == Keys.Shift;
Dex.SeenAll(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -353,7 +353,7 @@ private void CaughtNone(object sender, EventArgs e)
var species = GetSpecies(lastIndex);
SetEntry(species);
Dex.CaughtNone();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -363,7 +363,7 @@ private void CaughtAll(object sender, EventArgs e)
SetEntry(species);
bool shiny = ModifierKeys == Keys.Shift;
Dex.CaughtAll(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -373,7 +373,7 @@ private void CompleteDex(object sender, EventArgs e)
SetEntry(species);
bool shiny = ModifierKeys == Keys.Shift;
Dex.CompleteDex(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_PokedexSV.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_PokedexSV.cs
index cfc0a525f..7cf4cd918 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_PokedexSV.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_PokedexSV.cs
@@ -239,7 +239,7 @@ private void B_GiveAll_Click(object sender, EventArgs e)
bool shiny = ModifierKeys == Keys.Shift;
var species = GetSpecies(lastIndex);
Dex.SetDexEntryAll(species, shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -254,7 +254,7 @@ private void SeenNone(object sender, EventArgs e)
var species = GetSpecies(lastIndex);
SetEntry(species);
Dex.SeenNone();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -264,7 +264,7 @@ private void SeenAll(object sender, EventArgs e)
SetEntry(species);
bool shiny = ModifierKeys == Keys.Shift;
Dex.SeenAll(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -273,7 +273,7 @@ private void CaughtNone(object sender, EventArgs e)
var species = GetSpecies(lastIndex);
SetEntry(species);
Dex.CaughtNone();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -283,7 +283,7 @@ private void CaughtAll(object sender, EventArgs e)
SetEntry(species);
bool shiny = ModifierKeys == Keys.Shift;
Dex.CaughtAll(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -293,7 +293,7 @@ private void CompleteDex(object sender, EventArgs e)
SetEntry(species);
bool shiny = ModifierKeys == Keys.Shift;
Dex.CompleteDex(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_PokedexSVKitakami.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_PokedexSVKitakami.cs
index 05dc9b343..8525d35e3 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_PokedexSVKitakami.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_PokedexSVKitakami.cs
@@ -302,7 +302,7 @@ private void B_GiveAll_Click(object sender, EventArgs e)
bool shiny = ModifierKeys == Keys.Shift;
var species = GetSpecies(lastIndex);
Dex.SetDexEntryAll(species, shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -317,7 +317,7 @@ private void SeenNone(object sender, EventArgs e)
var species = GetSpecies(lastIndex);
SetEntry(species);
Dex.SeenNone();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -327,7 +327,7 @@ private void SeenAll(object sender, EventArgs e)
SetEntry(species);
bool shiny = ModifierKeys == Keys.Shift;
Dex.SeenAll(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -336,7 +336,7 @@ private void CaughtNone(object sender, EventArgs e)
var species = GetSpecies(lastIndex);
SetEntry(species);
Dex.CaughtNone();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -346,7 +346,7 @@ private void CaughtAll(object sender, EventArgs e)
SetEntry(species);
bool shiny = ModifierKeys == Keys.Shift;
Dex.CaughtAll(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
@@ -356,7 +356,7 @@ private void CompleteDex(object sender, EventArgs e)
SetEntry(species);
bool shiny = ModifierKeys == Keys.Shift;
Dex.CompleteDex(shiny);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
GetEntry(species);
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Raid9.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Raid9.cs
index 16273115c..d4fc61e29 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Raid9.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Raid9.cs
@@ -92,6 +92,6 @@ private void UpdateStringSeed(object? sender, EventArgs e)
private void B_CopyToOthers_Click(object sender, EventArgs e)
{
Raids.Propagate(CB_Raid.SelectedIndex, seedToo: ModifierKeys == Keys.Shift);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9.cs
index df0c0d21b..f83f6e7d6 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9.cs
@@ -218,7 +218,7 @@ private void B_UnlockFlyLocations_Click(object sender, EventArgs e)
block.ChangeBooleanType(SCTypeCode.Bool2);
}
B_UnlockFlyLocations.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private static ReadOnlySpan FlyHashes =>
@@ -343,28 +343,28 @@ private void B_CollectAllStakes_Click(object sender, EventArgs e)
{
SAV.CollectAllStakes();
B_CollectAllStakes.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_UnlockTMRecipes_Click(object sender, EventArgs e)
{
SAV.UnlockAllTMRecipes();
B_UnlockTMRecipes.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_ActivateSnacksworthLegendaries_Click(object sender, EventArgs e)
{
SAV.ActivateSnacksworthLegendaries();
B_ActivateSnacksworthLegendaries.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_UnlockCoaches_Click(object sender, EventArgs e)
{
SAV.UnlockAllCoaches();
B_UnlockCoaches.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_UnlockBikeUpgrades_Click(object sender, EventArgs e)
@@ -384,7 +384,7 @@ private void B_UnlockBikeUpgrades_Click(object sender, EventArgs e)
if (accessor.TryGetBlock("FSYS_RIDE_FLIGHT_ENABLE", out var fly))
fly.ChangeBooleanType(SCTypeCode.Bool2); // Base & DLC1 saves do not have this block
B_UnlockBikeUpgrades.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
public static void IMG_Save(Image image, string name)
@@ -405,7 +405,7 @@ public static void IMG_Save(Image image, string name)
_ => ImageFormat.Png,
};
image.Save(path, format);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void P_CurrPhoto_Click(object sender, EventArgs e) => IMG_Save(P_CurrPhoto.Image!, "current_photo");
@@ -417,13 +417,13 @@ private void B_UnlockClothing_Click(object sender, EventArgs e)
var accessor = SAV.Accessor;
PlayerFashionUnlock9.UnlockBase(accessor, SAV.Gender);
B_UnlockClothing.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void B_UnlockThrowStyles_Click(object sender, EventArgs e)
{
SAV.UnlockAllThrowStyles();
B_UnlockThrowStyles.Enabled = false;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9a.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9a.cs
index c6156190a..b1c2062d9 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9a.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9a.cs
@@ -241,7 +241,7 @@ private void B_CollectScrews_Click(object sender, EventArgs e)
if (ModifierKeys == (Keys.Alt | Keys.Control | Keys.Shift))
{
ColorfulScrew9a.SetAllScrews(SAV);
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
var itemName = GameInfo.Strings.Item[ColorfulScrew9a.ColorfulScrewItemIndex];
diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_BoxList.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_BoxList.cs
index 29b7f73dd..3aa3e1e13 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/SAV_BoxList.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_BoxList.cs
@@ -46,7 +46,7 @@ private void AddEvents()
DragDrop += (_, _) =>
{
Cursor = DefaultCursor;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
};
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_BoxViewer.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_BoxViewer.cs
index 60da5b479..518c1d7d0 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/SAV_BoxViewer.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_BoxViewer.cs
@@ -44,7 +44,7 @@ public SAV_BoxViewer(SAVEditor p, SlotChangeManager m, int box)
DragDrop += (_, _) =>
{
Cursor = DefaultCursor;
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
};
Owner = p.ParentForm;
Load += (_, _) => PositionRelativeToParent();
diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs
index fa2099c63..9a9f26431 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_Inventory.cs
@@ -392,7 +392,7 @@ private void GiveAllItems(object sender, EventArgs e)
}
ModifyPouch(CurrentPouch, p => p.GiveAllItems(Bag, items, (int)NUD_Count.Value));
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private static bool GetModifySettings(InventoryPouch pouch, out bool truncate, out bool shuffle)
diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_MailBox.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_MailBox.cs
index 4cc4b91c8..40361926c 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/SAV_MailBox.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_MailBox.cs
@@ -432,7 +432,7 @@ private DialogResult ModifyHeldItem()
var s = p.Select((pk, i) => ((sbyte)PKMNUDs[i].Value == entry) && ItemIsMail(pk.HeldItem) ? pk : null).ToArray();
if (s.All(v => v is null))
return ret;
- System.Media.SystemSounds.Question.Play();
+ WinFormsUtil.Question();
var msg = $"{s.Select((v, i) => v is null ? string.Empty : $"{Environment.NewLine} {PKMLabels[i].Text}: {PKMHeldItems[i].Text} -> {CB_MailType.Items[0]}").Aggregate($"Modify PKM's HeldItem?{Environment.NewLine}", (tmp, v) => $"{tmp}{v}")}{Environment.NewLine}{Environment.NewLine}Yes: Delete Mail & Modify PKM{Environment.NewLine}No: Delete Mail";
ret = WinFormsUtil.Prompt(MessageBoxButtons.YesNoCancel, msg);
if (ret != DialogResult.Yes)
@@ -580,7 +580,7 @@ private void SwapSlots(ListBox lb, bool down)
var otherIndex = index + (down ? 1 : -1);
if ((uint)otherIndex >= lb.Items.Count)
{
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
return;
}
diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.cs
index 251e4f3d6..686b50988 100644
--- a/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.cs
+++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.cs
@@ -761,7 +761,7 @@ private void B_ModifyAll_Click(object sender, EventArgs e)
foreach (var g in Album)
g.GiftUsed = sender == B_UsedAll;
SetGiftBoxes();
- System.Media.SystemSounds.Asterisk.Play();
+ WinFormsUtil.Asterisk();
}
private void LB_Received_KeyDown(object sender, KeyEventArgs e)
diff --git a/PKHeX.WinForms/Util/WinFormsUtil.cs b/PKHeX.WinForms/Util/WinFormsUtil.cs
index cb8243c43..a0198256c 100644
--- a/PKHeX.WinForms/Util/WinFormsUtil.cs
+++ b/PKHeX.WinForms/Util/WinFormsUtil.cs
@@ -5,6 +5,7 @@
using System.Globalization;
using System.IO;
using System.Linq;
+using System.Media;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
@@ -17,6 +18,19 @@ namespace PKHeX.WinForms;
public static class WinFormsUtil
{
+ internal static bool Quiet { get; set; }
+
+ private static void Sound(SystemSound sound)
+ {
+ if (!Quiet)
+ sound.Play();
+ }
+
+ internal static void Asterisk() => Sound(SystemSounds.Asterisk);
+ internal static void Hand() => Sound(SystemSounds.Hand);
+ internal static void Exclamation() => Sound(SystemSounds.Exclamation);
+ internal static void Question() => Sound(SystemSounds.Question);
+
internal static void TranslateInterface(Control form, string lang) => form.TranslateInterface(lang);
extension(Control child)
@@ -117,7 +131,7 @@ internal void HorizontallyCenter(Control parent)
/// The associated with the dialog.
internal static DialogResult Error(string friendlyMessage, Exception exception)
{
- System.Media.SystemSounds.Exclamation.Play();
+ Exclamation();
return ErrorWindow.ShowErrorDialog(friendlyMessage, exception, true);
}
@@ -128,24 +142,21 @@ internal static DialogResult Error(string friendlyMessage, Exception exception)
/// The associated with the dialog.
internal static DialogResult Error(params ReadOnlySpan lines)
{
- System.Media.SystemSounds.Hand.Play();
+ Hand();
string msg = string.Join(Environment.NewLine + Environment.NewLine, lines);
return MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
- internal static DialogResult Alert(params ReadOnlySpan lines) => Alert(true, lines);
-
- internal static DialogResult Alert(bool sound, params ReadOnlySpan lines)
+ internal static DialogResult Alert(params ReadOnlySpan lines)
{
- if (sound)
- System.Media.SystemSounds.Asterisk.Play();
+ Asterisk();
string msg = string.Join(Environment.NewLine + Environment.NewLine, lines);
- return MessageBox.Show(msg, "Alert", MessageBoxButtons.OK, sound ? MessageBoxIcon.Information : MessageBoxIcon.None);
+ return MessageBox.Show(msg, "Alert", MessageBoxButtons.OK, Quiet ? MessageBoxIcon.None : MessageBoxIcon.Information);
}
internal static DialogResult Prompt(MessageBoxButtons btn, params ReadOnlySpan lines)
{
- System.Media.SystemSounds.Asterisk.Play();
+ Asterisk();
string msg = string.Join(Environment.NewLine + Environment.NewLine, lines);
return MessageBox.Show(msg, "Prompt", btn, MessageBoxIcon.Question);
}