Esempio n. 1
0
        /// <summary>
        /// Used to recover the users server settings
        /// </summary>
        /// <returns>server settings</returns>
        public ServSettings GetServerSettings()
        {
            ServSettings settings = new ServSettings();

            XmlSerializer xs = new XmlSerializer(typeof(ServSettings));
            XmlTextReader tr = new XmlTextReader("ServerSettings.xml");
            if (tr != null)
            {
                settings = (ServSettings)xs.Deserialize(tr);
            }
            else
            {
                throw new FileNotFoundException();
            }

            return settings;
        }
Esempio n. 2
0
        /// <summary>
        /// Used to recover the users server settings
        /// </summary>
        /// <returns>server settings</returns>
        public ServSettings GetServerSettings()
        {
            ServSettings settings = new ServSettings();

            XmlSerializer xs = new XmlSerializer(typeof(ServSettings));
            XmlTextReader tr = new XmlTextReader("ServerSettings.xml");

            if (tr != null)
            {
                settings = (ServSettings)xs.Deserialize(tr);
            }
            else
            {
                throw new FileNotFoundException();
            }

            return(settings);
        }