/// <summary> /// Adds the list of filenames into the current voicepak list, and merges them /// into the CombinedVoicepack. /// </summary> public void AddVoicepacks(List <string> filenames) { if (!VoicepacksFilesToCombine.Any()) { InitializeCombinedVoicepack(); } foreach (var filename in filenames) { if (CombinedVoicepack.Merge(filename)) { VoicepacksFilesToCombine.Add(new FileInfo(filename)); } } SaveVoicepackFilesToCombineToSettings(); CombinedVoicepack.ExportToFile(CombinedVoicepackBackupFilename); }
/// <summary> /// Rebuilds CombinedVoicepack from the VoicepacksFilesToCombine list /// </summary> private void RecombineVoicepackFilesToCombine() { InitializeCombinedVoicepack(); var invalidFilesToRemove = new List <FileInfo>(); foreach (var voicePackFile in VoicepacksFilesToCombine) { if (!CombinedVoicepack.Merge(voicePackFile.FullName)) { invalidFilesToRemove.Add(voicePackFile); } } foreach (var invalidFile in invalidFilesToRemove) { VoicepacksFilesToCombine.Remove(invalidFile); } }