using System;

using CommonHelpers;

namespace ConfirmationPause {

//**************************************************************************************************
static partial class Program {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

static void PrintSyntax()
{
   HConsole.PrintIntensive(
      "=== {0} utility {1} ({2}): ===",
      ConfirmationPause_Info.AssemblyName, //Assembly.GetEntryAssembly().GetName().Name
      ConfirmationPause_Info.VersionStringExCON,
      ConfirmationPause_Info.CopyrightCON );
   HConsole.PrintExpressive(
      "Parameters are not supported." );
   HConsole.PrintIntensive(
      "Supported return codes:" );
   HConsole.PrintExpressive(
      "{1} {0} confirmed (dialog result);\n"+
      "{2} {0} canceled (dialog result);\n"+
      "{3} {0} error;\n"+
      "{4} {5} fatal error.",
      LongDash,
      ConfirmationCode, CancellationCode, ErrorCode, FatalErrorCode,
      DashChar );
}

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

static void WaitInput()
{
   WaitInput( false );
}
static void WaitInput(bool withPreliminaryInputReset=false)
{
   if ( withPreliminaryInputReset )
      HConsole.ResetInput();
   while ( !Console.KeyAvailable )
      HThread.Sleep( 10 );
}

static void BeepHigh()
{
   Console.Beep( 880, 100 );
}

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

const char DashChar = HConsole.DashChar;
const string LongDash = HConsole.LongDash;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // Program
//**************************************************************************************************

} // ConfirmationPause
