automapper框架优化
This commit is contained in:
24
Model/Models/CanMessageShow.cs
Normal file
24
Model/Models/CanMessageShow.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// CAN 报文展示纯数据类(对应 UIShare.UIViewModel.CanMessageShowModel)
|
||||
/// </summary>
|
||||
public class CanMessageShow
|
||||
{
|
||||
public byte 通道 { get; set; }
|
||||
|
||||
public int 报文ID { get; set; }
|
||||
|
||||
public ulong 时间戳 { get; set; }
|
||||
|
||||
public byte 长度 { get; set; }
|
||||
|
||||
public bool FD { get; set; }
|
||||
|
||||
public bool IsTx { get; set; }
|
||||
|
||||
public byte[] Bytes { get; set; } = new byte[64];
|
||||
|
||||
public string? 报文 { get; set; }
|
||||
}
|
||||
}
|
||||
18
Model/Models/DeviceInfo.cs
Normal file
18
Model/Models/DeviceInfo.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备信息纯数据类(对应 UIShare.UIViewModel.DeviceInfoModel)
|
||||
/// </summary>
|
||||
public class DeviceInfo
|
||||
{
|
||||
public string? DeviceName { get; set; }
|
||||
|
||||
public string? DeviceType { get; set; }
|
||||
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
public bool IsConnected { get; set; }
|
||||
}
|
||||
}
|
||||
16
Model/Models/InstructionNode.cs
Normal file
16
Model/Models/InstructionNode.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 指令节点纯数据类(对应 UIShare.UIViewModel.InstructionNode)
|
||||
/// </summary>
|
||||
public class InstructionNode
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
|
||||
public IList<InstructionNode> Children { get; set; } = new List<InstructionNode>();
|
||||
|
||||
public object? Tag { get; set; }
|
||||
}
|
||||
}
|
||||
16
Model/Models/Method.cs
Normal file
16
Model/Models/Method.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 方法纯数据类(对应 UIShare.UIViewModel.MethodModel)
|
||||
/// </summary>
|
||||
public class Method
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? FullName { get; set; }
|
||||
|
||||
public IList<Parameter> Parameters { get; set; } = new List<Parameter>();
|
||||
}
|
||||
}
|
||||
45
Model/Models/Parameter.cs
Normal file
45
Model/Models/Parameter.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 参数纯数据类(对应 UIShare.UIViewModel.ParameterModel)
|
||||
/// </summary>
|
||||
public class Parameter
|
||||
{
|
||||
public Guid ID { get; set; } = Guid.NewGuid();
|
||||
|
||||
public bool IsVisible { get; set; } = true;
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型全名(对应 ParameterModel.Type 的 FullName)
|
||||
/// </summary>
|
||||
public string? TypeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 参数类别(Input / Output / Temp)
|
||||
/// </summary>
|
||||
public string? Category { get; set; }
|
||||
|
||||
public bool IsGlobal { get; set; }
|
||||
|
||||
public object? Value { get; set; }
|
||||
|
||||
public object? LowerLimit { get; set; }
|
||||
|
||||
public object? UpperLimit { get; set; }
|
||||
|
||||
public bool Result { get; set; } = true;
|
||||
|
||||
public bool IsUseVar { get; set; }
|
||||
|
||||
public bool IsSave { get; set; }
|
||||
|
||||
public string? VariableName { get; set; }
|
||||
|
||||
public Guid? VariableID { get; set; }
|
||||
}
|
||||
}
|
||||
19
Model/Models/Program.cs
Normal file
19
Model/Models/Program.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 程序纯数据类(对应 UIShare.UIViewModel.ProgramModel)
|
||||
/// </summary>
|
||||
public class Program
|
||||
{
|
||||
public Guid ID { get; set; } = Guid.NewGuid();
|
||||
|
||||
public IList<Step> StepCollection { get; set; } = new List<Step>();
|
||||
|
||||
public IList<Step> ErrorStepCollection { get; set; } = new List<Step>();
|
||||
|
||||
public IList<Parameter> Parameters { get; set; } = new List<Parameter>();
|
||||
}
|
||||
}
|
||||
45
Model/Models/Step.cs
Normal file
45
Model/Models/Step.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 步骤纯数据类(对应 UIShare.UIViewModel.StepModel)
|
||||
/// </summary>
|
||||
public class Step
|
||||
{
|
||||
public Guid ID { get; set; } = Guid.NewGuid();
|
||||
|
||||
public bool IsUsed { get; set; } = true;
|
||||
|
||||
public int Index { get; set; }
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? StepType { get; set; }
|
||||
|
||||
public Method? Method { get; set; }
|
||||
|
||||
public Program? SubProgram { get; set; }
|
||||
|
||||
public int? LoopCount { get; set; }
|
||||
|
||||
public int? CurrentLoopCount { get; set; }
|
||||
|
||||
public Guid? LoopStartStepId { get; set; }
|
||||
|
||||
public int Result { get; set; } = -1;
|
||||
|
||||
public int? RunTime { get; set; }
|
||||
|
||||
public string? OKExpression { get; set; }
|
||||
|
||||
public string GotoSettingString { get; set; } = "";
|
||||
|
||||
public Guid? OKGotoStepID { get; set; }
|
||||
|
||||
public Guid? NGGotoStepID { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
}
|
||||
12
Model/Models/SubProgramItem.cs
Normal file
12
Model/Models/SubProgramItem.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Model.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 子程序项纯数据类(对应 UIShare.UIViewModel.SubProgramItem)
|
||||
/// </summary>
|
||||
public class SubProgramItem
|
||||
{
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
public string FilePath { get; set; } = "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user