public void SortFiles()
 {
     Folders.Clear();
     foreach (FileDictionaryFile entry in Files)
     {
         FileDictionaryFolder folder = Folders.FirstOrDefault(f => f.Name == entry.Folder);
         if (folder == null)
         {
             folder = new FileDictionaryFolder(entry.Folder);
             Folders.Add(folder);
         }
         folder.Files.Add(entry);
     }
 }
Beispiel #2
0
        public void InitFiles()
        {
            FileDictionaryFolder voice1 = FileDictionary.Folders.FirstOrDefault(d => d.Name == "VOICE1");
            FileDictionaryFolder voice2 = FileDictionary.Folders.FirstOrDefault(d => d.Name == "VOICE2");
            FileDictionaryFolder voice3 = FileDictionary.Folders.FirstOrDefault(d => d.Name == "VOICE3");
            FileDictionaryFolder xstr   = FileDictionary.Folders.FirstOrDefault(d => d.Name == "XSTR");

            List <FileDictionaryFile> files = new List <FileDictionaryFile>();

            files.AddRange(voice1.Files);
            files.AddRange(voice2.Files);
            files.AddRange(voice3.Files);
            files.AddRange(xstr.Files);
        }