添加 MX-PD-盘古 项目文件
将 MX-PD-盘古 - new 目录下的所有文件添加到主仓库
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
using MainShell.Manual.ViewModel.State;
|
||||
using Stylet;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace MainShell.DeviceMaintance.ViewModel.State
|
||||
{
|
||||
public class CylinderPageState : PropertyChangedBase
|
||||
{
|
||||
private DateTime _lastActionTime = DateTime.MinValue;
|
||||
private string _lastActionMessage = "等待气缸控制操作";
|
||||
|
||||
public DateTime LastActionTime
|
||||
{
|
||||
get { return _lastActionTime; }
|
||||
set { SetAndNotify(ref _lastActionTime, value); }
|
||||
}
|
||||
|
||||
public string LastActionMessage
|
||||
{
|
||||
get { return _lastActionMessage; }
|
||||
set { SetAndNotify(ref _lastActionMessage, value); }
|
||||
}
|
||||
|
||||
public ObservableCollection<CylinderItemState> Cylinders { get; } = new ObservableCollection<CylinderItemState>();
|
||||
}
|
||||
|
||||
public class CylinderItemState : PropertyChangedBase
|
||||
{
|
||||
private bool _isBusy;
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Module { get; set; }
|
||||
public string ControlTypeText { get; set; }
|
||||
|
||||
public bool IsBusy
|
||||
{
|
||||
get { return _isBusy; }
|
||||
set { SetAndNotify(ref _isBusy, value); }
|
||||
}
|
||||
|
||||
public ObservableCollection<CylinderSignalState> OutputSignals { get; } = new ObservableCollection<CylinderSignalState>();
|
||||
public ObservableCollection<CylinderSignalState> FeedbackSignals { get; } = new ObservableCollection<CylinderSignalState>();
|
||||
|
||||
public ICommand ExtendCommand { get; set; }
|
||||
public ICommand RetractCommand { get; set; }
|
||||
}
|
||||
|
||||
public class CylinderSignalState : PropertyChangedBase
|
||||
{
|
||||
private bool _isOn;
|
||||
|
||||
public string PointReference { get; set; }
|
||||
public string PointKey { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string LineNo { get; set; }
|
||||
public bool IsOutput { get; set; }
|
||||
|
||||
public string IoNameText
|
||||
{
|
||||
get { return string.IsNullOrWhiteSpace(PointReference) ? string.Empty : "IO Name:" + PointReference; }
|
||||
}
|
||||
|
||||
public bool IsOn
|
||||
{
|
||||
get { return _isOn; }
|
||||
set
|
||||
{
|
||||
if (SetAndNotify(ref _isOn, value))
|
||||
{
|
||||
OnPropertyChanged(nameof(StateText));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string StateText
|
||||
{
|
||||
get { return IsOn ? "ON" : "OFF"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user