Exemple #1
0
        /// <summary>
        /// Called after the Gui console terminated.
        /// </summary>
        /// <param name="asyncResult"></param>
        private static void NotifyGuiConsoleTerminated(IAsyncResult asyncResult)
        {
            //To-dos
            _bReleased = true;
            guiConsole = null;

            preErrMsg.Enqueue("A new CUI console is created to keep the app running.");
            CreateConsole(bInitedCMD, Prefix, false, Title);
            return;
        }
Exemple #2
0
        /// <summary>
        /// A method to start a standard message loop of Gui console.
        /// </summary>
        private static void _CreateGuiConsole(string customPrefix, string title)
        {
            try
            {
                guiConsole = new GuiConsole(customPrefix, title);

                Application.EnableVisualStyles();
                Application.Run(guiConsole);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error!");
            }
        }