public static ScriptFormatter CreatePlainTextFormatter() { ScriptFormatter toReturn = new ScriptFormatter(); toReturn.open = ""; toReturn.close = ""; toReturn.newLine = "\n"; toReturn.indent = " "; toReturn.singleSpace = " "; toReturn.openBracket = "<"; toReturn.closeBracket = ">"; toReturn.openElementFormat = ""; toReturn.closeElementFormat = ""; toReturn.openAttributeName = ""; toReturn.closeAttributeName = ""; toReturn.openValue = ""; toReturn.closeValue = ""; toReturn.openComment = toReturn.openBracket + "!--" + toReturn.singleSpace; toReturn.closeComment = toReturn.singleSpace + "--" + toReturn.closeBracket; return toReturn; }
private static ScriptFormatter CreateHtmlFormatter() { ScriptFormatter toReturn = new ScriptFormatter(); toReturn.open = "<span style=\"color:blue; font-family : monospace; white-space:nowrap;\" >"; toReturn.close = "</span>"; toReturn.newLine = "<br />"; toReturn.indent = " "; toReturn.singleSpace = " "; toReturn.openBracket = "<"; toReturn.closeBracket = ">"; toReturn.openElementFormat = "<span style=\"color:maroon\" >"; toReturn.closeElementFormat = "</span>"; toReturn.openAttributeName = "<span style=\"color:red\">"; toReturn.closeAttributeName = "</span>"; toReturn.openValue = "<span style=\"color:black\" ><b>"; toReturn.closeValue = "</b></span>"; toReturn.openComment = "<span style=\"font-style:italic; color:grey;\"><!--" + toReturn.singleSpace; toReturn.closeComment = toReturn.singleSpace + "--></span>"; return toReturn; }