Esempio n. 1
0
        private void ResetRandmizedItems(IEnumerable <PlaylistItem> items)
        {
            RandamizedItems.Clear();

            if (items != null)
            {
                var firstItem = items.Take(1).SingleOrDefault();
                if (firstItem != null)
                {
                    RandamizedItems.Add(firstItem);
                    RandamizedItems.AddRange(items.Skip(1).Shuffle());
                }
            }
        }
Esempio n. 2
0
        private void ResetRandmizedItems()
        {
            RandamizedItems.Clear();

            if (SourceItems != null)
            {
                var firstItem = SourceItems.Take(1).SingleOrDefault();
                if (firstItem != null)
                {
                    RandamizedItems.Add(firstItem);
                    RandamizedItems.AddRange(SourceItems.Skip(1).Shuffle());
                }
            }
        }