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

using System.Windows;

using CommonHelpers;

namespace UserWin {

//**************************************************************************************************
partial class UXAppWaiting {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public static async Task<bool> ReportError(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   string errorMessage )
{
   return await ReportError( extraInfo, null, errorMessage );
}

public static async Task<bool> ReportError(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   Exception e )
{
   return await ReportError( extraInfo, null, e );
}

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

public static async Task<bool> ReportError(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   string errorMessage, bool skipSuppressBackOff )
{
   return await ReportError( extraInfo, null, errorMessage, skipSuppressBackOff );
}

public static async Task<bool> ReportError(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   Exception e, bool skipSuppressBackOff )
{
   return await ReportError( extraInfo, null, e, skipSuppressBackOff );
}

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

public static async Task<bool> ReportError(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   [HOptional] Window owner, string errorMessage )
{
   return await ReportError( extraInfo, owner, errorMessage, false );
}

public static async Task<bool> ReportError(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   [HOptional] Window owner, Exception e )
{
   return await ReportError( extraInfo, owner, e, false );
}

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

public static async Task<bool> ReportError(
   [HOptional] UXShowMessageExtraInfo extraInfo, [HOptional] Window owner,
   string errorMessage, bool skipSuppressBackOff )
{
   await ReportErrorEx( extraInfo, owner, errorMessage,
      MessageBoxButton.OK, MessageBoxResult.OK,
      skipSuppressBackOff );
   return false;
}

public static async Task<bool> ReportError(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   [HOptional] Window owner, Exception e, bool skipSuppressBackOff )
{
   HArgChecking.VerifyNotNull( e );
   return await ReportError(
      UXShowMessageExtraInfo.ProvideWithException( extraInfo, e ), owner,
      HException.GetErrorMessage(e), skipSuppressBackOff );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // UXAppWaiting
//**************************************************************************************************

} // UserWin
