| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- 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;
- /// <summary>
- /// 唯一任务 Id
- /// </summary>
- public Guid Id
- {
- get { return _Id; }
- set { SetProperty(ref _Id, value); }
- }
- private int _TaskCode;
- /// <summary>
- /// 可用于外部引用的任务代码(可选)
- /// </summary>
- public int TaskCode
- {
- get { return _TaskCode; }
- set { SetProperty(ref _TaskCode, value); }
- }
- private Guid _FeederId;
- /// <summary>
- /// 关联的 Feeder Id(可选)
- /// </summary>
- public Guid FeederId
- {
- get { return _FeederId; }
- set { SetProperty(ref _FeederId, value); }
- }
- private string _FeederName;
- /// <summary>
- /// 关联的 Feeder 名称(可选)
- /// </summary>
- 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;
- /// <summary>
- /// 任务描述
- /// </summary>
- 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;
- /// <summary>
- /// 清料前输出信号
- /// </summary>
- 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;
- /// <summary>
- /// 清料后输出信号
- /// </summary>
- 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;
- /// <summary>
- /// Feeder振动集合
- /// </summary>
- 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;
- /// <summary>
- /// 任务是否启用
- /// </summary>
- 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
- };
- }
- }
- }
|