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

using WF = System.Windows.Forms;

using CommonHelpers;

namespace WFX {

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

public static bool ConfirmationDialog([HOptional] ShowMessageExtraInfo extraInfo,string text)
{
   return ConfirmationDialog( extraInfo, (WF.IWin32Window)null, text );
}

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

public static bool ConfirmationDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                       [HOptional] WF.IWin32Window owner, string text )
{
   return ConfirmationDialog( extraInfo, owner, text, null );
}

//==================================================================================================

public static bool ConfirmationDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                       string text, [HOptional] string caption )
{
   return ConfirmationDialog( extraInfo, (WF.IWin32Window)null, text, caption);
}

public static bool ConfirmationDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                       string text, [HOptional] string caption,
                                       bool defaultOKButton )
{
   return ConfirmationDialog( extraInfo, (WF.IWin32Window)null, text, caption, defaultOKButton );
}

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

public static bool ConfirmationDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                       [HOptional] WF.IWin32Window owner,
                                       string text, [HOptional] string caption )
{
   return ConfirmationDialog( extraInfo, owner, text, caption, WF.MessageBoxIcon.Exclamation );
}

public static bool ConfirmationDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                       [HOptional] WF.IWin32Window owner, string text,
                                       [HOptional] string caption, bool defaultOKButton )
{
   return ConfirmationDialog( extraInfo, owner, text, caption,
      WF.MessageBoxIcon.Exclamation, defaultOKButton );
}

//==================================================================================================

public static bool ConfirmationDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                       string text, [HOptional] string caption,
                                       WF.MessageBoxIcon icon )
{
   return ConfirmationDialog( extraInfo, null, text, caption, icon );
}

public static bool ConfirmationDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                       string text, [HOptional] string caption,
                                       WF.MessageBoxIcon icon, bool defaultOKButton )
{
   return ConfirmationDialog( extraInfo, null, text, caption, icon, defaultOKButton );
}

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

public static bool ConfirmationDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                       [HOptional] WF.IWin32Window owner,
                                       string text, [HOptional] string caption,
                                       WF.MessageBoxIcon icon )
{
   return ConfirmationDialog( extraInfo, owner, text, caption, icon, true );
}

public static bool ConfirmationDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                       [HOptional] WF.IWin32Window owner,
                                       string text, [HOptional] string caption,
                                       WF.MessageBoxIcon icon, bool defaultOKButton )
{
   return ShowMessage( extraInfo,
      owner, text, caption ?? ConfirmationCaption, WF.MessageBoxButtons.OKCancel, icon,
      defaultOKButton ? WF.DialogResult.OK : WF.DialogResult.Cancel )
      == WF.DialogResult.OK;
}

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

} // WFX
