Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
49100fc
add led control docs
Jul 20, 2026
c97f1d9
update architecture docs
Jul 20, 2026
cad1353
add Led controls docs
Jul 20, 2026
7b25716
update main docs because adding Led controls
Jul 20, 2026
0606811
add Led main project
Jul 20, 2026
e7bb880
add Led controls tests
Jul 20, 2026
b0379d6
add performance tool for Led controls
Jul 20, 2026
43b1744
add Led controls of Segment
Jul 20, 2026
f6f3d00
add tests of Led controls Segment
Jul 20, 2026
0a75f94
add Led controls Matrix
Jul 20, 2026
a70688a
add tests of Led controls Matrix
Jul 20, 2026
dedd8cd
add tests for Glow feature and Character feature
Jul 20, 2026
4a5e0c4
add LedSegment showcases
Jul 20, 2026
59b036e
add LedMatrix showcases
Jul 20, 2026
4741eb9
update meta information of Led controls to AtomUI.Labs
Jul 20, 2026
f2fe4b7
Segment extremely condition tests
Jul 20, 2026
094ef58
Matrix extremely condition tests
Jul 20, 2026
ed8aa75
update Led.Matrix performance doc
Jul 20, 2026
30fb517
update Led.Segment performance doc
Jul 20, 2026
57d1833
update Glow feature doc
Jul 20, 2026
de980cd
update Led overview doc
Jul 20, 2026
48451d3
optimize Led.Segment
Jul 20, 2026
8b8878e
update Led.Tests project
Jul 20, 2026
3f50cb5
update main project
Jul 20, 2026
26c25e6
optimize Led performance tool
Jul 20, 2026
1256069
add finitely diagnose
Jul 20, 2026
e93b178
add IMarqueeMotion interface
Jul 20, 2026
28e64b6
Optimize Led.Matrix display
Jul 20, 2026
0d8f28a
Optimize Led glow dispose process
Jul 20, 2026
7951480
彻底修改包名,遵守AtomUI.Labs标准
Jul 24, 2026
d2ebaf3
optimized Segment Glow Workbench examples
Jul 24, 2026
8a7fbfa
移除了Marquee MatrixDisplay Width="620"
Jul 24, 2026
b0d113f
rename labs namespace prefix to atom.labs
kusarparlly Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AtomUI.Labs.slnx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Solution>
<Project Path="src/AtomUI.Labs.Controls.Led/AtomUI.Labs.Controls.Led.csproj" />
<Project Path="tests/AtomUI.Labs.Controls.Led.Tests/AtomUI.Labs.Controls.Led.Tests.csproj" />
<Project Path="controlgallery/AtomUILabsGallery/AtomUILabsGallery.csproj" />
<Project Path="controlgallery/AtomUILabsGallery.Desktop/AtomUILabsGallery.Desktop.csproj" />
</Solution>
3 changes: 1 addition & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<RestoreAdditionalProjectSources>$(RestoreAdditionalProjectSources);$(MSBuildThisFileDirectory)../AtomUI.Base/output/Nuget/Release</RestoreAdditionalProjectSources>
<RestoreAdditionalProjectSources Condition="Exists('$(MSBuildThisFileDirectory)../AtomUI.Base/output/Nuget/Release')">$(RestoreAdditionalProjectSources);$(MSBuildThisFileDirectory)../AtomUI.Base/output/Nuget/Release</RestoreAdditionalProjectSources>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)/build/Version.props"/>
<Import Project="$(MSBuildThisFileDirectory)/build/Common.props"/>
<Import Project="$(MSBuildThisFileDirectory)/build/PackageMetaInfo.props"/>
<Import Project="$(MSBuildThisFileDirectory)/build/Output.props"/>
</Project>

2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="AtomUI.Core" Version="$(AtomUIVersion)"/>
<PackageVersion Include="AtomUI.Desktop.Controls" Version="$(AtomUIVersion)"/>
<PackageVersion Include="AtomUI.Toolkits.GalleryBase" Version="$(AtomUIVersion)"/>
<PackageVersion Include="AtomUI.Generator" Version="$(AtomUIVersion)"/>

<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
<PackageVersion Include="Avalonia.Headless" Version="$(AvaloniaVersion)"/>
<PackageVersion Include="Avalonia.Skia" Version="$(AvaloniaVersion)"/>
<PackageVersion Include="AvaloniaUI.DiagnosticsSupport" Version="2.2.1"/>
<PackageVersion Include="ReactiveUI.Avalonia" Version="12.0.3"/>

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ Labs package names follow this pattern:
dotnet add package AtomUI.Labs.Controls.<ControlName>
```

For example, install the currently implemented LED family with:

```bash
dotnet add package AtomUI.Labs.Controls.Led
```

Use a Labs package version that matches your AtomUI package version.

## Common Commands
Expand All @@ -45,6 +51,8 @@ Package artifacts are written to `output/Nuget/<Configuration>`.

- [Engineering overview](docs/engineering/overview.md)
- [Build and packaging](docs/architecture/build-and-packaging.md)
- [Experimental controls](docs/controls/overview.md)
- [LED control family](docs/controls/led/overview.md)
- [Global engineering guidelines](docs/global-engineering-guidelines.md)

## Status
Expand Down
8 changes: 8 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ Labs 包名遵循以下格式:
dotnet add package AtomUI.Labs.Controls.<ControlName>
```

例如,安装当前已经实现的 LED 控件家族:

```bash
dotnet add package AtomUI.Labs.Controls.Led
```

Labs 包版本应与应用使用的 AtomUI 主包版本保持一致。

## 常用命令
Expand All @@ -45,6 +51,8 @@ git diff --check

- [工程规范总览](docs/engineering/overview.md)
- [构建、打包与发布](docs/architecture/build-and-packaging.md)
- [实验控件文档](docs/controls/overview.md)
- [LED 控件家族](docs/controls/led/overview.md)
- [全局工程规范](docs/global-engineering-guidelines.md)

## 状态说明
Expand Down
5 changes: 5 additions & 0 deletions controlgallery/AtomUILabsGallery/AtomUILabsGallery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<AssemblyName>AtomUILabsGallery</AssemblyName>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="AtomUI.Labs.Controls.Led.Tests" />
</ItemGroup>

<ItemGroup>
<AssemblyMetadata Include="AtomUIVersion" Value="$(AtomUIVersion)"/>
<AssemblyMetadata Include="AtomUILabsVersion" Value="$(AtomUILabsVersion)"/>
Expand All @@ -16,6 +20,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../../src/AtomUI.Labs.Controls.Led/AtomUI.Labs.Controls.Led.csproj"/>
<PackageReference Include="Avalonia"/>
<PackageReference Include="AtomUI.Desktop.Controls"/>
<PackageReference Include="AtomUI.Toolkits.GalleryBase"/>
Expand Down
7 changes: 5 additions & 2 deletions controlgallery/AtomUILabsGallery/AtomUILabsGalleryModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using AtomUI.Toolkits.GalleryBase.Configuration;
using AtomUI.Toolkits.GalleryBase.Routing;
using AtomUILabsGallery.ShowCases;
using AtomUILabsGallery.ShowCases.Led;
using Avalonia.Controls;
using ReactiveUI;

Expand Down Expand Up @@ -51,13 +52,15 @@ private static void ConfigureNavigation(AtomUI.Toolkits.GalleryBase.Navigation.G
navigation.AddPage(OverviewViewModel.ID, "Overview", Icon(AntDesignIconKind.HomeOutlined));

var labs = navigation.AddGroup("Labs", "Labs Controls", Icon(AntDesignIconKind.AppstoreOutlined));
labs.AddPage(BlankViewModel.ID, "Blank Showcase", Icon(AntDesignIconKind.ExperimentOutlined));
labs.AddPage(LedSegmentViewModel.ID, "LED Segment Display", Icon(AntDesignIconKind.FieldNumberOutlined));
labs.AddPage(LedMatrixViewModel.ID, "LED Matrix Display", Icon(AntDesignIconKind.TableOutlined));
}

private static void ConfigureRoutes(GalleryRouteRegistry routes)
{
routes.Map(OverviewViewModel.ID, screen => new OverviewViewModel(screen), () => new OverviewShowCase());
routes.Map(BlankViewModel.ID, screen => new BlankViewModel(screen), () => new BlankShowCase());
routes.Map(LedSegmentViewModel.ID, screen => new LedSegmentViewModel(screen), () => new LedSegmentShowCase());
routes.Map(LedMatrixViewModel.ID, screen => new LedMatrixViewModel(screen), () => new LedMatrixShowCase());
}

private static Func<PathIcon> Icon(AntDesignIconKind kind)
Expand Down
32 changes: 0 additions & 32 deletions controlgallery/AtomUILabsGallery/ShowCases/BlankShowCase.axaml

This file was deleted.

27 changes: 0 additions & 27 deletions controlgallery/AtomUILabsGallery/ShowCases/BlankShowCase.axaml.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
using AtomUI.Labs.Controls.Led.Matrix;
using AtomUI.Labs.Controls.Led.Segment;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
using Avalonia.Threading;
using Avalonia.VisualTree;

namespace AtomUILabsGallery.ShowCases.Led;

public sealed class LedDynamicDisplays : StackPanel
{
private readonly SegmentDisplay _clockDisplay;
private readonly SegmentDisplay _segmentCounterDisplay;
private readonly MatrixDisplay _matrixCounterDisplay;
private readonly DispatcherTimer _timer;
private int _counter;

public LedDynamicDisplays()
{
Spacing = 12;
_clockDisplay = CreateSegmentDisplay();
_segmentCounterDisplay = CreateSegmentDisplay();
_matrixCounterDisplay = new MatrixDisplay
{
DotSize = 7,
DotSpacing = 2,
CharacterSpacing = 9,
Padding = new Thickness(14),
Background = new SolidColorBrush(Color.FromRgb(9, 18, 14)),
ActiveBrush = new SolidColorBrush(Color.FromRgb(97, 247, 157)),
InactiveBrush = new SolidColorBrush(Color.FromArgb(34, 97, 247, 157)),
CornerRadius = new CornerRadius(8),
HorizontalContentAlignment = HorizontalAlignment.Center,
VerticalContentAlignment = VerticalAlignment.Center
};
Children.Add(_clockDisplay);
Children.Add(new Grid
{
ColumnDefinitions = new ColumnDefinitions("*,*"),
ColumnSpacing = 12,
Children =
{
_segmentCounterDisplay,
PlaceInSecondColumn(_matrixCounterDisplay)
}
});

_timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) };
_timer.Tick += HandleTimerTick;
AttachedToVisualTree += HandleAttachedToVisualTree;
DetachedFromVisualTree += HandleDetachedFromVisualTree;
UpdateDisplays();
}

private static SegmentDisplay CreateSegmentDisplay()
{
return new SegmentDisplay
{
CharacterHeight = 54,
SegmentThickness = 6,
SegmentGap = 2,
CharacterSpacing = 7,
Padding = new Thickness(14),
Background = new SolidColorBrush(Color.FromRgb(8, 12, 16)),
ActiveBrush = new SolidColorBrush(Color.FromRgb(83, 237, 255)),
InactiveBrush = new SolidColorBrush(Color.FromArgb(34, 83, 237, 255)),
CornerRadius = new CornerRadius(10),
HorizontalContentAlignment = HorizontalAlignment.Center,
VerticalContentAlignment = VerticalAlignment.Center
};
}

private static Control PlaceInSecondColumn(Control control)
{
Grid.SetColumn(control, 1);
return control;
}

private void HandleAttachedToVisualTree(object? sender, VisualTreeAttachmentEventArgs e)
{
UpdateDisplays();
_timer.Start();
}

private void HandleDetachedFromVisualTree(object? sender, VisualTreeAttachmentEventArgs e)
{
_timer.Stop();
}

private void HandleTimerTick(object? sender, EventArgs e)
{
UpdateDisplays();
}

private void UpdateDisplays()
{
var now = DateTime.Now;
_clockDisplay.Text = $"{now:HH}:{now:mm}:{now:ss}";
_segmentCounterDisplay.Text = _counter.ToString("D4");
_matrixCounterDisplay.Text = _counter.ToString("D6");
_counter = (_counter + 1) % 1_000_000;
}
}
Loading