36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using RobotNet.MapShares.Dtos;
|
|
using RobotNet.MapShares.Enums;
|
|
|
|
namespace RobotNet.WebApp.Robots.Components.Monitoring.Element;
|
|
|
|
public class ZoneModel(ZoneDto Data) : IDisposable
|
|
{
|
|
public Guid Id => Data.Id;
|
|
public Guid MapId => Data.MapId;
|
|
public ZoneType Type => Data.Type;
|
|
|
|
public double X1 => Data.X1;
|
|
public double Y1 => Data.Y1;
|
|
public double X2 => Data.X2;
|
|
public double Y2 => Data.Y2;
|
|
public double X3 => Data.X3;
|
|
public double Y3 => Data.Y3;
|
|
public double X4 => Data.X4;
|
|
public double Y4 => Data.Y4;
|
|
|
|
public string Fill => Data.Type switch
|
|
{
|
|
ZoneType.Confined => "#c29ffa", // Vùng hoạt động hạn chế
|
|
ZoneType.Forbidden => "#ea868f", // Vùng cấm di chuyển
|
|
ZoneType.Operating => "#79dfc1", // Vùng hoạt động bình thường
|
|
ZoneType.OperatingHazard => "#ffda6a", // Vùng hoạt động nguy hiểm
|
|
ZoneType.Restricted => "#fd9843", // Vùng hoạt động giới hạn
|
|
ZoneType.LoadTransfer => "#e685b5", // Vùng chuyển hàng
|
|
_ => "none",
|
|
};
|
|
public void Dispose()
|
|
{
|
|
GC.SuppressFinalize(this);
|
|
}
|
|
}
|