Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueMystical committed Oct 15, 2024
2 parents 5251f70 + e846f9f commit 121c4bd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions SourceFiles/Messenger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Runtime.InteropServices;
using System.Windows.Forms;
using static DarkModeForms.KeyValue;
using Timer = System.Windows.Forms.Timer;

namespace DarkModeForms
{
Expand Down Expand Up @@ -67,9 +68,9 @@ public static DialogResult MessageBox(
switch (icon)
{
case MessageBoxIcon.Information: Icon = MsgIcon.Info; break;
case MessageBoxIcon.Exclamation: Icon = MsgIcon.Success; break;
case MessageBoxIcon.Exclamation: Icon = MsgIcon.Warning; break;
case MessageBoxIcon.Question: Icon = MsgIcon.Question; break;
case MessageBoxIcon.Error: Icon = MsgIcon.Cancel; break;
case MessageBoxIcon.Error: Icon = MsgIcon.Error; break;
case MessageBoxIcon.None:
default:
break;
Expand All @@ -78,6 +79,12 @@ public static DialogResult MessageBox(
return MessageBox(Message, title, Icon, buttons, pIsDarkMode);
}

public static DialogResult MessageBox(string Message, string title, MessageBoxButtons buttons = MessageBoxButtons.OK,
MsgIcon icon = MsgIcon.None, bool pIsDarkMode = true)
{
return MessageBox(Message, title, icon, buttons, pIsDarkMode);
}

/// <summary>Displays a message window, also known as a dialog box, which presents a message to the user.</summary>
/// <param name="Message">The text to display in the message box.</param>
/// <param name="title">The text to display in the title bar of the message box.</param>
Expand Down

0 comments on commit 121c4bd

Please sign in to comment.