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

namespace parkMonitor.viewModel.objectTree {
	/// <summary>部件树大类ViewModel</summary>
	public class ObjectTreeRootVM : ObservableCollection<object>, 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"); }
		}

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