diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de480f1..2f2f61c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,4 +13,4 @@ jobs: run: dotnet pack - name: Publish to Nuget if: contains(github.ref, 'refs/tags/v') - run: dotnet nuget push ./bin/Debug/Terminal.Gui.templates.$(fgrep \ ./Terminal.Gui.templates.csproj | grep -oEi '[0-9.]+').nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json + run: dotnet nuget push ./bin/Debug/Terminal.Gui.templates.$(fgrep \ ./Terminal.Gui.templates.csproj | grep -oEi '[0-9a-zA-Z.-]+').nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json diff --git a/Terminal.Gui.templates.csproj b/Terminal.Gui.templates.csproj index f0ad890..8c7f008 100644 --- a/Terminal.Gui.templates.csproj +++ b/Terminal.Gui.templates.csproj @@ -2,13 +2,13 @@ Template - 1.0.3 + 2.0.0-v2-develop.2203 Terminal.gui.templates Terminal.Gui templates Thomas Nind Templates to use when creating an application for Terminal.Gui. dotnet-new;templates;csharp;terminal;c#;gui;template;consol - net6.0 + net8.0 https://github.com/gui-cs/Terminal.Gui.templates README.md MIT @@ -16,13 +16,15 @@ false content - v1.0.3 - - Added Title to window showing quit shortcut - v1.0.2 - - Renamed package Terminal.Gui.templates - v1.0.1 - - Added README.md to package - - Changed Terminal.Gui package dependency to be 1.* instead of explicitly 1.7.2 + 2.0.0-v2-develop.2203 + - Update for version 2 of Terminal.Gui (latest Terminal Gui Designer compatible edition) + v1.0.3 + - Added Title to window showing quit shortcut + v1.0.2 + - Renamed package Terminal.Gui.templates + v1.0.1 + - Added README.md to package + - Changed Terminal.Gui package dependency to be 1.* instead of explicitly 1.7.2 diff --git a/templates/basic/MyGuiCsProject.csproj b/templates/basic/MyGuiCsProject.csproj index 4077f19..e9fcd95 100644 --- a/templates/basic/MyGuiCsProject.csproj +++ b/templates/basic/MyGuiCsProject.csproj @@ -2,13 +2,13 @@ Exe - net6.0 + net8.0 enable enable - + diff --git a/templates/basic/MyView.Designer.cs b/templates/basic/MyView.Designer.cs index 6eb118f..320be1f 100644 --- a/templates/basic/MyView.Designer.cs +++ b/templates/basic/MyView.Designer.cs @@ -28,25 +28,19 @@ private void InitializeComponent() { this.Y = 0; this.Modal = false; this.Text = ""; - this.Border.BorderStyle = Terminal.Gui.BorderStyle.Single; - this.Border.Effect3D = false; - this.Border.DrawMarginFrame = true; - this.TextAlignment = Terminal.Gui.TextAlignment.Left; this.Title = "Press Ctrl+Q to quit"; - this.label1.Width = 4; + this.label1.Width = Dim.Auto(); this.label1.Height = 1; this.label1.X = Pos.Center(); this.label1.Y = Pos.Center(); this.label1.Data = "label1"; this.label1.Text = "Hello World"; - this.label1.TextAlignment = Terminal.Gui.TextAlignment.Left; this.Add(this.label1); - this.button1.Width = 12; + this.button1.Width = Dim.Auto(); this.button1.X = Pos.Center(); this.button1.Y = Pos.Center() + 1; this.button1.Data = "button1"; this.button1.Text = "Click Me"; - this.button1.TextAlignment = Terminal.Gui.TextAlignment.Centered; this.button1.IsDefault = false; this.Add(this.button1); } diff --git a/templates/basic/MyView.cs b/templates/basic/MyView.cs index 18c43e7..6d8c54a 100644 --- a/templates/basic/MyView.cs +++ b/templates/basic/MyView.cs @@ -15,7 +15,7 @@ public partial class MyView { public MyView() { InitializeComponent(); - button1.Clicked += () => MessageBox.Query("Hello", "Hello There!", "Ok"); + button1.Accept += (s, e) => MessageBox.Query("Hello", "Hello There!", "Ok"); } } }