Ejemplo n.º 1
0
 void OnAddState()
 {
     var addStateViewModel = new StateDetailsViewModel(LibraryDevice);
     if (DialogService.ShowModalWindow(addStateViewModel))
     {
         LibraryDevice.States.Add(addStateViewModel.SelectedItem.State);
         StateViewModels.Add(addStateViewModel.SelectedItem);
         ServiceFactory.SaveService.LibraryChanged = true;
     }
 }
Ejemplo n.º 2
0
		void OnAddState()
		{
			var stateDetailsViewModel = new StateDetailsViewModel(SelectedDevice);
			if (DialogService.ShowModalWindow(stateDetailsViewModel))
			{
				SelectedDevice.States.Add(stateDetailsViewModel.SelectedState.State);
				States.Add(stateDetailsViewModel.SelectedState);
				SelectedState = States.LastOrDefault();
				ServiceFactory.SaveService.LibraryChanged = true;
			}
		}