Tabular_Data_pane.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ////////////////////////////////////////////////////////////////////////////
  2. // System Pre-define Functions
  3. // 95099372-ef3e-11ea-9c81-bf848405c62e
  4. //Callback of data preparation stage before UI is fully loaded.
  5. function OnInitializeData(reload, preview) {
  6. PUI(()=>{
  7. //you can access the 'ui' namespace in the parent form using the variable 'pui' here.
  8. //The 'pui' variable is valid in all functions of this document.
  9. //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
  10. });
  11. ui.list.table = [["Mode", "Frequency"], ["1.", "3401.6"], ["2.", "3417."], ["3.", "3648.3"], ["4.", "4287.6"], ["5.", "4630."], ["6.", "4646.8"], ["7.", "5580.2"], ["8.", "7273."], ["9.", "7581,1"], ["10.", "8074.6"]];
  12. }
  13. //Callback after UI is fully loaded and displayed.
  14. function OnReady(reload, preview) {
  15. PUI(()=>{
  16. //you can access the 'ui' namespace in the parent form using the variable 'pui' here.
  17. //The 'pui' variable is valid in all functions of this document.
  18. //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
  19. });
  20. }
  21. function OnCloseForm() {
  22. }
  23. function OnException(err) {
  24. //ui.MessageBox('Error', '' + err, MessageBox.Icon.Critical, MessageBox.Button.Ok);
  25. }
  26. //////////////////////////////////////////////////////////////////////////
  27. // Callback Functions.
  28. // 641a254c-ef3e-11ea-bc8a-379bb908bdd7
  29. //The message corresponding callback executed by the docker pane.
  30. // when calling [side_pane].fireEvent(type,para) in the main form.
  31. function OnParentDockerMessage(type, para) {
  32. }
  33. //////////////////////////////////////////////////////////////////////////
  34. // Utils Functions.
  35. // 6c165ad6-ef3e-11ea-987c-b761a131c2fe
  36. function onDragFile(filepath) {
  37. }
  38. function PUI(cb) {
  39. if(pui){cb();}
  40. }
  41. /*Usage of BLOCK_EVENT
  42. BLOCK_EVENT(()=>{
  43. ui.[name].[var] = ...;
  44. });
  45. */
  46. function BLOCK_EVENT(cb) {
  47. ui.block_event = true;
  48. cb();
  49. ui.block_event = false;
  50. }
  51. //////////////////////////////////////////////////////////////////////////
  52. // template codes for cw callback js.
  53. function CW_DeclareVariable(name, setter, getter) {
  54. if(typeof(__DeclareVariable) === 'function') {
  55. __DeclareVariable(name, setter, getter);
  56. }
  57. }
  58. function CW_DeclareOuterVariable(name) {
  59. if(typeof(__DeclareOuterVariable) === 'function') {
  60. __DeclareOuterVariable(name);
  61. }
  62. }