45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace XplorePlane.Models
|
|
{
|
|
// ── 矩阵单元格状态枚举 | Matrix Cell Status Enumeration ──────────
|
|
|
|
/// <summary>矩阵单元格执行状态 | Matrix cell execution status</summary>
|
|
[JsonConverter(typeof(JsonStringEnumConverter))]
|
|
public enum MatrixCellStatus
|
|
{
|
|
NotExecuted,
|
|
Executing,
|
|
Completed,
|
|
Error,
|
|
Disabled
|
|
}
|
|
|
|
// ── 矩阵数据模型 | Matrix Data Models ────────────────────────────
|
|
|
|
/// <summary>矩阵单元格(不可变)| Matrix cell (immutable)</summary>
|
|
public record MatrixCell(
|
|
int Row,
|
|
int Column,
|
|
double OffsetX,
|
|
double OffsetY,
|
|
bool IsEnabled,
|
|
MatrixCellStatus Status,
|
|
string ErrorMessage
|
|
);
|
|
|
|
/// <summary>矩阵布局(不可变)| Matrix layout (immutable)</summary>
|
|
public record MatrixLayout(
|
|
Guid Id,
|
|
int Rows,
|
|
int Columns,
|
|
double RowSpacing,
|
|
double ColumnSpacing,
|
|
double StartOffsetX,
|
|
double StartOffsetY,
|
|
string CncProgramPath,
|
|
IReadOnlyList<MatrixCell> Cells
|
|
);
|
|
} |