123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- $PBExportHeader$w_dfc_control_popupmenu_setlayout.srw
- forward
- global type w_dfc_control_popupmenu_setlayout from w_publ_base
- end type
- type dw_setlayout from datawindow within w_dfc_control_popupmenu_setlayout
- end type
- type cb_ok from uo_imflatbutton within w_dfc_control_popupmenu_setlayout
- end type
- type cbx_selectall from checkbox within w_dfc_control_popupmenu_setlayout
- end type
- type cbx_selectnone from checkbox within w_dfc_control_popupmenu_setlayout
- end type
- type st_dataobject from statictext within w_dfc_control_popupmenu_setlayout
- end type
- end forward
- global type w_dfc_control_popupmenu_setlayout from w_publ_base
- integer width = 2373
- integer height = 1512
- string title = "显示列选择"
- boolean minbox = false
- windowtype windowtype = response!
- dw_setlayout dw_setlayout
- cb_ok cb_ok
- cbx_selectall cbx_selectall
- cbx_selectnone cbx_selectnone
- st_dataobject st_dataobject
- end type
- global w_dfc_control_popupmenu_setlayout w_dfc_control_popupmenu_setlayout
- type variables
- datastore ins_ds
- s_dw_rbtnfilter_setlayout_rt ins_s_rt
- s_dw_rbtn_tran s_rb_tran
- end variables
- forward prototypes
- public subroutine wf_save (integer arg_type)
- end prototypes
- public subroutine wf_save (integer arg_type);dw_setlayout.AcceptText()
- Int ls_i,ls_cnt = 0
- FOR ls_i = 1 To dw_setlayout.RowCount()
- IF dw_setlayout.Object.cshow_flag[ls_i] = 1 THEN
- ls_cnt = 1
- EXIT
- END IF
- NEXT
- IF ls_cnt = 0 THEN
- MessageBox('错误','请至少选择显示一个列!')
- RETURN
- END IF
- Blob b_changes
- ins_ds.GetFullState(b_changes)
- ins_s_rt.b_changes = b_changes
- ins_s_rt.flag = 1
- ins_s_rt.i_type = arg_type
- Close(this)
- end subroutine
- on w_dfc_control_popupmenu_setlayout.create
- int iCurrent
- call super::create
- this.dw_setlayout=create dw_setlayout
- this.cb_ok=create cb_ok
- this.cbx_selectall=create cbx_selectall
- this.cbx_selectnone=create cbx_selectnone
- this.st_dataobject=create st_dataobject
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_setlayout
- this.Control[iCurrent+2]=this.cb_ok
- this.Control[iCurrent+3]=this.cbx_selectall
- this.Control[iCurrent+4]=this.cbx_selectnone
- this.Control[iCurrent+5]=this.st_dataobject
- end on
- on w_dfc_control_popupmenu_setlayout.destroy
- call super::destroy
- destroy(this.dw_setlayout)
- destroy(this.cb_ok)
- destroy(this.cbx_selectall)
- destroy(this.cbx_selectnone)
- destroy(this.st_dataobject)
- end on
- event open;call super::open;ins_s_rt.flag = 0 //默认返回——取消
- datastore ls_ds
- ls_ds = Create datastore
- ins_ds = Create datastore
- ins_ds.DataObject = 'dw_dfc_control_popupmenu_setlayout'
- Blob b_changes
- s_rb_tran = Message.PowerObjectParm
- ls_ds = s_rb_tran.dwr_ds
- st_dataobject.text = s_rb_tran.title //s_rb_tran.dwr_dataobject
- //ls_ds.rowscopy( 1, ls_ds.rowscount, /*dwbuffer f*/, /*datastore d*/, /*long i*/, /*dwbuffer t */)
- ls_ds.GetFullState(b_changes)
- ins_ds.SetFullState(b_changes)
- //messagebox('',string(ins_ds.rowcount()))
- ins_ds.ShareData( dw_setlayout)
- end event
- event close;call super::close;closewithreturn(this,ins_s_rt)
- end event
- type cb_func from w_publ_base`cb_func within w_dfc_control_popupmenu_setlayout
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_dfc_control_popupmenu_setlayout
- integer x = 1847
- integer y = 120
- integer width = 494
- integer height = 100
- string text = "取消"
- end type
- type dw_setlayout from datawindow within w_dfc_control_popupmenu_setlayout
- integer width = 1842
- integer height = 1344
- integer taborder = 30
- boolean bringtotop = true
- string title = "none"
- string dataobject = "dw_dfc_control_popupmenu_setlayout"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event clicked;//IF row > 0 THEN
- // IF This.Object.lock_flag[row] = 0 THEN
- // IF dwo.Name = 'ctitle' THEN
- // This.Object.cshow_flag[row] = 1 - This.Object.cshow_flag[row]
- // END IF
- // cbx_selectnone.checked = false
- // cbx_selectall.checked = false
- // END IF
- //END IF
- //
- end event
- type cb_ok from uo_imflatbutton within w_dfc_control_popupmenu_setlayout
- integer x = 1847
- integer y = 8
- integer width = 494
- integer taborder = 20
- boolean bringtotop = true
- end type
- event clicked;call super::clicked;wf_save(1)
- //dw_setlayout.AcceptText()
- //Int ls_i,ls_cnt = 0
- //FOR ls_i = 1 To dw_setlayout.RowCount()
- // IF dw_setlayout.Object.cshow_flag[ls_i] = 1 THEN
- // ls_cnt = 1
- // EXIT
- // END IF
- //NEXT
- //IF ls_cnt = 0 THEN
- // MessageBox('错误','请至少选择显示一个列!')
- // RETURN
- //END IF
- //
- //Blob b_changes
- //
- //ins_ds.GetFullState(b_changes)
- //ins_s_rt.b_changes = b_changes
- //ins_s_rt.flag = 1
- //ins_s_rt.b_autosize = cbx_autosize.checked
- //ins_s_rt.l_height = long(em_height.text)
- //
- //
- //Close(Parent)
- //
- end event
- type cbx_selectall from checkbox within w_dfc_control_popupmenu_setlayout
- integer x = 1874
- integer y = 472
- integer width = 416
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "全选"
- end type
- event clicked;long i
- if this.checked then
- for i = 1 to dw_setlayout.rowcount()
- dw_setlayout.object.cshow_flag[i] = 1
- next
- else
-
- end if
- cbx_selectnone.checked = false
-
- end event
- type cbx_selectnone from checkbox within w_dfc_control_popupmenu_setlayout
- integer x = 1874
- integer y = 556
- integer width = 416
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "全不选"
- end type
- event clicked;long i
- if this.checked then
- for i = 1 to dw_setlayout.rowcount()
- dw_setlayout.object.cshow_flag[i] = 0
- next
- else
-
- end if
- cbx_selectall.checked = false
-
- end event
- type st_dataobject from statictext within w_dfc_control_popupmenu_setlayout
- integer x = 5
- integer y = 1352
- integer width = 2171
- integer height = 72
- boolean bringtotop = true
- integer textsize = -10
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "none"
- boolean focusrectangle = false
- end type
|