From a256342d822bdfacb02d8b2fdb0b6e5055b3b63c Mon Sep 17 00:00:00 2001 From: Tom Laird-McConnell Date: Sat, 7 Dec 2024 11:03:38 -0800 Subject: [PATCH] Prepare build and packages for publishing (#175) * add support for NUGET publishing actions **PublishNuget** - builds release and publishes nuget and symbol nuget for the current checked in version **PublishIncrementNuget** - Bumps incremental build number (11.2.X) - builds release and publishes nuget and symbol nuget for the - Checks in updated build number NOTE: This needs a NUGET_KEY secret added * added icon and readme to each package and made sure they build with the right dependencies * cleanup package references * clean up package references, GuiCS is internal assembly instead of nuget package * update readmes Add ConsoloniaApplication Cleaned up turbovision stuff * update readmes, change previewhost gallery to use ConsoloniaApplication * fixes for merge * add ability to switch views to gallery * Update src/Consolonia.Core/Infrastructure/ConsoloniaApplication.cs * Add consolonia meta package * rename Consolonia.Themes.TurboVision to Consolonia.Themes Move namespaces for thems to Consolonia.Themes * move themes to root of project to align with namespaces * switch to using buildprops for icon and readme on packages --- .github/workflows/PublishIncrementalNuget.yml | 49 +++++++++++++++ .github/workflows/PublishNuget.yml | 35 +++++++++++ Directory.Build.props | 7 ++- src/Consolonia.Blazor/README.md | 14 +++++ src/Consolonia.Core/ApplicationStartup.cs | 4 +- .../Infrastructure/ConsoloniaApplication.cs | 18 ++++++ .../ConsoloniaNotSupportedException.cs | 1 - .../Infrastructure/ExceptionSink.cs | 12 +--- .../Infrastructure/ExceptionSinkExtensions.cs | 18 ++++++ src/Consolonia.Core/README.md | 11 ++++ .../Consolonia.Designer.csproj | 18 ------ src/Consolonia.Gallery/App.cs | 14 +---- .../Consolonia.Gallery.csproj | 5 +- .../Gallery/GalleryViews/GalleryButton.axaml | 3 +- .../GalleryViews/GalleryComboBox.axaml | 2 +- .../Gallery/GalleryViews/GalleryMenu.axaml | 5 +- src/Consolonia.Gallery/Program.cs | 8 --- .../View/ControlsListView.axaml | 17 ++++- .../View/ControlsListView.axaml.cs | 55 ++++++++++++++++ src/Consolonia.GuiCS/Consolonia.GuiCS.csproj | 5 +- src/Consolonia.GuiCS/readme.md | 7 --- src/Consolonia.NUnit/Consolonia.NUnit.csproj | 4 +- src/Consolonia.NUnit/ConsoloniaAppTestBase.cs | 1 - src/Consolonia.NUnit/README.md | 41 ++++++++++++ .../Consolonia.PlatformSupport.csproj | 22 ++++++- .../PlatformSupportExtensions.cs | 5 +- src/Consolonia.PlatformSupport/README.md | 20 ++++++ .../Assembly.cs | 0 .../Consolonia.Themes.csproj} | 0 .../Fluent/FluentColors.axaml | 35 ++++++----- .../Fluent/FluentTheme.axaml | 9 +-- .../FluentTheme.cs | 2 +- .../Material/MaterialColors.axaml | 0 .../Material/MaterialTheme.axaml | 6 +- .../MaterialTheme.cs | 2 +- src/Consolonia.Themes/README.md | 34 ++++++++++ .../Templates/Controls/AllControls.axaml | 0 .../Templates/Controls/Button.axaml | 2 +- .../Templates/Controls/Calendar.axaml | 2 +- .../Templates/Controls/CalendarButton.axaml | 0 .../Controls/CalendarDatePicker.axaml | 2 +- .../Controls/CalendarDayButton.axaml | 0 .../Templates/Controls/CalendarItem.axaml | 2 +- .../Templates/Controls/CaretControl.axaml | 2 +- .../Templates/Controls/CheckBox.axaml | 2 +- .../Templates/Controls/ComboBox.axaml | 2 +- .../Templates/Controls/ComboBoxItem.axaml | 2 +- .../Templates/Controls/ContentControl.axaml | 0 .../Templates/Controls/DataGrid.axaml | 2 +- .../Controls/DataValidationErrors.axaml | 0 .../Templates/Controls/DialogWindow.axaml | 2 +- .../Templates/Controls/FlyoutPresenter.axaml | 0 .../Helpers/AreIntegersEqualConverter.cs | 2 +- .../Controls/Helpers/BooleanAndConverter.cs | 2 +- .../Controls/Helpers/ButtonExtensions.cs | 2 +- .../Helpers/CalendarDatePickerExtensions.cs | 2 +- .../Controls/Helpers/CalendarExtensions.cs | 2 +- .../Controls/Helpers/CaretControl.cs | 2 +- .../Controls/Helpers/ComboBoxExtensions.cs | 2 +- .../Helpers/ConsoloniaTextPresenter.cs | 2 +- .../Controls/Helpers/DataGridExtensions.cs | 2 +- .../Controls/Helpers/DropDownExtensions.cs | 2 +- .../Controls/Helpers/FastLineSeparator.cs | 2 +- .../Controls/Helpers/MenuExtensions.cs | 2 +- .../Helpers/ScrollViewerExtensions.cs | 2 +- .../Controls/Helpers/SymbolsControl.cs | 2 +- .../Controls/Helpers/TextBoxCaret.cs | 2 +- .../Templates/Controls/ItemsControl.axaml | 0 .../Controls/LightDismissOverlaylayer.axaml | 0 .../Templates/Controls/ListBox.axaml | 2 +- .../Templates/Controls/ListBoxItem.axaml | 2 +- .../Templates/Controls/Menu.axaml | 2 +- .../Controls/MenuFlyoutPresenter.axaml | 2 +- .../Templates/Controls/MenuItem.axaml | 2 +- .../Templates/Controls/OverlayPopupHost.axaml | 0 .../Templates/Controls/Panel.axaml | 0 .../Templates/Controls/Popup.axaml | 0 .../Templates/Controls/ProgressBar.axaml | 2 +- .../Templates/Controls/RadioButton.axaml | 2 +- .../Templates/Controls/ScrollBar.axaml | 2 +- .../Templates/Controls/ScrollViewer.axaml | 2 +- .../Templates/Controls/Separator.axaml | 0 .../Templates/Controls/SymbolsControl.axaml | 2 +- .../Templates/Controls/TabControl.axaml | 0 .../Templates/Controls/TabItem.axaml | 2 +- .../Templates/Controls/TextBlock.axaml | 0 .../Templates/Controls/TextBox.axaml | 2 +- .../Templates/Controls/ToggleButton.axaml | 0 .../Templates/Controls/UserControl.axaml | 0 .../Templates/Controls/Window.axaml | 0 .../Templates/TurboVisionDefaultColors.axaml | 0 .../Templates/TurboVisionTheme.axaml | 2 +- .../TurboVisionBlack/Controls/Button.axaml | 2 +- .../TurboVisionBlackColors.axaml | 0 .../TurboVisionBlackTheme.axaml | 6 +- .../TurboVisionBlackTheme.cs | 2 +- .../TurboVisionDark/Controls/Button.axaml | 0 .../Controls/DialogWindow.axaml | 0 .../TurboVisionDarkColors.axaml | 0 .../TurboVisionDarkTheme.axaml | 8 +-- .../TurboVisionDarkTheme.cs | 2 +- .../TurboVisionTheme.cs | 2 +- src/Consolonia.sln | 33 ++++++---- src/Consolonia/Assembly.cs | 6 ++ src/Consolonia/Consolonia.csproj | 9 +++ src/Consolonia/README.md | 59 ++++++++++++++++++ src/Example/App.axaml | 9 --- src/Example/App.axaml.cs | 18 ------ src/Example/App.cs | 19 ++++++ src/Example/Example.csproj | 4 +- src/Example/Program.cs | 20 +++--- .../Avalonia.PreviewHost/App.axaml | 0 .../Avalonia.PreviewHost/App.axaml.cs | 0 .../Avalonia.PreviewHost}/Assembly.cs | 0 .../Assets/consolonia-logo.ico | Bin .../Avalonia.PreviewHost.csproj | 5 +- .../Avalonia.PreviewHost/Program.cs | 0 .../Avalonia.PreviewHost/README.md | 39 ++++++++++++ .../ViewModels/FileViewModel.cs | 0 .../ViewModels/MainViewModel.cs | 0 .../Views/MainWindow.axaml | 0 .../Views/MainWindow.axaml.cs | 0 .../Avalonia.PreviewHost/app.manifest | 0 .../Consolonia.Designer}/Assembly.cs | 0 .../Consolonia.Designer/ConsolePreview.cs | 28 +++------ .../Consolonia.Designer.csproj | 16 +++++ .../Consolonia.Designer/Extensions.cs | 8 +-- .../Consolonia.Designer/README.md | 26 ++++++++ src/Tests/Consolonia.Core.Tests/MiscTests.cs | 24 +++++++ .../Base/GalleryTestsBaseBase.cs | 2 +- .../Consolonia.Gallery.Tests/ButtonTests.cs | 2 +- src/Tools/Consolonia.PreviewHost/App.axaml | 8 --- .../{App.axaml.cs => App.cs} | 9 +-- .../Consolonia.PreviewHost.csproj | 16 +---- src/Tools/Consolonia.PreviewHost/Program.cs | 3 - src/Tools/Consolonia.PreviewHost/readme.md | 8 +++ 136 files changed, 691 insertions(+), 267 deletions(-) create mode 100644 .github/workflows/PublishIncrementalNuget.yml create mode 100644 .github/workflows/PublishNuget.yml create mode 100644 src/Consolonia.Blazor/README.md create mode 100644 src/Consolonia.Core/Infrastructure/ExceptionSinkExtensions.cs create mode 100644 src/Consolonia.Core/README.md delete mode 100644 src/Consolonia.Designer/Consolonia.Designer.csproj delete mode 100644 src/Consolonia.GuiCS/readme.md create mode 100644 src/Consolonia.NUnit/README.md create mode 100644 src/Consolonia.PlatformSupport/README.md rename src/{Consolonia.Designer => Consolonia.Themes}/Assembly.cs (100%) rename src/{Consolonia.Themes.TurboVision/Consolonia.Themes.TurboVision.csproj => Consolonia.Themes/Consolonia.Themes.csproj} (100%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/Fluent/FluentColors.axaml (64%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/Fluent/FluentTheme.axaml (58%) rename src/{Consolonia.Themes.TurboVision/Themes/Fluent => Consolonia.Themes}/FluentTheme.cs (81%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/Material/MaterialColors.axaml (100%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/Material/MaterialTheme.axaml (62%) rename src/{Consolonia.Themes.TurboVision/Themes/Material => Consolonia.Themes}/MaterialTheme.cs (81%) create mode 100644 src/Consolonia.Themes/README.md rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/AllControls.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Button.axaml (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Calendar.axaml (95%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/CalendarButton.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/CalendarDatePicker.axaml (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/CalendarDayButton.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/CalendarItem.axaml (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/CaretControl.axaml (97%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/CheckBox.axaml (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ComboBox.axaml (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ComboBoxItem.axaml (96%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ContentControl.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/DataGrid.axaml (99%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/DataValidationErrors.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/DialogWindow.axaml (99%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/FlyoutPresenter.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/AreIntegersEqualConverter.cs (89%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/BooleanAndConverter.cs (86%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/ButtonExtensions.cs (95%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/CalendarDatePickerExtensions.cs (97%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/CalendarExtensions.cs (94%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/CaretControl.cs (90%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/ComboBoxExtensions.cs (97%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/ConsoloniaTextPresenter.cs (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/DataGridExtensions.cs (89%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/DropDownExtensions.cs (97%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/FastLineSeparator.cs (96%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/MenuExtensions.cs (97%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/ScrollViewerExtensions.cs (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/SymbolsControl.cs (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Helpers/TextBoxCaret.cs (96%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ItemsControl.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/LightDismissOverlaylayer.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ListBox.axaml (96%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ListBoxItem.axaml (96%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Menu.axaml (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/MenuFlyoutPresenter.axaml (97%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/MenuItem.axaml (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/OverlayPopupHost.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Panel.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Popup.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ProgressBar.axaml (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/RadioButton.axaml (97%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ScrollBar.axaml (98%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ScrollViewer.axaml (99%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Separator.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/SymbolsControl.axaml (84%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/TabControl.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/TabItem.axaml (97%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/TextBlock.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/TextBox.axaml (99%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/ToggleButton.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/UserControl.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/Controls/Window.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/TurboVisionDefaultColors.axaml (100%) rename src/{Consolonia.Themes.TurboVision => Consolonia.Themes}/Templates/TurboVisionTheme.axaml (86%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/TurboVisionBlack/Controls/Button.axaml (79%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/TurboVisionBlack/TurboVisionBlackColors.axaml (100%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/TurboVisionBlack/TurboVisionBlackTheme.axaml (58%) rename src/{Consolonia.Themes.TurboVision/Themes/TurboVisionBlack => Consolonia.Themes}/TurboVisionBlackTheme.cs (80%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/TurboVisionDark/Controls/Button.axaml (100%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/TurboVisionDark/Controls/DialogWindow.axaml (100%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/TurboVisionDark/TurboVisionDarkColors.axaml (100%) rename src/{Consolonia.Themes.TurboVision/Themes => Consolonia.Themes}/TurboVisionDark/TurboVisionDarkTheme.axaml (52%) rename src/{Consolonia.Themes.TurboVision/Themes/TurboVisionDark => Consolonia.Themes}/TurboVisionDarkTheme.cs (80%) rename src/{Consolonia.Themes.TurboVision/Templates => Consolonia.Themes}/TurboVisionTheme.cs (83%) create mode 100644 src/Consolonia/Assembly.cs create mode 100644 src/Consolonia/Consolonia.csproj create mode 100644 src/Consolonia/README.md delete mode 100644 src/Example/App.axaml delete mode 100644 src/Example/App.axaml.cs create mode 100644 src/Example/App.cs rename src/{Tools => Experimental}/Avalonia.PreviewHost/App.axaml (100%) rename src/{Tools => Experimental}/Avalonia.PreviewHost/App.axaml.cs (100%) rename src/{Consolonia.Themes.TurboVision => Experimental/Avalonia.PreviewHost}/Assembly.cs (100%) rename src/{Tools => Experimental}/Avalonia.PreviewHost/Assets/consolonia-logo.ico (100%) rename src/{Tools => Experimental}/Avalonia.PreviewHost/Avalonia.PreviewHost.csproj (84%) rename src/{Tools => Experimental}/Avalonia.PreviewHost/Program.cs (100%) create mode 100644 src/Experimental/Avalonia.PreviewHost/README.md rename src/{Tools => Experimental}/Avalonia.PreviewHost/ViewModels/FileViewModel.cs (100%) rename src/{Tools => Experimental}/Avalonia.PreviewHost/ViewModels/MainViewModel.cs (100%) rename src/{Tools => Experimental}/Avalonia.PreviewHost/Views/MainWindow.axaml (100%) rename src/{Tools => Experimental}/Avalonia.PreviewHost/Views/MainWindow.axaml.cs (100%) rename src/{Tools => Experimental}/Avalonia.PreviewHost/app.manifest (100%) rename src/{Tools/Avalonia.PreviewHost => Experimental/Consolonia.Designer}/Assembly.cs (100%) rename src/{ => Experimental}/Consolonia.Designer/ConsolePreview.cs (99%) create mode 100644 src/Experimental/Consolonia.Designer/Consolonia.Designer.csproj rename src/{ => Experimental}/Consolonia.Designer/Extensions.cs (84%) create mode 100644 src/Experimental/Consolonia.Designer/README.md create mode 100644 src/Tests/Consolonia.Core.Tests/MiscTests.cs delete mode 100644 src/Tools/Consolonia.PreviewHost/App.axaml rename src/Tools/Consolonia.PreviewHost/{App.axaml.cs => App.cs} (96%) diff --git a/.github/workflows/PublishIncrementalNuget.yml b/.github/workflows/PublishIncrementalNuget.yml new file mode 100644 index 00000000..0be36513 --- /dev/null +++ b/.github/workflows/PublishIncrementalNuget.yml @@ -0,0 +1,49 @@ +name: Publish Incremental Nuget Release + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + + - name: Bump build version + id: bump + uses: vers-one/dotnet-project-version-updater@v1.5 + with: + files: | + "**/Consolonia.csproj" + version: bump-build + + - name: Restore dependencies + run: dotnet restore src/Consolonia.sln + + - name: Build + run: dotnet build src/Consolonia.sln -c Release --no-restore + + - name: dotnet pack + run: | + dotnet pack src/Consolonia.sln -c Release -o packages --include-symbols --property WarningLevel=0 + + - name: Publish NuGet and symbols + id: nuget-push + uses: edumserrano/nuget-push@v1 + with: + api-key: '${{ secrets.NUGET_KEY }}' + working-directory: 'packages' + fail-if-exists: false + + - name: Commit new version changes + run: | + git config --global user.name "Github Action" + git config --global user.email "jinek@users.noreply.github.com" + git commit -a -m "Bumped version for published nuget artifacts" + git push diff --git a/.github/workflows/PublishNuget.yml b/.github/workflows/PublishNuget.yml new file mode 100644 index 00000000..aca0ffa0 --- /dev/null +++ b/.github/workflows/PublishNuget.yml @@ -0,0 +1,35 @@ +name: Publish Nuget Release + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + + - name: Restore dependencies + run: dotnet restore src/Consolonia.sln + + - name: Build + run: dotnet build src/Consolonia.sln -c Release --no-restore + + - name: dotnet pack + run: | + dotnet pack src/Consolonia.sln -c Release -o packages --include-symbols --property WarningLevel=0 + + - name: Publish NuGet and symbols + id: nuget-push + uses: edumserrano/nuget-push@v1 + with: + api-key: '${{ secrets.NUGET_KEY }}' + working-directory: 'packages' + fail-if-exists: false + diff --git a/Directory.Build.props b/Directory.Build.props index 5c03ebf1..5ac9b88e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,13 +5,18 @@ disable - 11.0.9 + 11.2.1 https://github.com/jinek/Consolonia/graphs/contributors Text User Interface implementation of Avalonia UI (GUI Framework) Copyright © Evgeny Gorbovoy 2021 - 2022 + Icon.png AVA3001 11.2.1 + + + + \ No newline at end of file diff --git a/src/Consolonia.Blazor/README.md b/src/Consolonia.Blazor/README.md new file mode 100644 index 00000000..92292772 --- /dev/null +++ b/src/Consolonia.Blazor/README.md @@ -0,0 +1,14 @@ +# Consolonia UI + +TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) + +Supports XAML, data bindings, animation, styling and the rest from Avalonia. + +> Project is in proof of concept state and is looking for collaboration. + +## Showcase (click picture to see video) +[![datagridpic](https://user-images.githubusercontent.com/10516222/141980173-4eb4057a-6996-45bf-83f6-931316c98d88.png)](https://youtu.be/ttgZmbruk3Y) + +Example of usage: https://github.com/jinek/ToolUI + +Solution contains one more readme file with coding information. diff --git a/src/Consolonia.Core/ApplicationStartup.cs b/src/Consolonia.Core/ApplicationStartup.cs index 4570055f..498dcb68 100644 --- a/src/Consolonia.Core/ApplicationStartup.cs +++ b/src/Consolonia.Core/ApplicationStartup.cs @@ -6,10 +6,10 @@ using Consolonia.Core.Infrastructure; // ReSharper disable UnusedMember.Global //todo: how to disable it for public methods? - +// ReSharper disable CheckNamespace // ReSharper disable MemberCanBePrivate.Global -namespace Consolonia.Core +namespace Consolonia { public static class ApplicationStartup { diff --git a/src/Consolonia.Core/Infrastructure/ConsoloniaApplication.cs b/src/Consolonia.Core/Infrastructure/ConsoloniaApplication.cs index cda946f7..9d0e778a 100644 --- a/src/Consolonia.Core/Infrastructure/ConsoloniaApplication.cs +++ b/src/Consolonia.Core/Infrastructure/ConsoloniaApplication.cs @@ -1,5 +1,7 @@ +using System; using Avalonia; using Avalonia.Controls; +using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Controls.Primitives; using Avalonia.Input; using Avalonia.Media; @@ -59,4 +61,20 @@ public override void OnFrameworkInitializationCompleted() } } } + + public class ConsoloniaApplication : ConsoloniaApplication + where TMainWindow : Window, new() + { + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + var window = Activator.CreateInstance(); + ArgumentNullException.ThrowIfNull(window, typeof(TMainWindow).Name); + desktop.MainWindow = window; + } + + base.OnFrameworkInitializationCompleted(); + } + } } \ No newline at end of file diff --git a/src/Consolonia.Core/Infrastructure/ConsoloniaNotSupportedException.cs b/src/Consolonia.Core/Infrastructure/ConsoloniaNotSupportedException.cs index 11394801..0e794a63 100644 --- a/src/Consolonia.Core/Infrastructure/ConsoloniaNotSupportedException.cs +++ b/src/Consolonia.Core/Infrastructure/ConsoloniaNotSupportedException.cs @@ -3,7 +3,6 @@ namespace Consolonia.Core.Infrastructure { - [Serializable] public class ConsoloniaNotSupportedException : Exception { internal ConsoloniaNotSupportedException(NotSupportedRequest request) diff --git a/src/Consolonia.Core/Infrastructure/ExceptionSink.cs b/src/Consolonia.Core/Infrastructure/ExceptionSink.cs index 717fdf66..77c36bf8 100644 --- a/src/Consolonia.Core/Infrastructure/ExceptionSink.cs +++ b/src/Consolonia.Core/Infrastructure/ExceptionSink.cs @@ -1,10 +1,9 @@ using System; using System.Globalization; -using Avalonia; using Avalonia.Logging; namespace Consolonia.Core.Infrastructure - // ReSharper disable once ArrangeNamespaceBody +// ReSharper disable once ArrangeNamespaceBody { public class ExceptionSink : ILogSink { @@ -55,14 +54,5 @@ public void Log(LogEventLevel level, string area, object source, string messageT throw consoloniaException; } } - - public static class ExceptionSinkExtensions - { - public static AppBuilder LogToException(this AppBuilder builder) - { - Logger.Sink = new ExceptionSink(); - return builder; - } - } // ReSharper restore UnusedMember.Global } \ No newline at end of file diff --git a/src/Consolonia.Core/Infrastructure/ExceptionSinkExtensions.cs b/src/Consolonia.Core/Infrastructure/ExceptionSinkExtensions.cs new file mode 100644 index 00000000..ea4df246 --- /dev/null +++ b/src/Consolonia.Core/Infrastructure/ExceptionSinkExtensions.cs @@ -0,0 +1,18 @@ +using Avalonia; +using Avalonia.Logging; +using Consolonia.Core.Infrastructure; + +// ReSharper disable CheckNamespace +namespace Consolonia +// ReSharper disable once ArrangeNamespaceBody +{ + public static class ExceptionSinkExtensions + { + public static AppBuilder LogToException(this AppBuilder builder) + { + Logger.Sink = new ExceptionSink(); + return builder; + } + } + // ReSharper restore UnusedMember.Global +} \ No newline at end of file diff --git a/src/Consolonia.Core/README.md b/src/Consolonia.Core/README.md new file mode 100644 index 00000000..c83aa315 --- /dev/null +++ b/src/Consolonia.Core/README.md @@ -0,0 +1,11 @@ +# Consolonia.PlatformSupport +This package is the core Consolonia library. + +## Background +Consolonia is a TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) + +Supports XAML, data bindings, animation, styling and the rest from Avalonia. + +## Showcase (click picture to see video) +[![datagridpic](https://user-images.githubusercontent.com/10516222/141980173-4eb4057a-6996-45bf-83f6-931316c98d88.png)](https://youtu.be/ttgZmbruk3Y) + diff --git a/src/Consolonia.Designer/Consolonia.Designer.csproj b/src/Consolonia.Designer/Consolonia.Designer.csproj deleted file mode 100644 index d36a8f58..00000000 --- a/src/Consolonia.Designer/Consolonia.Designer.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/Consolonia.Gallery/App.cs b/src/Consolonia.Gallery/App.cs index a96ace76..6d9cfccd 100644 --- a/src/Consolonia.Gallery/App.cs +++ b/src/Consolonia.Gallery/App.cs @@ -1,13 +1,12 @@ using System.Globalization; using System.Threading; -using Avalonia.Controls.ApplicationLifetimes; using Consolonia.Core.Infrastructure; using Consolonia.Gallery.View; -using Consolonia.Themes.TurboVision.Themes.Fluent; +using Consolonia.Themes; namespace Consolonia.Gallery { - internal class App : ConsoloniaApplication + internal class App : ConsoloniaApplication { static App() { @@ -23,14 +22,5 @@ public App() Styles.Add(new FluentTheme()); /*Styles.Add(new MaterialTheme());*/ } - - public override void OnFrameworkInitializationCompleted() - { - var lifetime = ApplicationLifetime as IClassicDesktopStyleApplicationLifetime; - if (lifetime != null) - lifetime.MainWindow = new ControlsListView(); - - base.OnFrameworkInitializationCompleted(); - } } } \ No newline at end of file diff --git a/src/Consolonia.Gallery/Consolonia.Gallery.csproj b/src/Consolonia.Gallery/Consolonia.Gallery.csproj index e3f51ac4..3bb77c69 100644 --- a/src/Consolonia.Gallery/Consolonia.Gallery.csproj +++ b/src/Consolonia.Gallery/Consolonia.Gallery.csproj @@ -10,10 +10,7 @@ - - - - + diff --git a/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryButton.axaml b/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryButton.axaml index 4002c36e..b0b8f61f 100644 --- a/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryButton.axaml +++ b/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryButton.axaml @@ -14,8 +14,7 @@ - - + + + + AppBuilder.Configure() -#if DEBUG - .UseConsoloniaDesigner() -#else .UseConsolonia() -#endif .UseAutoDetectedConsole() .LogToException(); } diff --git a/src/Consolonia.Gallery/View/ControlsListView.axaml b/src/Consolonia.Gallery/View/ControlsListView.axaml index f56f55ee..60181320 100644 --- a/src/Consolonia.Gallery/View/ControlsListView.axaml +++ b/src/Consolonia.Gallery/View/ControlsListView.axaml @@ -3,7 +3,7 @@ xmlns:gallery="clr-namespace:Consolonia.Gallery.Gallery" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d" + mc:Ignorable="d" x:Class="Consolonia.Gallery.View.ControlsListView" Title="ControlsListView" > @@ -11,7 +11,7 @@ - @@ -19,7 +19,18 @@ Binding="{Binding Name}" /> - + + (); + this.Styles.Add(new MaterialTheme()); + TrySetupSelected(); } + public ControlsListViewModel Model => (ControlsListViewModel)DataContext; + private void TrySetupSelected() { if (_commandLineArgs.Length is not 1 and not 2) @@ -69,5 +87,42 @@ private void Exit_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e) { this.Close(); } + + private void ComboBox_SelectionChanged(object sender, Avalonia.Controls.SelectionChangedEventArgs e) + { + if (ThemeCombo?.SelectedItem is not ComboBoxItem selectedItem || + selectedItem.Content is not string themeName || + !Enum.TryParse(themeName, out var selectedTheme)) + { + return; + } + + Styles[0] = selectedTheme switch + { + Themes.Material => new MaterialTheme(), + Themes.Fluent => new FluentTheme(), + Themes.TurboVision => new TurboVisionTheme(), + Themes.TurboVisionDark => new TurboVisionDarkTheme(), + Themes.TurboVisionBlack => new TurboVisionBlackTheme(), + _ => throw new ArgumentOutOfRangeException(nameof(selectedTheme)) + }; + } + } + + public partial class ControlsListViewModel : ObservableObject + { + [ObservableProperty] + [NotifyPropertyChangedFor(nameof(IsTurboVisionDark))] + [NotifyPropertyChangedFor(nameof(IsTurboVisionBlack))] + [NotifyPropertyChangedFor(nameof(IsTurboVision))] + [NotifyPropertyChangedFor(nameof(IsFluent))] + [NotifyPropertyChangedFor(nameof(IsMaterial))] + private string _selectedTheme; + + public bool IsMaterial => SelectedTheme == nameof(Themes.Material); + public bool IsFluent => SelectedTheme == nameof(Themes.Fluent); + public bool IsTurboVision => SelectedTheme == nameof(Themes.TurboVision); + public bool IsTurboVisionDark => SelectedTheme == nameof(Themes.TurboVisionDark); + public bool IsTurboVisionBlack => SelectedTheme == nameof(Themes.TurboVisionBlack); } } \ No newline at end of file diff --git a/src/Consolonia.GuiCS/Consolonia.GuiCS.csproj b/src/Consolonia.GuiCS/Consolonia.GuiCS.csproj index 63547ffb..e0834556 100644 --- a/src/Consolonia.GuiCS/Consolonia.GuiCS.csproj +++ b/src/Consolonia.GuiCS/Consolonia.GuiCS.csproj @@ -1,7 +1,10 @@ - + + false false false + false + diff --git a/src/Consolonia.GuiCS/readme.md b/src/Consolonia.GuiCS/readme.md deleted file mode 100644 index d020d762..00000000 --- a/src/Consolonia.GuiCS/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -Almost all these files are either original or partly copypasted from https://github.com/migueldeicaza/gui.cs - -We need to think how to re-use them (ask to extract and pack within gui.cs or just make it mergable). -We also need to check lincensing question as probably current library is more open. - - -Autoformatting is switch at the CI for this project \ No newline at end of file diff --git a/src/Consolonia.NUnit/Consolonia.NUnit.csproj b/src/Consolonia.NUnit/Consolonia.NUnit.csproj index dae1791f..1819a3b5 100644 --- a/src/Consolonia.NUnit/Consolonia.NUnit.csproj +++ b/src/Consolonia.NUnit/Consolonia.NUnit.csproj @@ -2,9 +2,6 @@ - - true - @@ -13,4 +10,5 @@ + diff --git a/src/Consolonia.NUnit/ConsoloniaAppTestBase.cs b/src/Consolonia.NUnit/ConsoloniaAppTestBase.cs index 2cc76d4b..0a1285a7 100644 --- a/src/Consolonia.NUnit/ConsoloniaAppTestBase.cs +++ b/src/Consolonia.NUnit/ConsoloniaAppTestBase.cs @@ -6,7 +6,6 @@ using Avalonia.Controls; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Threading; -using Consolonia.Core; using Consolonia.Core.Drawing.PixelBufferImplementation; using NUnit.Framework; diff --git a/src/Consolonia.NUnit/README.md b/src/Consolonia.NUnit/README.md new file mode 100644 index 00000000..072e04d5 --- /dev/null +++ b/src/Consolonia.NUnit/README.md @@ -0,0 +1,41 @@ +# Consolonia.NUnit +This package provides testing support for testing consolonia controls using NUnit. + +## Background +Consolonia is a TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) + +Supports XAML, data bindings, animation, styling and the rest from Avalonia. + +## Showcase (click picture to see video) +[![datagridpic](https://user-images.githubusercontent.com/10516222/141980173-4eb4057a-6996-45bf-83f6-931316c98d88.png)](https://youtu.be/ttgZmbruk3Y) + +## Usage +To create a unit test against your consolonia application your test class should derive from ConsoloniaAppTestBase<App$gt;. + +You can define the size of your console by passing size parameter to base class. + +Then you can use UITest to interact with your application, and use UITest.AssertHasText() to verify the screen of text matches your expectation. + +### UITest.AssertHasText() +Takes one or more Regex patterns and verifies that the screen contains the text that matches the pattern. + +### UITest.AssertHasNoText() +Takes one or more Regex patterns and verifies that the screen does not contain the text that matches the pattern. + +## Example +```csharp + public class Tests : ConsoloniaAppTestBase + { + public Tests : base(new PixelBufferSize(80, 40)) + { + } + + + [Test] + public async Task DisplaysBasicText() + { + await UITest.KeyInput(Key.Tab); + await UITest.AssertHasText("This is TextBlock"); + } + } +``` diff --git a/src/Consolonia.PlatformSupport/Consolonia.PlatformSupport.csproj b/src/Consolonia.PlatformSupport/Consolonia.PlatformSupport.csproj index 67b5a320..fff11008 100644 --- a/src/Consolonia.PlatformSupport/Consolonia.PlatformSupport.csproj +++ b/src/Consolonia.PlatformSupport/Consolonia.PlatformSupport.csproj @@ -3,6 +3,26 @@ - + + true + Consolonia.GuiCS.dll + + + + + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage + + + + + + <_ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'All'))"/> + + + + diff --git a/src/Consolonia.PlatformSupport/PlatformSupportExtensions.cs b/src/Consolonia.PlatformSupport/PlatformSupportExtensions.cs index b1ea28a4..e9082653 100644 --- a/src/Consolonia.PlatformSupport/PlatformSupportExtensions.cs +++ b/src/Consolonia.PlatformSupport/PlatformSupportExtensions.cs @@ -1,12 +1,13 @@ using System; using Avalonia; using Avalonia.Controls; -using Consolonia.Core; using Consolonia.Core.Dummy; using Consolonia.Core.Infrastructure; +using Consolonia.PlatformSupport; +// ReSharper disable CheckNamespace #pragma warning disable IDE0161 -namespace Consolonia.PlatformSupport +namespace Consolonia #pragma warning restore IDE0161 { public static class PlatformSupportExtensions diff --git a/src/Consolonia.PlatformSupport/README.md b/src/Consolonia.PlatformSupport/README.md new file mode 100644 index 00000000..6e1111aa --- /dev/null +++ b/src/Consolonia.PlatformSupport/README.md @@ -0,0 +1,20 @@ +# Consolonia.PlatformSupport +This package provides Consolonia IConsole platform support for adapting to consoles on Windows, Linux and MacOS environments. + +## Background +Consolonia is a TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) + +Supports XAML, data bindings, animation, styling and the rest from Avalonia. + +## Showcase (click picture to see video) +[![datagridpic](https://user-images.githubusercontent.com/10516222/141980173-4eb4057a-6996-45bf-83f6-931316c98d88.png)](https://youtu.be/ttgZmbruk3Y) + +## Usage +```csharp +AppBuilder BuildAvaloniaApp() +{ + return AppBuilder.Configure() + .UseConsolonia() + .UseAutoDetectedConsole(); +} +``` \ No newline at end of file diff --git a/src/Consolonia.Designer/Assembly.cs b/src/Consolonia.Themes/Assembly.cs similarity index 100% rename from src/Consolonia.Designer/Assembly.cs rename to src/Consolonia.Themes/Assembly.cs diff --git a/src/Consolonia.Themes.TurboVision/Consolonia.Themes.TurboVision.csproj b/src/Consolonia.Themes/Consolonia.Themes.csproj similarity index 100% rename from src/Consolonia.Themes.TurboVision/Consolonia.Themes.TurboVision.csproj rename to src/Consolonia.Themes/Consolonia.Themes.csproj diff --git a/src/Consolonia.Themes.TurboVision/Themes/Fluent/FluentColors.axaml b/src/Consolonia.Themes/Fluent/FluentColors.axaml similarity index 64% rename from src/Consolonia.Themes.TurboVision/Themes/Fluent/FluentColors.axaml rename to src/Consolonia.Themes/Fluent/FluentColors.axaml index fbf5ea21..98def9c1 100644 --- a/src/Consolonia.Themes.TurboVision/Themes/Fluent/FluentColors.axaml +++ b/src/Consolonia.Themes/Fluent/FluentColors.axaml @@ -1,42 +1,45 @@ + xmlns:drawing="clr-namespace:Consolonia.Core.Drawing;assembly=Consolonia.Core" + xmlns:system="clr-namespace:System;assembly=System.Runtime"> + 1 - + - + Color="#323130" /> + - + - + + + - - - + - + - + - + - + - + - + + \ No newline at end of file diff --git a/src/Consolonia.Themes.TurboVision/Themes/Fluent/FluentTheme.axaml b/src/Consolonia.Themes/Fluent/FluentTheme.axaml similarity index 58% rename from src/Consolonia.Themes.TurboVision/Themes/Fluent/FluentTheme.axaml rename to src/Consolonia.Themes/Fluent/FluentTheme.axaml index 249c8f07..c97c8fa4 100644 --- a/src/Consolonia.Themes.TurboVision/Themes/Fluent/FluentTheme.axaml +++ b/src/Consolonia.Themes/Fluent/FluentTheme.axaml @@ -1,17 +1,14 @@ - - - + x:Class="Consolonia.Themes.FluentTheme"> - + - + \ No newline at end of file diff --git a/src/Consolonia.Themes.TurboVision/Themes/Fluent/FluentTheme.cs b/src/Consolonia.Themes/FluentTheme.cs similarity index 81% rename from src/Consolonia.Themes.TurboVision/Themes/Fluent/FluentTheme.cs rename to src/Consolonia.Themes/FluentTheme.cs index de514785..81482ddd 100644 --- a/src/Consolonia.Themes.TurboVision/Themes/Fluent/FluentTheme.cs +++ b/src/Consolonia.Themes/FluentTheme.cs @@ -2,7 +2,7 @@ using Avalonia.Markup.Xaml; using Avalonia.Styling; -namespace Consolonia.Themes.TurboVision.Themes.Fluent +namespace Consolonia.Themes { public class FluentTheme : Styles { diff --git a/src/Consolonia.Themes.TurboVision/Themes/Material/MaterialColors.axaml b/src/Consolonia.Themes/Material/MaterialColors.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Themes/Material/MaterialColors.axaml rename to src/Consolonia.Themes/Material/MaterialColors.axaml diff --git a/src/Consolonia.Themes.TurboVision/Themes/Material/MaterialTheme.axaml b/src/Consolonia.Themes/Material/MaterialTheme.axaml similarity index 62% rename from src/Consolonia.Themes.TurboVision/Themes/Material/MaterialTheme.axaml rename to src/Consolonia.Themes/Material/MaterialTheme.axaml index 6e7ba9c2..cc8463d9 100644 --- a/src/Consolonia.Themes.TurboVision/Themes/Material/MaterialTheme.axaml +++ b/src/Consolonia.Themes/Material/MaterialTheme.axaml @@ -1,14 +1,14 @@ + x:Class="Consolonia.Themes.MaterialTheme"> - + - + \ No newline at end of file diff --git a/src/Consolonia.Themes.TurboVision/Themes/Material/MaterialTheme.cs b/src/Consolonia.Themes/MaterialTheme.cs similarity index 81% rename from src/Consolonia.Themes.TurboVision/Themes/Material/MaterialTheme.cs rename to src/Consolonia.Themes/MaterialTheme.cs index a61818a6..6a4dfb43 100644 --- a/src/Consolonia.Themes.TurboVision/Themes/Material/MaterialTheme.cs +++ b/src/Consolonia.Themes/MaterialTheme.cs @@ -2,7 +2,7 @@ using Avalonia.Markup.Xaml; using Avalonia.Styling; -namespace Consolonia.Themes.TurboVision.Themes.Material +namespace Consolonia.Themes { public class MaterialTheme : Styles { diff --git a/src/Consolonia.Themes/README.md b/src/Consolonia.Themes/README.md new file mode 100644 index 00000000..4778d048 --- /dev/null +++ b/src/Consolonia.Themes/README.md @@ -0,0 +1,34 @@ +# Consolonia.Themes.TurboVision +Consolonia is a TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) + +Supports XAML, data bindings, animation, styling and the rest from Avalonia. + +# Showcase (click picture to see video) +[![datagridpic](https://user-images.githubusercontent.com/10516222/141980173-4eb4057a-6996-45bf-83f6-931316c98d88.png)](https://youtu.be/ttgZmbruk3Y) + +This package contains the following Consolonia Themes: +* **MaterialTheme** - Material Design theme +* **FluentTheme** - Fluent Design theme +* **TurboVisionTheme** - TurboVision theme +* **TurboVisionDarkTheme** - TurboVision Dark theme +* **TurboVisionBlackTheme** - TurboVision Black theme + +# Usage +Define an application with a theme + +## Define an application +Themes are styles which are applied to the application. + +HelloWorldApp.cs +```csharp +// use HelloWorldWindow as the MainWindow for the application +public class HelloWorldApp : ConsoloniaApplication +{ + public override void Initialize() + { + // set the theme + Styles.Add(new MaterialTheme()); + } +} +``` + diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/AllControls.axaml b/src/Consolonia.Themes/Templates/Controls/AllControls.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/AllControls.axaml rename to src/Consolonia.Themes/Templates/Controls/AllControls.axaml diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Button.axaml b/src/Consolonia.Themes/Templates/Controls/Button.axaml similarity index 98% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Button.axaml rename to src/Consolonia.Themes/Templates/Controls/Button.axaml index fe9e7296..1f591207 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Button.axaml +++ b/src/Consolonia.Themes/Templates/Controls/Button.axaml @@ -1,6 +1,6 @@ + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/CalendarDayButton.axaml b/src/Consolonia.Themes/Templates/Controls/CalendarDayButton.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/CalendarDayButton.axaml rename to src/Consolonia.Themes/Templates/Controls/CalendarDayButton.axaml diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/CalendarItem.axaml b/src/Consolonia.Themes/Templates/Controls/CalendarItem.axaml similarity index 98% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/CalendarItem.axaml rename to src/Consolonia.Themes/Templates/Controls/CalendarItem.axaml index c8b978bf..c4b288d8 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/CalendarItem.axaml +++ b/src/Consolonia.Themes/Templates/Controls/CalendarItem.axaml @@ -1,6 +1,6 @@ diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/CaretControl.axaml b/src/Consolonia.Themes/Templates/Controls/CaretControl.axaml similarity index 97% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/CaretControl.axaml rename to src/Consolonia.Themes/Templates/Controls/CaretControl.axaml index 09aa6141..d631252e 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/CaretControl.axaml +++ b/src/Consolonia.Themes/Templates/Controls/CaretControl.axaml @@ -1,6 +1,6 @@ diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/CheckBox.axaml b/src/Consolonia.Themes/Templates/Controls/CheckBox.axaml similarity index 98% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/CheckBox.axaml rename to src/Consolonia.Themes/Templates/Controls/CheckBox.axaml index bc518e3b..f7e5149c 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/CheckBox.axaml +++ b/src/Consolonia.Themes/Templates/Controls/CheckBox.axaml @@ -1,6 +1,6 @@ + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/DataValidationErrors.axaml b/src/Consolonia.Themes/Templates/Controls/DataValidationErrors.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/DataValidationErrors.axaml rename to src/Consolonia.Themes/Templates/Controls/DataValidationErrors.axaml diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/DialogWindow.axaml b/src/Consolonia.Themes/Templates/Controls/DialogWindow.axaml similarity index 99% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/DialogWindow.axaml rename to src/Consolonia.Themes/Templates/Controls/DialogWindow.axaml index f2bc9d26..ef4fb85e 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/DialogWindow.axaml +++ b/src/Consolonia.Themes/Templates/Controls/DialogWindow.axaml @@ -1,7 +1,7 @@ 1,0 diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/FlyoutPresenter.axaml b/src/Consolonia.Themes/Templates/Controls/FlyoutPresenter.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/FlyoutPresenter.axaml rename to src/Consolonia.Themes/Templates/Controls/FlyoutPresenter.axaml diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/AreIntegersEqualConverter.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/AreIntegersEqualConverter.cs similarity index 89% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/AreIntegersEqualConverter.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/AreIntegersEqualConverter.cs index b900d59d..2f5cdc70 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/AreIntegersEqualConverter.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/AreIntegersEqualConverter.cs @@ -4,7 +4,7 @@ using System.Linq; using Avalonia.Data.Converters; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { public class AreIntegersEqualConverter : IMultiValueConverter { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/BooleanAndConverter.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/BooleanAndConverter.cs similarity index 86% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/BooleanAndConverter.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/BooleanAndConverter.cs index 44c4ea24..d5fc2632 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/BooleanAndConverter.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/BooleanAndConverter.cs @@ -4,7 +4,7 @@ using System.Linq; using Avalonia.Data.Converters; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { public class BooleanAndConverter : IMultiValueConverter { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ButtonExtensions.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/ButtonExtensions.cs similarity index 95% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ButtonExtensions.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/ButtonExtensions.cs index 69fc5d7e..727b00bf 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ButtonExtensions.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/ButtonExtensions.cs @@ -5,7 +5,7 @@ using Avalonia.Interactivity; using Avalonia.Reactive; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { public static class ButtonExtensions { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/CalendarDatePickerExtensions.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/CalendarDatePickerExtensions.cs similarity index 97% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/CalendarDatePickerExtensions.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/CalendarDatePickerExtensions.cs index 688656c7..c0b508b0 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/CalendarDatePickerExtensions.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/CalendarDatePickerExtensions.cs @@ -6,7 +6,7 @@ using Avalonia.VisualTree; using Consolonia.Core.Helpers; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { internal static class CalendarDatePickerExtensions { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/CalendarExtensions.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/CalendarExtensions.cs similarity index 94% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/CalendarExtensions.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/CalendarExtensions.cs index 0f079e26..186907ce 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/CalendarExtensions.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/CalendarExtensions.cs @@ -3,7 +3,7 @@ using Avalonia.Input; using Consolonia.Core.Helpers; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { public static class CalendarExtensions { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/CaretControl.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/CaretControl.cs similarity index 90% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/CaretControl.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/CaretControl.cs index e94e76d1..c16d63bb 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/CaretControl.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/CaretControl.cs @@ -2,7 +2,7 @@ using Avalonia.Controls; using Avalonia.Controls.Primitives; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { public class CaretControl : ContentControl { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ComboBoxExtensions.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/ComboBoxExtensions.cs similarity index 97% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ComboBoxExtensions.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/ComboBoxExtensions.cs index 91072c1a..1d9994de 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ComboBoxExtensions.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/ComboBoxExtensions.cs @@ -7,7 +7,7 @@ using Avalonia.Threading; using Consolonia.Core.Helpers; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { internal static class ComboBoxExtensions { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ConsoloniaTextPresenter.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/ConsoloniaTextPresenter.cs similarity index 98% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ConsoloniaTextPresenter.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/ConsoloniaTextPresenter.cs index 29b44ca0..dc863d96 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ConsoloniaTextPresenter.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/ConsoloniaTextPresenter.cs @@ -10,7 +10,7 @@ using Consolonia.Core.Drawing.PixelBufferImplementation; using Consolonia.Core.Helpers; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { public class ConsoloniaTextPresenter : TextPresenter { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/DataGridExtensions.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/DataGridExtensions.cs similarity index 89% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/DataGridExtensions.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/DataGridExtensions.cs index 223064c2..0d323670 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/DataGridExtensions.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/DataGridExtensions.cs @@ -1,7 +1,7 @@ using Avalonia; using Avalonia.Controls; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { public static class DataGridExtensions { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/DropDownExtensions.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/DropDownExtensions.cs similarity index 97% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/DropDownExtensions.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/DropDownExtensions.cs index 6a8594a2..f41235aa 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/DropDownExtensions.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/DropDownExtensions.cs @@ -6,7 +6,7 @@ using Avalonia.Reactive; using Avalonia.Threading; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { internal static class DropDownExtensions { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/FastLineSeparator.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/FastLineSeparator.cs similarity index 96% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/FastLineSeparator.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/FastLineSeparator.cs index bed5768c..1a16fba9 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/FastLineSeparator.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/FastLineSeparator.cs @@ -3,7 +3,7 @@ using Avalonia.Layout; using Avalonia.Media; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { public class FastLineSeparator : Control { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/MenuExtensions.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/MenuExtensions.cs similarity index 97% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/MenuExtensions.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/MenuExtensions.cs index 28f0713b..63f5e2a7 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/MenuExtensions.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/MenuExtensions.cs @@ -10,7 +10,7 @@ using Avalonia.VisualTree; using Consolonia.Core.Helpers; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { internal static class MenuExtensions { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ScrollViewerExtensions.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/ScrollViewerExtensions.cs similarity index 98% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ScrollViewerExtensions.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/ScrollViewerExtensions.cs index 6e3a3e4c..8c5f38cf 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/ScrollViewerExtensions.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/ScrollViewerExtensions.cs @@ -6,7 +6,7 @@ using Avalonia.Input; using Consolonia.Core.Helpers; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { internal static class ScrollViewerExtensions { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/SymbolsControl.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/SymbolsControl.cs similarity index 98% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/SymbolsControl.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/SymbolsControl.cs index e21c1b07..5271065c 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/SymbolsControl.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/SymbolsControl.cs @@ -9,7 +9,7 @@ using Avalonia.Platform; using Consolonia.Core.Helpers; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { /// /// Represents a control that displays symbols. diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/TextBoxCaret.cs b/src/Consolonia.Themes/Templates/Controls/Helpers/TextBoxCaret.cs similarity index 96% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/TextBoxCaret.cs rename to src/Consolonia.Themes/Templates/Controls/Helpers/TextBoxCaret.cs index 9121ac0b..b8313287 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/Helpers/TextBoxCaret.cs +++ b/src/Consolonia.Themes/Templates/Controls/Helpers/TextBoxCaret.cs @@ -5,7 +5,7 @@ using Avalonia.Reactive; using Consolonia.Core.Drawing; -namespace Consolonia.Themes.TurboVision.Templates.Controls.Helpers +namespace Consolonia.Themes.Templates.Controls.Helpers { public class TextBoxCaret : Control { diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/ItemsControl.axaml b/src/Consolonia.Themes/Templates/Controls/ItemsControl.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/ItemsControl.axaml rename to src/Consolonia.Themes/Templates/Controls/ItemsControl.axaml diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/LightDismissOverlaylayer.axaml b/src/Consolonia.Themes/Templates/Controls/LightDismissOverlaylayer.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/LightDismissOverlaylayer.axaml rename to src/Consolonia.Themes/Templates/Controls/LightDismissOverlaylayer.axaml diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/ListBox.axaml b/src/Consolonia.Themes/Templates/Controls/ListBox.axaml similarity index 96% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/ListBox.axaml rename to src/Consolonia.Themes/Templates/Controls/ListBox.axaml index aff3aead..1db8b164 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/ListBox.axaml +++ b/src/Consolonia.Themes/Templates/Controls/ListBox.axaml @@ -1,6 +1,6 @@ + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/OverlayPopupHost.axaml b/src/Consolonia.Themes/Templates/Controls/OverlayPopupHost.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/OverlayPopupHost.axaml rename to src/Consolonia.Themes/Templates/Controls/OverlayPopupHost.axaml diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Panel.axaml b/src/Consolonia.Themes/Templates/Controls/Panel.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Panel.axaml rename to src/Consolonia.Themes/Templates/Controls/Panel.axaml diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/Popup.axaml b/src/Consolonia.Themes/Templates/Controls/Popup.axaml similarity index 100% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/Popup.axaml rename to src/Consolonia.Themes/Templates/Controls/Popup.axaml diff --git a/src/Consolonia.Themes.TurboVision/Templates/Controls/ProgressBar.axaml b/src/Consolonia.Themes/Templates/Controls/ProgressBar.axaml similarity index 98% rename from src/Consolonia.Themes.TurboVision/Templates/Controls/ProgressBar.axaml rename to src/Consolonia.Themes/Templates/Controls/ProgressBar.axaml index 6fe9c85c..cfa1bdcf 100644 --- a/src/Consolonia.Themes.TurboVision/Templates/Controls/ProgressBar.axaml +++ b/src/Consolonia.Themes/Templates/Controls/ProgressBar.axaml @@ -1,6 +1,6 @@ + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> + xmlns:helpers1="clr-namespace:Consolonia.Themes.Templates.Controls.Helpers;assembly=Consolonia.Themes"> - - - \ No newline at end of file diff --git a/src/Tools/Consolonia.PreviewHost/App.axaml.cs b/src/Tools/Consolonia.PreviewHost/App.cs similarity index 96% rename from src/Tools/Consolonia.PreviewHost/App.axaml.cs rename to src/Tools/Consolonia.PreviewHost/App.cs index 64724bb2..a2d9e296 100644 --- a/src/Tools/Consolonia.PreviewHost/App.axaml.cs +++ b/src/Tools/Consolonia.PreviewHost/App.cs @@ -1,9 +1,9 @@ using System.Globalization; using Avalonia.Controls.ApplicationLifetimes; -using Avalonia.Markup.Xaml; using Consolonia.Core.Infrastructure; using Consolonia.PreviewHost.ViewModels; using Consolonia.PreviewHost.Views; +using Consolonia.Themes; namespace Consolonia.PreviewHost { @@ -17,12 +17,7 @@ static App() public App() { - InitializeComponent(); - } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); + Styles.Add(new MaterialTheme()); } public override void OnFrameworkInitializationCompleted() diff --git a/src/Tools/Consolonia.PreviewHost/Consolonia.PreviewHost.csproj b/src/Tools/Consolonia.PreviewHost/Consolonia.PreviewHost.csproj index b34dbc11..adcc6381 100644 --- a/src/Tools/Consolonia.PreviewHost/Consolonia.PreviewHost.csproj +++ b/src/Tools/Consolonia.PreviewHost/Consolonia.PreviewHost.csproj @@ -9,28 +9,16 @@ Consolonia.PreviewHost - - Icon.png - readme.md - - - - - - - - - - + + - diff --git a/src/Tools/Consolonia.PreviewHost/Program.cs b/src/Tools/Consolonia.PreviewHost/Program.cs index ac58d538..a6937ad1 100644 --- a/src/Tools/Consolonia.PreviewHost/Program.cs +++ b/src/Tools/Consolonia.PreviewHost/Program.cs @@ -1,10 +1,7 @@ using System.Globalization; using System.Text; using Avalonia; -using Consolonia.Core; using Consolonia.Core.Dummy; -using Consolonia.Core.Infrastructure; -using Consolonia.PlatformSupport; namespace Consolonia.PreviewHost { diff --git a/src/Tools/Consolonia.PreviewHost/readme.md b/src/Tools/Consolonia.PreviewHost/readme.md index ad5c8ac8..26d1dc74 100644 --- a/src/Tools/Consolonia.PreviewHost/readme.md +++ b/src/Tools/Consolonia.PreviewHost/readme.md @@ -1,6 +1,14 @@ # Consolonia.PreviewHost This is a tool which enables a live view of a consolonia axaml file, or a consolonia project. +## Background +Consolonia is a TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) + +Supports XAML, data bindings, animation, styling and the rest from Avalonia. + +## Showcase (click picture to see video) +[![datagridpic](https://user-images.githubusercontent.com/10516222/141980173-4eb4057a-6996-45bf-83f6-931316c98d88.png)](https://youtu.be/ttgZmbruk3Y) + ## Installation To install the tool, you can use the following command: ```