08.03.2007, 19:42 | #1 |
Участник
|
axaptapedia: Configuration in title bar
Источник: http://www.axaptapedia.com/Configuration_in_title_bar
============== Summary: ==Configuration in title bar== One common complain with Dynamics Ax 4.0 is that it is not possible for the user to determine in which environment they are working. Particularly for consultants/developers who often have multiple Ax applications open at one time, this is very frustrating and can easily lead to errors (developing in the wrong application). In Axapta 3.0 information was displayed in the title bar allowing users to determine the application, but this is missing in Ax 4.0 This simple fix will display the configuration name in the main Dynamics Ax window title bar. You need to simply override the workspaceWindowCreated() method in the info() class (special class nearly at the bottom of the Classes node in the AOT) and add a single line of code. After the change, the method should appear as follows: void workspaceWindowCreated(int _hWnd) { ; // Put workspace window specific initialization here. // Show config in title bar WinAPI::setWindowText(_hWnd, strFmt("%1 - %2", WinAPI::getWindowText(_hWnd), xInfo::configuration())); } Another option is shown below. This will put the current AOS and server name, as well as the logged in development layer, after the standard title bar text. void workspaceWindowCreated(int _hWnd) { SqlSystem sqlSystem = new SqlSystem(); LoginProperty loginProperty = sqlSystem.createLoginProperty(); ; // Put workspace window specific initialization here. // Show application details in title bar if (loginProperty) { WinAPI::setWindowText(_hWnd, strFmt("%1 - %2@%3 (%4)", WinAPI::getWindowText(_hWnd), loginProperty.getDatabase(), loginProperty.getServer(), this.currentAOLayer())); } } The details for these fixes came originally from posts to the microsoft public axapta newsgroup. Источник: http://www.axaptapedia.com/Configuration_in_title_bar |
|
08.03.2007, 19:57 | #2 |
Участник
|
не забывайте, что состав заголовка указывается в файле axsys*.ktd в bin каталоге.
См. системную строку с номером #1076 Чаще бывает, что проще не кодировать, а поменять строку в этом файле. |
|