public RecolorAll(EMP_File _inputFile) { empFile = _inputFile; ParticleEffectsView = EmpParticleEffect.Create(empFile); InitializeComponent(); DataContext = this; GetAvgColor_Click(null, null); }
public static ObservableCollection <EmpParticleEffect> Create(EMP_File empFile) { ObservableCollection <EmpParticleEffect> newParticleEffects = new ObservableCollection <EmpParticleEffect>(); foreach (var particleEffect in empFile.ParticleEffects) { newParticleEffects.Add(new EmpParticleEffect() { ParticleEffect = particleEffect, Selected = true }); } return(newParticleEffects); }