ACAT.Extensions.Default.FunctionalAgents.PhraseSpeakAgent.PhraseSpeakAgent.quit C# (CSharp) Method

quit() private method

User wants to quit. Show confirmation and quit if user chooses to
private quit ( bool showConfirmDialog = true ) : void
showConfirmDialog bool
return void
        private void quit(bool showConfirmDialog = true)
        {
            bool quit = true;

            if (_phraseSpeakScanner == null)
            {
                return;
            }

            if (showConfirmDialog)
            {
                quit = Confirm(Resources.CloseQuestion);
            }

            if (quit)
            {
                closeScanner();
                Close();
            }
        }