$PBExportHeader$w_changerate_ch.srw forward global type w_changerate_ch from w_publ_base end type type cb_1 from uo_imflatbutton within w_changerate_ch end type type cb_2 from uo_imflatbutton within w_changerate_ch end type type sle_1 from singlelineedit within w_changerate_ch end type type st_1 from statictext within w_changerate_ch end type type st_2 from statictext within w_changerate_ch end type type rb_1 from radiobutton within w_changerate_ch end type type rb_2 from radiobutton within w_changerate_ch end type type rb_3 from radiobutton within w_changerate_ch end type type st_3 from statictext within w_changerate_ch end type type cbx_1 from checkbox within w_changerate_ch end type end forward global type w_changerate_ch from w_publ_base integer width = 1175 integer height = 644 string title = "设定转换比率" boolean minbox = false windowtype windowtype = response! cb_1 cb_1 cb_2 cb_2 sle_1 sle_1 st_1 st_1 st_2 st_2 rb_1 rb_1 rb_2 rb_2 rb_3 rb_3 st_3 st_3 cbx_1 cbx_1 end type global w_changerate_ch w_changerate_ch type variables string ls_rate long ll_cmp1,ll_cmp2 s_changerate s_rate end variables on w_changerate_ch.create int iCurrent call super::create this.cb_1=create cb_1 this.cb_2=create cb_2 this.sle_1=create sle_1 this.st_1=create st_1 this.st_2=create st_2 this.rb_1=create rb_1 this.rb_2=create rb_2 this.rb_3=create rb_3 this.st_3=create st_3 this.cbx_1=create cbx_1 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_1 this.Control[iCurrent+2]=this.cb_2 this.Control[iCurrent+3]=this.sle_1 this.Control[iCurrent+4]=this.st_1 this.Control[iCurrent+5]=this.st_2 this.Control[iCurrent+6]=this.rb_1 this.Control[iCurrent+7]=this.rb_2 this.Control[iCurrent+8]=this.rb_3 this.Control[iCurrent+9]=this.st_3 this.Control[iCurrent+10]=this.cbx_1 end on on w_changerate_ch.destroy call super::destroy destroy(this.cb_1) destroy(this.cb_2) destroy(this.sle_1) destroy(this.st_1) destroy(this.st_2) destroy(this.rb_1) destroy(this.rb_2) destroy(this.rb_3) destroy(this.st_3) destroy(this.cbx_1) end on event close;call super::close;closewithreturn(this,s_rate) end event event open;call super::open;long ll_pzflag,ll_addqty //string ls_rate ls_rate = f_ProfileString (sys_empid,'w_changedrate_ch', "changedrate",'0') if ls_rate = '0' then ls_rate = '100' end if ll_addqty = long(f_ProfileString (sys_empid,'w_changedrate_ch', "addqty",'0')) if ll_addqty = 1 then cbx_1.checked = true end if ll_pzflag = long(f_ProfileString (sys_empid,'w_changedrate_ch', "pzflag",'0')) if ll_pzflag = 3 then rb_3.checked = true elseif ll_pzflag = 2 then rb_2.checked = true else rb_1.checked = true end if sle_1.text = ls_rate //string(ll_rate,'#,##0.#####') end event type cb_func from w_publ_base`cb_func within w_changerate_ch boolean visible = false end type type cb_exit from w_publ_base`cb_exit within w_changerate_ch integer x = 795 integer y = 436 integer width = 302 integer height = 100 end type type cb_1 from uo_imflatbutton within w_changerate_ch integer x = 55 integer y = 436 integer taborder = 20 boolean bringtotop = true end type event clicked;call super::clicked;ls_rate = sle_1.text if rb_1.checked then ll_cmp1 = 1 elseif rb_2.checked then ll_cmp1 = 2 else ll_cmp1 = 3 end if if cbx_1.checked then ll_cmp2 = 1 else ll_cmp2 = 0 end if s_rate.rate = ls_rate s_rate.cmp1 = ll_cmp1 s_rate.cmp2 = ll_cmp2 close(parent) end event type cb_2 from uo_imflatbutton within w_changerate_ch integer x = 430 integer y = 436 integer taborder = 20 boolean bringtotop = true string text = "修改默认" end type event clicked;call super::clicked;f_SetProfileString (sys_empid,'w_changedrate_ch', "changedrate",sle_1.text) if cbx_1.checked then f_SetProfileString (sys_empid,'w_changedrate_ch', "addqty",'1') else f_SetProfileString (sys_empid,'w_changedrate_ch', "addqty",'0') end if if rb_1.checked then f_SetProfileString (sys_empid,'w_changedrate_ch', "pzflag",'1') elseif rb_2.checked then f_SetProfileString (sys_empid,'w_changedrate_ch', "pzflag",'2') else f_SetProfileString (sys_empid,'w_changedrate_ch', "pzflag",'3') end if messagebox('提示','修改成功', Information!, OK! ) end event type sle_1 from singlelineedit within w_changerate_ch integer x = 402 integer y = 36 integer width = 402 integer height = 84 integer taborder = 30 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type st_1 from statictext within w_changerate_ch integer x = 119 integer y = 52 integer width = 233 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217738 string text = "默认比率" boolean focusrectangle = false end type type st_2 from statictext within w_changerate_ch integer x = 110 integer y = 240 integer width = 242 integer height = 52 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217738 string text = "计算公式" boolean focusrectangle = false end type type rb_1 from radiobutton within w_changerate_ch integer x = 389 integer y = 160 integer width = 270 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 = 134217738 string text = "属性" end type type rb_2 from radiobutton within w_changerate_ch integer x = 389 integer y = 240 integer width = 270 integer height = 56 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217738 string text = "属性1" end type type rb_3 from radiobutton within w_changerate_ch integer x = 389 integer y = 312 integer width = 270 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 = 134217738 string text = "属性2" end type type st_3 from statictext within w_changerate_ch integer x = 690 integer y = 232 integer width = 69 integer height = 96 boolean bringtotop = true integer textsize = -16 integer weight = 700 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217738 string text = "+" alignment alignment = center! boolean focusrectangle = false end type type cbx_1 from checkbox within w_changerate_ch integer x = 823 integer y = 244 integer width = 219 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 = 134217738 string text = "辅数" end type