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

using WF = System.Windows.Forms;

using CommonHelpers;

namespace WFX {

//**************************************************************************************************
partial class AppWaiting {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public static bool ReportError([HOptional] ShowMessageExtraInfo extraInfo,string errorMessage)
{
   return ReportError( extraInfo, null, errorMessage );
}

public static bool ReportError([HOptional] ShowMessageExtraInfo extraInfo,Exception e)
{
   return ReportError( extraInfo, null, e );
}

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

static bool ReportError( [HOptional] ShowMessageExtraInfo extraInfo,
                         string errorMessage, bool skipSuppressBackOff )
{
   return ReportError( extraInfo, null, errorMessage, skipSuppressBackOff );
}

public static bool ReportError( [HOptional] ShowMessageExtraInfo extraInfo,
                                Exception e, bool skipSuppressBackOff )
{
   return ReportError( extraInfo, null, e, skipSuppressBackOff );
}

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

public static bool ReportError( [HOptional] ShowMessageExtraInfo extraInfo,
                                [HOptional] WF.IWin32Window owner, string errorMessage )
{
   return ReportError( extraInfo, owner, errorMessage, false );
}

public static bool ReportError( [HOptional] ShowMessageExtraInfo extraInfo,
                                [HOptional] WF.IWin32Window owner, Exception e )
{
   return ReportError( extraInfo, owner, e, false );
}

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

static bool ReportError( [HOptional] ShowMessageExtraInfo extraInfo,
                         [HOptional] WF.IWin32Window owner, string errorMessage,
                         bool skipSuppressBackOff )
{
   ReportErrorEx( extraInfo, owner, errorMessage,
      WF.MessageBoxButtons.OK, WF.DialogResult.OK,
      skipSuppressBackOff );
   return false;
}

public static bool ReportError( [HOptional] ShowMessageExtraInfo extraInfo,
                                [HOptional] WF.IWin32Window owner, Exception e,
                                bool skipSuppressBackOff )
{
   HArgChecking.VerifyNotNull( e );
   return ReportError(
      ShowMessageExtraInfo.ProvideWithException( extraInfo, e ), owner,
      HException.GetErrorMessage(e), skipSuppressBackOff );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // AppWaiting
//**************************************************************************************************

} // WFX
