mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Tweaks
This commit is contained in:
@@ -12,7 +12,7 @@ using Terminal.Gui.Views;
|
||||
|
||||
[assembly: ExampleMetadata ("Simple Example", "A basic login form demonstrating Terminal.Gui fundamentals")]
|
||||
[assembly: ExampleCategory ("Getting Started")]
|
||||
[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["a", "d", "m", "i", "n", "Tab", "p", "a", "s", "s", "w", "o", "r", "d", "Enter"], Order = 1)]
|
||||
[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["a", "d", "m", "i", "n", "Tab", "p", "a", "s", "s", "w", "o", "r", "d", "Enter"], DelayMs = 500, Order = 1)]
|
||||
[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["Enter"], DelayMs = 500, Order = 2)]
|
||||
[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["Esc"], DelayMs = 100, Order = 3)]
|
||||
|
||||
@@ -20,9 +20,6 @@ using Terminal.Gui.Views;
|
||||
ConfigurationManager.RuntimeConfig = """{ "Theme": "Light" }""";
|
||||
ConfigurationManager.Enable (ConfigLocations.All);
|
||||
|
||||
// Setup automatic key injection for testing
|
||||
ExampleContextInjector.SetupAutomaticInjection ();
|
||||
|
||||
// Check for test context to determine driver
|
||||
string? contextJson = Environment.GetEnvironmentVariable (ExampleContext.ENVIRONMENT_VARIABLE_NAME);
|
||||
string? driverName = null;
|
||||
@@ -33,8 +30,12 @@ if (!string.IsNullOrEmpty (contextJson))
|
||||
driverName = context?.DriverName;
|
||||
}
|
||||
|
||||
IApplication app = Application.Create ().Init (driverName);
|
||||
IApplication app = Application.Create ();
|
||||
|
||||
// Setup automatic key injection for testing
|
||||
ExampleContextInjector.SetupAutomaticInjection (app);
|
||||
|
||||
app.Init (driverName);
|
||||
app.Run<ExampleWindow> ();
|
||||
|
||||
// Dispose the app to clean up and enable Console.WriteLine below
|
||||
|
||||
Reference in New Issue
Block a user