HTLLeonding.Utility.LeoBoard
1.0.0-preview6
Prefix Reserved
This is a prerelease version of HTLLeonding.Utility.LeoBoard.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package HTLLeonding.Utility.LeoBoard --version 1.0.0-preview6
NuGet\Install-Package HTLLeonding.Utility.LeoBoard -Version 1.0.0-preview6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HTLLeonding.Utility.LeoBoard" Version="1.0.0-preview6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HTLLeonding.Utility.LeoBoard --version 1.0.0-preview6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HTLLeonding.Utility.LeoBoard, 1.0.0-preview6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HTLLeonding.Utility.LeoBoard as a Cake Addin #addin nuget:?package=HTLLeonding.Utility.LeoBoard&version=1.0.0-preview6&prerelease // Install HTLLeonding.Utility.LeoBoard as a Cake Tool #tool nuget:?package=HTLLeonding.Utility.LeoBoard&version=1.0.0-preview6&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LeoBoard
A utility library for creating simple, grid based UI application like Minesweeper, Chess, etc.
Allows to draw a grid with specified size, optional row and column numbers, and content for each cell. Left- and right-click events are captured and can be handled to update the cell content.
Sample usage
await Board.Initialize("Demo", 10, 20,
clickHandler: HandleClick,
drawGridNumbers: true);
Board.SetCellContent(0, 0, "X");
Board.SetCellContent(1, 1, "Y", Brushes.Red);
Board.SetCellContent(2, 2, "Z", Brushes.Blue);
Console.WriteLine(Board.GetCellContent(2, 2));
Console.ReadKey();
return;
void HandleClick(int row, int col, bool leftClick)
{
Console.WriteLine($"Clicked cell ({row}, {col}) with {(leftClick ? "left" : "right")} mouse button");
if (leftClick)
{
Board.SetCellContent(row, col, "A", Brushes.Green);
}
else
{
Board.SetCellContent(row, col, "B", Brushes.Purple);
}
}
- The
Console.ReadKey()
call is required to keep the hosting console application alive- Mind the
await
for theInitialize
method
- Mind the
- Allow for a few seconds for the window to appear (some async initialization is happening)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Avalonia (>= 11.1.0-beta1)
- Avalonia.Desktop (>= 11.1.0-beta1)
- Avalonia.Fonts.Inter (>= 11.1.0-beta1)
- Avalonia.Themes.Fluent (>= 11.1.0-beta1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.2.2 | 247 | 8 months ago |
3.2.1 | 150 | 8 months ago |
3.2.0 | 120 | 8 months ago |
3.1.0 | 139 | 9 months ago |
3.0.1 | 93 | 9 months ago |
3.0.0 | 134 | 9 months ago |
2.0.0 | 173 | 9 months ago |
2.0.0-preview1 | 94 | 9 months ago |
1.1.0 | 123 | 9 months ago |
1.0.1 | 176 | 10 months ago |
1.0.0 | 107 | 10 months ago |
1.0.0-preview6 | 88 | 10 months ago |
1.0.0-preview5 | 95 | 10 months ago |
1.0.0-preview4 | 79 | 10 months ago |
1.0.0-preview3 | 86 | 10 months ago |
1.0.0-preview2 | 90 | 10 months ago |
1.0.0-preview1 | 89 | 10 months ago |