w_taoda_backgroud_setting.srw 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. $PBExportHeader$w_taoda_backgroud_setting.srw
  2. forward
  3. global type w_taoda_backgroud_setting from window
  4. end type
  5. type st_9 from statictext within w_taoda_backgroud_setting
  6. end type
  7. type st_8 from statictext within w_taoda_backgroud_setting
  8. end type
  9. type st_7 from statictext within w_taoda_backgroud_setting
  10. end type
  11. type st_6 from statictext within w_taoda_backgroud_setting
  12. end type
  13. type st_5 from statictext within w_taoda_backgroud_setting
  14. end type
  15. type st_4 from statictext within w_taoda_backgroud_setting
  16. end type
  17. type st_3 from statictext within w_taoda_backgroud_setting
  18. end type
  19. type st_2 from statictext within w_taoda_backgroud_setting
  20. end type
  21. type cb_3 from commandbutton within w_taoda_backgroud_setting
  22. end type
  23. type st_1 from statictext within w_taoda_backgroud_setting
  24. end type
  25. type sle_5 from singlelineedit within w_taoda_backgroud_setting
  26. end type
  27. type sle_4 from singlelineedit within w_taoda_backgroud_setting
  28. end type
  29. type sle_3 from singlelineedit within w_taoda_backgroud_setting
  30. end type
  31. type sle_2 from singlelineedit within w_taoda_backgroud_setting
  32. end type
  33. type sle_1 from singlelineedit within w_taoda_backgroud_setting
  34. end type
  35. type cb_2 from commandbutton within w_taoda_backgroud_setting
  36. end type
  37. type cb_1 from commandbutton within w_taoda_backgroud_setting
  38. end type
  39. end forward
  40. global type w_taoda_backgroud_setting from window
  41. integer width = 1833
  42. integer height = 660
  43. boolean titlebar = true
  44. string title = "套打背景设置"
  45. boolean controlmenu = true
  46. windowtype windowtype = response!
  47. long backcolor = 67108864
  48. string icon = "AppIcon!"
  49. boolean center = true
  50. st_9 st_9
  51. st_8 st_8
  52. st_7 st_7
  53. st_6 st_6
  54. st_5 st_5
  55. st_4 st_4
  56. st_3 st_3
  57. st_2 st_2
  58. cb_3 cb_3
  59. st_1 st_1
  60. sle_5 sle_5
  61. sle_4 sle_4
  62. sle_3 sle_3
  63. sle_2 sle_2
  64. sle_1 sle_1
  65. cb_2 cb_2
  66. cb_1 cb_1
  67. end type
  68. global w_taoda_backgroud_setting w_taoda_backgroud_setting
  69. type variables
  70. s_background_rslt s_rslt
  71. end variables
  72. on w_taoda_backgroud_setting.create
  73. this.st_9=create st_9
  74. this.st_8=create st_8
  75. this.st_7=create st_7
  76. this.st_6=create st_6
  77. this.st_5=create st_5
  78. this.st_4=create st_4
  79. this.st_3=create st_3
  80. this.st_2=create st_2
  81. this.cb_3=create cb_3
  82. this.st_1=create st_1
  83. this.sle_5=create sle_5
  84. this.sle_4=create sle_4
  85. this.sle_3=create sle_3
  86. this.sle_2=create sle_2
  87. this.sle_1=create sle_1
  88. this.cb_2=create cb_2
  89. this.cb_1=create cb_1
  90. this.Control[]={this.st_9,&
  91. this.st_8,&
  92. this.st_7,&
  93. this.st_6,&
  94. this.st_5,&
  95. this.st_4,&
  96. this.st_3,&
  97. this.st_2,&
  98. this.cb_3,&
  99. this.st_1,&
  100. this.sle_5,&
  101. this.sle_4,&
  102. this.sle_3,&
  103. this.sle_2,&
  104. this.sle_1,&
  105. this.cb_2,&
  106. this.cb_1}
  107. end on
  108. on w_taoda_backgroud_setting.destroy
  109. destroy(this.st_9)
  110. destroy(this.st_8)
  111. destroy(this.st_7)
  112. destroy(this.st_6)
  113. destroy(this.st_5)
  114. destroy(this.st_4)
  115. destroy(this.st_3)
  116. destroy(this.st_2)
  117. destroy(this.cb_3)
  118. destroy(this.st_1)
  119. destroy(this.sle_5)
  120. destroy(this.sle_4)
  121. destroy(this.sle_3)
  122. destroy(this.sle_2)
  123. destroy(this.sle_1)
  124. destroy(this.cb_2)
  125. destroy(this.cb_1)
  126. end on
  127. event open;s_rslt = message.powerobjectparm
  128. sle_1.Text = s_rslt.filename
  129. sle_2.Text = string(s_rslt.x)
  130. sle_3.text = string(s_rslt.y)
  131. sle_4.Text = string(s_rslt.width)
  132. sle_5.Text = string(s_rslt.height)
  133. s_rslt.ifok = 0
  134. end event
  135. event close;closewithreturn(this, s_rslt)
  136. end event
  137. type st_9 from statictext within w_taoda_backgroud_setting
  138. integer x = 663
  139. integer y = 328
  140. integer width = 224
  141. integer height = 52
  142. integer textsize = -9
  143. integer weight = 400
  144. fontcharset fontcharset = gb2312charset!
  145. fontpitch fontpitch = variable!
  146. string facename = "宋体"
  147. long textcolor = 33554432
  148. long backcolor = 67108864
  149. string text = "毫米(mm)"
  150. alignment alignment = right!
  151. boolean focusrectangle = false
  152. end type
  153. type st_8 from statictext within w_taoda_backgroud_setting
  154. integer x = 663
  155. integer y = 192
  156. integer width = 224
  157. integer height = 52
  158. integer textsize = -9
  159. integer weight = 400
  160. fontcharset fontcharset = gb2312charset!
  161. fontpitch fontpitch = variable!
  162. string facename = "宋体"
  163. long textcolor = 33554432
  164. long backcolor = 67108864
  165. string text = "毫米(mm)"
  166. alignment alignment = right!
  167. boolean focusrectangle = false
  168. end type
  169. type st_7 from statictext within w_taoda_backgroud_setting
  170. integer x = 1545
  171. integer y = 328
  172. integer width = 224
  173. integer height = 52
  174. integer textsize = -9
  175. integer weight = 400
  176. fontcharset fontcharset = gb2312charset!
  177. fontpitch fontpitch = variable!
  178. string facename = "宋体"
  179. long textcolor = 33554432
  180. long backcolor = 67108864
  181. string text = "毫米(mm)"
  182. alignment alignment = right!
  183. boolean focusrectangle = false
  184. end type
  185. type st_6 from statictext within w_taoda_backgroud_setting
  186. integer x = 1545
  187. integer y = 192
  188. integer width = 224
  189. integer height = 52
  190. integer textsize = -9
  191. integer weight = 400
  192. fontcharset fontcharset = gb2312charset!
  193. fontpitch fontpitch = variable!
  194. string facename = "宋体"
  195. long textcolor = 33554432
  196. long backcolor = 67108864
  197. string text = "毫米(mm)"
  198. alignment alignment = right!
  199. boolean focusrectangle = false
  200. end type
  201. type st_5 from statictext within w_taoda_backgroud_setting
  202. integer x = 946
  203. integer y = 328
  204. integer width = 197
  205. integer height = 52
  206. integer textsize = -9
  207. integer weight = 400
  208. fontcharset fontcharset = gb2312charset!
  209. fontpitch fontpitch = variable!
  210. string facename = "宋体"
  211. long textcolor = 33554432
  212. long backcolor = 67108864
  213. string text = "高度"
  214. alignment alignment = right!
  215. boolean focusrectangle = false
  216. end type
  217. type st_4 from statictext within w_taoda_backgroud_setting
  218. integer x = 910
  219. integer y = 192
  220. integer width = 233
  221. integer height = 52
  222. integer textsize = -9
  223. integer weight = 400
  224. fontcharset fontcharset = gb2312charset!
  225. fontpitch fontpitch = variable!
  226. string facename = "宋体"
  227. long textcolor = 33554432
  228. long backcolor = 67108864
  229. string text = "垂直偏移"
  230. alignment alignment = right!
  231. boolean focusrectangle = false
  232. end type
  233. type st_3 from statictext within w_taoda_backgroud_setting
  234. integer x = 50
  235. integer y = 328
  236. integer width = 197
  237. integer height = 52
  238. integer textsize = -9
  239. integer weight = 400
  240. fontcharset fontcharset = gb2312charset!
  241. fontpitch fontpitch = variable!
  242. string facename = "宋体"
  243. long textcolor = 33554432
  244. long backcolor = 67108864
  245. string text = "宽度"
  246. alignment alignment = right!
  247. boolean focusrectangle = false
  248. end type
  249. type st_2 from statictext within w_taoda_backgroud_setting
  250. integer x = 14
  251. integer y = 192
  252. integer width = 233
  253. integer height = 52
  254. integer textsize = -9
  255. integer weight = 400
  256. fontcharset fontcharset = gb2312charset!
  257. fontpitch fontpitch = variable!
  258. string facename = "宋体"
  259. long textcolor = 33554432
  260. long backcolor = 67108864
  261. string text = "水平偏移"
  262. alignment alignment = right!
  263. boolean focusrectangle = false
  264. end type
  265. type cb_3 from commandbutton within w_taoda_backgroud_setting
  266. integer x = 1632
  267. integer y = 40
  268. integer width = 137
  269. integer height = 84
  270. integer taborder = 20
  271. integer textsize = -9
  272. integer weight = 400
  273. fontcharset fontcharset = gb2312charset!
  274. fontpitch fontpitch = variable!
  275. string facename = "宋体"
  276. string text = "…"
  277. end type
  278. event clicked;String FileType
  279. FileType += "JPG(*.JPG),*.JPG,"
  280. FileType += "位图文件(*.bmp),*.bmp,"
  281. FileType += "GIF文件(*.GIF),*.GIF"
  282. String ls_filename, is_temp
  283. IF GetFileOpenName("Select File",ls_filename,is_temp,"all",FileType) = 1 THEN
  284. sle_1.Text = ls_filename
  285. END IF
  286. end event
  287. type st_1 from statictext within w_taoda_backgroud_setting
  288. integer x = 50
  289. integer y = 56
  290. integer width = 197
  291. integer height = 52
  292. integer textsize = -9
  293. integer weight = 400
  294. fontcharset fontcharset = gb2312charset!
  295. fontpitch fontpitch = variable!
  296. string facename = "宋体"
  297. long textcolor = 33554432
  298. long backcolor = 67108864
  299. string text = "背景图"
  300. alignment alignment = right!
  301. boolean focusrectangle = false
  302. end type
  303. type sle_5 from singlelineedit within w_taoda_backgroud_setting
  304. integer x = 1143
  305. integer y = 312
  306. integer width = 402
  307. integer height = 84
  308. integer taborder = 50
  309. integer textsize = -9
  310. integer weight = 400
  311. fontcharset fontcharset = gb2312charset!
  312. fontpitch fontpitch = variable!
  313. string facename = "宋体"
  314. long textcolor = 33554432
  315. borderstyle borderstyle = stylelowered!
  316. end type
  317. type sle_4 from singlelineedit within w_taoda_backgroud_setting
  318. integer x = 261
  319. integer y = 312
  320. integer width = 402
  321. integer height = 84
  322. integer taborder = 40
  323. integer textsize = -9
  324. integer weight = 400
  325. fontcharset fontcharset = gb2312charset!
  326. fontpitch fontpitch = variable!
  327. string facename = "宋体"
  328. long textcolor = 33554432
  329. borderstyle borderstyle = stylelowered!
  330. end type
  331. type sle_3 from singlelineedit within w_taoda_backgroud_setting
  332. integer x = 1143
  333. integer y = 176
  334. integer width = 402
  335. integer height = 84
  336. integer taborder = 30
  337. integer textsize = -9
  338. integer weight = 400
  339. fontcharset fontcharset = gb2312charset!
  340. fontpitch fontpitch = variable!
  341. string facename = "宋体"
  342. long textcolor = 33554432
  343. borderstyle borderstyle = stylelowered!
  344. end type
  345. type sle_2 from singlelineedit within w_taoda_backgroud_setting
  346. integer x = 261
  347. integer y = 176
  348. integer width = 402
  349. integer height = 84
  350. integer taborder = 20
  351. integer textsize = -9
  352. integer weight = 400
  353. fontcharset fontcharset = gb2312charset!
  354. fontpitch fontpitch = variable!
  355. string facename = "宋体"
  356. long textcolor = 33554432
  357. borderstyle borderstyle = stylelowered!
  358. end type
  359. type sle_1 from singlelineedit within w_taoda_backgroud_setting
  360. integer x = 261
  361. integer y = 40
  362. integer width = 1367
  363. integer height = 84
  364. integer taborder = 10
  365. integer textsize = -9
  366. integer weight = 400
  367. fontcharset fontcharset = gb2312charset!
  368. fontpitch fontpitch = variable!
  369. string facename = "宋体"
  370. long textcolor = 33554432
  371. borderstyle borderstyle = stylelowered!
  372. end type
  373. type cb_2 from commandbutton within w_taoda_backgroud_setting
  374. integer x = 1417
  375. integer y = 448
  376. integer width = 274
  377. integer height = 96
  378. integer taborder = 20
  379. integer textsize = -9
  380. integer weight = 400
  381. fontcharset fontcharset = gb2312charset!
  382. fontpitch fontpitch = variable!
  383. string facename = "宋体"
  384. string text = "取消"
  385. end type
  386. event clicked;close(parent)
  387. end event
  388. type cb_1 from commandbutton within w_taoda_backgroud_setting
  389. integer x = 1088
  390. integer y = 448
  391. integer width = 274
  392. integer height = 96
  393. integer taborder = 10
  394. integer textsize = -9
  395. integer weight = 400
  396. fontcharset fontcharset = gb2312charset!
  397. fontpitch fontpitch = variable!
  398. string facename = "宋体"
  399. string text = "确定"
  400. end type
  401. event clicked;s_rslt.Filename = sle_1.Text
  402. s_rslt.X = Double(sle_2.Text)
  403. s_rslt.Y = Double(sle_3.Text)
  404. s_rslt.Width = Double(sle_4.Text)
  405. s_rslt.Height = Double(sle_5.Text)
  406. if not FileExists(s_rslt.Filename) then
  407. MessageBox('提示', '文件不存在' + s_rslt.Filename)
  408. return
  409. end if
  410. s_rslt.ifok = 1
  411. close(parent)
  412. end event