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 WriteToOutput(string outputString) { OutputLog.AppendText("\n" + outputString); OutputLog.ScrollToEnd(); }