Esempio n. 1
0
 public void LoadSettings()
 {
     this.Settings = new SettingsData();
     try
     {
         if (File.Exists(settingsFile))
         {
             XmlSerializer serializer = new XmlSerializer(typeof(SettingsData));
             using (StreamReader reader = new StreamReader(settingsFile))
             {
                 this.Settings = serializer.Deserialize(reader) as SettingsData;
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 2
0
        public void LoadSettings()
        {
            this.Settings = new SettingsData();
            try
            {
                if (File.Exists(settingsFile))
                {
                    XmlSerializer serializer = new XmlSerializer(typeof(SettingsData));
                    using (StreamReader reader = new StreamReader(settingsFile))
                    {
                        this.Settings = serializer.Deserialize(reader) as SettingsData;
                    }
                }
            }
            catch
            {

            }
        }