/// ------------------------------------------------------------------------------------
        public void Save()
        {
            Logger.WriteEvent("Saving Collection Settings");

            XElement xml = new XElement("Collection");

            xml.Add(new XAttribute("version", "0.2"));
            Language1.SaveToXElement(xml);
            Language2.SaveToXElement(xml);
            Language3.SaveToXElement(xml);
            xml.Add(new XElement("SignLanguageName", SignLanguageName));
            xml.Add(new XElement("SignLanguageIso639Code", SignLanguageIso639Code));
            xml.Add(new XElement("OneTimeCheckVersionNumber", OneTimeCheckVersionNumber));
            xml.Add(new XElement("IsSourceCollection", IsSourceCollection.ToString()));
            xml.Add(new XElement("XMatterPack", XMatterPackName));
            xml.Add(new XElement("PageNumberStyle", PageNumberStyle));
            xml.Add(new XElement("BrandingProjectName", BrandingProjectKey));
            xml.Add(new XElement("SubscriptionCode", SubscriptionCode));
            xml.Add(new XElement("Country", Country));
            xml.Add(new XElement("Province", Province));
            xml.Add(new XElement("District", District));
            xml.Add(new XElement("AllowNewBooks", AllowNewBooks.ToString()));
            xml.Add(new XElement("AudioRecordingMode", AudioRecordingMode.ToString()));
            xml.Add(new XElement("AudioRecordingTrimEndMilliseconds", AudioRecordingTrimEndMilliseconds));
            SIL.IO.RobustIO.SaveXElement(xml, SettingsFilePath);
        }
Example #2
0
        /// ------------------------------------------------------------------------------------
        public void Save()
        {
            Logger.WriteEvent("Saving Collection Settings");

            XElement xml = new XElement("Collection");

            xml.Add(new XAttribute("version", "0.2"));
            xml.Add(new XElement("CollectionId", CollectionId));
            Language1.SaveToXElement(xml);
            Language2.SaveToXElement(xml);
            Language3.SaveToXElement(xml);
            xml.Add(new XElement("SignLanguageName", SignLanguageName));
            xml.Add(new XElement("SignLanguageIso639Code", SignLanguageIso639Code));
            xml.Add(new XElement("OneTimeCheckVersionNumber", OneTimeCheckVersionNumber));
            xml.Add(new XElement("IsSourceCollection", IsSourceCollection.ToString()));
            xml.Add(new XElement("XMatterPack", XMatterPackName));
            xml.Add(new XElement("PageNumberStyle", PageNumberStyle));
            xml.Add(new XElement("BrandingProjectName", BrandingProjectKey));
            xml.Add(new XElement("SubscriptionCode", SubscriptionCode));
            xml.Add(new XElement("Country", Country));
            xml.Add(new XElement("Province", Province));
            xml.Add(new XElement("District", District));
            xml.Add(new XElement("AllowNewBooks", AllowNewBooks.ToString()));
            xml.Add(new XElement("AudioRecordingMode", AudioRecordingMode.ToString()));
            xml.Add(new XElement("AudioRecordingTrimEndMilliseconds", AudioRecordingTrimEndMilliseconds));
            if (Administrators != null && Administrators.Length > 0)
            {
                xml.Add(new XElement("Administrators", string.Join(",", Administrators)));
            }
            if (!string.IsNullOrEmpty(DefaultBookshelf))
            {
                xml.Add(new XElement("DefaultBookTags", "bookshelf:" + DefaultBookshelf));
            }
            SIL.IO.RobustIO.SaveXElement(xml, SettingsFilePath);
        }