first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
namespace RobotNet.MapShares.Models;
public class ElementExpressionModel
{
public string MapName { get; set; } = string.Empty;
public string ModelName { get; set; } = string.Empty;
public string Expression { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,40 @@
using System.Text.Json.Serialization;
namespace RobotNet.MapShares.Models;
public class LoggerModel
{
[JsonPropertyName("time")]
public string? Time { get; set; }
[JsonPropertyName("level")]
public string? Level { get; set; }
[JsonPropertyName("message")]
public string? Message { get; set; }
[JsonPropertyName("exception")]
public string? Exception { get; set; }
public string ColorClass => Level switch
{
"WARN" => "text-warning",
"INFO" => "text-info",
"DEBUG" => "text-success",
"ERROR" => "text-danger",
"FATAL" => "text-secondary",
_ => "text-muted",
};
public string BackgroundClass => Level switch
{
"WARN" => "bg-warning text-dark",
"INFO" => "bg-info text-dark",
"DEBUG" => "bg-success text-white",
"ERROR" => "bg-danger text-white",
"FATAL" => "bg-secondary text-white",
_ => "bg-dark text-white",
};
public bool HasException => !string.IsNullOrEmpty(Exception);
}

View File

@@ -0,0 +1,75 @@
using RobotNet.MapShares.Dtos;
using RobotNet.MapShares.Enums;
namespace RobotNet.MapShares.Models;
public enum MapEditorBackupType
{
Node,
ControlPoint1Edge,
ControlPoint2Edge,
Zone,
MoveNode,
MoveEdge,
Copy,
MergeNode,
SplitNode
}
public class MapEditorBackup
{
public MapEditorBackupType Type { get; set; }
public Guid Id { get; set; }
public object Obj { get; set; } = null!;
}
public class MapEditorBackupModel
{
public MapEditorBackup[] Steps { get; set; } = [];
}
public class PositionBackup
{
public Guid Id { get; set; }
public double X { get; set; }
public double Y { get; set; }
}
public class EdgeBackup
{
public Guid Id { get; set; }
public TrajectoryDegree TrajectoryDegree { get; set; }
public double StartX { get; set; }
public double StartY { get; set; }
public double EndX { get; set; }
public double EndY { get; set; }
public double ControlPoint1X { get; set; }
public double ControlPoint1Y { get; set; }
public double ControlPoint2X { get; set; }
public double ControlPoint2Y { get; set; }
}
public class ZoneShapeBackup
{
public int NodeChange { get; set; }
public double X1 { get; set; }
public double Y1 { get; set; }
public double X2 { get; set; }
public double Y2 { get; set; }
public double X3 { get; set; }
public double Y3 { get; set; }
public double X4 { get; set; }
public double Y4 { get; set; }
}
public class SplitNodeBackup
{
public Guid NodeId { get; set; }
public Dictionary<Guid, NodeDto> EdgeSplit { get; set; } = [];
}
public class MergeNodeUpdate
{
public Guid NodeId { get; set; }
public Dictionary<Guid, Guid> EdgesMerge { get; set; } = [];
}