/// <summary> /// Removes the list of files from the current voicepack list /// </summary> /// <remarks> /// In stead of actually removing, I just recreate the combined voicepack from the updated list. /// My initial tests seem to indicate this is a fast enough operation and seems stable. /// To actually create a real remove, much work is needed. /// </remarks> public void RemoveVoicepacks(List <FileInfo> files) { foreach (var file in files) { VoicepacksFilesToCombine.Remove(file); } RecombineVoicepackFilesToCombine(); SaveVoicepackFilesToCombineToSettings(); CombinedVoicepack.ExportToFile(CombinedVoicepackBackupFilename); }
/// <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); }