예제 #1
0
 public void SaveXML(ConfigureContigencia config)
 {
     System.Xml.Serialization.XmlSerializer writer = new System.Xml.Serialization.XmlSerializer(typeof(ConfigureContigencia));
     System.IO.StreamWriter file = new System.IO.StreamWriter(@"AppConfigContingencia.xml");
     writer.Serialize(file, config);
     file.Close();
 }
예제 #2
0
 public ConfigureContigencia GetConfig()
 {
     overview = new ConfigureContigencia();
     try
     {
         System.Xml.Serialization.XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(typeof(ConfigureContigencia));
         System.IO.StreamReader file = new System.IO.StreamReader(@"AppConfigContingencia.xml");
         overview = (ConfigureContigencia)reader.Deserialize(file);
         file.Close();
     }
     catch (Exception e)
     {
         WriteXML();
         
     }
     return overview;
 }