m_email_view.srm 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. $PBExportHeader$m_email_view.srm
  2. forward
  3. global type m_email_view from menu
  4. end type
  5. type m_main from menu within m_email_view
  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_main from menu within m_email_view
  24. m_item1 m_item1
  25. m_item2 m_item2
  26. m_item3 m_item3
  27. m_item4 m_item4
  28. m_item5 m_item5
  29. m_1 m_1
  30. m_账号管理 m_账号管理
  31. m_导入 m_导入
  32. end type
  33. global type m_email_view from menu
  34. m_main m_main
  35. end type
  36. end forward
  37. global type m_email_view from menu
  38. m_main m_main
  39. end type
  40. global m_email_view m_email_view
  41. type variables
  42. Powerobject Anyobject
  43. end variables
  44. forward prototypes
  45. public subroutine popupmenu (integer x, integer y)
  46. public subroutine setmenuitem (string itemstring)
  47. public subroutine setitemdisabled (integer itemorder)
  48. public subroutine setiteminvisible (integer itemorder)
  49. end prototypes
  50. public subroutine popupmenu (integer x, integer y);this.m_main.popmenu(x,y)
  51. end subroutine
  52. public subroutine setmenuitem (string itemstring);int itempos,itemorder=1,i
  53. string currentitem
  54. if len(itemstring)=0 then return
  55. itempos=pos(itemstring,"|",1)
  56. DO WHILE itempos<>0
  57. // itempos为间隔符"|"的位置
  58. currentitem=left(itemstring,itempos - 1)
  59. //取出子串
  60. itemstring=mid(itemstring, itempos+1, len(itemstring))
  61. this.m_main.item[itemorder].text=currentitem
  62. itempos=pos(itemstring,"|",1)
  63. itemorder++
  64. LOOP
  65. this.m_main.item[itemorder].text=itemstring
  66. for i=1 to itemorder
  67. this.m_main.item[i].visible=true
  68. this.m_main.item[i].enabled=true
  69. next
  70. for i=itemorder+1 to 15
  71. this.m_main.item[i].visible=false
  72. next
  73. end subroutine
  74. public subroutine setitemdisabled (integer itemorder);if itemorder<1 or itemorder>15 then return
  75. this.m_main.item[itemorder].enabled=false
  76. end subroutine
  77. public subroutine setiteminvisible (integer itemorder);if itemorder<1 or itemorder>15 then return
  78. this.m_main.item[itemorder].visible=false
  79. end subroutine
  80. on m_email_view.create
  81. m_email_view=this
  82. call super::create
  83. this.text = "m_popup"
  84. this.m_main=create m_main
  85. this.Item[UpperBound(this.Item)+1]=this.m_main
  86. end on
  87. on m_email_view.destroy
  88. call super::destroy
  89. destroy(this.m_main)
  90. end on
  91. type m_main from menu within m_email_view
  92. m_item1 m_item1
  93. m_item2 m_item2
  94. m_item3 m_item3
  95. m_item4 m_item4
  96. m_item5 m_item5
  97. m_1 m_1
  98. m_账号管理 m_账号管理
  99. m_导入 m_导入
  100. end type
  101. on m_main.create
  102. call super::create
  103. this.text = "main"
  104. this.m_item1=create m_item1
  105. this.m_item2=create m_item2
  106. this.m_item3=create m_item3
  107. this.m_item4=create m_item4
  108. this.m_item5=create m_item5
  109. this.m_1=create m_1
  110. this.m_账号管理=create m_账号管理
  111. this.m_导入=create m_导入
  112. this.Item[UpperBound(this.Item)+1]=this.m_item1
  113. this.Item[UpperBound(this.Item)+1]=this.m_item2
  114. this.Item[UpperBound(this.Item)+1]=this.m_item3
  115. this.Item[UpperBound(this.Item)+1]=this.m_item4
  116. this.Item[UpperBound(this.Item)+1]=this.m_item5
  117. this.Item[UpperBound(this.Item)+1]=this.m_1
  118. this.Item[UpperBound(this.Item)+1]=this.m_账号管理
  119. this.Item[UpperBound(this.Item)+1]=this.m_导入
  120. end on
  121. on m_main.destroy
  122. call super::destroy
  123. destroy(this.m_item1)
  124. destroy(this.m_item2)
  125. destroy(this.m_item3)
  126. destroy(this.m_item4)
  127. destroy(this.m_item5)
  128. destroy(this.m_1)
  129. destroy(this.m_账号管理)
  130. destroy(this.m_导入)
  131. end on
  132. type m_item1 from menu within m_main
  133. end type
  134. on m_item1.create
  135. call super::create
  136. this.text = "接收当前"
  137. end on
  138. on m_item1.destroy
  139. call super::destroy
  140. end on
  141. event clicked;Anyobject.triggerevent("ue_revcur")
  142. end event
  143. type m_item2 from menu within m_main
  144. end type
  145. on m_item2.create
  146. call super::create
  147. this.text = "发送当前"
  148. end on
  149. on m_item2.destroy
  150. call super::destroy
  151. end on
  152. event clicked;Anyobject.triggerevent("ue_sendcur")
  153. end event
  154. type m_item3 from menu within m_main
  155. end type
  156. on m_item3.create
  157. call super::create
  158. this.text = "-"
  159. end on
  160. on m_item3.destroy
  161. call super::destroy
  162. end on
  163. event clicked;Anyobject.triggerevent("ue_item3")
  164. end event
  165. type m_item4 from menu within m_main
  166. end type
  167. on m_item4.create
  168. call super::create
  169. this.text = "接收全部"
  170. end on
  171. on m_item4.destroy
  172. call super::destroy
  173. end on
  174. event clicked;Anyobject.triggerevent("ue_revall")
  175. end event
  176. type m_item5 from menu within m_main
  177. end type
  178. on m_item5.create
  179. call super::create
  180. this.text = "发送全部"
  181. end on
  182. on m_item5.destroy
  183. call super::destroy
  184. end on
  185. event clicked;Anyobject.triggerevent("ue_sendall")
  186. end event
  187. type m_1 from menu within m_main
  188. end type
  189. event clicked;Anyobject.triggerevent("ue_item3")
  190. end event
  191. on m_1.create
  192. call super::create
  193. this.text = "-"
  194. end on
  195. on m_1.destroy
  196. call super::destroy
  197. end on
  198. type m_账号管理 from menu within m_main
  199. end type
  200. event clicked;Anyobject.triggerevent('ue_emailset')
  201. end event
  202. on m_账号管理.create
  203. call super::create
  204. this.text = "账号管理"
  205. end on
  206. on m_账号管理.destroy
  207. call super::destroy
  208. end on
  209. type m_导入 from menu within m_main
  210. end type
  211. event clicked;Anyobject.triggerevent('ue_import_eml')
  212. end event
  213. on m_导入.create
  214. call super::create
  215. this.text = "导入"
  216. end on
  217. on m_导入.destroy
  218. call super::destroy
  219. end on