Exemplo n.º 1
0
        private void CreateBossesBtn_Click(Object sender, RoutedEventArgs e)
        {
            var bossItems = Importer.ConvertBossTable();
            var bosses    = bossItems.Select((b, i) => new Boss(b, i + 1)).ToList();

            var serializer = new XmlSerializer(typeof(List <Boss>));

            using (var stringWriter = new StringWriter())
                using (var xmlWriter = XmlWriter.Create(stringWriter))
                {
                    serializer.Serialize(xmlWriter, bosses);
                    File.WriteAllText("Bosses.xml", stringWriter.ToString());
                }
        }
Exemplo n.º 2
0
 private void BossTableConvertBtn_Click(Object sender, RoutedEventArgs e)
 {
     var bossItems = Importer.ConvertBossTable();
 }