using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeamAAS_VP.Enums;
namespace TeamAAS_VP.Models.Feeder
{
public class FeederClearWork : BindableBase
{
private Guid _Id;
///
/// 唯一任务 Id
///
public Guid Id
{
get { return _Id; }
set { SetProperty(ref _Id, value); }
}
private int _TaskCode;
///
/// 可用于外部引用的任务代码(可选)
///
public int TaskCode
{
get { return _TaskCode; }
set { SetProperty(ref _TaskCode, value); }
}
private Guid _FeederId;
///
/// 关联的 Feeder Id(可选)
///
public Guid FeederId
{
get { return _FeederId; }
set { SetProperty(ref _FeederId, value); }
}
private string _FeederName;
///
/// 关联的 Feeder 名称(可选)
///
public string FeederName
{
get { return _FeederName; }
set { SetProperty(ref _FeederName, value); }
}
private string _Name;
public string Name
{
get { return _Name; }
set { SetProperty(ref _Name, value); }
}
private string _Description;
///
/// 任务描述
///
public string Description
{
get { return _Description; }
set { SetProperty(ref _Description, value); }
}
private DateTime _CreateTime;
public DateTime CreateTime
{
get { return _CreateTime; }
set { SetProperty(ref _CreateTime, value); }
}
private VibrationFunction _BeforeOutput;
///
/// 清料前输出信号
///
public VibrationFunction BeforeOutput
{
get { return _BeforeOutput; }
set { SetProperty(ref _BeforeOutput, value); }
}
private bool _BeforeScript;
public bool BeforeScript
{
get { return _BeforeScript; }
set { SetProperty(ref _BeforeScript, value); }
}
private VibrationFunction _BackOutput;
///
/// 清料后输出信号
///
public VibrationFunction BackOutput
{
get { return _BackOutput; }
set { SetProperty(ref _BackOutput, value); }
}
private bool _BackScript;
public bool BackScript
{
get { return _BackScript; }
set { SetProperty(ref _BackScript, value); }
}
private FeederWorks _FeederWorks;
///
/// Feeder振动集合
///
public FeederWorks FeederWorks
{
get { return _FeederWorks; }
set { SetProperty(ref _FeederWorks, value); }
}
private int _ClearCount;
public int ClearCount
{
get { return _ClearCount; }
set { SetProperty(ref _ClearCount, value); }
}
private int _VibrationCount;
public int VibrationCount
{
get { return _VibrationCount; }
set { SetProperty(ref _VibrationCount, value); }
}
private bool _Enabled = true;
///
/// 任务是否启用
///
public bool Enabled
{
get { return _Enabled; }
set { SetProperty(ref _Enabled, value); }
}
public FeederClearWork()
{
Id = Guid.NewGuid();
CreateTime = DateTime.Now;
FeederWorks = new FeederWorks();
TaskCode = 0;
Description = string.Empty;
}
public FeederClearWork Copy()
{
return new FeederClearWork
{
Id = this.Id,
FeederId = this.FeederId,
TaskCode = this.TaskCode,
Name = this.Name,
Description = this.Description,
CreateTime = this.CreateTime,
BeforeOutput = this.BeforeOutput,
BeforeScript = this.BeforeScript,
BackOutput = this.BackOutput,
BackScript = this.BackScript,
FeederWorks = this.FeederWorks?.Copy(),
ClearCount = this.ClearCount,
VibrationCount = this.VibrationCount,
Enabled = this.Enabled
};
}
}
}