m_popup.srm 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. $PBExportHeader$m_popup.srm
  2. forward
  3. global type m_popup from menu
  4. end type
  5. type m_main from menu within m_popup
  6. end type
  7. type m_item1 from menu within m_main
  8. end type
  9. type m_item2 from menu within m_main
  10. end type
  11. type m_item3 from menu within m_main
  12. end type
  13. type m_item4 from menu within m_main
  14. end type
  15. type m_item5 from menu within m_main
  16. end type
  17. type m_1 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_main from menu within m_popup
  26. m_item1 m_item1
  27. m_item2 m_item2
  28. m_item3 m_item3
  29. m_item4 m_item4
  30. m_item5 m_item5
  31. m_1 m_1
  32. m_设置下级版本 m_设置下级版本
  33. m_设置报表下级菜单 m_设置报表下级菜单
  34. m_设置单据下级菜单 m_设置单据下级菜单
  35. end type
  36. global type m_popup from menu
  37. m_main m_main
  38. end type
  39. end forward
  40. global type m_popup from menu
  41. m_main m_main
  42. end type
  43. global m_popup m_popup
  44. type variables
  45. Powerobject Anyobject
  46. end variables
  47. forward prototypes
  48. public subroutine popupmenu (integer x, integer y)
  49. public subroutine setmenuitem (string itemstring)
  50. public subroutine setitemdisabled (integer itemorder)
  51. public subroutine setiteminvisible (integer itemorder)
  52. end prototypes
  53. public subroutine popupmenu (integer x, integer y);this.m_main.popmenu(x,y)
  54. end subroutine
  55. public subroutine setmenuitem (string itemstring);int itempos,itemorder=1,i
  56. string currentitem
  57. if len(itemstring)=0 then return
  58. itempos=pos(itemstring,"|")
  59. DO WHILE itempos<>0
  60. // itempos为间隔符"|"的位置
  61. currentitem=left(itemstring,itempos - 1)
  62. //取出子串
  63. itemstring=mid(itemstring, itempos+1)
  64. this.m_main.item[itemorder].text=currentitem
  65. itempos=pos(itemstring,"|")
  66. itemorder++
  67. LOOP
  68. this.m_main.item[itemorder].text=itemstring
  69. for i=1 to itemorder
  70. this.m_main.item[i].visible=true
  71. this.m_main.item[i].enabled=true
  72. next
  73. for i=itemorder+1 to 15
  74. this.m_main.item[i].visible=false
  75. next
  76. end subroutine
  77. public subroutine setitemdisabled (integer itemorder);if itemorder<1 or itemorder>15 then return
  78. this.m_main.item[itemorder].enabled=false
  79. end subroutine
  80. public subroutine setiteminvisible (integer itemorder);if itemorder<1 or itemorder>15 then return
  81. this.m_main.item[itemorder].visible=false
  82. end subroutine
  83. on m_popup.create
  84. m_popup=this
  85. call super::create
  86. this.text = "m_popup"
  87. this.menutextcolor = 134217735
  88. this.menubackcolor = 134217732
  89. this.menuhighlightcolor = 134217741
  90. this.textsize = 8
  91. this.weight = 400
  92. this.facename = "Tahoma"
  93. this.titlebackcolor = 134217730
  94. this.bitmapbackcolor = 12632256
  95. this.menubitmaps = true
  96. this.titlegradient = true
  97. this.toolbartextcolor = 134217746
  98. this.toolbarbackcolor = 67108864
  99. this.toolbarhighlightcolor = 134217741
  100. this.toolbargradient = true
  101. this.bitmapgradient = true
  102. this.m_main=create m_main
  103. this.Item[UpperBound(this.Item)+1]=this.m_main
  104. end on
  105. on m_popup.destroy
  106. call super::destroy
  107. destroy(this.m_main)
  108. end on
  109. type m_main from menu within m_popup
  110. m_item1 m_item1
  111. m_item2 m_item2
  112. m_item3 m_item3
  113. m_item4 m_item4
  114. m_item5 m_item5
  115. m_1 m_1
  116. m_设置下级版本 m_设置下级版本
  117. m_设置报表下级菜单 m_设置报表下级菜单
  118. m_设置单据下级菜单 m_设置单据下级菜单
  119. end type
  120. on m_main.create
  121. call super::create
  122. this.text = "main"
  123. this.menutextcolor = 134217735
  124. this.menubackcolor = 134217732
  125. this.menuhighlightcolor = 134217741
  126. this.textsize = 8
  127. this.weight = 400
  128. this.facename = "Tahoma"
  129. this.titlebackcolor = 134217730
  130. this.bitmapbackcolor = 12632256
  131. this.menubitmaps = true
  132. this.titlegradient = true
  133. this.toolbartextcolor = 134217746
  134. this.toolbarbackcolor = 67108864
  135. this.toolbarhighlightcolor = 134217741
  136. this.toolbargradient = true
  137. this.bitmapgradient = true
  138. this.m_item1=create m_item1
  139. this.m_item2=create m_item2
  140. this.m_item3=create m_item3
  141. this.m_item4=create m_item4
  142. this.m_item5=create m_item5
  143. this.m_1=create m_1
  144. this.m_设置下级版本=create m_设置下级版本
  145. this.m_设置报表下级菜单=create m_设置报表下级菜单
  146. this.m_设置单据下级菜单=create m_设置单据下级菜单
  147. this.Item[UpperBound(this.Item)+1]=this.m_item1
  148. this.Item[UpperBound(this.Item)+1]=this.m_item2
  149. this.Item[UpperBound(this.Item)+1]=this.m_item3
  150. this.Item[UpperBound(this.Item)+1]=this.m_item4
  151. this.Item[UpperBound(this.Item)+1]=this.m_item5
  152. this.Item[UpperBound(this.Item)+1]=this.m_1
  153. this.Item[UpperBound(this.Item)+1]=this.m_设置下级版本
  154. this.Item[UpperBound(this.Item)+1]=this.m_设置报表下级菜单
  155. this.Item[UpperBound(this.Item)+1]=this.m_设置单据下级菜单
  156. end on
  157. on m_main.destroy
  158. call super::destroy
  159. destroy(this.m_item1)
  160. destroy(this.m_item2)
  161. destroy(this.m_item3)
  162. destroy(this.m_item4)
  163. destroy(this.m_item5)
  164. destroy(this.m_1)
  165. destroy(this.m_设置下级版本)
  166. destroy(this.m_设置报表下级菜单)
  167. destroy(this.m_设置单据下级菜单)
  168. end on
  169. type m_item1 from menu within m_main
  170. end type
  171. on m_item1.create
  172. call super::create
  173. this.text = "新建兄弟"
  174. this.menutextcolor = 134217735
  175. this.menubackcolor = 134217732
  176. this.menuhighlightcolor = 134217741
  177. this.textsize = 8
  178. this.weight = 400
  179. this.facename = "Tahoma"
  180. this.titlebackcolor = 134217730
  181. this.bitmapbackcolor = 12632256
  182. this.menubitmaps = true
  183. this.titlegradient = true
  184. this.toolbartextcolor = 134217746
  185. this.toolbarbackcolor = 67108864
  186. this.toolbarhighlightcolor = 134217741
  187. this.toolbargradient = true
  188. this.bitmapgradient = true
  189. end on
  190. on m_item1.destroy
  191. call super::destroy
  192. end on
  193. event clicked;Anyobject.triggerevent("ue_tree_add_bro")
  194. end event
  195. type m_item2 from menu within m_main
  196. end type
  197. on m_item2.create
  198. call super::create
  199. this.text = "新建孩子"
  200. this.menutextcolor = 134217735
  201. this.menubackcolor = 134217732
  202. this.menuhighlightcolor = 134217741
  203. this.textsize = 8
  204. this.weight = 400
  205. this.facename = "Tahoma"
  206. this.titlebackcolor = 134217730
  207. this.bitmapbackcolor = 12632256
  208. this.menubitmaps = true
  209. this.titlegradient = true
  210. this.toolbartextcolor = 134217746
  211. this.toolbarbackcolor = 67108864
  212. this.toolbarhighlightcolor = 134217741
  213. this.toolbargradient = true
  214. this.bitmapgradient = true
  215. end on
  216. on m_item2.destroy
  217. call super::destroy
  218. end on
  219. event clicked;Anyobject.triggerevent("ue_tree_add_son")
  220. end event
  221. type m_item3 from menu within m_main
  222. end type
  223. on m_item3.create
  224. call super::create
  225. this.text = "-"
  226. this.menutextcolor = 134217735
  227. this.menubackcolor = 134217732
  228. this.menuhighlightcolor = 134217741
  229. this.textsize = 8
  230. this.weight = 400
  231. this.facename = "Tahoma"
  232. this.titlebackcolor = 134217730
  233. this.bitmapbackcolor = 12632256
  234. this.menubitmaps = true
  235. this.titlegradient = true
  236. this.toolbartextcolor = 134217746
  237. this.toolbarbackcolor = 67108864
  238. this.toolbarhighlightcolor = 134217741
  239. this.toolbargradient = true
  240. this.bitmapgradient = true
  241. end on
  242. on m_item3.destroy
  243. call super::destroy
  244. end on
  245. event clicked;Anyobject.triggerevent("ue_item3")
  246. end event
  247. type m_item4 from menu within m_main
  248. end type
  249. on m_item4.create
  250. call super::create
  251. this.text = "编辑"
  252. this.menutextcolor = 134217735
  253. this.menubackcolor = 134217732
  254. this.menuhighlightcolor = 134217741
  255. this.textsize = 8
  256. this.weight = 400
  257. this.facename = "Tahoma"
  258. this.titlebackcolor = 134217730
  259. this.bitmapbackcolor = 12632256
  260. this.menubitmaps = true
  261. this.titlegradient = true
  262. this.toolbartextcolor = 134217746
  263. this.toolbarbackcolor = 67108864
  264. this.toolbarhighlightcolor = 134217741
  265. this.toolbargradient = true
  266. this.bitmapgradient = true
  267. end on
  268. on m_item4.destroy
  269. call super::destroy
  270. end on
  271. event clicked;Anyobject.triggerevent("ue_tree_edit")
  272. end event
  273. type m_item5 from menu within m_main
  274. end type
  275. on m_item5.create
  276. call super::create
  277. this.text = "删除"
  278. this.menutextcolor = 134217735
  279. this.menubackcolor = 134217732
  280. this.menuhighlightcolor = 134217741
  281. this.textsize = 8
  282. this.weight = 400
  283. this.facename = "Tahoma"
  284. this.titlebackcolor = 134217730
  285. this.bitmapbackcolor = 12632256
  286. this.menubitmaps = true
  287. this.titlegradient = true
  288. this.toolbartextcolor = 134217746
  289. this.toolbarbackcolor = 67108864
  290. this.toolbarhighlightcolor = 134217741
  291. this.toolbargradient = true
  292. this.bitmapgradient = true
  293. end on
  294. on m_item5.destroy
  295. call super::destroy
  296. end on
  297. event clicked;Anyobject.triggerevent("ue_tree_del")
  298. end event
  299. type m_1 from menu within m_main
  300. end type
  301. event clicked;Anyobject.triggerevent("ue_item3")
  302. end event
  303. on m_1.create
  304. call super::create
  305. this.text = "-"
  306. this.menutextcolor = 134217735
  307. this.menubackcolor = 134217732
  308. this.menuhighlightcolor = 134217741
  309. this.textsize = 8
  310. this.weight = 400
  311. this.facename = "Tahoma"
  312. this.titlebackcolor = 134217730
  313. this.bitmapbackcolor = 12632256
  314. this.menubitmaps = true
  315. this.titlegradient = true
  316. this.toolbartextcolor = 134217746
  317. this.toolbarbackcolor = 67108864
  318. this.toolbarhighlightcolor = 134217741
  319. this.toolbargradient = true
  320. this.bitmapgradient = true
  321. end on
  322. on m_1.destroy
  323. call super::destroy
  324. end on
  325. type m_设置下级版本 from menu within m_main
  326. end type
  327. event clicked;Anyobject.triggerevent("ue_tree_set_son")
  328. end event
  329. on m_设置下级版本.create
  330. call super::create
  331. this.text = "设置下级版本"
  332. this.menutextcolor = 134217735
  333. this.menubackcolor = 134217732
  334. this.menuhighlightcolor = 134217741
  335. this.textsize = 8
  336. this.weight = 400
  337. this.facename = "Tahoma"
  338. this.titlebackcolor = 134217730
  339. this.bitmapbackcolor = 12632256
  340. this.menubitmaps = true
  341. this.titlegradient = true
  342. this.toolbartextcolor = 134217746
  343. this.toolbarbackcolor = 67108864
  344. this.toolbarhighlightcolor = 134217741
  345. this.toolbargradient = true
  346. this.bitmapgradient = true
  347. end on
  348. on m_设置下级版本.destroy
  349. call super::destroy
  350. end on
  351. type m_设置报表下级菜单 from menu within m_main
  352. end type
  353. event clicked;Anyobject.triggerevent("ue_tree_add_reportson")
  354. end event
  355. on m_设置报表下级菜单.create
  356. call super::create
  357. this.text = "设置报表下级菜单"
  358. this.menutextcolor = 134217735
  359. this.menubackcolor = 134217732
  360. this.menuhighlightcolor = 134217741
  361. this.textsize = 8
  362. this.weight = 400
  363. this.facename = "Tahoma"
  364. this.titlebackcolor = 134217730
  365. this.bitmapbackcolor = 12632256
  366. this.menubitmaps = true
  367. this.titlegradient = true
  368. this.toolbartextcolor = 134217746
  369. this.toolbarbackcolor = 67108864
  370. this.toolbarhighlightcolor = 134217741
  371. this.toolbargradient = true
  372. this.bitmapgradient = true
  373. end on
  374. on m_设置报表下级菜单.destroy
  375. call super::destroy
  376. end on
  377. type m_设置单据下级菜单 from menu within m_main
  378. end type
  379. event clicked;Anyobject.triggerevent("ue_tree_add_billfunc")
  380. end event
  381. on m_设置单据下级菜单.create
  382. call super::create
  383. this.text = "设置单据下级菜单"
  384. this.menutextcolor = 134217735
  385. this.menubackcolor = 134217732
  386. this.menuhighlightcolor = 134217741
  387. this.textsize = 8
  388. this.weight = 400
  389. this.facename = "Tahoma"
  390. this.titlebackcolor = 134217730
  391. this.bitmapbackcolor = 12632256
  392. this.menubitmaps = true
  393. this.titlegradient = true
  394. this.toolbartextcolor = 134217746
  395. this.toolbarbackcolor = 67108864
  396. this.toolbarhighlightcolor = 134217741
  397. this.toolbargradient = true
  398. this.bitmapgradient = true
  399. end on
  400. on m_设置单据下级菜单.destroy
  401. call super::destroy
  402. end on