// Copyright (C), 2015, CEU Co., Ltd. // USR Changed by 2015-02-02T13:39:36 Fandy Xie 谢宇帆 // Version : 1.0 // Description : 自定义当前鼠标焦点的上行和下行备注 // Return : void fandy_comments_insertBeginEnd(Editor e) { int startLine = e.selectionStartLine(); int endLine = e.selectionEndLine(); int startCol = e.selectionStartCol(); UserInfo userInfo; ; select userInfo where userInfo.id == curuserid(); if (endLine < startLine) endLine = startLine; e.unmark(); e.gotoLine(startLine); e.gotoCol(1); e.insertLines("// " + strUpr(enum2str(currentAOLayer())) + " Changed by " + userInfo.name + " - Begin\n"); endLine = endLine + 2; e.gotoLine(endLine); e.gotoCol(1); e.insertLines("// " + strUpr(enum2str(currentAOLayer())) + " Changed by " + userInfo.name + " - End\n"); }
// Copyright (C), 2015, CEU Co., Ltd. // USR Changed by 2015-02-02T13:42:36 Fandy Xie 谢宇帆 // Version : 1.0 // Description : 自定义备注格式 // Return : void fandy_comments_insertTopDescription(Editor e) { int startLine = e.selectionStartLine(); int endLine = e.selectionEndLine(); int startCol = e.selectionStartCol(); userInfo userInfo; str dateTimeStr; transDateTime dateTimes; ; /* 当前行前面添加 if (endLine < startLine) endLine = startLine; e.unmark(); e.gotoLine(startLine); e.gotoCol(1); */ e.unmark(); e.gotoLine(1); e.gotoCol(1); e.insertLines(strfmt("// Copyright (C), %1, %2 Co., Ltd.\n", year(today()), strUpr(curext()))); select firstonly userInfo where userInfo.Id == curUserId(); dateTimes = dateTimeUtil::applyTimeZoneOffset(dateTimeUtil::utcNow(), dateTimeUtil::getUserPreferredTimeZone()); dateTimeStr = dateTimeUtil::toStr(dateTimes); e.insertLines("// " + strUpr(enum2str(currentAOLayer())) + " Changed by " + dateTimeStr + " " + userInfo.name + '\n'); e.insertLines("// Version : 1.0\n"); e.insertLines("// Description :\n"); e.insertLines("// Return :\n"); }