refactor: 将Framework库和RT、UI放在同一个解决方案中。
This commit is contained in:
+53
@@ -0,0 +1,53 @@
|
||||
using MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel
|
||||
{
|
||||
public class RecipeStepValidationInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public RecipeStepValidationInfo(RecipeStep step, Param param, string message)
|
||||
{
|
||||
Step = step;
|
||||
Param = param;
|
||||
Message = message;
|
||||
|
||||
RecipeStep.ValidateStepNo(step.StepNo, out var vStepNo);
|
||||
StepNo = vStepNo;
|
||||
|
||||
ParamCaption = param?.DisplayName ?? "Unknown";
|
||||
|
||||
if (param is IValueParam vp)
|
||||
Value = vp.GetValue();
|
||||
else
|
||||
Value = "Unknown";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public RecipeStep Step { get; }
|
||||
|
||||
public IParam Param { get; }
|
||||
|
||||
public int StepNo { get; }
|
||||
|
||||
public string ParamCaption { get; }
|
||||
|
||||
public object Value { get; }
|
||||
|
||||
public string Message { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methdos
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"[Step{Step.StepNo}][{Param.DisplayName}] {Message}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user