diff --git a/src/Consolonia.Core/README.md b/src/Consolonia.Core/README.md index febb1204..ca9577bb 100644 --- a/src/Consolonia.Core/README.md +++ b/src/Consolonia.Core/README.md @@ -1,13 +1,14 @@ -# Consolonia UI -TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) +# 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) +## 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 is the core Consolonia library. - # Usage Define an application with a theme (See Consolonia.Themes.TurboVision for themes) diff --git a/src/Consolonia.Designer/README.md b/src/Consolonia.Designer/README.md index 8e8f844d..d938113a 100644 --- a/src/Consolonia.Designer/README.md +++ b/src/Consolonia.Designer/README.md @@ -1,5 +1,5 @@ -# Consolonia UI -TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) +# Consolonia.Designer +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. diff --git a/src/Consolonia.Gallery/App.cs b/src/Consolonia.Gallery/App.cs index 8fb77bc2..950da46a 100644 --- a/src/Consolonia.Gallery/App.cs +++ b/src/Consolonia.Gallery/App.cs @@ -1,15 +1,13 @@ -using System; using System.Globalization; using System.Threading; -using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Styling; using Consolonia.Core.Infrastructure; using Consolonia.Gallery.View; -using Consolonia.Themes.TurboVision.Themes; +using Consolonia.Themes; namespace Consolonia.Gallery { - internal class App : ConsoloniaApplication + internal class App : ConsoloniaApplication { static App() { @@ -28,14 +26,5 @@ public override void RegisterServices() { base.RegisterServices(); } - - 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.NUnit/README.md b/src/Consolonia.NUnit/README.md index d890c865..072e04d5 100644 --- a/src/Consolonia.NUnit/README.md +++ b/src/Consolonia.NUnit/README.md @@ -1,16 +1,14 @@ -# Consolonia UI +# Consolonia.NUnit +This package provides testing support for testing consolonia controls using NUnit. -TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) +## 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. -> 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) -This package provides testing support for testing consolonia controls using NUnit. - ## Usage To create a unit test against your consolonia application your test class should derive from ConsoloniaAppTestBase<App$gt;. diff --git a/src/Consolonia.PlatformSupport/README.md b/src/Consolonia.PlatformSupport/README.md index 1971eec9..6e1111aa 100644 --- a/src/Consolonia.PlatformSupport/README.md +++ b/src/Consolonia.PlatformSupport/README.md @@ -1,16 +1,14 @@ -# Consolonia UI +# Consolonia.PlatformSupport +This package provides Consolonia IConsole platform support for adapting to consoles on Windows, Linux and MacOS environments. -TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) +## 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. -> 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) -This package provides Consolonia IConsole platform support for adapting to consoles on Windows, Linux and MacOS environments. - ## Usage ```csharp AppBuilder BuildAvaloniaApp() diff --git a/src/Consolonia.Themes.TurboVision/README.md b/src/Consolonia.Themes.TurboVision/README.md index 0c9b0120..4778d048 100644 --- a/src/Consolonia.Themes.TurboVision/README.md +++ b/src/Consolonia.Themes.TurboVision/README.md @@ -1,17 +1,34 @@ -# Consolonia UI - -TUI (Text User Interface) (GUI Framework) implementation for [Avalonia UI](https://github.com/AvaloniaUI) +# 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. -> Project is in proof of concept state and is looking for collaboration. - -## Showcase (click picture to see video) +# 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 defines 4 themes for Consolonia -* **MaterialTheme** - Material Design -* **FluentTheme** - Fluent Design -* **TurboVisionTheme** - Turbo Vision -* **TurboVisionDarkTheme** - Turbo Vision Dark -* **TurboVisionBlackTheme** - Turbo Vision Black \ No newline at end of file +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/Example/App.cs b/src/Example/App.cs index 95f7d29e..0aa85663 100644 --- a/src/Example/App.cs +++ b/src/Example/App.cs @@ -1,5 +1,5 @@ using Consolonia.Core.Infrastructure; -using Consolonia.Themes.TurboVision.Themes; +using Consolonia.Themes; using Example.Views; namespace Example @@ -9,12 +9,11 @@ public partial class App : ConsoloniaApplication { public App() { - Styles.Add(new TurboVisionTheme()); - Styles.Add(new TurboVisionBlackTheme()); - Styles.Add(new TurboVisionBlackTheme()); - Styles.Add(new TurboVisionBlackTheme()); - // Styles.Add(new FluentTheme()); - // Styles.Add(new TurboVisionTheme()); + //Styles.Add(new TurboVisionTheme()); + //Styles.Add(new TurboVisionBlackTheme()); + //Styles.Add(new TurboVisionDarkTheme()); + //Styles.Add(new FluentTheme()); + Styles.Add(new MaterialTheme()); } } } \ No newline at end of file diff --git a/src/Tools/Consolonia.PreviewHost/App.axaml b/src/Tools/Consolonia.PreviewHost/App.axaml deleted file mode 100644 index abd90cda..00000000 --- a/src/Tools/Consolonia.PreviewHost/App.axaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ 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..f3657f40 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); + this.Styles.Add(new MaterialTheme()); } public override void OnFrameworkInitializationCompleted() 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: ```