m_rpt_mod.srm 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. $PBExportHeader$m_rpt_mod.srm
  2. forward
  3. global type m_rpt_mod from menu
  4. end type
  5. type m_main from menu within m_rpt_mod
  6. end type
  7. type m_item2 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_item5 from menu within m_main
  14. end type
  15. type m_2 from menu within m_main
  16. end type
  17. type m_导出 from menu within m_main
  18. end type
  19. type m_导入 from menu within m_main
  20. end type
  21. type m_- from menu within m_main
  22. end type
  23. type m_刷新 from menu within m_main
  24. end type
  25. type m_1 from menu within m_main
  26. end type
  27. type m_属性 from menu within m_main
  28. end type
  29. type m_main from menu within m_rpt_mod
  30. m_item2 m_item2
  31. m_另存为 m_另存为
  32. m_item4 m_item4
  33. m_item5 m_item5
  34. m_2 m_2
  35. m_导出 m_导出
  36. m_导入 m_导入
  37. m_- m_-
  38. m_刷新 m_刷新
  39. m_1 m_1
  40. m_属性 m_属性
  41. end type
  42. global type m_rpt_mod from menu
  43. m_main m_main
  44. end type
  45. end forward
  46. global type m_rpt_mod from menu
  47. m_main m_main
  48. end type
  49. global m_rpt_mod m_rpt_mod
  50. type variables
  51. Powerobject Anyobject
  52. end variables
  53. forward prototypes
  54. public subroutine popupmenu (integer x, integer y)
  55. public subroutine setmenuitem (string itemstring)
  56. public subroutine setitemdisabled (integer itemorder)
  57. public subroutine setiteminvisible (integer itemorder)
  58. end prototypes
  59. public subroutine popupmenu (integer x, integer y);this.m_main.popmenu(x,y)
  60. end subroutine
  61. public subroutine setmenuitem (string itemstring);int itempos,itemorder=1,i
  62. string currentitem
  63. if len(itemstring)=0 then return
  64. itempos=pos(itemstring,"|")
  65. DO WHILE itempos<>0
  66. // itempos为间隔符"|"的位置
  67. currentitem=left(itemstring,itempos - 1)
  68. //取出子串
  69. itemstring=mid(itemstring, itempos+1)
  70. this.m_main.item[itemorder].text=currentitem
  71. itempos=pos(itemstring,"|")
  72. itemorder++
  73. LOOP
  74. this.m_main.item[itemorder].text=itemstring
  75. for i=1 to itemorder
  76. this.m_main.item[i].visible=true
  77. this.m_main.item[i].enabled=true
  78. next
  79. for i=itemorder+1 to 15
  80. this.m_main.item[i].visible=false
  81. next
  82. end subroutine
  83. public subroutine setitemdisabled (integer itemorder);if itemorder<1 or itemorder>15 then return
  84. this.m_main.item[itemorder].enabled=false
  85. end subroutine
  86. public subroutine setiteminvisible (integer itemorder);if itemorder<1 or itemorder>15 then return
  87. this.m_main.item[itemorder].visible=false
  88. end subroutine
  89. on m_rpt_mod.create
  90. m_rpt_mod=this
  91. call super::create
  92. this.text = "m_popup"
  93. this.m_main=create m_main
  94. this.Item[UpperBound(this.Item)+1]=this.m_main
  95. end on
  96. on m_rpt_mod.destroy
  97. call super::destroy
  98. destroy(this.m_main)
  99. end on
  100. type m_main from menu within m_rpt_mod
  101. m_item2 m_item2
  102. m_另存为 m_另存为
  103. m_item4 m_item4
  104. m_item5 m_item5
  105. m_2 m_2
  106. m_导出 m_导出
  107. m_导入 m_导入
  108. m_- m_-
  109. m_刷新 m_刷新
  110. m_1 m_1
  111. m_属性 m_属性
  112. end type
  113. on m_main.create
  114. call super::create
  115. this.text = "main"
  116. this.m_item2=create m_item2
  117. this.m_另存为=create m_另存为
  118. this.m_item4=create m_item4
  119. this.m_item5=create m_item5
  120. this.m_2=create m_2
  121. this.m_导出=create m_导出
  122. this.m_导入=create m_导入
  123. this.m_-=create m_-
  124. this.m_刷新=create m_刷新
  125. this.m_1=create m_1
  126. this.m_属性=create m_属性
  127. this.Item[UpperBound(this.Item)+1]=this.m_item2
  128. this.Item[UpperBound(this.Item)+1]=this.m_另存为
  129. this.Item[UpperBound(this.Item)+1]=this.m_item4
  130. this.Item[UpperBound(this.Item)+1]=this.m_item5
  131. this.Item[UpperBound(this.Item)+1]=this.m_2
  132. this.Item[UpperBound(this.Item)+1]=this.m_导出
  133. this.Item[UpperBound(this.Item)+1]=this.m_导入
  134. this.Item[UpperBound(this.Item)+1]=this.m_-
  135. this.Item[UpperBound(this.Item)+1]=this.m_刷新
  136. this.Item[UpperBound(this.Item)+1]=this.m_1
  137. this.Item[UpperBound(this.Item)+1]=this.m_属性
  138. end on
  139. on m_main.destroy
  140. call super::destroy
  141. destroy(this.m_item2)
  142. destroy(this.m_另存为)
  143. destroy(this.m_item4)
  144. destroy(this.m_item5)
  145. destroy(this.m_2)
  146. destroy(this.m_导出)
  147. destroy(this.m_导入)
  148. destroy(this.m_-)
  149. destroy(this.m_刷新)
  150. destroy(this.m_1)
  151. destroy(this.m_属性)
  152. end on
  153. type m_item2 from menu within m_main
  154. end type
  155. event clicked;Anyobject.triggerevent("ue_add_rpt")
  156. end event
  157. on m_item2.create
  158. call super::create
  159. this.text = "新建"
  160. end on
  161. on m_item2.destroy
  162. call super::destroy
  163. end on
  164. type m_另存为 from menu within m_main
  165. end type
  166. on m_另存为.create
  167. call super::create
  168. this.text = "另存为"
  169. end on
  170. on m_另存为.destroy
  171. call super::destroy
  172. end on
  173. event clicked;Anyobject.triggerevent("ue_copy_rpt")
  174. end event
  175. type m_item4 from menu within m_main
  176. end type
  177. event clicked;Anyobject.triggerevent("ue_open_main")
  178. end event
  179. on m_item4.create
  180. call super::create
  181. this.text = "编辑报表"
  182. end on
  183. on m_item4.destroy
  184. call super::destroy
  185. end on
  186. type m_item5 from menu within m_main
  187. end type
  188. event clicked;Anyobject.triggerevent("ue_del_rpt")
  189. end event
  190. on m_item5.create
  191. call super::create
  192. this.text = "删除"
  193. end on
  194. on m_item5.destroy
  195. call super::destroy
  196. end on
  197. type m_2 from menu within m_main
  198. end type
  199. on m_2.create
  200. call super::create
  201. this.text = "-"
  202. end on
  203. on m_2.destroy
  204. call super::destroy
  205. end on
  206. type m_导出 from menu within m_main
  207. end type
  208. on m_导出.create
  209. call super::create
  210. this.text = "导出"
  211. end on
  212. on m_导出.destroy
  213. call super::destroy
  214. end on
  215. type m_导入 from menu within m_main
  216. end type
  217. on m_导入.create
  218. call super::create
  219. this.text = "导入"
  220. end on
  221. on m_导入.destroy
  222. call super::destroy
  223. end on
  224. type m_- from menu within m_main
  225. end type
  226. on m_-.create
  227. call super::create
  228. this.text = "-"
  229. end on
  230. on m_-.destroy
  231. call super::destroy
  232. end on
  233. type m_刷新 from menu within m_main
  234. end type
  235. event clicked;Anyobject.triggerevent("ue_resh_rpt")
  236. end event
  237. on m_刷新.create
  238. call super::create
  239. this.text = "刷新"
  240. end on
  241. on m_刷新.destroy
  242. call super::destroy
  243. end on
  244. type m_1 from menu within m_main
  245. end type
  246. on m_1.create
  247. call super::create
  248. this.text = "-"
  249. end on
  250. on m_1.destroy
  251. call super::destroy
  252. end on
  253. type m_属性 from menu within m_main
  254. end type
  255. event clicked;Anyobject.triggerevent("ue_mod_rpt")
  256. end event
  257. on m_属性.create
  258. call super::create
  259. this.text = "属性"
  260. end on
  261. on m_属性.destroy
  262. call super::destroy
  263. end on