mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
This PR includes: #586 - Fixed Clipping #587 - LayoutComplete #591 - Sys Console Scenario #590 - Significantly improves MessageBox, Dialog, Frame drawning and more See the PRs above for all the details. Here are the issues this closes: Closes #299 - MessageBox now auto sizes Closes #557 - MessageBoxes on small screens Closes #432 - MessageBox does not deal with long text; width/height params are goofy Closes #521 - MessageBox should take ustrings (BREAKING CHANGE) Closes #35 - Dialog should have 1 char padding around edges Closes #570 - Dialog should use computed layout for buttons Closes #470 - UI Catalog: Add Dialogs Scenario Closes #569 - LayoutComplete event Plus probably more.
34 lines
793 B
C#
34 lines
793 B
C#
using Terminal.Gui;
|
|
|
|
namespace UICatalog {
|
|
[ScenarioMetadata (Name: "System Console", Description: "Not working - #518 - Enables System Console and exercises things")]
|
|
[ScenarioCategory ("Bug Repro")]
|
|
[ScenarioCategory ("Console")]
|
|
class UseSystemConsole : Scenario {
|
|
public override void Init (Toplevel top)
|
|
{
|
|
Application.UseSystemConsole = true;
|
|
base.Init (top);
|
|
}
|
|
|
|
public override void RequestStop ()
|
|
{
|
|
base.RequestStop ();
|
|
Application.UseSystemConsole = false;
|
|
}
|
|
|
|
public override void Run ()
|
|
{
|
|
base.Run ();
|
|
}
|
|
|
|
public override void Setup ()
|
|
{
|
|
Win.Add (new Button ("Press me!") {
|
|
X = Pos.Center (),
|
|
Y = Pos.Center (),
|
|
Clicked = () => MessageBox.Query (20, 7, "Hi", "Neat?", "Yes", "No")
|
|
});
|
|
}
|
|
}
|
|
} |