using parkMonitor.model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace parkMonitor.viewModel {
	/// <summary>设备菜单项</summary>
	public class DevMenuItemVM : INotifyPropertyChanged {
		//设备名
		string _Name = "";
		public string Name {
			get { return _Name; }
			set { _Name = value; FirePropertyChanged("Name"); }
		}

		//设备类型
		DeviceType _DevType = DeviceType.Unknown;
		public DeviceType DevType {
			get { return _DevType; }
			set { _DevType = value; FirePropertyChanged("DevType"); }
		}

		//设备主键
		object _Pkey = "";
		public object Pkey {
			get { return _Pkey; }
			set { _Pkey = value; FirePropertyChanged("Pkey"); }
		}

		public virtual event PropertyChangedEventHandler PropertyChanged;
		public virtual void FirePropertyChanged(string propertyName) {
			if(PropertyChanged != null) {
				PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
