//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// 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 YesNoDialog([HOptional] ShowMessageExtraInfo extraInfo,string text)
{
   return YesNoDialog( extraInfo, (WF.IWin32Window)null, text );
}

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

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

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

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

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

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

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

public static bool YesNoDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                [HOptional] WF.IWin32Window owner, string text,
                                [HOptional] string caption, bool defaultYesButton )
{
   return YesNoDialog( extraInfo, owner, text, caption, YesNoDialogDefaultIcon, defaultYesButton );
}

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

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

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

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

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

public static bool YesNoDialog( [HOptional] ShowMessageExtraInfo extraInfo,
                                [HOptional] WF.IWin32Window owner,
                                string text, [HOptional] string caption,
                                WF.MessageBoxIcon icon, bool defaultYesButton )
{
   return ShowMessage( extraInfo,
      owner, text, caption, WF.MessageBoxButtons.YesNo, icon,
      defaultYesButton ? WF.DialogResult.Yes : WF.DialogResult.No )
      == WF.DialogResult.Yes;
}

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

} // WFX
