//ncrunch: no coverage end public void UpdateOnContentChange(ContentType type, string addedName) { if (type == ContentType.ParticleSystem && !EffectsInProject.Contains(addedName)) { EffectsInProject.Add(addedName); RaisePropertyChanged("EffectsInProject"); } if (type == ContentType.ParticleEmitter && !EmittersInProject.Contains(addedName)) { EmittersInProject.Add(addedName); RaisePropertyChanged("EmittersInProject"); } if (type == ContentType.Material && !MaterialList.Contains(addedName)) { MaterialList.Add(addedName); RaisePropertyChanged("MaterialList"); } }
public void ToggleLookingForExistingEmitters() { if (SavedEmitterSelectionVisibility == Visibility.Visible) { SavedEmitterSelectionVisibility = Visibility.Hidden; RaisePropertyChanged("SavedEmitterSelectionVisibility"); return; } EmittersInProject.Clear(); var foundEmitters = service.GetAllContentNamesByType(ContentType.ParticleEmitter); foreach (var emitterName in foundEmitters) { EmittersInProject.Add(emitterName); } SavedEmitterSelectionVisibility = Visibility.Visible; RaisePropertyChanged("EmittersInProject"); RaisePropertyChanged("SavedEmitterSelectionVisibility"); }