From ae3aefbe75cd16bbf0d739464d9fb2394dcce044 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 27 Aug 2018 18:25:11 +0100 Subject: [PATCH] Add GUI console. --- DicConsole.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/DicConsole.cs b/DicConsole.cs index 3c0c82b..5fdabb6 100644 --- a/DicConsole.cs +++ b/DicConsole.cs @@ -48,16 +48,19 @@ namespace DiscImageChef.Console public delegate void DebugWriteHandler(string format, params object[] arg); + public delegate void DebugWithModuleWriteLineHandler(string module, string format, params object[] arg); + /// /// Implements a console abstraction that defines four level of messages that can be routed to different consoles: /// standard, error, verbose and debug. /// public static class DicConsole { - public static event WriteLineHandler WriteLineEvent; - public static event ErrorWriteLineHandler ErrorWriteLineEvent; - public static event VerboseWriteLineHandler VerboseWriteLineEvent; - public static event DebugWriteLineHandler DebugWriteLineEvent; + public static event WriteLineHandler WriteLineEvent; + public static event ErrorWriteLineHandler ErrorWriteLineEvent; + public static event VerboseWriteLineHandler VerboseWriteLineEvent; + public static event DebugWriteLineHandler DebugWriteLineEvent; + public static event DebugWithModuleWriteLineHandler DebugWithModuleWriteLineEvent; public static event WriteHandler WriteEvent; public static event ErrorWriteHandler ErrorWriteEvent; @@ -82,6 +85,7 @@ namespace DiscImageChef.Console public static void DebugWriteLine(string module, string format, params object[] arg) { DebugWriteLineEvent?.Invoke("DEBUG (" + module + "): " + format, arg); + DebugWithModuleWriteLineEvent?.Invoke(module, format, arg); } public static void WriteLine()