123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- using MECF.Framework.Common.OperationCenter;
- using Prism.Commands;
- using Prism.Mvvm;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Venus_MainPages.ViewModels
- {
- public class PlatformViewModel : BindableBase
- {
- #region 私有字段
- private bool m_LoadLockDoorIsOpen;
- private bool m_PumpValveIsOpen;
- private bool m_VentValveIsOpen;
- private bool m_IsATM;
- private string ModuleName="PMA";
- #endregion
- #region 属性
- public bool LoadLockDoorIsOpen
- {
- get { return m_LoadLockDoorIsOpen; }
- set { SetProperty(ref m_LoadLockDoorIsOpen, value); }
- }
- public bool PumpValveIsOpen
- {
- get { return m_PumpValveIsOpen; }
- set { SetProperty(ref m_PumpValveIsOpen, value); }
- }
- public bool VentValveIsOpen
- {
- get { return m_VentValveIsOpen; }
- set { SetProperty(ref m_VentValveIsOpen, value); }
- }
- public bool IsATM
- {
- get { return m_IsATM; }
- set { SetProperty(ref m_IsATM, value); }
- }
- #endregion
- #region 命令
- private DelegateCommand _PurgeCommand;
- public DelegateCommand PurgeCommand =>
- _PurgeCommand ?? (_PurgeCommand = new DelegateCommand(OnPurge));
- private DelegateCommand _VentCommand;
- public DelegateCommand VentCommand =>
- _VentCommand ?? (_VentCommand = new DelegateCommand(OnVent));
- private DelegateCommand _PumpCommand;
- public DelegateCommand PumpCommand =>
- _PumpCommand ?? (_PumpCommand = new DelegateCommand(OnPump));
- #endregion
- #region 构造函数
- public PlatformViewModel()
- {
- m_IsATM = true;
- }
- #endregion
- #region 命令方法
- private void OnPump()
- {
- //PumpValveIsOpen = true;
- IsATM = !IsATM;
- }
- private void OnPurge()
- {
-
- //if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Purge")
- //{
- // InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
- //}
- //else
- //{
- // InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Purge");
- //}
- }
- private void OnVent()
- {
- //if (RtDataValues[$"{ModuleName}.FsmState"].ToString() == "Vent")
- //{
- // //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopPurge");
- //}
- //else
- //{
- // InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Vent");
- //}
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VentLoadLock");
- }
- #endregion
- }
- }
|