|
12 | 12 |
|
13 | 13 | [assembly: ExampleMetadata ("Simple Example", "A basic login form demonstrating Terminal.Gui fundamentals")] |
14 | 14 | [assembly: ExampleCategory ("Getting Started")] |
15 | | -[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["a", "d", "m", "i", "n", "Tab", "p", "a", "s", "s", "w", "o", "r", "d", "Enter"], Order = 1)] |
| 15 | +[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["a", "d", "m", "i", "n", "Tab", "p", "a", "s", "s", "w", "o", "r", "d", "Enter"], DelayMs = 500, Order = 1)] |
16 | 16 | [assembly: ExampleDemoKeyStrokes (KeyStrokes = ["Enter"], DelayMs = 500, Order = 2)] |
17 | 17 | [assembly: ExampleDemoKeyStrokes (KeyStrokes = ["Esc"], DelayMs = 100, Order = 3)] |
18 | 18 |
|
19 | 19 | // Override the default configuration for the application to use the Light theme |
20 | 20 | ConfigurationManager.RuntimeConfig = """{ "Theme": "Light" }"""; |
21 | 21 | ConfigurationManager.Enable (ConfigLocations.All); |
22 | 22 |
|
23 | | -// Setup automatic key injection for testing |
24 | | -ExampleContextInjector.SetupAutomaticInjection (); |
25 | | - |
26 | 23 | // Check for test context to determine driver |
27 | 24 | string? contextJson = Environment.GetEnvironmentVariable (ExampleContext.ENVIRONMENT_VARIABLE_NAME); |
28 | 25 | string? driverName = null; |
|
33 | 30 | driverName = context?.DriverName; |
34 | 31 | } |
35 | 32 |
|
36 | | -IApplication app = Application.Create ().Init (driverName); |
| 33 | +IApplication app = Application.Create (); |
| 34 | + |
| 35 | +// Setup automatic key injection for testing |
| 36 | +ExampleContextInjector.SetupAutomaticInjection (app); |
37 | 37 |
|
| 38 | +app.Init (driverName); |
38 | 39 | app.Run<ExampleWindow> (); |
39 | 40 |
|
40 | 41 | // Dispose the app to clean up and enable Console.WriteLine below |
|
0 commit comments