AX2009
// USR Changed on 2013-07-10 at 12:57:46 by 7519 - Begin // USR Changed on 2013-07-10 at 12:57:46 by 7519 - End public void comments_insertHeader(Editor e) { UserInfo userInfo; name name; str source; ; e.unmark(); e.gotoLine(1); e.gotoCol(1); /* Original source = '// Changed on ' + date2str(today(),123,2,1,3,1,4, DateFlags::FormatAll ) + ' at ' + time2str(timenow(), 1, 1) + ' by ' + curuserid() + ' '; */ /* source += "// " + strUpr(enum2str(currentAOLayer())) + " Changed on " + date2str(today(),123,2,1,3,1,4, DateFlags::FormatAll ) + " at " + time2str(timenow(), 1, 1) + " by " + curuserid() + ' '; */ select firstOnly userInfo where userInfo.id == curUserId(); name = subStr(userInfo.networkAlias, strLen(userInfo.networkAlias) - 3,strlen(userInfo.networkAlias)); name = Global::isInteger(name) ? name : UserInfo.id; source += "// " + strUpr(enum2str(currentAOLayer())) + " Changed on " + date2str(today(),321,2,3,2,3,4, DateFlags::FormatAll ) + " at " + time2str(timenow(), 1, 1) + " by " + name + " - Begin" + ' ' + " " + "// " + strUpr(enum2str(currentAOLayer())) + " Changed on " + date2str(today(),321,2,3,2,3,4, DateFlags::FormatAll ) + " at " + time2str(timenow(), 1, 1) + " by " + name + " - End" + ' '; e.insertLines(source); }
AX2012
http://fandyax.blogspot.hk/2012/11/how-to-using-code-changed-comment-in.html