예제 #1
0
		void InitializeDevices()
		{
			Devices = new ObservableCollection<PDUDeviceViewModel>();

			if (Device.PDUGroupLogic == null)
				return;

			foreach (var groupDevice in Device.PDUGroupLogic.Devices)
			{
				var pduDeviceViewModel = new PDUDeviceViewModel();
				pduDeviceViewModel.Initialize(groupDevice);
				Devices.Add(pduDeviceViewModel);
			}

			SelectedDevice = Devices.FirstOrDefault();
		}
예제 #2
0
		void OnAdd()
		{
			var pduDeviceViewModel = new PDUDeviceViewModel();
			pduDeviceViewModel.Initialize(SelectedAvailableDevice.Device);
			Devices.Add(pduDeviceViewModel);
			InitializeAvailableDevices();
		}