$PBExportHeader$w_sys_wait_jdt.srw
$PBExportComments$单进度条
forward
global type w_sys_wait_jdt from w_publ_base
end type
type r_back from rectangle within w_sys_wait_jdt
end type
type st_msg from statictext within w_sys_wait_jdt
end type
type p_1 from picture within w_sys_wait_jdt
end type
type st_3 from statictext within w_sys_wait_jdt
end type
type r_obj from rectangle within w_sys_wait_jdt
end type
end forward

global type w_sys_wait_jdt from w_publ_base
integer x = 626
integer y = 488
integer width = 1568
integer height = 304
boolean titlebar = false
boolean controlmenu = false
boolean minbox = false
long backcolor = 16776960
r_back r_back
st_msg st_msg
p_1 p_1
st_3 st_3
r_obj r_obj
end type
global w_sys_wait_jdt w_sys_wait_jdt

type variables
int ls_x
double obj_tol=0,obj_inc=0
string old_msg
end variables

forward prototypes
public function integer wf_inc (double inc)
public function integer wf_accepttol (double tol)
public function integer wf_set_msg (string arg_msg)
end prototypes

public function integer wf_inc (double inc);//wf_inc
obj_inc=inc

double bf=0
if obj_tol=0 then
	r_obj.width=0
	return 0
end if

bf=(obj_inc/obj_tol)
st_3.text=string(bf,'0.0%')
if bf>1 then bf=1
r_obj.width=r_back.width*bf
if  mod( long(right(string(bf),1)) ,2 )=0 then
	p_1.Invert=true
else
	p_1.Invert=false
end if

//messagebox(string(inc)+' '+string(obj_inc),string(r_obj.width)+' '+string(r_back.width))
return 0
end function

public function integer wf_accepttol (double tol);//wf_accepttol
obj_tol=tol
r_obj.width=0
wf_set_msg(old_msg)
return 0
end function

public function integer wf_set_msg (string arg_msg);//wf_set_msg()
st_msg.Text = arg_msg
RETURN 0

end function

on w_sys_wait_jdt.create
int iCurrent
call super::create
this.r_back=create r_back
this.st_msg=create st_msg
this.p_1=create p_1
this.st_3=create st_3
this.r_obj=create r_obj
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.r_back
this.Control[iCurrent+2]=this.st_msg
this.Control[iCurrent+3]=this.p_1
this.Control[iCurrent+4]=this.st_3
this.Control[iCurrent+5]=this.r_obj
end on

on w_sys_wait_jdt.destroy
call super::destroy
destroy(this.r_back)
destroy(this.st_msg)
destroy(this.p_1)
destroy(this.st_3)
destroy(this.r_obj)
end on

event open;call super::open;ls_x=p_1.x
wf_accepttol(0)
wf_inc(0)
old_msg=st_msg.text

end event

event timer;//if p_1.x=ls_x then 
//	p_1.x=ls_x+20
//else
//	p_1.x=ls_x
//end if


	
end event

event hide;//wf_accepttol(0)
//wf_inc(0)


end event

event activate;//timer(0.1)
end event

event show;//wf_accepttol(0)
//wf_inc(0)
end event

event other;////open(w_sys_wait_jdt) //打开进度窗口
////w_sys_wait_jdt.WF_ACCEPTTOL(dw_contract.ROWCOUNT()) //初始化进度条
////w_sys_wait_jdt.wf_set_msg('新提示内容,请稍候...')
////FOR LS_LONG =1 TO dw_contract.ROWCOUNT()
////	///处理
////	w_sys_wait_jdt.WF_INC(LS_LONG) //进度
////NEXT
////messagebox('操作完成','新建合约收费明细 '+STRING(OBJ_RC)+' 个,请核对!')
////close(w_sys_wait_jdt) 
end event

type cb_func from w_publ_base`cb_func within w_sys_wait_jdt
boolean visible = false
boolean enabled = false
end type

type cb_exit from w_publ_base`cb_exit within w_sys_wait_jdt
boolean visible = false
boolean enabled = false
end type

type r_back from rectangle within w_sys_wait_jdt
long linecolor = 65535
integer linethickness = 4
long fillcolor = 16777215
integer x = 87
integer y = 204
integer width = 1381
integer height = 36
end type

type st_msg from statictext within w_sys_wait_jdt
integer x = 206
integer y = 40
integer width = 1285
integer height = 108
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 16776960
boolean enabled = false
string text = "系统正在进行数据处理,请稍候..."
boolean focusrectangle = false
end type

type p_1 from picture within w_sys_wait_jdt
integer x = 23
integer y = 16
integer width = 183
integer height = 120
boolean bringtotop = true
boolean originalsize = true
string picturename = "graphics\report_sp.bmp"
boolean focusrectangle = false
end type

type st_3 from statictext within w_sys_wait_jdt
integer x = 631
integer y = 148
integer width = 288
integer height = 52
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long backcolor = 16776960
boolean enabled = false
string text = "%"
alignment alignment = center!
boolean focusrectangle = false
end type

type r_obj from rectangle within w_sys_wait_jdt
long linecolor = 16711680
integer linethickness = 4
long fillcolor = 255
integer x = 87
integer y = 204
integer width = 389
integer height = 36
end type

