motorTest/Model/FlowModel.cs
2026-10-17 11:39:30 +08:00

75 lines
1.8 KiB
C#

using Community;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
/// <summary>
/// 流程模型
/// </summary>
public class FlowModel : NotificationObject
{
private string myName;
/// <summary>
/// 流程名称
/// </summary>
public string MyName
{
get { return myName; }
set
{
myName = value;
RaisePropertyChanged("MyName");
}
}
/// <summary>
/// 流程步骤
/// </summary>
public GengralProcessEnum RunStep { get; set; }
/// <summary>
/// 时间
/// </summary>
public DateTime RunTime { get; set; }
private ShowInfo runState;
/// <summary>
/// 状态
/// </summary>
public ShowInfo RunState
{
get { return runState; }
set
{
runState = value;
RaisePropertyChanged("RunState");
}
}
private int step;
public int Step
{
get { return step; }
set { step = value; RunTime = DateTime.Now; }
}
public FlowModel(string name = "")
{
MyName = name;
RunStep = GengralProcessEnum.Start;
Step = 0;
RunState = new ShowInfo() { StatuInfo = "待运行", StatusBackground = ColorStr.Gray, StatusForeground = ColorStr.White };
RunTime = DateTime.Now;
}
public void Reset()
{
RunStep = GengralProcessEnum.Start;
RunState = new ShowInfo() { StatuInfo = "待运行", StatusBackground = ColorStr.Gray, StatusForeground = ColorStr.White };
}
}
}