//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// WFX satellite library | Author: Sergei Y.Kitáev
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;

using WF = System.Windows.Forms;

using CommonHelpers;

namespace WFX {

//**************************************************************************************************
partial class MessageBox {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public static void ShowMessage( [HOptional] ShowMessageExtraInfo extraInfo,
                                string text, [HOptional] string caption, WF.MessageBoxIcon icon )
{
   ShowMessage(extraInfo,(WF.IWin32Window)null,text,caption,icon);
}

public static WF.DialogResult ShowMessage( [HOptional] ShowMessageExtraInfo extraInfo,
                                           string text, [HOptional] string caption,
                                           WF.MessageBoxButtons buttons,
                                           WF.MessageBoxIcon icon )
{
   return ShowMessage(extraInfo,(WF.IWin32Window)null,text,caption,buttons,icon);
}

public static WF.DialogResult ShowMessage( [HOptional] ShowMessageExtraInfo extraInfo,
                                           string text, [HOptional] string caption,
                                           WF.MessageBoxButtons buttons,
                                           WF.MessageBoxIcon icon,
                                           WF.DialogResult defaultResult )
{
   return ShowMessage(extraInfo,(WF.IWin32Window)null,text,caption,buttons,icon,defaultResult);
}

//--------------------------------------------------------------------------------------------------

public static void ShowMessage( [HOptional] ShowMessageExtraInfo extraInfo,
                                [HOptional] WF.IWin32Window owner,
                                string text, [HOptional] string caption,
                                WF.MessageBoxIcon icon )
{
   ShowMessage(extraInfo,owner,text,caption,WF.MessageBoxButtons.OK,icon);
}

public static WF.DialogResult ShowMessage( [HOptional] ShowMessageExtraInfo extraInfo,
                                           [HOptional] WF.IWin32Window owner,
                                           string text, [HOptional] string caption,
                                           WF.MessageBoxButtons buttons,
                                           WF.MessageBoxIcon icon )
{
   return ShowMessage( extraInfo, owner,
      text, caption, buttons, icon,
      DefaultResultFromButtons(buttons) );
}

public static WF.DialogResult ShowMessage( [HOptional] ShowMessageExtraInfo extraInfo,
                                           [HOptional] WF.IWin32Window owner,
                                           string text, [HOptional] string caption,
                                           WF.MessageBoxButtons buttons,
                                           WF.MessageBoxIcon icon,
                                           WF.DialogResult defaultResult )
{
   return Dispatcher.Synchronize(delegate{
      return DoShowMessage(
         extraInfo ?? new ShowMessageExtraInfo( HSounds.Default ),
         owner, text, caption, buttons, icon, defaultResult );
   });
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // MessageBox
//**************************************************************************************************

} // WFX
