w_sys_register.srw 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. $PBExportHeader$w_sys_register.srw
  2. $PBExportComments$Generated MDI frame window
  3. forward
  4. global type w_sys_register from w_publ_base
  5. end type
  6. type cb_reg from uo_imflatbutton within w_sys_register
  7. end type
  8. type st_1 from statictext within w_sys_register
  9. end type
  10. type sle_regkey from singlelineedit within w_sys_register
  11. end type
  12. type sle_regword from singlelineedit within w_sys_register
  13. end type
  14. type st_2 from statictext within w_sys_register
  15. end type
  16. type st_3 from statictext within w_sys_register
  17. end type
  18. type st_4 from statictext within w_sys_register
  19. end type
  20. type st_ok from statictext within w_sys_register
  21. end type
  22. type p_ok from picture within w_sys_register
  23. end type
  24. type st_cus from statictext within w_sys_register
  25. end type
  26. type st_5 from statictext within w_sys_register
  27. end type
  28. end forward
  29. global type w_sys_register from w_publ_base
  30. integer width = 1673
  31. integer height = 796
  32. string title = "系统注册"
  33. boolean minbox = false
  34. windowtype windowtype = response!
  35. cb_reg cb_reg
  36. st_1 st_1
  37. sle_regkey sle_regkey
  38. sle_regword sle_regword
  39. st_2 st_2
  40. st_3 st_3
  41. st_4 st_4
  42. st_ok st_ok
  43. p_ok p_ok
  44. st_cus st_cus
  45. st_5 st_5
  46. end type
  47. global w_sys_register w_sys_register
  48. type variables
  49. uo_security3 obj_secu
  50. int ifshow=0 //1-正常时不显示,总是显示
  51. int rt_int=0
  52. end variables
  53. forward prototypes
  54. public function integer wf_ifchecked ()
  55. end prototypes
  56. public function integer wf_ifchecked ();Int rslt
  57. Date ls_limitdate
  58. String ls_regword
  59. String arg_msg
  60. rslt = obj_secu.f_check()
  61. ls_regword = obj_secu.uof_getregcode()
  62. IF rslt = 2 THEN //成功
  63. st_1.Visible = FALSE
  64. st_4.Visible = FALSE
  65. sle_regword.Enabled = FALSE
  66. cb_reg.Enabled = FALSE
  67. st_ok.Visible = TRUE
  68. st_cus.Visible = TRUE
  69. sle_regword.Text = ls_regword
  70. rt_int = 1
  71. ELSE
  72. st_1.Visible = TRUE
  73. st_4.Visible = TRUE
  74. sle_regword.Enabled = TRUE
  75. cb_reg.Enabled = TRUE
  76. st_ok.Visible = FALSE
  77. st_cus.Visible = FALSE
  78. sle_regword.Text = ''
  79. rt_int = 0
  80. END IF
  81. RETURN 1
  82. end function
  83. on w_sys_register.create
  84. int iCurrent
  85. call super::create
  86. this.cb_reg=create cb_reg
  87. this.st_1=create st_1
  88. this.sle_regkey=create sle_regkey
  89. this.sle_regword=create sle_regword
  90. this.st_2=create st_2
  91. this.st_3=create st_3
  92. this.st_4=create st_4
  93. this.st_ok=create st_ok
  94. this.p_ok=create p_ok
  95. this.st_cus=create st_cus
  96. this.st_5=create st_5
  97. iCurrent=UpperBound(this.Control)
  98. this.Control[iCurrent+1]=this.cb_reg
  99. this.Control[iCurrent+2]=this.st_1
  100. this.Control[iCurrent+3]=this.sle_regkey
  101. this.Control[iCurrent+4]=this.sle_regword
  102. this.Control[iCurrent+5]=this.st_2
  103. this.Control[iCurrent+6]=this.st_3
  104. this.Control[iCurrent+7]=this.st_4
  105. this.Control[iCurrent+8]=this.st_ok
  106. this.Control[iCurrent+9]=this.p_ok
  107. this.Control[iCurrent+10]=this.st_cus
  108. this.Control[iCurrent+11]=this.st_5
  109. end on
  110. on w_sys_register.destroy
  111. call super::destroy
  112. destroy(this.cb_reg)
  113. destroy(this.st_1)
  114. destroy(this.sle_regkey)
  115. destroy(this.sle_regword)
  116. destroy(this.st_2)
  117. destroy(this.st_3)
  118. destroy(this.st_4)
  119. destroy(this.st_ok)
  120. destroy(this.p_ok)
  121. destroy(this.st_cus)
  122. destroy(this.st_5)
  123. end on
  124. event open;call super::open;
  125. IF sys_if_network = 1 THEN
  126. MessageBox('系统提示',"网络版注册信息请到后台管理服务器查询!")
  127. cb_reg.enabled = false
  128. sle_regkey.enabled = false
  129. sle_regword.enabled = false
  130. st_cus.visible = false
  131. st_ok.visible = false
  132. st_1.visible = false
  133. st_4.visible = false
  134. RETURN
  135. END IF
  136. obj_secu = CREATE uo_security3
  137. obj_secu.uof_init_version_id(sys_version_id)
  138. obj_secu.uof_init_mmkey(sys_power_key)
  139. Boolean lb_dog
  140. lb_dog = obj_secu.uof_readdog()
  141. IF lb_dog THEN
  142. st_5.Text = "查找到龙嘉加密狗"
  143. ELSE
  144. st_5.Text = "没有查找到龙嘉加密狗"
  145. END IF
  146. String arg_msg = ''
  147. String obj_regkey = ''
  148. obj_regkey = obj_secu.f_get_signkey()
  149. sle_regkey.Text = obj_regkey
  150. st_cus.Text = sys_message_report_title
  151. //ext:
  152. wf_ifchecked()
  153. //sle_regkey.event getfocus( )
  154. //sle_regkey.SelectText(1, Len(sle_regkey.Text))
  155. ////messagebox( "", i)
  156. end event
  157. event ue_before_open;ifshow=Message.DoubleParm
  158. end event
  159. event close;closewithreturn(this,rt_int)
  160. end event
  161. type cb_func from w_publ_base`cb_func within w_sys_register
  162. boolean visible = false
  163. integer x = 1248
  164. integer y = 536
  165. boolean enabled = false
  166. end type
  167. type cb_exit from w_publ_base`cb_exit within w_sys_register
  168. integer x = 987
  169. integer y = 596
  170. end type
  171. type cb_reg from uo_imflatbutton within w_sys_register
  172. integer x = 466
  173. integer y = 596
  174. integer width = 311
  175. integer height = 96
  176. integer taborder = 50
  177. string text = "注册"
  178. end type
  179. event clicked;call super::clicked;String arg_msg = ''
  180. IF obj_secu.f_register(Trim(sle_regword.Text)) <> 1 THEN
  181. MessageBox('系统提示',obj_secu.ins_LastErrorMsg)
  182. RETURN
  183. END IF
  184. wf_ifchecked()
  185. //st_1.text=string(obj_secu.f_getselfvolumeid(arg_msg))+'/'+obj_secu.f_getregwordstr(arg_msg)
  186. end event
  187. type st_1 from statictext within w_sys_register
  188. integer x = 809
  189. integer y = 28
  190. integer width = 859
  191. integer height = 68
  192. integer textsize = -9
  193. integer weight = 400
  194. fontcharset fontcharset = gb2312charset!
  195. fontpitch fontpitch = variable!
  196. string facename = "宋体"
  197. long textcolor = 33554432
  198. long backcolor = 134217739
  199. string text = "系统注册步骤:"
  200. boolean focusrectangle = false
  201. end type
  202. type sle_regkey from singlelineedit within w_sys_register
  203. event ue_dwnkey pbm_dwnkey
  204. integer x = 411
  205. integer y = 368
  206. integer width = 1143
  207. integer height = 88
  208. integer taborder = 30
  209. boolean bringtotop = true
  210. integer textsize = -9
  211. integer weight = 400
  212. fontcharset fontcharset = gb2312charset!
  213. fontpitch fontpitch = fixed!
  214. fontfamily fontfamily = modern!
  215. string facename = "Fixedsys"
  216. long textcolor = 8388608
  217. long backcolor = 12632256
  218. boolean autohscroll = false
  219. boolean displayonly = true
  220. borderstyle borderstyle = stylelowered!
  221. boolean hideselection = false
  222. end type
  223. type sle_regword from singlelineedit within w_sys_register
  224. integer x = 411
  225. integer y = 472
  226. integer width = 1143
  227. integer height = 88
  228. integer taborder = 10
  229. boolean bringtotop = true
  230. integer textsize = -9
  231. integer weight = 400
  232. fontcharset fontcharset = gb2312charset!
  233. fontpitch fontpitch = fixed!
  234. fontfamily fontfamily = modern!
  235. string facename = "Fixedsys"
  236. long textcolor = 33554432
  237. boolean autohscroll = false
  238. borderstyle borderstyle = stylelowered!
  239. end type
  240. type st_2 from statictext within w_sys_register
  241. integer x = 96
  242. integer y = 376
  243. integer width = 315
  244. integer height = 76
  245. boolean bringtotop = true
  246. integer textsize = -9
  247. integer weight = 400
  248. fontcharset fontcharset = gb2312charset!
  249. fontpitch fontpitch = variable!
  250. string facename = "宋体"
  251. long textcolor = 33554432
  252. long backcolor = 134217739
  253. boolean enabled = false
  254. string text = "本机标志码:"
  255. alignment alignment = right!
  256. boolean focusrectangle = false
  257. end type
  258. type st_3 from statictext within w_sys_register
  259. integer x = 96
  260. integer y = 484
  261. integer width = 315
  262. integer height = 76
  263. boolean bringtotop = true
  264. integer textsize = -9
  265. integer weight = 400
  266. fontcharset fontcharset = gb2312charset!
  267. fontpitch fontpitch = variable!
  268. string facename = "宋体"
  269. long textcolor = 33554432
  270. long backcolor = 134217739
  271. boolean enabled = false
  272. string text = "本机注册码:"
  273. alignment alignment = right!
  274. boolean focusrectangle = false
  275. end type
  276. type st_4 from statictext within w_sys_register
  277. integer x = 809
  278. integer y = 116
  279. integer width = 859
  280. integer height = 200
  281. boolean bringtotop = true
  282. integer textsize = -9
  283. integer weight = 400
  284. fontcharset fontcharset = gb2312charset!
  285. fontpitch fontpitch = variable!
  286. string facename = "宋体"
  287. long textcolor = 33554432
  288. long backcolor = 134217739
  289. boolean enabled = false
  290. string text = " 向供应商提供本系统系统的~"本机标志码~",索取本机注册码,执行~"注册~".未注册的用户使用受限."
  291. boolean focusrectangle = false
  292. end type
  293. type st_ok from statictext within w_sys_register
  294. integer x = 809
  295. integer y = 164
  296. integer width = 859
  297. integer height = 100
  298. boolean bringtotop = true
  299. integer textsize = -9
  300. integer weight = 700
  301. fontcharset fontcharset = gb2312charset!
  302. fontpitch fontpitch = variable!
  303. string facename = "宋体"
  304. long textcolor = 16711680
  305. long backcolor = 134217739
  306. boolean enabled = false
  307. string text = "你已经成为本系统注册永久的用户!"
  308. boolean focusrectangle = false
  309. end type
  310. type p_ok from picture within w_sys_register
  311. integer y = 24
  312. integer width = 754
  313. integer height = 244
  314. boolean bringtotop = true
  315. boolean enabled = false
  316. boolean originalsize = true
  317. string picturename = "graphics\LongjoeLOGO.bmp"
  318. boolean border = true
  319. borderstyle borderstyle = styleshadowbox!
  320. boolean focusrectangle = false
  321. end type
  322. type st_cus from statictext within w_sys_register
  323. integer x = 809
  324. integer y = 28
  325. integer width = 859
  326. integer height = 132
  327. boolean bringtotop = true
  328. integer textsize = -9
  329. integer weight = 700
  330. fontcharset fontcharset = gb2312charset!
  331. fontpitch fontpitch = variable!
  332. string facename = "宋体"
  333. long textcolor = 16711680
  334. long backcolor = 134217739
  335. boolean enabled = false
  336. string text = "用户"
  337. boolean focusrectangle = false
  338. end type
  339. type st_5 from statictext within w_sys_register
  340. integer x = 23
  341. integer y = 300
  342. integer width = 462
  343. integer height = 48
  344. boolean bringtotop = true
  345. integer textsize = -9
  346. integer weight = 400
  347. fontcharset fontcharset = gb2312charset!
  348. fontpitch fontpitch = variable!
  349. string facename = "宋体"
  350. long textcolor = 255
  351. long backcolor = 134217739
  352. boolean focusrectangle = false
  353. end type