public static void LoadEffects(string fileName, LEDStrip displayStrip, List<EffectContainer> list) { Console.WriteLine("Settings: Openning file {0}", fileName); using (StreamReader rdr = new StreamReader(fileName)) { var effList = JsonConvert.DeserializeObject<List<EffectContainer>>(rdr.ReadToEnd(), new EffectConverter()); foreach (EffectContainer cont in effList) { Console.WriteLine("{0}, {1}",cont.Information.Name, cont.Information.IsScreenSaver); cont.AssignStrip(displayStrip); list.Add(cont); } } }
public void AssignStrip(LEDStrip strip) { this.LedStrip = strip; }
public EffectContainer(IEffect effect, LEDStrip strip, EffectInfo info) { this.Information = info; this.Effect = effect; this.LedStrip = strip; }