Beispiel #1
0
        private static void CreateConfig()
        {
            TemplateSettings settings = new TemplateSettings();
            Template template = new Template();
            template.Name = "www.jobhunt.in:Template(Bright)";
            template.StyleName = "Fancy";
            template.BottomMargin = 48;
            template.TopMargin = 48;
            template.LeftMargin = 48;
            template.RightMargin = 48;
            settings.Templates.Add(template);

            // Serialization
            XmlSerializer s = new XmlSerializer(typeof(TemplateSettings));
            TextWriter w = new StreamWriter(@"templatesettings.sample.xml");
            s.Serialize(w, settings);
            w.Close();
        }