Skip links

Axapta editöründeki Script menusune ekleme yapmak


Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 117

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 118

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 117

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 118
Axapta editöründeki Script menusune ekleme yapmak

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 ;

// <ETG – /*Revizyon yapan*/> GN: /*Geliştirme no*/   T: /* Tarihi buraya yazıyoruz*/ A: /* açıklama*/
// Kodu Buraya Yazalım
// <ETG – /*Revizyon yapan*/> GN:

Bu kodu Script menusune eklemek için EditorScript klasına şu metodu eklemeliyiz.

[sourcecode language=”csharp”]
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]

 
[sourcecode language=”csharp”]
Source FDCommentTemplateLine()
{
;
source = “”;
source += ‘\n’;
source += strfmt(‘// <ETG – %1 > GN:   ‘,curUserID());
source += ‘\n’;
return source;
}[/sourcecode]
 

Selamlar.

Opinions

Join the Discussion