void write_header() { Func <int, string> sp = (i) => (new string(' ', i)); if (!string.IsNullOrEmpty(G.PSGGFILE)) { m_src = sp(m_indent) + G.GetComment(sp(12) + "psggConverterLib.dll converted from psgg-file:") + G.PSGGFILE + G.NEWLINECHAR + G.NEWLINECHAR; } else { m_src = sp(m_indent) + G.GetComment(sp(12) + "psggConverterLib.dll converted from " + m_excel + ".") + G.NEWLINECHAR + G.NEWLINECHAR; } }
void do_if_include() { m_bDone = false; if (m_mw.IsInclude()) { var matchstr = m_mw.GetMatchStr(); var file = m_mw.GetIncludFilename(); var enc = m_mw.GetIncludeFileEnc(); var text = IncludeFile.readfile(G, matchstr, file, enc); m_resultlines.Add(G.GetComment(" #start include -" + file)); var tmplines = StringUtil.ReplaceWordsInLine(m_line, matchstr, text); m_resultlines.AddRange(tmplines); m_resultlines.Add(G.GetComment(" #end include -" + file)); m_bDone = true; } }