$PBExportHeader$w_email_ds.srw forward global type w_email_ds from window end type type cb_2 from commandbutton within w_email_ds end type type sle_f from singlelineedit within w_email_ds end type type st_6 from statictext within w_email_ds end type type sle_s from singlelineedit within w_email_ds end type type st_5 from statictext within w_email_ds end type type sle_r from singlelineedit within w_email_ds end type type st_4 from statictext within w_email_ds end type type sle_y from singlelineedit within w_email_ds end type type st_3 from statictext within w_email_ds end type type st_2 from statictext within w_email_ds end type type sle_n from singlelineedit within w_email_ds end type type st_1 from statictext within w_email_ds end type type cb_1 from commandbutton within w_email_ds end type end forward global type w_email_ds from window integer width = 2126 integer height = 508 boolean titlebar = true string title = "定时发送" boolean controlmenu = true windowtype windowtype = response! long backcolor = 67108864 string icon = "AppIcon!" boolean center = true cb_2 cb_2 sle_f sle_f st_6 st_6 sle_s sle_s st_5 st_5 sle_r sle_r st_4 st_4 sle_y sle_y st_3 st_3 st_2 st_2 sle_n sle_n st_1 st_1 cb_1 cb_1 end type global w_email_ds w_email_ds on w_email_ds.create this.cb_2=create cb_2 this.sle_f=create sle_f this.st_6=create st_6 this.sle_s=create sle_s this.st_5=create st_5 this.sle_r=create sle_r this.st_4=create st_4 this.sle_y=create sle_y this.st_3=create st_3 this.st_2=create st_2 this.sle_n=create sle_n this.st_1=create st_1 this.cb_1=create cb_1 this.Control[]={this.cb_2,& this.sle_f,& this.st_6,& this.sle_s,& this.st_5,& this.sle_r,& this.st_4,& this.sle_y,& this.st_3,& this.st_2,& this.sle_n,& this.st_1,& this.cb_1} end on on w_email_ds.destroy destroy(this.cb_2) destroy(this.sle_f) destroy(this.st_6) destroy(this.sle_s) destroy(this.st_5) destroy(this.sle_r) destroy(this.st_4) destroy(this.sle_y) destroy(this.st_3) destroy(this.st_2) destroy(this.sle_n) destroy(this.st_1) destroy(this.cb_1) end on event open;sle_n.text=string(year(today())) sle_y.text=string(month(today())) sle_r.text=string(day(today())) sle_s.text=string(hour(now())) sle_f.text=string(Minute(now())) end event type cb_2 from commandbutton within w_email_ds integer x = 1691 integer y = 304 integer width = 402 integer height = 108 integer taborder = 70 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "取消" end type event clicked;CloseWithReturn(parent,"cancel") end event type sle_f from singlelineedit within w_email_ds integer x = 1723 integer y = 140 integer width = 288 integer height = 84 integer taborder = 50 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = StyleBox! end type type st_6 from statictext within w_email_ds integer x = 2048 integer y = 144 integer width = 91 integer height = 76 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 67108864 string text = "分" boolean focusrectangle = false end type type sle_s from singlelineedit within w_email_ds integer x = 1312 integer y = 140 integer width = 288 integer height = 84 integer taborder = 40 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = StyleBox! end type type st_5 from statictext within w_email_ds integer x = 1637 integer y = 144 integer width = 91 integer height = 76 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 67108864 string text = "时" boolean focusrectangle = false end type type sle_r from singlelineedit within w_email_ds integer x = 882 integer y = 140 integer width = 288 integer height = 84 integer taborder = 30 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = StyleBox! end type type st_4 from statictext within w_email_ds integer x = 1207 integer y = 144 integer width = 91 integer height = 76 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 67108864 string text = "日" boolean focusrectangle = false end type type sle_y from singlelineedit within w_email_ds integer x = 434 integer y = 140 integer width = 288 integer height = 84 integer taborder = 20 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = StyleBox! end type type st_3 from statictext within w_email_ds integer x = 759 integer y = 144 integer width = 91 integer height = 76 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 67108864 string text = "月" boolean focusrectangle = false end type type st_2 from statictext within w_email_ds integer x = 352 integer y = 140 integer width = 91 integer height = 76 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 67108864 string text = "年" boolean focusrectangle = false end type type sle_n from singlelineedit within w_email_ds integer x = 27 integer y = 136 integer width = 288 integer height = 84 integer taborder = 10 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = StyleBox! end type type st_1 from statictext within w_email_ds integer x = 23 integer y = 36 integer width = 645 integer height = 72 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 67108864 string text = "选择定时发送的时间:" boolean focusrectangle = false end type type cb_1 from commandbutton within w_email_ds integer x = 1257 integer y = 304 integer width = 402 integer height = 108 integer taborder = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "确定" end type event clicked;String send_date,send_time DateTime send_datetime send_date = String(Trim(sle_n.Text) + '-' +Trim(sle_y.Text) + '-' +Trim(sle_r.Text)) send_time = String(Time(Trim(sle_s.Text) + ':' +Trim(sle_f.Text) + ':00' )) IF IsDate(send_date) = False Or send_time = "00:00:00" THEN MessageBox("错误","日期时间设置错误") RETURN END IF send_datetime = DateTime(Date(send_date),Time(send_time)) IF send_datetime <= DateTime(Today(),Now()) THEN MessageBox("错误","发送日期时间不能小于等于现在日期时间") RETURN END IF CloseWithReturn(parent,string(send_datetime)) end event