-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated PR15 changes for support for #14
Moved a bunch of blocking operations off the GUI thread Revamped logging, will probably switch to a more lightweight logging library later Added -console command line argument to show output console Switched to .net 4.0 as required version
- Loading branch information
Showing
20 changed files
with
436 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<?xml version="1.0"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
</startup> | ||
</configuration> | ||
<configSections> | ||
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/> | ||
</configSections> | ||
<log4net> | ||
<appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
<file value="${TMP}\NTRDebuggerTool-Log.txt"/> | ||
<appendToFile value="true"/> | ||
<layout type="log4net.Layout.XMLLayout"/> | ||
</appender> | ||
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] <%property{auth}> - %message%newline"/> | ||
</layout> | ||
</appender> | ||
<root> | ||
<level value="WARN"/> | ||
<appender-ref ref="LogFileAppender"/> | ||
<appender-ref ref="ConsoleAppender"/> | ||
</root> | ||
</log4net> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace NTRDebuggerTool | ||
{ | ||
class ConsoleHelper | ||
{ | ||
[DllImport("kernel32.dll", SetLastError = true)] | ||
static extern bool AllocConsole(); | ||
|
||
[DllImport("kernel32.dll")] | ||
static extern IntPtr GetConsoleWindow(); | ||
|
||
[DllImport("user32.dll")] | ||
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); | ||
|
||
const int SW_HIDE = 0; | ||
const int SW_SHOW = 5; | ||
|
||
public static void EnableConsole() | ||
{ | ||
IntPtr Handle = GetConsoleWindow(); | ||
if (Handle == IntPtr.Zero) | ||
{ | ||
AllocConsole(); | ||
} | ||
else | ||
{ | ||
ShowWindow(Handle, SW_SHOW); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.