diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-11-24 10:48:34 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-11-24 10:48:34 +0100 |
| commit | 98eada369aa50115e677a1b337662fee9f0ca011 (patch) | |
| tree | 6855bc602c4da5f6a13c90276452b438172c1d3d /Tests/BasicTests.cs | |
| parent | 4db409fdff013e3e4249d567e4d6fdb0ee877256 (diff) | |
debug log viewer, X backends
Diffstat (limited to 'Tests/BasicTests.cs')
| -rw-r--r-- | Tests/BasicTests.cs | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs index 02b6742d..732edbc3 100644 --- a/Tests/BasicTests.cs +++ b/Tests/BasicTests.cs @@ -7,27 +7,30 @@ namespace tests { class MainClass { + static Interface app; + public static void Main(string[] args) { - using (Interface app = new Interface ()) { + using (app = new Interface ()) { // XWindow win = new XWindow (app); // win.Show (); //app.LoadIMLFragment (@"<SimpleGauge Level='40' Margin='5' Background='Jet' Foreground='Grey' Width='30' Height='50%'/>"); - app.KeyboardKeyDown += App_KeyboardKeyDown; + app.Keyboard.KeyDown += App_KeyboardKeyDown; - app.AddWidget (@"Interfaces/Divers/0.crow").DataSource = app; + //app.AddWidget (@"Interfaces/Divers/0.crow").DataSource = app; //app.AddWidget (@"Interfaces/Splitter/1.crow").DataSource = app; //app.AddWidget (@"Interfaces/Container/0.crow").DataSource = app; //app.AddWidget (@"Interfaces/Divers/colorPicker.crow").DataSource = app; //app.AddWidget ("Interfaces/Divers/perfMeasures.crow").DataSource = app; + app.AddWidget ("#Tests.ui.dbgLog.crow").DataSource = app; while (true) { - /*#if MEASURE_TIME + #if MEASURE_TIME foreach (PerformanceMeasure m in app.PerfMeasures) m.NotifyChanges (); - #endif*/ - //Thread.Sleep(10); + #endif + Thread.Sleep(10); } } /*using (Display disp = new Display()) @@ -48,14 +51,16 @@ namespace tests }*/ } - static void App_KeyboardKeyDown (object sender, KeyboardKeyEventArgs e) + static void App_KeyboardKeyDown (object sender, KeyEventArgs e) { Console.WriteLine((byte)e.Key); + //#if DEBUG_LOG switch (e.Key) { - case Key.Keypad1: - DebugLog.save (sender as Interface); + case Key.F2: + DebugLog.save (app); break; } + //#endif } } } |