AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 24.01.2009, 22:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
axaptapedia: Editor scripts FormatToColumnLayout
Источник: http://www.axaptapedia.com/Editor_sc...ToColumnLayout
==============

Summary: Initial creation

=== Purpose ===
Allow you to select blocks of variable declarations or assignments, and format them to column layout (as suggested by msdn x++ best practices).

=== Description ===
Take the following code:

static void Example(Args _args)
{
IntrastatParameters intrastatParameters = IntrastatParameters::find();
SalesTable salesTable;
NumberSeq numberSeq;
SalesLine salesLine;
SalesFormLetter salesFormLetter;
;
numberSeq = NumberSeq::newGetNumFromCode(SalesParameters::numRefSalesId().NumberSequence);

salesTable.SalesId = numberSeq.num();
salesTable.TransactionCode = intrastatParameters.DefaultSalePurchase;
salesTable.Transport = intrastatParameters.TransportModeParm;
salesTable.Port = intrastatParameters.PortParm;
salesTable.CustAccount = "4015";


By selecting the block of variable declarations, then choosing Scripts -> addIns -> FormatToColumnLayout, and then the same again for the block of variable assigments will result in the following:


static void Example(Args _args)
{
IntrastatParameters intrastatParameters = IntrastatParameters::find();
SalesTable salesTable;
NumberSeq numberSeq;
SalesLine salesLine;
SalesFormLetter salesFormLetter;
;
numberSeq = NumberSeq::newGetNumFromCode(SalesParameters::numRefSalesId().NumberSequence);

salesTable.SalesId = numberSeq.num();
salesTable.TransactionCode = intrastatParameters.DefaultSalePurchase;
salesTable.Transport = intrastatParameters.TransportModeParm;
salesTable.Port = intrastatParameters.PortParm;
salesTable.CustAccount = "4015";


=== Dynamics AX versions ===
Has been tested on Dynamics AX 4.0 SP2 and Dynamics AX 2009

=== Download ===
*Version 1.0 - [http://www.axaptapedia.com/Image:Pri...lumnLayout.xpo download]

=== Installation ===
After downloading and importing the above xpo the following code needs to be pasted into a new method in the EditorScripts class:


//
/// Editor_Scripts_FormatToColumnLayout_GregP, 2009-01-24
/// Formats selected block of variable assignments or declarations into column format
///
/// Currenty open editor
void addIns_FormatToColumnLayout(Editor e)
{
;
EditorFormat::FormatToColumnLayout(e);
}


=== Used in ===
[[Editor scripts]]

=== See also ===
*MSDN x++ best practice - [http://msdn.microsoft.com/en-us/library/aa619943.aspx X++ Layout]

[[Category:Development tools]]


Источник: http://www.axaptapedia.com/Editor_sc...ToColumnLayout
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axaptapedia: Startup Tool Blog bot DAX Blogs 0 13.02.2009 02:05
axcoder: PowerShell + Ax Blog bot DAX Blogs 1 09.01.2009 18:05
axaptapedia: Load Web Documents Blog bot DAX Blogs 1 03.01.2009 23:50
axcoder: AxPath is supported by axaptapedia Blog bot DAX Blogs 0 11.05.2007 10:00

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 09:03.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.