-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7baaeaa
commit 3581e56
Showing
6 changed files
with
147 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/Sudoku.Presentation/Presentation/Nodes/Shapes/PencilMarkViewNode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
namespace Sudoku.Presentation.Nodes.Shapes; | ||
|
||
/// <summary> | ||
/// Defines a pencil-mark view node. | ||
/// </summary> | ||
public sealed partial class PencilMarkViewNode : SingleCellMarkViewNode | ||
{ | ||
/// <summary> | ||
/// Initializes a <see cref="PencilMarkViewNode"/> instance via the specified values. | ||
/// </summary> | ||
/// <param name="cell">The cell.</param> | ||
/// <param name="notation">The notation.</param> | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public PencilMarkViewNode(int cell, string notation) : base(DisplayColorKind.Normal, cell, Direction.None) => Notation = notation; | ||
|
||
|
||
/// <summary> | ||
/// Indicates the notation. | ||
/// </summary> | ||
public string Notation { get; } | ||
|
||
|
||
/// <inheritdoc/> | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public override bool Equals([NotNullWhen(true)] ViewNode? other) | ||
=> other is PencilMarkViewNode comparer | ||
&& Identifier == comparer.Identifier && Cell == comparer.Cell && Notation == comparer.Notation; | ||
|
||
[GeneratedOverriddingMember(GeneratedGetHashCodeBehavior.CallingHashCodeCombine, nameof(Identifier), nameof(Cell), nameof(Notation))] | ||
public override partial int GetHashCode(); | ||
|
||
[GeneratedOverriddingMember(GeneratedToStringBehavior.RecordLike, nameof(Identifier), nameof(Cell), nameof(Notation))] | ||
public override partial string ToString(); | ||
|
||
/// <inheritdoc/> | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public override PencilMarkViewNode Clone() => new(Cell, Notation); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.