Add primitive visual property

This commit is contained in:
RedikultsevEvg
2025-08-03 23:37:50 +05:00
parent 6e8f4bcc58
commit 466c57feef
52 changed files with 742 additions and 138 deletions

View File

@@ -0,0 +1,32 @@
using Newtonsoft.Json;
using StructureHelperCommon.Models.VisualProperties;
using StructureHelperCommon.Services.ColorServices;
using System.Windows.Media;
namespace DataAccess.DTOs
{
public class PrimitiveVisualPropertyDTO : IPrimitiveVisualProperty
{
[JsonProperty("Id")]
public Guid Id { get; }
[JsonProperty("IsVisible")]
public bool IsVisible { get; set; } = true;
[JsonProperty("Color")]
public Color Color { get; set; } = ColorProcessor.GetRandomColor();
[JsonProperty("Zindex")]
public int ZIndex { get; set; } = 0;
[JsonProperty("Opacity")]
public double Opacity { get; set; } = 1;
public PrimitiveVisualPropertyDTO(Guid id)
{
Id = id;
}
public object Clone()
{
return this;
}
}
}