Exemple #1
0
        /// <summary>
        /// Loads a set of application settings from the specified file.
        /// </summary>
        /// <param name="path">The path to the file from which to load the application settings.</param>
        /// <returns>The <see cref="UltravioletApplicationSettings"/> which were deserialized from the specified file.</returns>
        public static UltravioletActivitySettings Load(String path)
        {
            var xml = XDocument.Load(path);

            var settings = new UltravioletActivitySettings();

            settings.Audio = UltravioletActivityAudioSettings.Load(xml.Root.Element("Audio"));

            if (settings.Audio == null)
            {
                return(null);
            }

            return(settings);
        }