using Aitex.Core.UI.MVVM;
using MECF.Framework.Common.CommonData;
using MECF.Framework.Common.DataCenter;
using MECF.Framework.Common.Device.Safety;
using MECF.Framework.Common.Equipment;
using MECF.Framework.Common.OperationCenter;
using MECF.Framework.Common.Utilities;
using OpenSEMI.ClientBase.Command;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Windows.Threading;
namespace PunkHPX8_MainPages.ViewModels
{
public class SystemSafetyViewModel : BindableBase
{
#region 常量
private const string SAFETY_DATA = "SafetyData";
private const string IS_SWITCH_ON = "IsSwitchOn";
private const string IS_INITIALIZED = "IsInitialized";
private const string IS_MOVING = "IsMoving";
#endregion
#region 内部变量
private SafetyData _commonSafetyData;
#region VPW
private bool _isVpw1RotationOn;
private bool _isVpw2RotationOn;
#endregion
#endregion
#region 属性
#region VPW
public bool IsVpw1RotationOn { get { return _isVpw1RotationOn; } set { SetProperty(ref _isVpw1RotationOn, value); } }
public bool IsVpw2RotationOn { get { return _isVpw2RotationOn; } set { SetProperty(ref _isVpw2RotationOn, value); } }
#endregion
public SafetyData CommonSafetyData { get { return _commonSafetyData; } set { SetProperty(ref _commonSafetyData, value); } }
#endregion
///
/// 定时器
///
DispatcherTimer _timer;
///
/// 查询后台数据集合
///
private List _rtDataKeys = new List();
///
/// rt查询key数值字典
///
private Dictionary _rtDataValueDic = new Dictionary();
#region 指令
public ICommand PauseCommand { get; private set; }
public ICommand ResumeCommand { get; private set; }
public ICommand ResetCommand { get; private set; }
public ICommand LockCassetteDoorsCommand { get; private set; }
public ICommand UnlockCassetteDoorsCommand { get; private set; }
public ICommand LockCell12DoorsCommand { get; private set; }
public ICommand UnlockCell12DoorsCommand { get; private set; }
public ICommand LockCell34DoorsCommand { get; private set; }
public ICommand UnlockCell34DoorsCommand { get; private set; }
public ICommand LockAlignerDoorsCommand { get; private set; }
public ICommand UnlockAlignerDoorsCommand { get; private set; }
public ICommand AllOnCommand { get; private set; }
#endregion
///
/// 构造函数
///
public SystemSafetyViewModel()
{
PauseCommand = new DelegateCommand