Ejemplo n.º 1
0
 public void saveInfo(ConfigurationBackup backupSettings)
 {
     try
     {
         var           myfile = File.Create(pathModule + @"\SettingBackup.xml");
         XmlSerializer xml    = new XmlSerializer(typeof(ConfigurationBackup));
         xml.Serialize(myfile, backupSettings);
         myfile.Close();
     }
     catch (Exception ex)
     {
         Console.WriteLine("" + ex.Message);
     }
 }
Ejemplo n.º 2
0
        public void Load()
        {
            if (File.Exists("SettingBackup.xml"))
            {
                XmlSerializer       reader = new System.Xml.Serialization.XmlSerializer(typeof(ConfigurationBackup));
                StreamReader        file   = new System.IO.StreamReader(pathModule + @"\SettingBackup.xml");
                ConfigurationBackup config = new ConfigurationBackup();
                config = (ConfigurationBackup)reader.Deserialize(file);

                this.activate             = config.activate;
                this.general_Log          = config.general_Log;
                this.import_Log           = config.import_Log;
                this.export_Log           = config.export_Log;
                this.export_Log           = config.export_Log;
                this.import_files_success = config.import_files_success;
                this.import_files_error   = config.import_files_error;
                this.backup_files         = config.backup_files;
                file.Close();
            }
        }