Пример #1
0
        private void Export()
        {
            Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();

            dlg.Filter = exportFileFilter;

            if (dlg.ShowDialog() == true)
            {
                ExportData d = new ExportData();
                d.Monsters.AddRange(from x in monstersList where x.IsSelected select(Monster) x.Item);
                foreach (var source in d.Monsters.Where(source => source.SkillsParsed))
                {
                    source.SkillsParsed = false;
                }
                d.Spells.AddRange(from x in spellsList where x.IsSelected select(Spell) x.Item);
                d.Feats.AddRange(from x in featsList where x.IsSelected select(Feat) x.Item);
                d.Conditions.AddRange(from x in conditionsList where x.IsSelected select(Condition) x.Item);
                XmlLoader <ExportData> .Save(d, dlg.FileName);

                this.Close();
            }
        }
Пример #2
0
 public static void Save(List <T> list, string filename)
 {
     XmlLoader <List <T> > .Save(list, filename);
 }
Пример #3
0
 public static void Save(List <T> list, string filename, bool appData)
 {
     XmlLoader <List <T> > .Save(list, filename, appData);
 }
Пример #4
0
 private static void SaveList()
 {
     XmlLoader <BookmarkList> .Save(list, "BookmarkList.xml", true);
 }