Merhaba
Axapta editorunda sağ script menusu mevcut bazı uygulamalar mevcut. Sizde bu menuye kendi scriptlerinizi ekleyebilirsiniz.
Öreneğin benim geliştirmelerde kullandığım standart bir yorum satırı var. Şu şekilde ;
// <ETG – etg_fd > GN :002 T : 28.05.2011 A : Stok kartı düzeltmeleri
// <ETG – etg_fd > GN :002
Tanımı şöyle ;
// Kodu Buraya Yazalım // <ETG – /*Revizyon yapan*/> GN:
Bu kodu Script menusune eklemek için EditorScript klasına şu metodu eklemeliyiz.
public void FD_CommentTemplateSelected(Editor _editor)
{
xppSource xppSource = new xppSource(_editor.columnNo());
int startLine = _editor.selectionStartLine();
int endLine = _editor.selectionEndLine();
;
_editor.gotoLine(startLine);
_editor.gotoCol(1);
_editor.insertLines(xppSource.FDCommentTemplateHead());
_editor.gotoLine(endLine + 3);
_editor.gotoCol(1);
_editor.insertLines(xppSource.FDCommentTemplateLine());
}
[/sourcecode]
Buarada kullandığımız FDCommentTemplateHead() ve FDCommentTemplateLine() metodunu xppSource klasına yazmamız gerekiyor.
[sourcecode language=”csharp”]
Source FDCommentTemplateHead()
{
;
source = “”;
source += ‘\n’;
source += strfmt(‘// <ETG – %1 > GN: T: %2 A: ‘,curUserId(), systemDateGet());
source += ‘\n’;
return source;
}
[/sourcecode]
Source FDCommentTemplateLine()
{
;
source = “”;
source += ‘\n’;
source += strfmt(‘// <ETG – %1 > GN: ‘,curUserID());
source += ‘\n’;
return source;
}[/sourcecode]
Selamlar.
🙂 Makale yapmısınız
Permalinkevet 🙂
Permalink