UI
The UI
(alias ui
) class provides static properties and methods for managing and interacting with the Application Center user interface. It includes methods for managing Navigation View, creating app/dialog views.
Static Properties:
navigation: UINavigation
(read-only)
A read-only instance of theUINavigation
class that manages navigation-related operations within the UI. Corresponds to the tree control at the left side in the Application Center.cursor
:Cursor
The current cursor for the UI. This can be modified to set different cursor styles or types. To access available cursors viaCursor
class (e.g., Cursor.Hand, Cursor.Arrow, etc.).sessions: UISession[]
(read-only)
A read-only array of activeUISession
objects, each representing a separate user session within the UI. Can be used to communicate between active sessions. Each Application Center main window instance corresponds to one session.icons
:Icons
(read-only)
A read-only property providing access to the collection of UI icons. In system configuration and in javascript code you can access icons just by specifying the name. All icons are stored in document class Icon (SYS$ICON) and can be extended or changed viaSystem Management→Icons
app.localStorage:
LocalStorage
(read-only)
Provides access to local storage, allowing persistent storage of data in the Application Center on the local PC. Allowed types are string, boolean, number, date. Setting undefined as value will delete your setting.
sessionStorage:
SessionStorage
(read-only)
Provides access to session storage, which allows data to be stored for the duration of a session (until Application Center window is closed).Hwnd: number
(read-only)
The main window handle.
Static Methods:
lock()
Locks the user interface, preventing interaction until theunlock()
method is called. This is useful when performing multiple UI updates. It will prevent UI flickering and improve performance.unlock()
Unlocks the UI, allowing user interaction after it has been locked using thelock()
method.alert(txt: string)
Displays a message to the user in a modal dialog. The user must acknowledge the message by pressing a button "OK".confirm(question: string): boolean
Displays a confirmation dialog with a question and "Yes" and "No" buttons. Returnstrue
if the user selects "Yes," otherwisefalse
.prompt(text: string, defaultInput: string): any
Displays a prompt dialog asking for user input. Returns the entered text if the user provides input ornull
if the user cancels.browse(options?: BrowseOptions): string[] | undefined
Opens a file browsing dialog based on the provided options. Returns an array of selected file paths, orundefined
if the user cancels the operation.
BrowseOptions:open: boolean
(default =true
)
Iftrue
functionbrowse(...)
shows File Open dialog.save: boolean
(default =false
)
Iftrue
functionbrowse(...)
shows File Save dialog.title: string
(default =''
)
The title of the File Open/Save dialog window.directory: string
(default =''
)
Specifies the initial directory to open when the dialog is shown.file: string
(default =''
)
Pre-fills a file name in the dialog when opened.pickFolders: boolean
(default =false
)
Allows the user to select folders instead of files.promptOverwrite: boolean
(default =true
)
Prompts the user before overwriting an existing file in save mode.disableDirectoryChange: boolean
(default =false
)
If set totrue
, prevents the user from changing the directory in the dialog.pathMustExist: boolean
(default =false
)
Ensures that the selected path must exist .showHidden: boolean
(default =false
)
Shows hidden files and forders.hideReadOnly: boolean
(default =false
)
Does not return read-only items.addToRecent: boolean
(default =true
)
Currently selected path will be added to the Most Recently Used list, and will be offered in a browsing dialog next time.multiSelect: boolean
(default =true
)
Allows the user to select multiple files.filter: string[]
(default =['Text files (*.txt)|*.TXT', 'All files (*.*)|*.*']
)
Defines file type filters that the user can choose from in the dialog.selectFilter: string
(default =''
)
Pre-selects a filter from thefilter
list when the dialog is opened.