private void CreateMiragesBtn_Click(Object sender, RoutedEventArgs e) { var resistanceItems = Importer.ConvertResistanceTable(); var prismtunityMementoItems = Importer.ConvertPrismtunityMementoTable(); var names = resistanceItems.Select(r => r.Mirage).Union(prismtunityMementoItems.Select(pm => pm.Mirage)); var mirages = names.Select(n => new Mirage(resistanceItems.SingleOrDefault(r => n == r.Mirage), prismtunityMementoItems.SingleOrDefault(pm => n == pm.Mirage))).ToList(); var serializer = new XmlSerializer(typeof(List <Mirage>)); using (var stringWriter = new StringWriter()) using (var xmlWriter = XmlWriter.Create(stringWriter)) { serializer.Serialize(xmlWriter, mirages); File.WriteAllText("Mirages.xml", stringWriter.ToString()); } }
private void ResistanceTableConvertBtn_Click(Object sender, RoutedEventArgs e) { var resistanceItems = Importer.ConvertResistanceTable(); }