Ejemplo n.º 1
0
        public void saveColors(string fileName)
        {
            XmlSetup tmpSetup = new XmlSetup();

            tmpSetup.setFileName(fileName);
            tmpSetup.loadXml();

            tmpSetup.addSetting("script_color_object", ObjectStyle.toSetupValue());
            tmpSetup.addSetting("script_color_object_ref", ObjectStyleReferenz.toSetupValue());
            tmpSetup.addSetting("script_color_var1", VaribalesStyle.toSetupValue());
            tmpSetup.addSetting("script_color_var2", VarStyle.toSetupValue());
            tmpSetup.addSetting("script_color_keyword", KeyWordStyle.toSetupValue());
            tmpSetup.addSetting("script_color_command", CommandStyle.toSetupValue());
            tmpSetup.addSetting("script_color_ref", ReferenzStyle.toSetupValue());
            tmpSetup.addSetting("script_color_comment", CommentStyle.toSetupValue());
            tmpSetup.addSetting("script_color_string", TextStyle.toSetupValue());
            tmpSetup.addSetting("script_color_number", NumberStyle.toSetupValue());

            HighlightStyle defaultStyle = new HighlightStyle();

            defaultStyle.BackColor = HighlightStyle.defaultColor;
            defaultStyle.Font      = new Font(this.defaultFontName, this.fontDefaultSize, FontStyle.Regular);
            tmpSetup.addSetting("script_color_default", defaultStyle.toSetupValue());

            tmpSetup.saveXml();
        }