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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.10.2006, 16:40   #1  
Blog bot is offline
Blog bot
Участник
 
25,506 / 847 (80) +++++++
Регистрация: 28.10.2006
Fred Shen: Use resource files in Axapta
Источник: http://fredshen.spaces.live.com/Blog...E4E3!162.entry
==============
Axapta provides a very handy feature to allow developers to ship their solution with Axapta built-in image files. In Application Object Tree, you can find resources node. Select resources node and right click; select Create from File, specify the file location for the new resource file. After that you can use this resource file in Axapta without specifying an absolute file path in your hard disk.
Then let's see how to use this kind of files in Axapta.
First, pick up the resource node from AOT;
SysResource::getResourceNode();

Then generate a temporary file for this resource file;
SysResource::saveToTempFile()

Finally specify the temporary file path for controls.
Here comes an example to show how to use a resource file as a background image of  a given form.
    {
        ResourceNode            resourceNode;
        FilePath  imagename;
        ;
        resourceNode = SysResource::getResourceNode(resourcestr(ResourceName)); 
        if (resourceNode)
        {
            resourceNode. AOTload();
            imagename =  SysResource::saveToTempFile(resourceNode);
        }
        else
        {
             throw Error("No file exists.")
        }

        element.design().imageName(imagename);
    }



==============
Источник: http://fredshen.spaces.live.com/Blog...E4E3!162.entry
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Fred Shen: Limited sessions in Axapta Blog bot DAX Blogs 0 28.10.2006 16:40
Fred Shen: Convert Axapta date type value to datetime type value in SQL Server Blog bot DAX Blogs 0 28.10.2006 16:40
Fred Shen: Read and alter registry settings in Axapta Blog bot DAX Blogs 0 28.10.2006 16:40
Fred Shen: Axapta build number Blog bot DAX Blogs 0 28.10.2006 16:40
Fred Shen: Tips on optimizing primary index in Axapta Blog bot DAX Blogs 0 28.10.2006 16:40

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

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

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