using System.Windows.Forms;

namespace FastReport.Utils
{
    /// <summary>
    /// Provides the message functions. 
    /// </summary>
    public static class FRMessageBox
    {
        /// <summary>
        /// Shows the Message Box with error message.
        /// </summary>
        /// <param name="msg">The message.</param>
        public static void Error(string msg)
        {
            MessageBox.Show(msg, Res.Get("Messages,Error"), MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        /// <summary>
        /// Shows Message Box with confirmation.
        /// </summary>
        /// <param name="msg">The message.</param>
        /// <param name="buttons">The dialog buttons.</param>
        /// <returns>The dialog result.</returns>
        public static DialogResult Confirm(string msg, MessageBoxButtons buttons)
        {
            return MessageBox.Show(msg, Res.Get("Messages,Confirmation"), buttons, MessageBoxIcon.Question);
        }

        /// <summary>
        /// Shows information Message Box.
        /// </summary>
        /// <param name="msg">The message.</param>
        public static void Information(string msg)
        {
            MessageBox.Show(msg, Res.Get("Messages,Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

    }
}