first commit -push
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user