public xEffect Add(string theLabel, int endTime) { xEffect newEff = new xEffect(theLabel, endTime); Add(newEff); return(newEff); }
public xEffect Add(int startTime, int endTime) { xEffect newEff = new xEffect(startTime, endTime); Add(newEff); return(newEff); }
public xEffect Add(int endTime) { xEffect newEff = new xEffect(endTime); Add(newEff); return(newEff); }
public void Add(xEffect newEffect) { if (effects.Count > 0) { if (newEffect.starttime < effects[effects.Count - 1].endtime) { // Is this truly an error? How will xLights respond? //System.Diagnostics.Debugger.Break(); // Raise Exception } else { effects.Add(newEffect); maxMillis = newEffect.endtime; // effectCount++; //Array.Resize(ref effects, effectCount); //effects[effectCount - 1] = newEffect; } } else { effects.Add(newEffect); maxMillis = newEffect.endtime; //effectCount = 1; //Array.Resize(ref effects, 1); //effects[0] = newEffect; } }