TimeAndDate.cs 802 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using Terminal.Gui;
  3. namespace UICatalog {
  4. [ScenarioMetadata (Name: "Time And Date", Description: "Illustrates TimeField and time & date handling")]
  5. [ScenarioCategory ("Controls")]
  6. [ScenarioCategory ("Bug Repro")] // Issue #246
  7. class TimeAndDate : Scenario {
  8. public override void Setup ()
  9. {
  10. // NOTE: The TimeField control is not ready for prime-time.
  11. Win.Add (new TimeField (0, 0, DateTime.Now, isShort: false) {
  12. // BUGBUG: TimeField does not support Computed Layout
  13. //X = Pos.Center (),
  14. //Y = Pos.Center () - 1,
  15. X = 10,
  16. Y = 2,
  17. });
  18. Win.Add (new TimeField (0, 2, DateTime.Now, isShort: true) {
  19. // BUGBUG: TimeField does not support Computed Layout
  20. //X = Pos.Center (),
  21. //Y = Pos.Center () + 1,
  22. X = 10,
  23. Y = 3,
  24. });
  25. }
  26. }
  27. }