diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml
index d139fe63b..db0c0a9d4 100644
--- a/.github/workflows/api-docs.yml
+++ b/.github/workflows/api-docs.yml
@@ -32,7 +32,7 @@ jobs:
- name: Setup Pages
if: github.ref_name == 'v1_release' || github.ref_name == 'v1_develop'
- uses: actions/configure-pages@v4
+ uses: actions/configure-pages@v5
- name: Upload artifact
if: github.ref_name == 'v1_release' || github.ref_name == 'v1_develop'
@@ -49,7 +49,7 @@ jobs:
- name: v2_develop Repository Dispatch ${{ github.ref_name }}
if: github.ref_name == 'v2_develop'
- uses: peter-evans/repository-dispatch@v2
+ uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.V2DOCS_TOKEN }}
repository: gui-cs/Terminal.GuiV2Docs
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 0182a49de..960b80f4a 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -19,7 +19,7 @@ jobs:
fetch-depth: 0 # fetch-depth is needed for GitVersion
- name: Install GitVersion
- uses: gittools/actions/gitversion/setup@v0
+ uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: '5.x'
includePrerelease: true
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d75e8f486..e92d17f10 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -10,8 +10,8 @@ We welcome contributions from the community. See [Issues](https://github.com/gui
Terminal.Gui uses the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branching model.
-* The `main` branch is always stable, and always matches the most recently released Nuget package.
-* The `develop` branch is where new development and bug-fixes happen. It is the default branch.
+* The `v1_release_` and `v2_release` branches are always stable, and always matches the most recently released Nuget package.
+* The `v1__develop` and `v2_develop` branches are where new development and bug-fixes happen. `v2_develop` is the default Github branch.
### Forking Terminal.Gui
@@ -33,11 +33,11 @@ You now have your own fork and a local repo that references it as `origin`. Your
### Starting to Make a Change
-Ensure your local `develop` (for v1) or `v2_develop` (for v2) branch is up-to-date with `upstream` (`github.com/gui-cs/Terminal.Gui`):
+Ensure your local `v1_develop` (for v1) or `v2_develop` (for v2) branch is up-to-date with `upstream` (`github.com/gui-cs/Terminal.Gui`):
```powershell
cd ./Terminal.Gui
-git checkout develop
-git pull upstream develop
+git checkout v2_develop
+git pull upstream v2_develop
```
Create a new local branch:
diff --git a/Directory.Build.props b/Directory.Build.props
deleted file mode 100644
index a389e5f94..000000000
--- a/Directory.Build.props
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Directory.Build.targets b/Directory.Build.targets
deleted file mode 100644
index 79faf752f..000000000
--- a/Directory.Build.targets
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- $(DefineConstants);DIMAUTO
-
-
\ No newline at end of file
diff --git a/Example/Example.cs b/Example/Example.cs
index 630e6560f..13c7b9138 100644
--- a/Example/Example.cs
+++ b/Example/Example.cs
@@ -6,19 +6,19 @@
using System;
using Terminal.Gui;
-var app = Application.Run ();
-
-Console.WriteLine ($"Username: {app.UserNameText.Text}");
-
-app.Dispose ();
+Application.Run ().Dispose ();
// Before the application exits, reset Terminal.Gui for clean shutdown
Application.Shutdown ();
+// To see this output on the screen it must be done after shutdown,
+// which restores the previous screen.
+Console.WriteLine ($@"Username: {ExampleWindow.UserName}");
+
// Defines a top-level window with border and title
public class ExampleWindow : Window
{
- public TextField UserNameText;
+ public static string UserName;
public ExampleWindow ()
{
@@ -27,7 +27,7 @@ public class ExampleWindow : Window
// Create input components and labels
var usernameLabel = new Label { Text = "Username:" };
- UserNameText = new TextField
+ var userNameText = new TextField
{
// Position text field adjacent to the label
X = Pos.Right (usernameLabel) + 1,
@@ -46,7 +46,7 @@ public class ExampleWindow : Window
Secret = true,
// align with the text box above
- X = Pos.Left (UserNameText),
+ X = Pos.Left (userNameText),
Y = Pos.Top (passwordLabel),
Width = Dim.Fill ()
};
@@ -64,19 +64,20 @@ public class ExampleWindow : Window
// When login button is clicked display a message popup
btnLogin.Accept += (s, e) =>
- {
- if (UserNameText.Text == "admin" && passwordText.Text == "password")
- {
- MessageBox.Query ("Logging In", "Login Successful", "Ok");
- Application.RequestStop ();
- }
- else
- {
- MessageBox.ErrorQuery ("Logging In", "Incorrect username or password", "Ok");
- }
- };
+ {
+ if (userNameText.Text == "admin" && passwordText.Text == "password")
+ {
+ MessageBox.Query ("Logging In", "Login Successful", "Ok");
+ UserName = userNameText.Text;
+ Application.RequestStop ();
+ }
+ else
+ {
+ MessageBox.ErrorQuery ("Logging In", "Incorrect username or password", "Ok");
+ }
+ };
// Add the views to the Window
- Add (usernameLabel, UserNameText, passwordLabel, passwordText, btnLogin);
+ Add (usernameLabel, userNameText, passwordLabel, passwordText, btnLogin);
}
}
diff --git a/FSharpExample/FSharpExample.fsproj b/FSharpExample/FSharpExample.fsproj
index 57b4cc7c0..82b2802e5 100644
--- a/FSharpExample/FSharpExample.fsproj
+++ b/FSharpExample/FSharpExample.fsproj
@@ -13,4 +13,7 @@
+
+
+
\ No newline at end of file
diff --git a/FSharpExample/Program.fs b/FSharpExample/Program.fs
index bfeaef2ed..88d801f04 100644
--- a/FSharpExample/Program.fs
+++ b/FSharpExample/Program.fs
@@ -1,454 +1,48 @@
-open System
-open System.Diagnostics
-open System.Globalization
-open System.IO
-open NStack
-open Terminal.Gui
+open Terminal.Gui
-let ustr (x: string) = ustring.Make(x)
-let mutable ml2 = Unchecked.defaultof