| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | 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;        #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;        }        #endregion    }}
 |