w_dfc_control_popupmenu_setlayout.srw 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. $PBExportHeader$w_dfc_control_popupmenu_setlayout.srw
  2. forward
  3. global type w_dfc_control_popupmenu_setlayout from w_publ_base
  4. end type
  5. type dw_setlayout from datawindow within w_dfc_control_popupmenu_setlayout
  6. end type
  7. type cb_ok from uo_imflatbutton within w_dfc_control_popupmenu_setlayout
  8. end type
  9. type cbx_selectall from checkbox within w_dfc_control_popupmenu_setlayout
  10. end type
  11. type cbx_selectnone from checkbox within w_dfc_control_popupmenu_setlayout
  12. end type
  13. type st_dataobject from statictext within w_dfc_control_popupmenu_setlayout
  14. end type
  15. end forward
  16. global type w_dfc_control_popupmenu_setlayout from w_publ_base
  17. integer width = 2373
  18. integer height = 1512
  19. string title = "显示列选择"
  20. boolean minbox = false
  21. windowtype windowtype = response!
  22. dw_setlayout dw_setlayout
  23. cb_ok cb_ok
  24. cbx_selectall cbx_selectall
  25. cbx_selectnone cbx_selectnone
  26. st_dataobject st_dataobject
  27. end type
  28. global w_dfc_control_popupmenu_setlayout w_dfc_control_popupmenu_setlayout
  29. type variables
  30. datastore ins_ds
  31. s_dw_rbtnfilter_setlayout_rt ins_s_rt
  32. s_dw_rbtn_tran s_rb_tran
  33. end variables
  34. forward prototypes
  35. public subroutine wf_save (integer arg_type)
  36. end prototypes
  37. public subroutine wf_save (integer arg_type);dw_setlayout.AcceptText()
  38. Int ls_i,ls_cnt = 0
  39. FOR ls_i = 1 To dw_setlayout.RowCount()
  40. IF dw_setlayout.Object.cshow_flag[ls_i] = 1 THEN
  41. ls_cnt = 1
  42. EXIT
  43. END IF
  44. NEXT
  45. IF ls_cnt = 0 THEN
  46. MessageBox('错误','请至少选择显示一个列!')
  47. RETURN
  48. END IF
  49. Blob b_changes
  50. ins_ds.GetFullState(b_changes)
  51. ins_s_rt.b_changes = b_changes
  52. ins_s_rt.flag = 1
  53. ins_s_rt.i_type = arg_type
  54. Close(this)
  55. end subroutine
  56. on w_dfc_control_popupmenu_setlayout.create
  57. int iCurrent
  58. call super::create
  59. this.dw_setlayout=create dw_setlayout
  60. this.cb_ok=create cb_ok
  61. this.cbx_selectall=create cbx_selectall
  62. this.cbx_selectnone=create cbx_selectnone
  63. this.st_dataobject=create st_dataobject
  64. iCurrent=UpperBound(this.Control)
  65. this.Control[iCurrent+1]=this.dw_setlayout
  66. this.Control[iCurrent+2]=this.cb_ok
  67. this.Control[iCurrent+3]=this.cbx_selectall
  68. this.Control[iCurrent+4]=this.cbx_selectnone
  69. this.Control[iCurrent+5]=this.st_dataobject
  70. end on
  71. on w_dfc_control_popupmenu_setlayout.destroy
  72. call super::destroy
  73. destroy(this.dw_setlayout)
  74. destroy(this.cb_ok)
  75. destroy(this.cbx_selectall)
  76. destroy(this.cbx_selectnone)
  77. destroy(this.st_dataobject)
  78. end on
  79. event open;call super::open;ins_s_rt.flag = 0 //默认返回——取消
  80. datastore ls_ds
  81. ls_ds = Create datastore
  82. ins_ds = Create datastore
  83. ins_ds.DataObject = 'dw_dfc_control_popupmenu_setlayout'
  84. Blob b_changes
  85. s_rb_tran = Message.PowerObjectParm
  86. ls_ds = s_rb_tran.dwr_ds
  87. st_dataobject.text = s_rb_tran.title //s_rb_tran.dwr_dataobject
  88. //ls_ds.rowscopy( 1, ls_ds.rowscount, /*dwbuffer f*/, /*datastore d*/, /*long i*/, /*dwbuffer t */)
  89. ls_ds.GetFullState(b_changes)
  90. ins_ds.SetFullState(b_changes)
  91. //messagebox('',string(ins_ds.rowcount()))
  92. ins_ds.ShareData( dw_setlayout)
  93. end event
  94. event close;call super::close;closewithreturn(this,ins_s_rt)
  95. end event
  96. type cb_func from w_publ_base`cb_func within w_dfc_control_popupmenu_setlayout
  97. boolean visible = false
  98. end type
  99. type cb_exit from w_publ_base`cb_exit within w_dfc_control_popupmenu_setlayout
  100. integer x = 1847
  101. integer y = 120
  102. integer width = 494
  103. integer height = 100
  104. string text = "取消"
  105. end type
  106. type dw_setlayout from datawindow within w_dfc_control_popupmenu_setlayout
  107. integer width = 1842
  108. integer height = 1344
  109. integer taborder = 30
  110. boolean bringtotop = true
  111. string title = "none"
  112. string dataobject = "dw_dfc_control_popupmenu_setlayout"
  113. boolean hscrollbar = true
  114. boolean vscrollbar = true
  115. boolean livescroll = true
  116. borderstyle borderstyle = stylelowered!
  117. end type
  118. event clicked;//IF row > 0 THEN
  119. // IF This.Object.lock_flag[row] = 0 THEN
  120. // IF dwo.Name = 'ctitle' THEN
  121. // This.Object.cshow_flag[row] = 1 - This.Object.cshow_flag[row]
  122. // END IF
  123. // cbx_selectnone.checked = false
  124. // cbx_selectall.checked = false
  125. // END IF
  126. //END IF
  127. //
  128. end event
  129. type cb_ok from uo_imflatbutton within w_dfc_control_popupmenu_setlayout
  130. integer x = 1847
  131. integer y = 8
  132. integer width = 494
  133. integer taborder = 20
  134. boolean bringtotop = true
  135. end type
  136. event clicked;call super::clicked;wf_save(1)
  137. //dw_setlayout.AcceptText()
  138. //Int ls_i,ls_cnt = 0
  139. //FOR ls_i = 1 To dw_setlayout.RowCount()
  140. // IF dw_setlayout.Object.cshow_flag[ls_i] = 1 THEN
  141. // ls_cnt = 1
  142. // EXIT
  143. // END IF
  144. //NEXT
  145. //IF ls_cnt = 0 THEN
  146. // MessageBox('错误','请至少选择显示一个列!')
  147. // RETURN
  148. //END IF
  149. //
  150. //Blob b_changes
  151. //
  152. //ins_ds.GetFullState(b_changes)
  153. //ins_s_rt.b_changes = b_changes
  154. //ins_s_rt.flag = 1
  155. //ins_s_rt.b_autosize = cbx_autosize.checked
  156. //ins_s_rt.l_height = long(em_height.text)
  157. //
  158. //
  159. //Close(Parent)
  160. //
  161. end event
  162. type cbx_selectall from checkbox within w_dfc_control_popupmenu_setlayout
  163. integer x = 1874
  164. integer y = 472
  165. integer width = 416
  166. integer height = 76
  167. boolean bringtotop = true
  168. integer textsize = -9
  169. integer weight = 400
  170. fontcharset fontcharset = gb2312charset!
  171. fontpitch fontpitch = variable!
  172. string facename = "宋体"
  173. long textcolor = 33554432
  174. long backcolor = 134217739
  175. string text = "全选"
  176. end type
  177. event clicked;long i
  178. if this.checked then
  179. for i = 1 to dw_setlayout.rowcount()
  180. dw_setlayout.object.cshow_flag[i] = 1
  181. next
  182. else
  183. end if
  184. cbx_selectnone.checked = false
  185. end event
  186. type cbx_selectnone from checkbox within w_dfc_control_popupmenu_setlayout
  187. integer x = 1874
  188. integer y = 556
  189. integer width = 416
  190. integer height = 76
  191. boolean bringtotop = true
  192. integer textsize = -9
  193. integer weight = 400
  194. fontcharset fontcharset = gb2312charset!
  195. fontpitch fontpitch = variable!
  196. string facename = "宋体"
  197. long textcolor = 33554432
  198. long backcolor = 134217739
  199. string text = "全不选"
  200. end type
  201. event clicked;long i
  202. if this.checked then
  203. for i = 1 to dw_setlayout.rowcount()
  204. dw_setlayout.object.cshow_flag[i] = 0
  205. next
  206. else
  207. end if
  208. cbx_selectall.checked = false
  209. end event
  210. type st_dataobject from statictext within w_dfc_control_popupmenu_setlayout
  211. integer x = 5
  212. integer y = 1352
  213. integer width = 2171
  214. integer height = 72
  215. boolean bringtotop = true
  216. integer textsize = -10
  217. integer weight = 400
  218. fontcharset fontcharset = gb2312charset!
  219. fontpitch fontpitch = variable!
  220. string facename = "宋体"
  221. long textcolor = 33554432
  222. long backcolor = 134217739
  223. string text = "none"
  224. boolean focusrectangle = false
  225. end type