From 79293ff90a4b26ec8d2d41907df554526d0e5c8f Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 20 May 2020 16:24:35 -0600 Subject: [PATCH 1/7] fix launch settings to not launch a scenario --- UICatalog/Properties/launchSettings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UICatalog/Properties/launchSettings.json b/UICatalog/Properties/launchSettings.json index 1d6b7542f..3941ffe72 100644 --- a/UICatalog/Properties/launchSettings.json +++ b/UICatalog/Properties/launchSettings.json @@ -1,8 +1,8 @@ { "profiles": { "UICatalog": { - "commandName": "Project", - "commandLineArgs": "HexEditor" + "commandName": "Project" + } } } \ No newline at end of file From fd9c7931656795fb07f1b8a2d8d0ddcd4acde1c6 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 20 May 2020 20:44:43 -0600 Subject: [PATCH 2/7] Demos TimeField - and proves it's not ready for use --- UICatalog/Scenarios/TimeAndDate.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 UICatalog/Scenarios/TimeAndDate.cs diff --git a/UICatalog/Scenarios/TimeAndDate.cs b/UICatalog/Scenarios/TimeAndDate.cs new file mode 100644 index 000000000..132517cdc --- /dev/null +++ b/UICatalog/Scenarios/TimeAndDate.cs @@ -0,0 +1,29 @@ +using System; +using Terminal.Gui; + +namespace UICatalog { + [ScenarioMetadata (Name: "Time And Date", Description: "Illustrates TimeField and time & date handling")] + [ScenarioCategory ("Controls")] + 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 From 267ba58f917c83ed845047ced532287110ee1d35 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 20 May 2020 20:50:01 -0600 Subject: [PATCH 3/7] Linked to Issue #246 --- UICatalog/Scenarios/TimeAndDate.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/UICatalog/Scenarios/TimeAndDate.cs b/UICatalog/Scenarios/TimeAndDate.cs index 132517cdc..3ac2cd3fc 100644 --- a/UICatalog/Scenarios/TimeAndDate.cs +++ b/UICatalog/Scenarios/TimeAndDate.cs @@ -4,6 +4,7 @@ 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 () { From 348aa08c064a3c3309ff5cbef968f51a7375b76b Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 20 May 2020 21:14:23 -0600 Subject: [PATCH 4/7] Shows of ProgressBar --- UICatalog/Scenarios/Progress.cs | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 UICatalog/Scenarios/Progress.cs 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 From d02880c6151c0bc3e81d92f286a31f61fb2c7acf Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 20 May 2020 21:14:23 -0600 Subject: [PATCH 5/7] Shows of ProgressBar --- UICatalog/Scenarios/Progress.cs | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 UICatalog/Scenarios/Progress.cs 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 From af6273a8cb720ab8a8b4efe4646b7d4404e4d6f8 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 20 May 2020 21:19:08 -0600 Subject: [PATCH 6/7] commented yml until we resolve netstandard2.1 build debate --- .github/workflows/dotnetcore.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index f734ea7b5..fe44e5fb5 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -11,15 +11,16 @@ jobs: 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 +# Commented out until we resolve how to build the project with just netstandard2.1 +# 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 From 6393ebe8b6c1d92e0fa3985cc96eeb1525b2ccc5 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Thu, 21 May 2020 07:57:10 -0600 Subject: [PATCH 7/7] totally removed yml file --- .github/workflows/dotnetcore.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/dotnetcore.yml diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml deleted file mode 100644 index fe44e5fb5..000000000 --- a/.github/workflows/dotnetcore.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: .NET Core - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - -# Commented out until we resolve how to build the project with just netstandard2.1 -# 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