Class Scoresheet
Blazor component to list the moves from a chess game
It offers Scoresheet.DisplayMode
You can select if moves shall be outputted in SAN, FIGURINE or in UCI (as used in UCI protocol for engines)
The component is able to output Comments and Variations
Inheritance
Inherited Members
Namespace: PonzianiComponents
Assembly: PonzianiComponents.dll
Syntax
public class Scoresheet
Properties
| Improve this Doc View SourceColorCommentBackground
Background color for comments in tabular mode
Declaration
[Parameter]
public string ColorCommentBackground { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ColorCommentText
Text color for comments in inline modes and for comments within variations in tabular mode
Declaration
[Parameter]
public string ColorCommentText { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ColorVariationBackground
Background color for variations in tabular mode
Declaration
[Parameter]
public string ColorVariationBackground { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Comments
If true comments are displayed
Declaration
[Parameter]
public bool Comments { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ExtendedMoveInfo
If true and extended move info is available (think time, evaluation or depth) this info will be outputted in tabular mode
Declaration
[Parameter]
public bool ExtendedMoveInfo { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Game
The game whose moves are listed in the scoresheet
Declaration
[Parameter]
public Game Game { get; set; }
Property Value
| Type | Description |
|---|---|
| Game |
HierarchicalDisplay
If true, each variation starts on a new line, subvariations are indented
Declaration
[Parameter]
public bool HierarchicalDisplay { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Id
Id of the rendered HTML element
Declaration
[Parameter]
public string Id { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Language
ISO 639-1 two-letter language code
Declaration
[Parameter]
public string Language { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
MinimalRowCount
Minimal number of rows shown in tabular display even independent of number of existing moves
Declaration
[Parameter]
public int MinimalRowCount { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Mode
Display Mode (Tabular or inline)
Declaration
[Parameter]
public Scoresheet.DisplayMode Mode { get; set; }
Property Value
| Type | Description |
|---|---|
| Scoresheet.DisplayMode |
OnMoveSelected
Is called whenever the user selects a move by clicking it
Declaration
[Parameter]
public EventCallback<MoveSelectInfo> OnMoveSelected { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Components.EventCallback<MoveSelectInfo> |
OtherAttributes
Other HTML Attributes, which are applied to the root element of the rendered scoresheet. Depending on Mode this is either a <table> or a <div>
With this mechanism it's possible e.g. to set the width of the scoresheet (in inline mode)
Declaration
[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object> OtherAttributes { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.String, System.Object> |
Type
Notation Type
Declaration
[Parameter]
public Scoresheet.NotationType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| Scoresheet.NotationType |
Variations
If true, variations are displayed
Declaration
[Parameter]
public bool Variations { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
| Improve this Doc View SourceAddMove(ExtendedMove)
API Method to add a move to the scoresheet
Declaration
public bool AddMove(ExtendedMove move)
Parameters
| Type | Name | Description |
|---|---|---|
| ExtendedMove | move | Move to be added |
Returns
| Type | Description |
|---|---|
| System.Boolean | true, if move was added successful, false if not |
AddMove(Move)
API Method to add a move to the scoresheet
Declaration
public bool AddMove(Move move)
Parameters
| Type | Name | Description |
|---|---|---|
| Move | move | Move to be added |
Returns
| Type | Description |
|---|---|
| System.Boolean | true, if move was added successful, false if not |
OnAfterRenderAsync(Boolean)
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | firstRender |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
OnParametersSet()
Declaration
protected override void OnParametersSet()