diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml deleted file mode 100644 index f734ea7b5..000000000 --- a/.github/workflows/dotnetcore.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: .NET Core - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.101 - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Test - run: dotnet test --no-restore --verbosity normal diff --git a/UICatalog/Scenarios/Progress.cs b/UICatalog/Scenarios/Progress.cs new file mode 100644 index 000000000..a8b64309d --- /dev/null +++ b/UICatalog/Scenarios/Progress.cs @@ -0,0 +1,47 @@ +using System; +using Terminal.Gui; + +namespace UICatalog { + // + // This would be a great scenario to show of threading (Issue #471) + // + [ScenarioMetadata (Name: "Progress", Description: "Shows off ProgressBar.")] + [ScenarioCategory ("Controls")] + class Progress : Scenario { + + private ProgressBar _progressBar; + public override void Setup () + { + Win.Add (new Button ("Start") { + X = Pos.Center () - 20, + Y = Pos.Center () - 5, + Clicked = () => Start () + }); ; + + Win.Add (new Button ("Stop") { + X = Pos.Center () + 10, + Y = Pos.Center () - 5, + Clicked = () => Stop() + }); + + _progressBar = new ProgressBar () { + X = Pos.Center (), + // BUGBUG: If you remove the +1 below the control is drawn at top?!?! + Y = Pos.Center ()+1, + Width = 30, + Fraction = 0.25F, + }; + Win.Add (_progressBar); + } + + private void Start () + { + _progressBar.Fraction = 0F; + } + + private void Stop () + { + _progressBar.Fraction = 1F; + } + } +} \ No newline at end of file diff --git a/UICatalog/Scenarios/TimeAndDate.cs b/UICatalog/Scenarios/TimeAndDate.cs new file mode 100644 index 000000000..3ac2cd3fc --- /dev/null +++ b/UICatalog/Scenarios/TimeAndDate.cs @@ -0,0 +1,30 @@ +using System; +using Terminal.Gui; + +namespace UICatalog { + [ScenarioMetadata (Name: "Time And Date", Description: "Illustrates TimeField and time & date handling")] + [ScenarioCategory ("Controls")] + [ScenarioCategory ("Bug Repro")] // Issue #246 + class TimeAndDate : Scenario { + public override void Setup () + { + // NOTE: The TimeField control is not ready for prime-time. + + Win.Add (new TimeField (0, 0, DateTime.Now, isShort: false) { + // BUGBUG: TimeField does not support Computed Layout + //X = Pos.Center (), + //Y = Pos.Center () - 1, + X = 10, + Y = 2, + }); + + Win.Add (new TimeField (0, 2, DateTime.Now, isShort: true) { + // BUGBUG: TimeField does not support Computed Layout + //X = Pos.Center (), + //Y = Pos.Center () + 1, + X = 10, + Y = 3, + }); + } + } +} \ No newline at end of file