Ejemplo n.º 1
0
        static SettingsXML SaveDefault(XmlSerializer xmlSerializer)
        {
            SettingsXML settings = new SettingsXML();

            settings.DataDir  = @"..|..|..|data".Replace('|', Path.DirectorySeparatorChar);
            settings.FontDir  = settings.DataDir;
            settings.ImageDir = settings.DataDir;

            using (FileStream stream = File.Open(SettingsFile, FileMode.Create))
            {
                xmlSerializer.Serialize(stream, settings);
            }
            return(settings);
        }
Ejemplo n.º 2
0
        static SettingsXML SaveDefault(XmlSerializer xmlSerializer)
        {
            SettingsXML settings = new SettingsXML();
            settings.DataDir = @"..|..|..|data".Replace('|', Path.DirectorySeparatorChar);
            settings.FontDir = settings.DataDir;
            settings.ImageDir = settings.DataDir;

            using (FileStream stream = File.Open(SettingsFile, FileMode.Create))
            {
                xmlSerializer.Serialize(stream, settings);
            }
            return settings;
        }