To Comment a code axpta in a Block Like
/*
Some Code
*/
Add the Below Code in Editor Scripit Class in Axapta
void AX_BlockComment(Editor e)
{
int FLine,Eline;
int FCol,ECol;
FLine = e.selectionStartLine();
FCol = e.selectionStartCol();
ECol = e.selectionEndCol();
Eline = e.selectionEndLine();
e.unmark();
e.gotoLine(FLine-1);
e.gotoCol(1);
e.insertLines('//'+' Commented by ' + curUserId()+', on '+date2str(today(),123,2,1,3,1,4 ) + ',' +time2str(timeNow(), 1, 2)+'\n');
e.gotoLine(FLine);
e.gotoCol(FCol);
e.insertString('/*');
e.gotoLine(Eline+1);
e.gotoCol(1);
e.insertString('*/');
}
No comments:
Post a Comment