void FillTheIndexerForFixedOrder (CVM.WPMediaStandbildPlayingData StandBildPlayingData) { StandBildPlayingData.SortedNamesOfActiveDescriptions.Clear (); List<int> ActuallFileIndizessesToPlay = new List<int> (); int Index = 0; foreach (String FileName in StandBildPlayingData.NamesOfActiveDescriptions) { StandBildPlayingData.SortedNamesOfActiveDescriptions.Add (FileName); ActuallFileIndizessesToPlay.Add (Index++); } StandBildPlayingData.SetFileIndizessesToPlay (ActuallFileIndizessesToPlay); }
void FillTheIndexerForSortedOrder (CVM.WPMediaStandbildPlayingData StandBildPlayingData, String PlayingOrder) { SortedDictionary<String, int> SortingField = new SortedDictionary<string, int> (); int Index = 0; while (Index < StandBildPlayingData.SortFields.Count) { String SortField = StandBildPlayingData.SortFields [Index]; int SortingUnifier = 0; while (SortingField.Keys.Contains (SortField)) { SortField = StandBildPlayingData.SortFields [Index] + Convert.ToString (SortingUnifier++); } SortingField.Add (SortField, Index); Index++; } List<int> ActuallFileIndizessesToPlay = new List<int> (); if (PlayingOrder == "NameID") { foreach (KeyValuePair<String, int> Entry in SortingField) { ActuallFileIndizessesToPlay.Add (Entry.Value); } } else if (PlayingOrder == "LastWriteTime") { foreach (KeyValuePair<String, int> Entry in SortingField) { ActuallFileIndizessesToPlay.Insert (0, Entry.Value); } } else { foreach (KeyValuePair<String, int> Entry in SortingField) { ActuallFileIndizessesToPlay.Add (Entry.Value); } } StandBildPlayingData.SetFileIndizessesToPlay (ActuallFileIndizessesToPlay); }
void FillTheIndexerForRandomOrder (CVM.WPMediaStandbildPlayingData StandBildPlayingData) { StandBildPlayingData.SortedNamesOfActiveDescriptions.Clear (); StandBildPlayingData.SetFileIndizessesToPlay (CVM.CommonValues.CreateRealRandomizedIndexArray (StandBildPlayingData.NamesOfActiveDescriptions.Count)); StandBildPlayingData.IndexToFileIndexToPlay = 0; while (StandBildPlayingData.IsFileIndexToPlayCorrect ()) { StandBildPlayingData.SortedNamesOfActiveDescriptions.Add (StandBildPlayingData.NameOfActiveDescription ()); StandBildPlayingData.IndexToFileIndexToPlay++; } StandBildPlayingData.IndexToFileIndexToPlay = 0; }