| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- ////////////////////////////////////////////////////////////////////////////
- // System Pre-define Functions
- // 95099372-ef3e-11ea-9c81-bf848405c62e
- //Callback of data preparation stage before UI is fully loaded.
- var dock_widget = false;
- function OnInitializeData(reload, preview) {
- if(preview) {return;}
-
- parent.setTimeout(()=>{
- OnInitDocker();
- }, 0);
-
- }
- function appendDockPane(sub_form, title, init_pos, allow_pos, features) {
- let dw = sub_form.CreateDock(title);
- if(features) {ui.docker.setFeatures(dw, features);}
- ui.docker.setAllowAreas(dw, allow_pos);
- ui.docker.dock(dw, init_pos);
-
- return dw;
- }
- function OnInitDocker() {
-
- dock_widget = appendDockPane(unit.form.side_pane, "功能区", 1, 1|2);
-
- ui.docker.show(dock_widget, true);
-
- }
- function installDockerCallback(apply_cb, next_cb, back_cb){
- ui.OnLeftSideApply = apply_cb;
- ui.OnLeftSideNext = next_cb;
- ui.OnLeftSideBack = back_cb;
- }
- //Callback after UI is fully loaded and displayed.
- function OnReady(reload, preview) {
- }
- function OnCloseForm() {
-
- }
- function OnException(err) {
- //ui.MessageBox('Error', '' + err, MessageBox.Icon.Critical, MessageBox.Button.Ok);
- }
- //////////////////////////////////////////////////////////////////////////
- // Callback Functions.
- // 641a254c-ef3e-11ea-bc8a-379bb908bdd7
- //The message corresponding callback executed by the main form
- // when calling pui.fireEvent(type,para) in the Docker subform.
- function OnChildDockerMessage(type, para){
- }
- //////////////////////////////////////////////////////////////////////////
- // Utils Functions.
- // 6c165ad6-ef3e-11ea-987c-b761a131c2fe
- function onDragFile(filepath) {
- }
- /*Usage of BLOCK_EVENT
- BLOCK_EVENT(()=>{
- ui.[name].[var] = ...;
- });
- */
- function BLOCK_EVENT(cb) {
- ui.block_event = true;
-
- cb();
-
- ui.block_event = false;
- }
|