Ejemplo n.º 1
0
        private void Log_MessageLogged(object sender, Logger.LogEvents e)
        {
            if (e.Output == OutputType.MsgBox)
            {
                MessageBox.Show(e.Message);
            }
            else
            {
                OutputLog.Dispatcher.BeginInvoke((Action)(() =>
                {
                    OutputLog.AppendText(e.Message);
                    OutputLog.ScrollToEnd();
                }));

                if (e.Output == OutputType.Both)
                {
                    System.Windows.Forms.MessageBox.Show(e.Message.Replace(">> ", ""));
                }
            }

            bool showConsoleFlash   = Settings.LoadedSettings.ConsoleFlash;
            bool isConsoleCollapsed = OutputLog.Visibility == Visibility.Collapsed;

            if (showConsoleFlash && isConsoleCollapsed)
            {
                blinkTimer.Start();
            }
        }
 private void Logger_MessageLogged(object sender, Logger.LogEvents e)
 {
     Main.RunOnUIThread(() =>
     {
         debugUC.OutputConsole.AppendText($">> {e.Message}\n");
         debugUC.OutputConsole.CaretPosition = debugUC.OutputConsole.Document.ContentEnd;
     });
 }
Ejemplo n.º 3
0
        private void Logger_MessageLogged(object sender, Logger.LogEvents e)
        {
            if (e.MessageDisplayTime <= 0)
            {
                const int defaultTime = 2500;
                e.MessageDisplayTime = defaultTime;
            }

            msgQueue.Enqueue(e);

            if (msgQueue.Peek() == e) //Only one in queue because first one is the one we just added
            {
                RunMsgThread();
            }
        }
Ejemplo n.º 4
0
        private void Logger_MessageLogged(object sender, Logger.LogEvents e)
        {
            if (e.LogType == Logger.LogType.MessageBox)
            {
                MessageBox.Show(e.Message);
            }

            RunOnUIThread(() =>
            {
                if (e.LogType == Logger.LogType.Console)
                {
                    System.Diagnostics.Debug.WriteLine(e.Message);
                }
            });
        }