void Save(string language, string addOn)
        {
            string captionFile =
                System.IO.Path.Combine(Steam.SteamData.GetHLAInstallFolder(), Steam.SteamData.HLAWIPAddonGamePath,
                                       addOn, Steam.SteamData.CaptionFolder, string.Format(Steam.SteamData.CaptionFormat, language + "_custom"));

            ClosedCaptions captionsList  = new ClosedCaptions();
            ClosedCaptions workingCCList = new ClosedCaptions();
            //First load in all the game captions for the selected language.


            string gameCaptionFile = System.IO.Path.Combine(Steam.SteamData.GetHLAInstallFolder(), @"game\hlvr",
                                                            Steam.SteamData.CaptionFolder, string.Format(Steam.SteamData.CaptionFormat, language));

            using (var stream = new FileStream(gameCaptionFile, FileMode.Open, FileAccess.Read))
            {
                captionsList.Read(stream);
            }

            foreach (var caption in Captions)
            {
                workingCCList.Add(caption.Caption);
                captionsList.Add(caption.Caption);
            }
            captionsList.Write(captionFile);
            string workingCaptionFile = System.IO.Path.Combine(Steam.SteamData.GetHLAInstallFolder(), Steam.SteamData.HLAWIPAddonGamePath,
                                                               addOn, Steam.SteamData.CaptionFolder, string.Format(workingCCFileFormat, language + "_custom"));

            workingCCList.Write(workingCaptionFile);

            MessageBox.Show("Captions saved as: " + captionFile + "\r\nWorking caption file: " + workingCaptionFile);
        }
        void LoadCaptionData()
        {
            string addonFolder = Steam.SteamData.GetHLAAddOnFolder(AddOn);

            Captions    = new ObservableCollection <ClosedCaptionDependencyObject>();
            SoundEvents = new ObservableCollection <Soundevent>();
            hashToName  = new Dictionary <uint, Soundevent>();
            foreach (var eventFiles in new DirectoryInfo(addonFolder).GetFiles("*." + Steam.SteamData.SoundEventsExtension, SearchOption.AllDirectories))
            {
                foreach (var soundName in AAT.AddonHelper.DeserializeFile(eventFiles.FullName))
                {
                    SoundEvents.Add(soundName);
                    hashToName.Add(ValveResourceFormat.Crc32.Compute(Encoding.UTF8.GetBytes(soundName.EventName)), soundName);
                }
            }

            //Look for and load any caption file.
            string targetPath = System.IO.Path.Combine(Steam.SteamData.GetHLAInstallFolder(), Steam.SteamData.HLAWIPAddonGamePath, AddOn, Steam.SteamData.CaptionFolder);

            if (Directory.Exists(targetPath))
            {
                foreach (var captionFiles in new DirectoryInfo(targetPath).GetFiles(string.Format(workingCCFileFormat, SelectedLanguage + "_custom"), SearchOption.AllDirectories))
                {
                    var closedCaptions = new ClosedCaptions();
                    using (var stream = captionFiles.OpenRead())
                    {
                        closedCaptions.Read(stream);
                    }
                    foreach (var caption in closedCaptions.Captions)
                    {
                        var cap = new ClosedCaptionDependencyObject(caption);
                        if (hashToName.ContainsKey(caption.SoundEventHash))
                        {
                            cap.SoundEvent = hashToName[caption.SoundEventHash];
                        }
                        Captions.Add(cap);
                    }
                }
            }
        }