$PBExportHeader$w_sys_printpagesetting.srw forward global type w_sys_printpagesetting from w_publ_base end type type cb_ok from uo_imflatbutton within w_sys_printpagesetting end type type st_1 from statictext within w_sys_printpagesetting end type type rb_1 from radiobutton within w_sys_printpagesetting end type type rb_2 from radiobutton within w_sys_printpagesetting end type type rb_3 from radiobutton within w_sys_printpagesetting end type type sle_1 from singlelineedit within w_sys_printpagesetting end type type gb_1 from groupbox within w_sys_printpagesetting end type type st_2 from statictext within w_sys_printpagesetting end type type st_curpage from statictext within w_sys_printpagesetting end type type st_pagecount from statictext within w_sys_printpagesetting end type type st_5 from statictext within w_sys_printpagesetting end type type em_copies from editmask within w_sys_printpagesetting end type type cb_3 from uo_imflatbutton within w_sys_printpagesetting end type end forward global type w_sys_printpagesetting from w_publ_base integer x = 553 integer y = 288 integer width = 2043 integer height = 744 string title = "打印页选择" boolean minbox = false windowtype windowtype = response! cb_ok cb_ok st_1 st_1 rb_1 rb_1 rb_2 rb_2 rb_3 rb_3 sle_1 sle_1 gb_1 gb_1 st_2 st_2 st_curpage st_curpage st_pagecount st_pagecount st_5 st_5 em_copies em_copies cb_3 cb_3 end type global w_sys_printpagesetting w_sys_printpagesetting type variables INT OBJ_PAGECOUNT datawindow OBJ_DW end variables forward prototypes public function string wf_checkexpr (string obj_str) end prototypes public function string wf_checkexpr (string obj_str);//wf_checkexpr long ls_flag,OBJ_COUNT,LS_SUBFLAG INT CHOICE_FLAG string LS_STR,STR_ARRAY[],MID_STR LS_STR=TRIM(OBJ_STR)+',' ls_flag=pos(LS_STR,",") DO WHILE ls_flag>0 and OBJ_COUNT<=1000 MID_STR=TRIM(left(LS_STR,ls_flag - 1)) CHOICE_FLAG=0 LS_SUBFLAG=pos(MID_STR,"-") IF INTEGER(MID_STR)>0 AND INTEGER(MID_STR)<=obj_pagecount THEN CHOICE_FLAG=1 ELSEIF LS_SUBFLAG>0 THEN IF INTEGER(LEFT(MID_STR,LS_SUBFLAG - 1))>0 AND INTEGER(LEFT(MID_STR,LS_SUBFLAG - 1))<=obj_pagecount & AND INTEGER(RIGHT(MID_STR,LEN(MID_STR) - LS_SUBFLAG))>0 AND INTEGER(RIGHT(MID_STR,LEN(MID_STR) - LS_SUBFLAG))<=obj_pagecount & AND INTEGER(LEFT(MID_STR,LS_SUBFLAG - 1))=1 then ddlb_1.SelectItem(1) //w_sys_wait.HIDE() ////dw_1.SetRowFocusIndicator (Hand!) end event type cb_func from w_publ_base`cb_func within w_sys_printpagesetting boolean visible = false integer x = 1303 integer y = 36 boolean enabled = false end type type cb_exit from w_publ_base`cb_exit within w_sys_printpagesetting integer x = 1664 integer y = 284 end type type cb_ok from uo_imflatbutton within w_sys_printpagesetting integer x = 1664 integer y = 36 integer width = 311 integer height = 96 integer taborder = 40 string text = "打印" end type event clicked;call super::clicked;IF rb_1.CHECKED THEN obj_dw.object.datawindow.print.page.range='' ELSEIF rb_2.CHECKED THEN obj_dw.object.datawindow.print.page.range=OBJ_DW.Describe("Evaluate('Page()',"+trim(string(OBJ_DW.getrow()))+")") ELSE obj_dw.object.datawindow.print.page.range=TRIM(sle_1.TEXT) END IF IF LONG(em_copies.TEXT)=1 THEN ELSE obj_dw.object.datawindow.print.copies=LONG(em_copies.TEXT) END IF obj_DW.PRINT() obj_dw.object.datawindow.print.page.range='' obj_dw.object.datawindow.print.copies=1 Close(PARENT) end event type st_1 from statictext within w_sys_printpagesetting integer x = 73 integer y = 572 integer width = 887 integer height = 56 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "打印页选择" boolean focusrectangle = false end type type rb_1 from radiobutton within w_sys_printpagesetting integer x = 119 integer y = 200 integer width = 247 integer height = 76 integer taborder = 10 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 = "全部" boolean checked = true end type event clicked;RB_3.POSTEVENT(CLICKED!) end event type rb_2 from radiobutton within w_sys_printpagesetting integer x = 119 integer y = 288 integer width = 247 integer height = 76 integer taborder = 20 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;RB_3.POSTEVENT(CLICKED!) end event type rb_3 from radiobutton within w_sys_printpagesetting integer x = 119 integer y = 372 integer width = 274 integer height = 76 integer taborder = 30 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;sle_1.enabled = this.checked IF THIS.checked AND TRIM(sle_1.TEXT)='' THEN cb_ok.ENABLED=FALSE ELSE cb_ok.ENABLED=TRUE END IF end event type sle_1 from singlelineedit within w_sys_printpagesetting event key pbm_keyup integer x = 389 integer y = 368 integer width = 1166 integer height = 84 integer taborder = 40 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean enabled = false boolean autohscroll = false borderstyle borderstyle = stylelowered! end type event key;RB_3.POSTEVENT(CLICKED!) If key = KeyEnter! Or Key = KeyDownArrow! Then // keybd_event ( 9, 0, 0 , 0 ) // 按下tab keybd_event ( 9, 0, 2, 0 ) // 释放tab Return 1 End If end event event modified;THIS.TEXT=wf_checkexpr(THIS.TEXT) RB_3.POSTEVENT(CLICKED!) end event type gb_1 from groupbox within w_sys_printpagesetting integer x = 50 integer y = 124 integer width = 1559 integer height = 412 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "打印页选择" end type type st_2 from statictext within w_sys_printpagesetting integer x = 389 integer y = 464 integer width = 553 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 boolean enabled = false string text = "如:3,4,7-10" boolean focusrectangle = false end type type st_curpage from statictext within w_sys_printpagesetting integer x = 389 integer y = 300 integer width = 567 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 boolean enabled = false string text = "(第 1 页)" boolean focusrectangle = false end type type st_pagecount from statictext within w_sys_printpagesetting integer x = 389 integer y = 216 integer width = 562 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 boolean enabled = false string text = "(共 1 页)" boolean focusrectangle = false end type type st_5 from statictext within w_sys_printpagesetting integer x = 78 integer y = 32 integer width = 261 integer height = 64 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 boolean enabled = false string text = "打印份数:" alignment alignment = right! boolean focusrectangle = false end type type em_copies from editmask within w_sys_printpagesetting integer x = 366 integer y = 16 integer width = 215 integer height = 80 integer taborder = 40 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 string text = "1" alignment alignment = right! borderstyle borderstyle = stylelowered! string mask = "###0" end type event modified;IF LONG(THIS.TEXT)<=0 THEN CB_OK.ENABLED=FALSE ELSE CB_OK.ENABLED=TRUE END IF end event type cb_3 from uo_imflatbutton within w_sys_printpagesetting integer x = 1664 integer y = 160 integer width = 311 integer height = 96 integer taborder = 40 string text = "打印设置" end type event clicked;call super::clicked;PRINTSETUP() end event