コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: MiYanni/WoFFTool
        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());
                }
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: MiYanni/WoFFTool
 private void ResistanceTableConvertBtn_Click(Object sender, RoutedEventArgs e)
 {
     var resistanceItems = Importer.ConvertResistanceTable();
 }