Skip to content

Commit

Permalink
update readmes, change previewhost gallery to use ConsoloniaApplicati…
Browse files Browse the repository at this point in the history
…on<T>
  • Loading branch information
tomlm committed Dec 5, 2024
1 parent 2dfb3fb commit 135fd58
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 66 deletions.
11 changes: 6 additions & 5 deletions src/Consolonia.Core/README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
4 changes: 2 additions & 2 deletions src/Consolonia.Designer/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
15 changes: 2 additions & 13 deletions src/Consolonia.Gallery/App.cs
Original file line number Diff line number Diff line change
@@ -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<ControlsListView>
{
static App()
{
Expand All @@ -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();
}
}
}
10 changes: 4 additions & 6 deletions src/Consolonia.NUnit/README.md
Original file line number Diff line number Diff line change
@@ -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&lt;App$gt;.

Expand Down
10 changes: 4 additions & 6 deletions src/Consolonia.PlatformSupport/README.md
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
41 changes: 29 additions & 12 deletions src/Consolonia.Themes.TurboVision/README.md
Original file line number Diff line number Diff line change
@@ -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
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<HelloWorldWindow>
{
public override void Initialize()
{
// set the theme
Styles.Add(new MaterialTheme());
}
}
```

13 changes: 6 additions & 7 deletions src/Example/App.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Consolonia.Core.Infrastructure;
using Consolonia.Themes.TurboVision.Themes;
using Consolonia.Themes;
using Example.Views;

namespace Example
Expand All @@ -9,12 +9,11 @@ public partial class App : ConsoloniaApplication<DataGridTestWindow>
{
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());
}
}
}
8 changes: 0 additions & 8 deletions src/Tools/Consolonia.PreviewHost/App.axaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
{
Expand All @@ -17,12 +17,7 @@ static App()

public App()
{
InitializeComponent();
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
this.Styles.Add(new MaterialTheme());
}

public override void OnFrameworkInitializationCompleted()
Expand Down
8 changes: 8 additions & 0 deletions src/Tools/Consolonia.PreviewHost/readme.md
Original file line number Diff line number Diff line change
@@ -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:
```
Expand Down

0 comments on commit 135fd58

Please sign in to comment.