public void DeleteStream(int i) { StreamLog stream = this.streams[i]; stream.Uninit(); this.streams.RemoveAt(i); if (this.StreamDeleted != null) { this.StreamDeleted(stream); } foreach (Vars var in this.perWindowVars.Each()) { var.workingStream = Mathf.Clamp(var.workingStream, 0, this.streams.Count - 1); } }
public void DeleteStream(int i) { StreamLog stream = this.streams[i]; stream.Uninit(); stream.FilterAltered -= this.console.SaveModules; stream.OptionAltered -= this.console.SaveModules; this.streams.RemoveAt(i); if (this.StreamDeleted != null) { this.StreamDeleted(stream); } foreach (Vars var in this.perWindowVars.Each()) { var.workingStream = Mathf.Clamp(var.workingStream, 0, this.streams.Count - 1); } this.console.SaveModules(); }