Skip to content

Commit

Permalink
Update KryptonMessageBoxForm.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
PWagner1 committed Dec 17, 2022
1 parent 712fd0f commit 806bd30
Showing 1 changed file with 9 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,23 @@ private void UpdateIcon()
break;
case KryptonMessageBoxIcon.Hand:
_messageIcon.Image = MessageBoxResources.Hand;
PlayHandSound();
SystemSounds.Hand.Play();
break;
case KryptonMessageBoxIcon.SystemHand:
_messageIcon.Image = SystemIcons.Hand.ToBitmap();
SystemSounds.Hand.Play();
break;
case KryptonMessageBoxIcon.Question:
_messageIcon.Image = MessageBoxResources.Question;
PlayQuestionSound();
SystemSounds.Question.Play();
break;
case KryptonMessageBoxIcon.SystemQuestion:
_messageIcon.Image = SystemIcons.Question.ToBitmap();
SystemSounds.Question.Play();
break;
case KryptonMessageBoxIcon.Exclamation:
_messageIcon.Image = MessageBoxResources.Warning;
PlayExclamationSound();
SystemSounds.Exclamation.Play();
break;
case KryptonMessageBoxIcon.SystemExclamation:
_messageIcon.Image = SystemIcons.Warning.ToBitmap();
Expand All @@ -171,27 +171,27 @@ private void UpdateIcon()
{
_messageIcon.Image = MessageBoxResources.Asterisk;
}
PlayAsteriskSound();
SystemSounds.Asterisk.Play();
break;
case KryptonMessageBoxIcon.SystemAsterisk:
_messageIcon.Image = SystemIcons.Asterisk.ToBitmap();
PlayAsteriskSound();
SystemSounds.Asterisk.Play();
break;
case KryptonMessageBoxIcon.Stop:
_messageIcon.Image = MessageBoxResources.Stop;
PlayStopSound();
SystemSounds.Asterisk.Play();
break;
case KryptonMessageBoxIcon.Error:
_messageIcon.Image = MessageBoxResources.Critical;
PlayStopSound();
SystemSounds.Asterisk.Play();
break;
case KryptonMessageBoxIcon.Warning:
_messageIcon.Image = MessageBoxResources.Warning;
PlayExclamationSound();
SystemSounds.Exclamation.Play();
break;
case KryptonMessageBoxIcon.Information:
_messageIcon.Image = MessageBoxResources.Information;
PlayAsteriskSound();
SystemSounds.Asterisk.Play();
break;
case KryptonMessageBoxIcon.Shield:
if (OSUtilities.IsWindowsEleven)
Expand Down Expand Up @@ -251,16 +251,6 @@ private void UpdateIcon()

}

private static void PlayStopSound() => SystemSounds.Hand.Play();

private static void PlayAsteriskSound() => SystemSounds.Asterisk.Play();

private static void PlayExclamationSound() => SystemSounds.Exclamation.Play();

private static void PlayQuestionSound() => SystemSounds.Question.Play();

private static void PlayHandSound() => SystemSounds.Hand.Play();

private void UpdateButtons()
{
switch (_buttons)
Expand Down

0 comments on commit 806bd30

Please sign in to comment.