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

using System.Windows;

using CommonHelpers;

namespace UserWin {

//**************************************************************************************************
partial class UXMessageBox {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public static async Task ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   string text )
{
   await ShowSuccess( extraInfo, (Window)null, text );
}

public static async Task<MessageBoxResult> ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   string text, MessageBoxButton button )
{
   return await ShowSuccess( extraInfo, (Window)null, text, button );
}

public static async Task<MessageBoxResult> ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   string text, MessageBoxButton button,
   MessageBoxResult defaultResult )
{
   return await ShowSuccess( extraInfo, (Window)null, text, button, defaultResult );
}

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

public static async Task ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   string text, [HOptional] string caption )
{
   await ShowSuccess( extraInfo, (Window)null, text, caption );
}

public static async Task<MessageBoxResult> ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   string text, [HOptional] string caption,
   MessageBoxButton button )
{
   return await ShowSuccess( extraInfo, (Window)null, text, caption, button );
}

public static async Task<MessageBoxResult> ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   string text, [HOptional] string caption,
   MessageBoxButton button,
   MessageBoxResult defaultResult )
{
   return await ShowSuccess( extraInfo, (Window)null, text, caption, button, defaultResult );
}

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

public static async Task ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   [HOptional] Window owner, string text )
{
   await ShowSuccess( extraInfo, owner, text, null );
}

public static async Task<MessageBoxResult> ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   [HOptional] Window owner, string text,
   MessageBoxButton button )
{
   return await ShowSuccess( extraInfo, owner, text, null, button );
}

public static async Task<MessageBoxResult> ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   [HOptional] Window owner, string text,
   MessageBoxButton button,
   MessageBoxResult defaultResult )
{
   return await ShowSuccess( extraInfo, owner, text, null, button, defaultResult );
}

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

public static async Task ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   [HOptional] Window owner, string text,
   [HOptional] string caption )
{
   await ShowSuccess( extraInfo, owner, text, caption, MessageBoxButton.OK );
}

public static async Task<MessageBoxResult> ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   [HOptional] Window owner, string text,
   [HOptional] string caption, MessageBoxButton button )
{
   return await ShowSuccess(
      extraInfo, owner, text, caption, button,
      DefaultResultFromButton(button) );
}

public static async Task<MessageBoxResult> ShowSuccess(
   [HOptional] UXShowMessageExtraInfo extraInfo,
   [HOptional] Window owner, string text,
   [HOptional] string caption, MessageBoxButton button,
   MessageBoxResult defaultResult )
{
   return await ShowMessage(
      extraInfo ?? new UXShowMessageExtraInfo( HSounds.Success ),
      owner, text, caption ?? SuccessCaption,
      button, MessageBoxImage.Exclamation,
      defaultResult );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // UXMessageBox
//**************************************************************************************************

} // UserWin
