result_menu_pane.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. }
  12. //Callback after UI is fully loaded and displayed.
  13. function OnReady(reload, preview) {
  14. PUI(()=>{
  15. //you can access the 'ui' namespace in the parent form using the variable 'pui' here.
  16. //The 'pui' variable is valid in all functions of this document.
  17. //For robustness, you'd better use 'PUI(cb);' to access 'pui' variable.
  18. });
  19. }
  20. function OnCloseForm() {
  21. }
  22. function OnException(err) {
  23. //ui.MessageBox('Error', '' + err, MessageBox.Icon.Critical, MessageBox.Button.Ok);
  24. }
  25. //////////////////////////////////////////////////////////////////////////
  26. // Callback Functions.
  27. // 641a254c-ef3e-11ea-bc8a-379bb908bdd7
  28. function OnStack(){
  29. unit.form.mainfrm.menu(31);
  30. }
  31. function OnCom2(){
  32. unit.form.mainfrm.menu(29);
  33. }
  34. function OnCom1(){
  35. unit.form.mainfrm.menu(28);
  36. }
  37. function OnCom(){
  38. unit.form.mainfrm.menu(27);
  39. }
  40. function OnAnsys(){
  41. unit.form.mainfrm.menu(24);
  42. unit.form.mainfrm.OnChangePicture(5, 1);
  43. //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: Blue;font-size:20px;">模态分析结果加载功能!</h4>');
  44. unit.form.mainfrm.OnCueline('模态分析结果加载功能!首先要进行模态加载,进行上下帧切换时要先按上一帧切换才能按下一帧切换,按完后要等待左边消息反馈Successs后才能继续按', 'blue');
  45. }
  46. function OnCutter(){
  47. unit.form.mainfrm.menu(10);
  48. unit.form.mainfrm.OnChangePicture(5, 1);
  49. //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: Blue;font-size:20px;">模型剖切功能,对模型进行实时剖切!</h4>');
  50. unit.form.mainfrm.OnCueline('模型剖切功能,对模型进行实时剖切!', 'blue');
  51. }
  52. function OnAttribute(){
  53. unit.form.mainfrm.menu(9);
  54. unit.form.mainfrm.OnChangePicture(5, 1);
  55. //unit.form.mainfrm.OnCueline('<h4 style="font-family:arial;color: Blue;font-size:20px;">云图切换功能,执行云图属性切换、颜色条、危险点位置等功能!</h4>');
  56. unit.form.mainfrm.OnCueline('云图切换功能,执行云图属性切换、颜色条、危险点位置等功能!', 'blue');
  57. }
  58. //The message corresponding callback executed by the docker pane.
  59. // when calling [side_pane].fireEvent(type,para) in the main form.
  60. function OnParentDockerMessage(type, para) {
  61. }
  62. //////////////////////////////////////////////////////////////////////////
  63. // Utils Functions.
  64. // 6c165ad6-ef3e-11ea-987c-b761a131c2fe
  65. function onDragFile(filepath) {
  66. }
  67. function PUI(cb) {
  68. if(pui){cb();}
  69. }
  70. /*Usage of BLOCK_EVENT
  71. BLOCK_EVENT(()=>{
  72. ui.[name].[var] = ...;
  73. });
  74. */
  75. function BLOCK_EVENT(cb) {
  76. ui.block_event = true;
  77. cb();
  78. ui.block_event = false;
  79. }
  80. //////////////////////////////////////////////////////////////////////////
  81. // template codes for cw callback js.
  82. function CW_DeclareVariable(name, setter, getter) {
  83. if(typeof(__DeclareVariable) === 'function') {
  84. __DeclareVariable(name, setter, getter);
  85. }
  86. }
  87. function CW_DeclareOuterVariable(name) {
  88. if(typeof(__DeclareOuterVariable) === 'function') {
  89. __DeclareOuterVariable(name);
  90. }
  91. }