mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Add command line options to ExampleRunner and improve demo keystrokes
- Added --fake-driver/-f option to force FakeDriver via ConfigurationManager - Added --timeout/-t option to configure timeout in milliseconds - ExampleRunner no longer injects additional keys (relies on example mode) - Updated RunnableWrapperExample with longer delays (200ms) for better reliability - Examples remain clean with only metadata and Create(example: true) Note: RunnableWrapperExample intentionally doesn't quit on Esc key (tests timeout handling) Tests need additional work to properly coordinate key injection with example mode. Co-authored-by: tig <585482+tig@users.noreply.github.com>
This commit is contained in:
@@ -10,11 +10,11 @@ using Terminal.Gui.Views;
|
||||
[assembly: Terminal.Gui.Examples.ExampleMetadata ("Runnable Wrapper Example", "Shows how to wrap any View to make it runnable without implementing IRunnable")]
|
||||
[assembly: Terminal.Gui.Examples.ExampleCategory ("API Patterns")]
|
||||
[assembly: Terminal.Gui.Examples.ExampleCategory ("Views")]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["t", "e", "s", "t", "Esc"], Order = 1)]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["SetDelay:100", "Enter", "Esc"], Order = 2)]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["SetDelay:100", "Enter", "Esc"], Order = 3)]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["SetDelay:100", "Enter", "Esc"], Order = 4)]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["SetDelay:100", "Enter", "Esc"], Order = 5)]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["SetDelay:200", "t", "e", "s", "t", "Esc"], Order = 1)]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["SetDelay:200", "Enter", "Esc"], Order = 2)]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["SetDelay:200", "Enter", "Esc"], Order = 3)]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["SetDelay:200", "Enter", "Esc"], Order = 4)]
|
||||
[assembly: Terminal.Gui.Examples.ExampleDemoKeyStrokes (KeyStrokes = ["SetDelay:200", "Enter", "Esc"], Order = 5)]
|
||||
|
||||
IApplication app = Application.Create (example: true);
|
||||
app.Init ();
|
||||
|
||||
Reference in New Issue
Block a user