Add GUI console.

This commit is contained in:
2018-08-27 18:25:11 +01:00
parent 2b32fb3c43
commit ae3aefbe75

View File

@@ -48,6 +48,8 @@ namespace DiscImageChef.Console
public delegate void DebugWriteHandler(string format, params object[] arg); public delegate void DebugWriteHandler(string format, params object[] arg);
public delegate void DebugWithModuleWriteLineHandler(string module, string format, params object[] arg);
/// <summary> /// <summary>
/// Implements a console abstraction that defines four level of messages that can be routed to different consoles: /// Implements a console abstraction that defines four level of messages that can be routed to different consoles:
/// standard, error, verbose and debug. /// standard, error, verbose and debug.
@@ -58,6 +60,7 @@ namespace DiscImageChef.Console
public static event ErrorWriteLineHandler ErrorWriteLineEvent; public static event ErrorWriteLineHandler ErrorWriteLineEvent;
public static event VerboseWriteLineHandler VerboseWriteLineEvent; public static event VerboseWriteLineHandler VerboseWriteLineEvent;
public static event DebugWriteLineHandler DebugWriteLineEvent; public static event DebugWriteLineHandler DebugWriteLineEvent;
public static event DebugWithModuleWriteLineHandler DebugWithModuleWriteLineEvent;
public static event WriteHandler WriteEvent; public static event WriteHandler WriteEvent;
public static event ErrorWriteHandler ErrorWriteEvent; public static event ErrorWriteHandler ErrorWriteEvent;
@@ -82,6 +85,7 @@ namespace DiscImageChef.Console
public static void DebugWriteLine(string module, string format, params object[] arg) public static void DebugWriteLine(string module, string format, params object[] arg)
{ {
DebugWriteLineEvent?.Invoke("DEBUG (" + module + "): " + format, arg); DebugWriteLineEvent?.Invoke("DEBUG (" + module + "): " + format, arg);
DebugWithModuleWriteLineEvent?.Invoke(module, format, arg);
} }
public static void WriteLine() public static void WriteLine()