m_popup_shortcut_del.srm 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. $PBExportHeader$m_popup_shortcut_del.srm
  2. forward
  3. global type m_popup_shortcut_del from menu
  4. end type
  5. type m_main from menu within m_popup_shortcut_del
  6. end type
  7. type m_添加快捷方式 from menu within m_main
  8. end type
  9. type m_- from menu within m_main
  10. end type
  11. type m_item4 from menu within m_main
  12. end type
  13. type m_main from menu within m_popup_shortcut_del
  14. m_添加快捷方式 m_添加快捷方式
  15. m_- m_-
  16. m_item4 m_item4
  17. end type
  18. global type m_popup_shortcut_del from menu
  19. m_main m_main
  20. end type
  21. end forward
  22. global type m_popup_shortcut_del from menu
  23. m_main m_main
  24. end type
  25. global m_popup_shortcut_del m_popup_shortcut_del
  26. type variables
  27. Powerobject Anyobject
  28. end variables
  29. forward prototypes
  30. public subroutine popupmenu (integer x, integer y)
  31. public subroutine setmenuitem (string itemstring)
  32. public subroutine setitemdisabled (integer itemorder)
  33. public subroutine setiteminvisible (integer itemorder)
  34. end prototypes
  35. public subroutine popupmenu (integer x, integer y);this.m_main.popmenu(x,y)
  36. end subroutine
  37. public subroutine setmenuitem (string itemstring);int itempos,itemorder=1,i
  38. string currentitem
  39. if len(itemstring)=0 then return
  40. itempos=pos(itemstring,"|")
  41. DO WHILE itempos<>0
  42. // itempos为间隔符"|"的位置
  43. currentitem=left(itemstring,itempos - 1)
  44. //取出子串
  45. itemstring=mid(itemstring, itempos+1)
  46. this.m_main.item[itemorder].text=currentitem
  47. itempos=pos(itemstring,"|")
  48. itemorder++
  49. LOOP
  50. this.m_main.item[itemorder].text=itemstring
  51. for i=1 to itemorder
  52. this.m_main.item[i].visible=true
  53. this.m_main.item[i].enabled=true
  54. next
  55. for i=itemorder+1 to 15
  56. this.m_main.item[i].visible=false
  57. next
  58. end subroutine
  59. public subroutine setitemdisabled (integer itemorder);if itemorder<1 or itemorder>15 then return
  60. this.m_main.item[itemorder].enabled=false
  61. end subroutine
  62. public subroutine setiteminvisible (integer itemorder);if itemorder<1 or itemorder>15 then return
  63. this.m_main.item[itemorder].visible=false
  64. end subroutine
  65. on m_popup_shortcut_del.create
  66. m_popup_shortcut_del=this
  67. call super::create
  68. this.text = "m_popup_shortcut_del"
  69. this.m_main=create m_main
  70. this.Item[UpperBound(this.Item)+1]=this.m_main
  71. end on
  72. on m_popup_shortcut_del.destroy
  73. call super::destroy
  74. destroy(this.m_main)
  75. end on
  76. type m_main from menu within m_popup_shortcut_del
  77. m_添加快捷方式 m_添加快捷方式
  78. m_- m_-
  79. m_item4 m_item4
  80. end type
  81. on m_main.create
  82. call super::create
  83. this.text = "main"
  84. this.m_添加快捷方式=create m_添加快捷方式
  85. this.m_-=create m_-
  86. this.m_item4=create m_item4
  87. this.Item[UpperBound(this.Item)+1]=this.m_添加快捷方式
  88. this.Item[UpperBound(this.Item)+1]=this.m_-
  89. this.Item[UpperBound(this.Item)+1]=this.m_item4
  90. end on
  91. on m_main.destroy
  92. call super::destroy
  93. destroy(this.m_添加快捷方式)
  94. destroy(this.m_-)
  95. destroy(this.m_item4)
  96. end on
  97. type m_添加快捷方式 from menu within m_main
  98. end type
  99. event clicked;if sys_version_type = 0 then
  100. w_main_scware.lv_shortcut.triggerevent("ue_add_shortcut")
  101. //else
  102. // w_main_scware_biz.lv_shortcut.triggerevent("ue_add_shortcut")
  103. end if
  104. end event
  105. on m_添加快捷方式.create
  106. call super::create
  107. this.text = "添加快捷方式"
  108. end on
  109. on m_添加快捷方式.destroy
  110. call super::destroy
  111. end on
  112. type m_- from menu within m_main
  113. end type
  114. on m_-.create
  115. call super::create
  116. this.text = "-"
  117. end on
  118. on m_-.destroy
  119. call super::destroy
  120. end on
  121. type m_item4 from menu within m_main
  122. end type
  123. on m_item4.create
  124. call super::create
  125. this.text = "删除快捷方式"
  126. end on
  127. on m_item4.destroy
  128. call super::destroy
  129. end on
  130. event clicked;IF sys_version_type = 0 THEN
  131. w_main_scware.lv_shortcut.TriggerEvent("ue_del_shortcut")
  132. //ELSE
  133. // w_main_scware_biz.lv_shortcut.TriggerEvent("ue_del_shortcut")
  134. END IF
  135. end event