Ejemplo n.º 1
0
        internal void Add(Types.TrackNumber trackNumber)
        {
            var data = squareData[GetIndex(trackNumber.Coordinate)];

            if (data.Set(trackNumber))
            {
                data.TrackNumberIndex = TrackNumbers.Count();
                TrackNumbers.Add(data.TrackNumber);
            }
        }
Ejemplo n.º 2
0
 public void Clear()
 {
     foreach (var i in squareData)
     {
         i.Clear();
     }
     PushbackSquares.Clear();
     TrackNumbers.Clear();
     MoveSquares.Clear();
 }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        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--;
                }
            }
        }