private void MergeHTML(string text) { string f; HtmlText = text; if (text != null) { if (String.IsNullOrWhiteSpace(ShellTemplate)) { f = Shell.FindFile(OwnerShellId, ShellTemplateFileName); if (f == null) { return; } ShellTemplate = Settings.ReadInFile(f); } if (String.IsNullOrWhiteSpace(ShellCss)) { f = Shell.FindFile(OwnerShellId, ShellCssFileName); if (f == null) { return; } ShellCss = Settings.ReadInFile(f); } ArrayList args = new ArrayList(); args.Add(ShellCss); args.Add(text); HtmlText = Scripts.SubVars(ShellTemplate, args); } }
public static string Cat(string fileName) { if (!String.IsNullOrWhiteSpace(fileName)) { string fp = Scripts.GetScriptFilePath(fileName); if (fp == null) { fp = Shell.FindFile(Shell.ConsoleShellId, fileName); } if (fp != null) { return(Settings.ReadInFile(fp)); } } return("Error: file not found."); }