internal void Add(Types.TrackNumber trackNumber) { var data = squareData[GetIndex(trackNumber.Coordinate)]; if (data.Set(trackNumber)) { data.TrackNumberIndex = TrackNumbers.Count(); TrackNumbers.Add(data.TrackNumber); } }
public void Clear() { foreach (var i in squareData) { i.Clear(); } PushbackSquares.Clear(); TrackNumbers.Clear(); MoveSquares.Clear(); }
public override string ToString() { string trackString = "[Unknown Track]"; if (TrackNumbers != null && TrackNumbers.Any()) { trackString = string.Format("{0}", string.Join("-", TrackNumbers.Select(c => c.ToString("00")))); } return(string.Format("{0} - {1} - {2}:{3} {4}: {5}", Authors.ConcatToString(" & "), BookTitle, DiscNumber, trackString, Title, Quality)); }
internal void Remove(Types.TrackNumber trackNumber) { var data = squareData[GetIndex(trackNumber.Coordinate)]; if (data.UnsetTrackNumber()) { TrackNumbers.RemoveAt(data.TrackNumberIndex); for (int i = data.TrackNumberIndex; i < TrackNumbers.Count; i++) { squareData[GetIndex(TrackNumbers[i].Coordinate)].TrackNumberIndex--; } } }