Generic.cs 500 B

123456789101112131415161718
  1. using Terminal.Gui;
  2. namespace UICatalog {
  3. [ScenarioMetadata (Name: "Generic", Description: "Generic sample - A template for creating new Scenarios")]
  4. [ScenarioCategory ("Controls")]
  5. class MyScenario : Scenario {
  6. public override void Setup ()
  7. {
  8. // Put your scenario code here, e.g.
  9. var button = new Button ("Press me!") {
  10. X = Pos.Center (),
  11. Y = Pos.Center (),
  12. };
  13. button.Clicked += () => MessageBox.Query (20, 7, "Hi", "Neat?", "Yes", "No");
  14. Win.Add (button);
  15. }
  16. }
  17. }