From 0b8783e28bae2a61e0717af1de75bc32695b8c07 Mon Sep 17 00:00:00 2001 From: woksin Date: Wed, 5 Aug 2026 18:32:59 +0200 Subject: [PATCH 1/6] Restore from nuget.org alone NuGet.config named a local feed by absolute path. That path existed on one machine, so every restore anywhere else failed with NU1301 before reaching nuget.org - an unreachable source is an error, not a source to skip. The build job on main has been red since. --- NuGet.config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NuGet.config b/NuGet.config index 94410df1..398f9204 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,10 @@ - + From 04f9a9936b395acfa568eda88c6ef42773f9b73e Mon Sep 17 00:00:00 2001 From: woksin Date: Wed, 5 Aug 2026 18:38:13 +0200 Subject: [PATCH 2/6] Keep the comment free of double hyphens An XML comment cannot contain '--', so the explanatory comment made NuGet.config unparseable and traded one restore failure for another. --- NuGet.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NuGet.config b/NuGet.config index 398f9204..240333d9 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,9 +2,9 @@ + source to skip. To use one, register it per machine with "dotnet nuget add source". --> From 64ea335312ffc06d3b72d82128c77a703169f604 Mon Sep 17 00:00:00 2001 From: woksin Date: Wed, 5 Aug 2026 18:43:25 +0200 Subject: [PATCH 3/6] Resolve Testcontainers above the floor Chronicle asks for Cratis.Chronicle.XUnit.Integration 16.16.0 requires Testcontainers 4.13.0 and the repository pinned 4.12.0, which restore rejects as a downgrade rather than resolving upward. Microsoft.NET.Test.SDK was also declared twice, differing only in the case of 'Sdk' - package ids are case insensitive, so the two entries were one package pinned to two versions. --- Directory.Packages.props | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index d5567c9b..dd06e5af 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -18,11 +18,11 @@ - - - - - + + + + + @@ -36,11 +36,10 @@ - + - \ No newline at end of file From ff4de9d4402df792bdf0e8356c7e49d2f81da8ce Mon Sep 17 00:00:00 2001 From: woksin Date: Wed, 5 Aug 2026 18:48:00 +0200 Subject: [PATCH 4/6] Resolve Terminal.Gui where the console sample's API lives The console quickstart is written against Terminal.Gui 1.x, where Dialog, Window, Label and TextField sit directly in the Terminal.Gui namespace. It was pinned to 2.4.11, which moved them, so the sample has not compiled since it was added. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index dd06e5af..ef0b8457 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -32,7 +32,7 @@ - + From f3a9716bfba7f14ed3f0c301103282beb159b505 Mon Sep 17 00:00:00 2001 From: woksin Date: Wed, 5 Aug 2026 18:52:59 +0200 Subject: [PATCH 5/6] Leave Terminal.Gui where it was Pinning back to 1.x is the wrong direction: the designer-generated files use ViewArrangement, Alignment and ListWrapper, which are 2.x. The console sample needs the namespaces its 2.x version actually uses, not an older library, and that is a change to the sample rather than to a version. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index ef0b8457..dd06e5af 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -32,7 +32,7 @@ - + From a91bd30589d53a73eff4634a4cb4dca8020ab6f4 Mon Sep 17 00:00:00 2001 From: woksin Date: Wed, 5 Aug 2026 19:51:58 +0200 Subject: [PATCH 6/6] Reach Terminal.Gui types where 2.x keeps them The console quickstart was written when Dialog, Window, Label, TextField and ListView sat directly under Terminal.Gui. 2.x splits them across Terminal.Gui.Views, .ViewBase, .Input and .App, so the sample has not compiled against its own pinned version since it was added. Namespaces taken from lib/net10.0/Terminal.Gui.xml in the 2.4.11 package rather than inferred: Views for the widgets and ListViewItemEventArgs, ViewBase for ViewArrangement and Alignment, Input for CommandEventArgs, App for Application. --- .../Console/Dialogs/AddBook.Designer.cs | 54 +++++++++---------- .../Quickstart/Console/Dialogs/AddBook.cs | 1 - .../Console/Dialogs/Books.Designer.cs | 16 +++--- Chronicle/Quickstart/Console/Dialogs/Books.cs | 1 - .../Console/Dialogs/BorrowedBooks.Designer.cs | 16 +++--- .../Console/Dialogs/BorrowedBooks.cs | 1 - .../Console/Dialogs/OverdueBooks.Designer.cs | 16 +++--- .../Console/Dialogs/OverdueBooks.cs | 1 - .../Console/Dialogs/ReservedBooks.Designer.cs | 16 +++--- .../Console/Dialogs/ReservedBooks.cs | 1 - .../Dialogs/UserAndBookSelector.Designer.cs | 42 +++++++-------- .../Console/Dialogs/UserAndBookSelector.cs | 1 - Chronicle/Quickstart/Console/GlobalUsings.cs | 7 +++ .../Quickstart/Console/Library.Designer.cs | 16 +++--- Chronicle/Quickstart/Console/Library.cs | 1 - Chronicle/Quickstart/Console/Program.cs | 1 - 16 files changed, 95 insertions(+), 96 deletions(-) diff --git a/Chronicle/Quickstart/Console/Dialogs/AddBook.Designer.cs b/Chronicle/Quickstart/Console/Dialogs/AddBook.Designer.cs index e945bf50..82fcde37 100644 --- a/Chronicle/Quickstart/Console/Dialogs/AddBook.Designer.cs +++ b/Chronicle/Quickstart/Console/Dialogs/AddBook.Designer.cs @@ -17,98 +17,98 @@ namespace Quickstart.Dialogs { using System.Drawing; - public partial class AddBook : Terminal.Gui.Dialog { + public partial class AddBook : Terminal.Gui.Views.Dialog { - private Terminal.Gui.Label label; + private Terminal.Gui.Views.Label label; - private Terminal.Gui.TextField _title; + private Terminal.Gui.Views.TextField _title; - private Terminal.Gui.Label label2; + private Terminal.Gui.Views.Label label2; - private Terminal.Gui.TextField _author; + private Terminal.Gui.Views.TextField _author; - private Terminal.Gui.Label label3; + private Terminal.Gui.Views.Label label3; - private Terminal.Gui.TextField _isbn; + private Terminal.Gui.Views.TextField _isbn; private void InitializeComponent() { - this._isbn = new Terminal.Gui.TextField(); - this.label3 = new Terminal.Gui.Label(); - this._author = new Terminal.Gui.TextField(); - this.label2 = new Terminal.Gui.Label(); - this._title = new Terminal.Gui.TextField(); - this.label = new Terminal.Gui.Label(); + this._isbn = new Terminal.Gui.Views.TextField(); + this.label3 = new Terminal.Gui.Views.Label(); + this._author = new Terminal.Gui.Views.TextField(); + this.label2 = new Terminal.Gui.Views.Label(); + this._title = new Terminal.Gui.Views.TextField(); + this.label = new Terminal.Gui.Views.Label(); this.Width = Dim.Fill(0); this.Height = Dim.Auto(); this.X = Pos.Center(); this.Y = Pos.Center(); this.Visible = true; - this.Arrangement = Terminal.Gui.ViewArrangement.Movable; + this.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Movable; this.Modal = true; - this.TextAlignment = Terminal.Gui.Alignment.Start; + this.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Title = ""; this.label.Width = Dim.Auto(); this.label.Height = 1; this.label.X = 1; this.label.Y = 1; this.label.Visible = true; - this.label.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this.label.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this.label.Data = "label"; this.label.Text = "Title"; - this.label.TextAlignment = Terminal.Gui.Alignment.Start; + this.label.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Add(this.label); this._title.Width = Dim.Fill(1); this._title.Height = 1; this._title.X = 1; this._title.Y = 2; this._title.Visible = true; - this._title.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._title.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._title.Secret = false; this._title.Data = "_title"; this._title.Text = ""; - this._title.TextAlignment = Terminal.Gui.Alignment.Start; + this._title.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Add(this._title); this.label2.Width = Dim.Auto(); this.label2.Height = 1; this.label2.X = 1; this.label2.Y = 4; this.label2.Visible = true; - this.label2.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this.label2.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this.label2.Data = "label2"; this.label2.Text = "Author"; - this.label2.TextAlignment = Terminal.Gui.Alignment.Start; + this.label2.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Add(this.label2); this._author.Width = Dim.Fill(1); this._author.Height = 1; this._author.X = 1; this._author.Y = 5; this._author.Visible = true; - this._author.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._author.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._author.Secret = false; this._author.Data = "_author"; this._author.Text = ""; - this._author.TextAlignment = Terminal.Gui.Alignment.Start; + this._author.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Add(this._author); this.label3.Width = Dim.Auto(); this.label3.Height = 1; this.label3.X = 1; this.label3.Y = 7; this.label3.Visible = true; - this.label3.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this.label3.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this.label3.Data = "label3"; this.label3.Text = "ISBN"; - this.label3.TextAlignment = Terminal.Gui.Alignment.Start; + this.label3.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Add(this.label3); this._isbn.Width = Dim.Fill(1); this._isbn.Height = 1; this._isbn.X = 1; this._isbn.Y = 8; this._isbn.Visible = true; - this._isbn.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._isbn.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._isbn.Secret = false; this._isbn.Data = "_isbn"; this._isbn.Text = ""; - this._isbn.TextAlignment = Terminal.Gui.Alignment.Start; + this._isbn.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Add(this._isbn); } } diff --git a/Chronicle/Quickstart/Console/Dialogs/AddBook.cs b/Chronicle/Quickstart/Console/Dialogs/AddBook.cs index 7cce6498..3a12bcb8 100644 --- a/Chronicle/Quickstart/Console/Dialogs/AddBook.cs +++ b/Chronicle/Quickstart/Console/Dialogs/AddBook.cs @@ -1,7 +1,6 @@ // Copyright (c) Cratis. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Terminal.Gui; namespace Quickstart.Dialogs; diff --git a/Chronicle/Quickstart/Console/Dialogs/Books.Designer.cs b/Chronicle/Quickstart/Console/Dialogs/Books.Designer.cs index ca17383f..823d9fc2 100644 --- a/Chronicle/Quickstart/Console/Dialogs/Books.Designer.cs +++ b/Chronicle/Quickstart/Console/Dialogs/Books.Designer.cs @@ -17,30 +17,30 @@ namespace Quickstart.Dialogs { using System.Drawing; - public partial class Books : Terminal.Gui.Dialog { + public partial class Books : Terminal.Gui.Views.Dialog { - private Terminal.Gui.ListView _books; + private Terminal.Gui.Views.ListView _books; private void InitializeComponent() { - this._books = new Terminal.Gui.ListView(); + this._books = new Terminal.Gui.Views.ListView(); this.Width = Dim.Percent(90); this.Height = Dim.Percent(80); this.X = Pos.Center(); this.Y = Pos.Center(); this.Visible = true; - this.Arrangement = Terminal.Gui.ViewArrangement.Movable; + this.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Movable; this.Modal = true; - this.TextAlignment = Terminal.Gui.Alignment.Start; + this.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Title = ""; this._books.Width = Dim.Fill(1); this._books.Height = Dim.Fill(1); this._books.X = 1; this._books.Y = 1; this._books.Visible = true; - this._books.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._books.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._books.Data = "_books"; - this._books.TextAlignment = Terminal.Gui.Alignment.Start; - this._books.Source = new Terminal.Gui.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { + this._books.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; + this._books.Source = new Terminal.Gui.Views.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { "Item1", "Item2", "Item3"})); diff --git a/Chronicle/Quickstart/Console/Dialogs/Books.cs b/Chronicle/Quickstart/Console/Dialogs/Books.cs index 64bcf0bf..e3e9256b 100644 --- a/Chronicle/Quickstart/Console/Dialogs/Books.cs +++ b/Chronicle/Quickstart/Console/Dialogs/Books.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.ObjectModel; -using Terminal.Gui; namespace Quickstart.Dialogs; diff --git a/Chronicle/Quickstart/Console/Dialogs/BorrowedBooks.Designer.cs b/Chronicle/Quickstart/Console/Dialogs/BorrowedBooks.Designer.cs index b72b10f1..3b306b37 100644 --- a/Chronicle/Quickstart/Console/Dialogs/BorrowedBooks.Designer.cs +++ b/Chronicle/Quickstart/Console/Dialogs/BorrowedBooks.Designer.cs @@ -17,30 +17,30 @@ namespace Quickstart.Dialogs { using System.Drawing; - public partial class BorrowedBooks : Terminal.Gui.Dialog { + public partial class BorrowedBooks : Terminal.Gui.Views.Dialog { - private Terminal.Gui.ListView _books; + private Terminal.Gui.Views.ListView _books; private void InitializeComponent() { - this._books = new Terminal.Gui.ListView(); + this._books = new Terminal.Gui.Views.ListView(); this.Width = Dim.Percent(90); this.Height = Dim.Percent(80); this.X = Pos.Center(); this.Y = Pos.Center(); this.Visible = true; - this.Arrangement = Terminal.Gui.ViewArrangement.Movable; + this.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Movable; this.Modal = true; - this.TextAlignment = Terminal.Gui.Alignment.Start; + this.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Title = ""; this._books.Width = Dim.Fill(1); this._books.Height = Dim.Fill(1); this._books.X = 1; this._books.Y = 1; this._books.Visible = true; - this._books.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._books.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._books.Data = "_books"; - this._books.TextAlignment = Terminal.Gui.Alignment.Start; - this._books.Source = new Terminal.Gui.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { + this._books.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; + this._books.Source = new Terminal.Gui.Views.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { "Item1", "Item2", "Item3"})); diff --git a/Chronicle/Quickstart/Console/Dialogs/BorrowedBooks.cs b/Chronicle/Quickstart/Console/Dialogs/BorrowedBooks.cs index 98e1d593..8646a8a6 100644 --- a/Chronicle/Quickstart/Console/Dialogs/BorrowedBooks.cs +++ b/Chronicle/Quickstart/Console/Dialogs/BorrowedBooks.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.ObjectModel; -using Terminal.Gui; namespace Quickstart.Dialogs; diff --git a/Chronicle/Quickstart/Console/Dialogs/OverdueBooks.Designer.cs b/Chronicle/Quickstart/Console/Dialogs/OverdueBooks.Designer.cs index db577fd9..2196714d 100644 --- a/Chronicle/Quickstart/Console/Dialogs/OverdueBooks.Designer.cs +++ b/Chronicle/Quickstart/Console/Dialogs/OverdueBooks.Designer.cs @@ -17,30 +17,30 @@ namespace Quickstart.Dialogs { using System.Drawing; - public partial class OverdueBooks : Terminal.Gui.Dialog { + public partial class OverdueBooks : Terminal.Gui.Views.Dialog { - private Terminal.Gui.ListView _books; + private Terminal.Gui.Views.ListView _books; private void InitializeComponent() { - this._books = new Terminal.Gui.ListView(); + this._books = new Terminal.Gui.Views.ListView(); this.Width = Dim.Percent(90); this.Height = Dim.Percent(80); this.X = Pos.Center(); this.Y = Pos.Center(); this.Visible = true; - this.Arrangement = Terminal.Gui.ViewArrangement.Movable; + this.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Movable; this.Modal = true; - this.TextAlignment = Terminal.Gui.Alignment.Start; + this.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Title = ""; this._books.Width = Dim.Fill(1); this._books.Height = Dim.Fill(1); this._books.X = 1; this._books.Y = 1; this._books.Visible = true; - this._books.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._books.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._books.Data = "_books"; - this._books.TextAlignment = Terminal.Gui.Alignment.Start; - this._books.Source = new Terminal.Gui.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { + this._books.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; + this._books.Source = new Terminal.Gui.Views.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { "Item1", "Item2", "Item3"})); diff --git a/Chronicle/Quickstart/Console/Dialogs/OverdueBooks.cs b/Chronicle/Quickstart/Console/Dialogs/OverdueBooks.cs index 5f8e962b..85330fd9 100644 --- a/Chronicle/Quickstart/Console/Dialogs/OverdueBooks.cs +++ b/Chronicle/Quickstart/Console/Dialogs/OverdueBooks.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.ObjectModel; -using Terminal.Gui; namespace Quickstart.Dialogs; diff --git a/Chronicle/Quickstart/Console/Dialogs/ReservedBooks.Designer.cs b/Chronicle/Quickstart/Console/Dialogs/ReservedBooks.Designer.cs index f062d3fa..85686dfb 100644 --- a/Chronicle/Quickstart/Console/Dialogs/ReservedBooks.Designer.cs +++ b/Chronicle/Quickstart/Console/Dialogs/ReservedBooks.Designer.cs @@ -17,30 +17,30 @@ namespace Quickstart.Dialogs { using System.Drawing; - public partial class ReservedBooks : Terminal.Gui.Dialog { + public partial class ReservedBooks : Terminal.Gui.Views.Dialog { - private Terminal.Gui.ListView _books; + private Terminal.Gui.Views.ListView _books; private void InitializeComponent() { - this._books = new Terminal.Gui.ListView(); + this._books = new Terminal.Gui.Views.ListView(); this.Width = Dim.Percent(90); this.Height = Dim.Percent(80); this.X = Pos.Center(); this.Y = Pos.Center(); this.Visible = true; - this.Arrangement = Terminal.Gui.ViewArrangement.Movable; + this.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Movable; this.Modal = true; - this.TextAlignment = Terminal.Gui.Alignment.Start; + this.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Title = ""; this._books.Width = Dim.Fill(1); this._books.Height = Dim.Fill(1); this._books.X = 1; this._books.Y = 1; this._books.Visible = true; - this._books.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._books.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._books.Data = "_books"; - this._books.TextAlignment = Terminal.Gui.Alignment.Start; - this._books.Source = new Terminal.Gui.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { + this._books.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; + this._books.Source = new Terminal.Gui.Views.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { "Item1", "Item2", "Item3"})); diff --git a/Chronicle/Quickstart/Console/Dialogs/ReservedBooks.cs b/Chronicle/Quickstart/Console/Dialogs/ReservedBooks.cs index ecd544d4..3d6a3f87 100644 --- a/Chronicle/Quickstart/Console/Dialogs/ReservedBooks.cs +++ b/Chronicle/Quickstart/Console/Dialogs/ReservedBooks.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.ObjectModel; -using Terminal.Gui; namespace Quickstart.Dialogs; diff --git a/Chronicle/Quickstart/Console/Dialogs/UserAndBookSelector.Designer.cs b/Chronicle/Quickstart/Console/Dialogs/UserAndBookSelector.Designer.cs index ebb31473..839b7f70 100644 --- a/Chronicle/Quickstart/Console/Dialogs/UserAndBookSelector.Designer.cs +++ b/Chronicle/Quickstart/Console/Dialogs/UserAndBookSelector.Designer.cs @@ -17,49 +17,49 @@ namespace Quickstart.Dialogs { using System.Drawing; - public partial class UserAndBookSelector : Terminal.Gui.Dialog { + public partial class UserAndBookSelector : Terminal.Gui.Views.Dialog { - private Terminal.Gui.Label label; + private Terminal.Gui.Views.Label label; - private Terminal.Gui.ListView _borrowers; + private Terminal.Gui.Views.ListView _borrowers; - private Terminal.Gui.Label label2; + private Terminal.Gui.Views.Label label2; - private Terminal.Gui.ListView _books; + private Terminal.Gui.Views.ListView _books; private void InitializeComponent() { - this._books = new Terminal.Gui.ListView(); - this.label2 = new Terminal.Gui.Label(); - this._borrowers = new Terminal.Gui.ListView(); - this.label = new Terminal.Gui.Label(); + this._books = new Terminal.Gui.Views.ListView(); + this.label2 = new Terminal.Gui.Views.Label(); + this._borrowers = new Terminal.Gui.Views.ListView(); + this.label = new Terminal.Gui.Views.Label(); this.Width = Dim.Percent(90); this.Height = Dim.Percent(90); this.X = Pos.Center(); this.Y = Pos.Center(); this.Visible = true; - this.Arrangement = Terminal.Gui.ViewArrangement.Movable; + this.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Movable; this.Modal = true; - this.TextAlignment = Terminal.Gui.Alignment.Start; + this.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Title = ""; this.label.Width = Dim.Auto(); this.label.Height = 1; this.label.X = 1; this.label.Y = 1; this.label.Visible = true; - this.label.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this.label.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this.label.Data = "label"; this.label.Text = "Borrower"; - this.label.TextAlignment = Terminal.Gui.Alignment.Start; + this.label.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Add(this.label); this._borrowers.Width = Dim.Fill(1); this._borrowers.Height = 10; this._borrowers.X = 1; this._borrowers.Y = 2; this._borrowers.Visible = true; - this._borrowers.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._borrowers.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._borrowers.Data = "_borrowers"; - this._borrowers.TextAlignment = Terminal.Gui.Alignment.Start; - this._borrowers.Source = new Terminal.Gui.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { + this._borrowers.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; + this._borrowers.Source = new Terminal.Gui.Views.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { "Item1", "Item2", "Item3"})); @@ -71,20 +71,20 @@ private void InitializeComponent() { this.label2.X = 1; this.label2.Y = 13; this.label2.Visible = true; - this.label2.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this.label2.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this.label2.Data = "label2"; this.label2.Text = "Book"; - this.label2.TextAlignment = Terminal.Gui.Alignment.Start; + this.label2.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Add(this.label2); this._books.Width = Dim.Fill(1); this._books.Height = 10; this._books.X = 1; this._books.Y = 14; this._books.Visible = true; - this._books.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._books.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._books.Data = "_books"; - this._books.TextAlignment = Terminal.Gui.Alignment.Start; - this._books.Source = new Terminal.Gui.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { + this._books.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; + this._books.Source = new Terminal.Gui.Views.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { "Item1", "Item2", "Item3"})); diff --git a/Chronicle/Quickstart/Console/Dialogs/UserAndBookSelector.cs b/Chronicle/Quickstart/Console/Dialogs/UserAndBookSelector.cs index 9fd60271..365d5aed 100644 --- a/Chronicle/Quickstart/Console/Dialogs/UserAndBookSelector.cs +++ b/Chronicle/Quickstart/Console/Dialogs/UserAndBookSelector.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.ObjectModel; -using Terminal.Gui; namespace Quickstart.Dialogs; diff --git a/Chronicle/Quickstart/Console/GlobalUsings.cs b/Chronicle/Quickstart/Console/GlobalUsings.cs index a07f738b..4e01a98b 100644 --- a/Chronicle/Quickstart/Console/GlobalUsings.cs +++ b/Chronicle/Quickstart/Console/GlobalUsings.cs @@ -2,3 +2,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. global using Quickstart.Common; + +// Terminal.Gui 2.x splits what used to sit directly under Terminal.Gui across these namespaces. The +// designer-generated files fully-qualify their types; everything hand-written reaches them from here. +global using Terminal.Gui.App; +global using Terminal.Gui.Input; +global using Terminal.Gui.ViewBase; +global using Terminal.Gui.Views; diff --git a/Chronicle/Quickstart/Console/Library.Designer.cs b/Chronicle/Quickstart/Console/Library.Designer.cs index bb2244b5..a4f620f5 100644 --- a/Chronicle/Quickstart/Console/Library.Designer.cs +++ b/Chronicle/Quickstart/Console/Library.Designer.cs @@ -17,30 +17,30 @@ namespace Quickstart { using System.Drawing; - public partial class Library : Terminal.Gui.Window { + public partial class Library : Terminal.Gui.Views.Window { - private Terminal.Gui.ListView _mainMenu; + private Terminal.Gui.Views.ListView _mainMenu; private void InitializeComponent() { - this._mainMenu = new Terminal.Gui.ListView(); + this._mainMenu = new Terminal.Gui.Views.ListView(); this.Width = Dim.Fill(0); this.Height = Dim.Fill(0); this.X = 0; this.Y = 0; this.Visible = true; - this.Arrangement = (Terminal.Gui.ViewArrangement.Movable | Terminal.Gui.ViewArrangement.Overlapped); + this.Arrangement = (Terminal.Gui.ViewBase.ViewArrangement.Movable | Terminal.Gui.ViewBase.ViewArrangement.Overlapped); this.Modal = false; - this.TextAlignment = Terminal.Gui.Alignment.Start; + this.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; this.Title = "Library (ESC to quit)"; this._mainMenu.Width = Dim.Fill(1); this._mainMenu.Height = Dim.Fill(1); this._mainMenu.X = 1; this._mainMenu.Y = 1; this._mainMenu.Visible = true; - this._mainMenu.Arrangement = Terminal.Gui.ViewArrangement.Fixed; + this._mainMenu.Arrangement = Terminal.Gui.ViewBase.ViewArrangement.Fixed; this._mainMenu.Data = "_mainMenu"; - this._mainMenu.TextAlignment = Terminal.Gui.Alignment.Start; - this._mainMenu.Source = new Terminal.Gui.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { + this._mainMenu.TextAlignment = Terminal.Gui.ViewBase.Alignment.Start; + this._mainMenu.Source = new Terminal.Gui.Views.ListWrapper(new System.Collections.ObjectModel.ObservableCollection(new string[] { "Initialize with books", "Add book to inventory", "Borrow book", diff --git a/Chronicle/Quickstart/Console/Library.cs b/Chronicle/Quickstart/Console/Library.cs index 04eadda0..7840cf57 100644 --- a/Chronicle/Quickstart/Console/Library.cs +++ b/Chronicle/Quickstart/Console/Library.cs @@ -3,7 +3,6 @@ using System.Collections.ObjectModel; using Quickstart.Dialogs; -using Terminal.Gui; namespace Quickstart; diff --git a/Chronicle/Quickstart/Console/Program.cs b/Chronicle/Quickstart/Console/Program.cs index 44fef3e2..29f7d45b 100644 --- a/Chronicle/Quickstart/Console/Program.cs +++ b/Chronicle/Quickstart/Console/Program.cs @@ -6,7 +6,6 @@ using MongoDB.Bson; using MongoDB.Driver; using Quickstart; -using Terminal.Gui; #region Snippet:Quickstart-Console-Setup using Cratis.Chronicle;