public List<Stream> FindStreamClashes(Stream stream) { List<Stream> clashes = new List<Stream>(); Stream current = stream.Type.SelectedStream; if (current != null) current.Selected = false; foreach (Stream other in StreamList) { if (!other.Selected) continue; if (stream.ClashesWith(other)) clashes.Add(other); } if (current != null) current.Selected = true; return clashes; }
public bool Fits(Stream stream) { // check if stream fits with the current streams foreach (Stream other in Combination_) { if (stream.ClashesWith(other)) return false; } return true; }