private ScreenchooterExitCode ShowHelpOrMakeScreenshot()
        {
            ScreenchooterExitCode exitCode = ScreenchooterExitCode.Error;

            if (CommandLineArguments.ShowHelp)
            {
                WriteHelpMessageToConsole();
                exitCode = ScreenchooterExitCode.Success;
            }
            else
            {
                try
                {
                    SetCaptureRegionFromCommandLineArguments();
                    MakeAndSaveScreenshot();
                    exitCode = ScreenchooterExitCode.Success;
                }
                catch (Exception e)
                {
                    WriteErrorMessageToConsole(e.Message);
                }
            }

            return(exitCode);
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns>Exit code.</returns>
        internal int Run()
        {
            ScreenchooterExitCode exitCode = ScreenchooterExitCode.Error;

            if (CommandLineArguments.ArgsParsedSuccessful)
            {
                exitCode = ShowHelpOrMakeScreenshot();
            }
            else
            {
                WriteErrorMessageToConsole(CommandLineArguments.ArgsParseErrorMessage);
            }
            return((int)exitCode);
        }