SystemConsole.cs 752 B

123456789101112131415161718192021222324252627282930313233
  1. using Terminal.Gui;
  2. namespace UICatalog {
  3. [ScenarioMetadata (Name: "System Console", Description: "Not working - #518 - Enables System Console and exercises things")]
  4. [ScenarioCategory ("Bug Repro")]
  5. [ScenarioCategory ("Console")]
  6. class UseSystemConsole : Scenario {
  7. public override void Init (Toplevel top)
  8. {
  9. Application.UseSystemConsole = true;
  10. base.Init (top);
  11. }
  12. public override void RequestStop ()
  13. {
  14. base.RequestStop ();
  15. }
  16. public override void Run ()
  17. {
  18. base.Run ();
  19. }
  20. public override void Setup ()
  21. {
  22. Win.Add (new Button ("Press me!") {
  23. X = Pos.Center (),
  24. Y = Pos.Center (),
  25. Clicked = () => MessageBox.Query (20, 7, "Hi", "Neat?", "Yes", "No")
  26. });
  27. }
  28. }
  29. }