Добавьте файлы проекта.
This commit is contained in:
35
Lattice.Core/Models/LayoutNode.cs
Normal file
35
Lattice.Core/Models/LayoutNode.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Lattice.Core.Abstractions;
|
||||
|
||||
namespace Lattice.Core.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Абстрактный базовый класс для всех узлов дерева компоновки.
|
||||
/// </summary>
|
||||
public abstract class LayoutNode : ILayoutElement
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public Guid Id { get; } = Guid.NewGuid();
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public double WidthValue { get; set; } = 1.0;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsWidthStar { get; set; } = true;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public double HeightValue { get; set; } = 1.0;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsHeightStar { get; set; } = true;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ILayoutElement? Parent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Возвращает строковое представление узла для отладки.
|
||||
/// </summary>
|
||||
public override string ToString() => $"{GetType().Name} [{Name}] ({Id.ToString()[..4]})";
|
||||
}
|
||||
Reference in New Issue
Block a user