w_email_ds.srw 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. $PBExportHeader$w_email_ds.srw
  2. forward
  3. global type w_email_ds from window
  4. end type
  5. type cb_2 from commandbutton within w_email_ds
  6. end type
  7. type sle_f from singlelineedit within w_email_ds
  8. end type
  9. type st_6 from statictext within w_email_ds
  10. end type
  11. type sle_s from singlelineedit within w_email_ds
  12. end type
  13. type st_5 from statictext within w_email_ds
  14. end type
  15. type sle_r from singlelineedit within w_email_ds
  16. end type
  17. type st_4 from statictext within w_email_ds
  18. end type
  19. type sle_y from singlelineedit within w_email_ds
  20. end type
  21. type st_3 from statictext within w_email_ds
  22. end type
  23. type st_2 from statictext within w_email_ds
  24. end type
  25. type sle_n from singlelineedit within w_email_ds
  26. end type
  27. type st_1 from statictext within w_email_ds
  28. end type
  29. type cb_1 from commandbutton within w_email_ds
  30. end type
  31. end forward
  32. global type w_email_ds from window
  33. integer width = 2126
  34. integer height = 508
  35. boolean titlebar = true
  36. string title = "定时发送"
  37. boolean controlmenu = true
  38. windowtype windowtype = response!
  39. long backcolor = 67108864
  40. string icon = "AppIcon!"
  41. boolean center = true
  42. cb_2 cb_2
  43. sle_f sle_f
  44. st_6 st_6
  45. sle_s sle_s
  46. st_5 st_5
  47. sle_r sle_r
  48. st_4 st_4
  49. sle_y sle_y
  50. st_3 st_3
  51. st_2 st_2
  52. sle_n sle_n
  53. st_1 st_1
  54. cb_1 cb_1
  55. end type
  56. global w_email_ds w_email_ds
  57. on w_email_ds.create
  58. this.cb_2=create cb_2
  59. this.sle_f=create sle_f
  60. this.st_6=create st_6
  61. this.sle_s=create sle_s
  62. this.st_5=create st_5
  63. this.sle_r=create sle_r
  64. this.st_4=create st_4
  65. this.sle_y=create sle_y
  66. this.st_3=create st_3
  67. this.st_2=create st_2
  68. this.sle_n=create sle_n
  69. this.st_1=create st_1
  70. this.cb_1=create cb_1
  71. this.Control[]={this.cb_2,&
  72. this.sle_f,&
  73. this.st_6,&
  74. this.sle_s,&
  75. this.st_5,&
  76. this.sle_r,&
  77. this.st_4,&
  78. this.sle_y,&
  79. this.st_3,&
  80. this.st_2,&
  81. this.sle_n,&
  82. this.st_1,&
  83. this.cb_1}
  84. end on
  85. on w_email_ds.destroy
  86. destroy(this.cb_2)
  87. destroy(this.sle_f)
  88. destroy(this.st_6)
  89. destroy(this.sle_s)
  90. destroy(this.st_5)
  91. destroy(this.sle_r)
  92. destroy(this.st_4)
  93. destroy(this.sle_y)
  94. destroy(this.st_3)
  95. destroy(this.st_2)
  96. destroy(this.sle_n)
  97. destroy(this.st_1)
  98. destroy(this.cb_1)
  99. end on
  100. event open;sle_n.text=string(year(today()))
  101. sle_y.text=string(month(today()))
  102. sle_r.text=string(day(today()))
  103. sle_s.text=string(hour(now()))
  104. sle_f.text=string(Minute(now()))
  105. end event
  106. type cb_2 from commandbutton within w_email_ds
  107. integer x = 1691
  108. integer y = 304
  109. integer width = 402
  110. integer height = 108
  111. integer taborder = 70
  112. integer textsize = -9
  113. integer weight = 400
  114. fontcharset fontcharset = gb2312charset!
  115. fontpitch fontpitch = variable!
  116. string facename = "宋体"
  117. string text = "取消"
  118. end type
  119. event clicked;CloseWithReturn(parent,"cancel")
  120. end event
  121. type sle_f from singlelineedit within w_email_ds
  122. integer x = 1723
  123. integer y = 140
  124. integer width = 288
  125. integer height = 84
  126. integer taborder = 50
  127. integer textsize = -9
  128. integer weight = 400
  129. fontcharset fontcharset = gb2312charset!
  130. fontpitch fontpitch = variable!
  131. string facename = "宋体"
  132. long textcolor = 33554432
  133. borderstyle borderstyle = StyleBox!
  134. end type
  135. type st_6 from statictext within w_email_ds
  136. integer x = 2048
  137. integer y = 144
  138. integer width = 91
  139. integer height = 76
  140. integer textsize = -9
  141. integer weight = 400
  142. fontcharset fontcharset = gb2312charset!
  143. fontpitch fontpitch = variable!
  144. string facename = "宋体"
  145. long textcolor = 33554432
  146. long backcolor = 67108864
  147. string text = "分"
  148. boolean focusrectangle = false
  149. end type
  150. type sle_s from singlelineedit within w_email_ds
  151. integer x = 1312
  152. integer y = 140
  153. integer width = 288
  154. integer height = 84
  155. integer taborder = 40
  156. integer textsize = -9
  157. integer weight = 400
  158. fontcharset fontcharset = gb2312charset!
  159. fontpitch fontpitch = variable!
  160. string facename = "宋体"
  161. long textcolor = 33554432
  162. borderstyle borderstyle = StyleBox!
  163. end type
  164. type st_5 from statictext within w_email_ds
  165. integer x = 1637
  166. integer y = 144
  167. integer width = 91
  168. integer height = 76
  169. integer textsize = -9
  170. integer weight = 400
  171. fontcharset fontcharset = gb2312charset!
  172. fontpitch fontpitch = variable!
  173. string facename = "宋体"
  174. long textcolor = 33554432
  175. long backcolor = 67108864
  176. string text = "时"
  177. boolean focusrectangle = false
  178. end type
  179. type sle_r from singlelineedit within w_email_ds
  180. integer x = 882
  181. integer y = 140
  182. integer width = 288
  183. integer height = 84
  184. integer taborder = 30
  185. integer textsize = -9
  186. integer weight = 400
  187. fontcharset fontcharset = gb2312charset!
  188. fontpitch fontpitch = variable!
  189. string facename = "宋体"
  190. long textcolor = 33554432
  191. borderstyle borderstyle = StyleBox!
  192. end type
  193. type st_4 from statictext within w_email_ds
  194. integer x = 1207
  195. integer y = 144
  196. integer width = 91
  197. integer height = 76
  198. integer textsize = -9
  199. integer weight = 400
  200. fontcharset fontcharset = gb2312charset!
  201. fontpitch fontpitch = variable!
  202. string facename = "宋体"
  203. long textcolor = 33554432
  204. long backcolor = 67108864
  205. string text = "日"
  206. boolean focusrectangle = false
  207. end type
  208. type sle_y from singlelineedit within w_email_ds
  209. integer x = 434
  210. integer y = 140
  211. integer width = 288
  212. integer height = 84
  213. integer taborder = 20
  214. integer textsize = -9
  215. integer weight = 400
  216. fontcharset fontcharset = gb2312charset!
  217. fontpitch fontpitch = variable!
  218. string facename = "宋体"
  219. long textcolor = 33554432
  220. borderstyle borderstyle = StyleBox!
  221. end type
  222. type st_3 from statictext within w_email_ds
  223. integer x = 759
  224. integer y = 144
  225. integer width = 91
  226. integer height = 76
  227. integer textsize = -9
  228. integer weight = 400
  229. fontcharset fontcharset = gb2312charset!
  230. fontpitch fontpitch = variable!
  231. string facename = "宋体"
  232. long textcolor = 33554432
  233. long backcolor = 67108864
  234. string text = "月"
  235. boolean focusrectangle = false
  236. end type
  237. type st_2 from statictext within w_email_ds
  238. integer x = 352
  239. integer y = 140
  240. integer width = 91
  241. integer height = 76
  242. integer textsize = -9
  243. integer weight = 400
  244. fontcharset fontcharset = gb2312charset!
  245. fontpitch fontpitch = variable!
  246. string facename = "宋体"
  247. long textcolor = 33554432
  248. long backcolor = 67108864
  249. string text = "年"
  250. boolean focusrectangle = false
  251. end type
  252. type sle_n from singlelineedit within w_email_ds
  253. integer x = 27
  254. integer y = 136
  255. integer width = 288
  256. integer height = 84
  257. integer taborder = 10
  258. integer textsize = -9
  259. integer weight = 400
  260. fontcharset fontcharset = gb2312charset!
  261. fontpitch fontpitch = variable!
  262. string facename = "宋体"
  263. long textcolor = 33554432
  264. borderstyle borderstyle = StyleBox!
  265. end type
  266. type st_1 from statictext within w_email_ds
  267. integer x = 23
  268. integer y = 36
  269. integer width = 645
  270. integer height = 72
  271. integer textsize = -9
  272. integer weight = 400
  273. fontcharset fontcharset = gb2312charset!
  274. fontpitch fontpitch = variable!
  275. string facename = "宋体"
  276. long textcolor = 33554432
  277. long backcolor = 67108864
  278. string text = "选择定时发送的时间:"
  279. boolean focusrectangle = false
  280. end type
  281. type cb_1 from commandbutton within w_email_ds
  282. integer x = 1257
  283. integer y = 304
  284. integer width = 402
  285. integer height = 108
  286. integer taborder = 60
  287. boolean bringtotop = true
  288. integer textsize = -9
  289. integer weight = 400
  290. fontcharset fontcharset = gb2312charset!
  291. fontpitch fontpitch = variable!
  292. string facename = "宋体"
  293. string text = "确定"
  294. end type
  295. event clicked;String send_date,send_time
  296. DateTime send_datetime
  297. send_date = String(Trim(sle_n.Text) + '-' +Trim(sle_y.Text) + '-' +Trim(sle_r.Text))
  298. send_time = String(Time(Trim(sle_s.Text) + ':' +Trim(sle_f.Text) + ':00' ))
  299. IF IsDate(send_date) = False Or send_time = "00:00:00" THEN
  300. MessageBox("错误","日期时间设置错误")
  301. RETURN
  302. END IF
  303. send_datetime = DateTime(Date(send_date),Time(send_time))
  304. IF send_datetime <= DateTime(Today(),Now()) THEN
  305. MessageBox("错误","发送日期时间不能小于等于现在日期时间")
  306. RETURN
  307. END IF
  308. CloseWithReturn(parent,string(send_datetime))
  309. end event