first commit -push
This commit is contained in:
8
RobotNet.MapShares/Models/ElementExpressionModel.cs
Normal file
8
RobotNet.MapShares/Models/ElementExpressionModel.cs
Normal 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;
|
||||
}
|
||||
40
RobotNet.MapShares/Models/LoggerModel.cs
Normal file
40
RobotNet.MapShares/Models/LoggerModel.cs
Normal 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);
|
||||
}
|
||||
75
RobotNet.MapShares/Models/MapEditorBackupModel.cs
Normal file
75
RobotNet.MapShares/Models/MapEditorBackupModel.cs
Normal 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; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user