From: Jean-Philippe Bruyère Date: Thu, 29 Nov 2018 15:30:15 +0000 (+0100) Subject: debug log view X-Git-Tag: v0.8.7~29^2~8 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=ad73227b8e68d290ca008e5195ffb9624ee64b09;p=jp%2Fcrow.git debug log view --- diff --git a/Crow.csproj b/Crow.csproj index fdb6d7c1..6ad0c309 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -412,5 +412,6 @@ + diff --git a/CrowIDE/src/CrowIDE.cs b/CrowIDE/src/CrowIDE.cs index 0ee5844d..89bcdcab 100644 --- a/CrowIDE/src/CrowIDE.cs +++ b/CrowIDE/src/CrowIDE.cs @@ -101,12 +101,14 @@ namespace Crow.Coding CurrentSolution = null; } + static CrowIDE app; [STAThread] static void Main () { - using (CrowIDE app = new CrowIDE ()) { + using (app = new CrowIDE ()) { MainIFace = app; + app.Keyboard.KeyDown += App_KeyboardKeyDown; app.initIde (); while (true) { @@ -116,6 +118,18 @@ namespace Crow.Coding } } + static void App_KeyboardKeyDown (object sender, KeyEventArgs e) + { + Console.WriteLine((byte)e.Key); + //#if DEBUG_LOG + switch (e.Key) { + case Key.F2: + DebugLog.save (app); + break; + } + //#endif + } + public CrowIDE () : base(1024, 800) { diff --git a/Tests/ui/dbgLog.crow b/Tests/ui/dbgLog.crow index d0735082..86ed0edc 100755 --- a/Tests/ui/dbgLog.crow +++ b/Tests/ui/dbgLog.crow @@ -5,6 +5,16 @@