w_kickout_input.srw 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. $PBExportHeader$w_kickout_input.srw
  2. forward
  3. global type w_kickout_input from w_publ_base
  4. end type
  5. type mle_1 from multilineedit within w_kickout_input
  6. end type
  7. type em_1 from editmask within w_kickout_input
  8. end type
  9. type st_2 from statictext within w_kickout_input
  10. end type
  11. type cb_send from uo_imflatbutton within w_kickout_input
  12. end type
  13. end forward
  14. global type w_kickout_input from w_publ_base
  15. integer width = 1742
  16. integer height = 760
  17. string title = "强制终止用户连接"
  18. boolean minbox = false
  19. windowtype windowtype = response!
  20. mle_1 mle_1
  21. em_1 em_1
  22. st_2 st_2
  23. cb_send cb_send
  24. end type
  25. global w_kickout_input w_kickout_input
  26. on w_kickout_input.create
  27. int iCurrent
  28. call super::create
  29. this.mle_1=create mle_1
  30. this.em_1=create em_1
  31. this.st_2=create st_2
  32. this.cb_send=create cb_send
  33. iCurrent=UpperBound(this.Control)
  34. this.Control[iCurrent+1]=this.mle_1
  35. this.Control[iCurrent+2]=this.em_1
  36. this.Control[iCurrent+3]=this.st_2
  37. this.Control[iCurrent+4]=this.cb_send
  38. end on
  39. on w_kickout_input.destroy
  40. call super::destroy
  41. destroy(this.mle_1)
  42. destroy(this.em_1)
  43. destroy(this.st_2)
  44. destroy(this.cb_send)
  45. end on
  46. type cb_func from w_publ_base`cb_func within w_kickout_input
  47. boolean visible = false
  48. end type
  49. type cb_exit from w_publ_base`cb_exit within w_kickout_input
  50. integer x = 1376
  51. integer y = 560
  52. string text = "取消"
  53. end type
  54. type mle_1 from multilineedit within w_kickout_input
  55. integer x = 18
  56. integer y = 20
  57. integer width = 1701
  58. integer height = 520
  59. integer taborder = 30
  60. boolean bringtotop = true
  61. integer textsize = -9
  62. integer weight = 400
  63. fontcharset fontcharset = gb2312charset!
  64. fontpitch fontpitch = variable!
  65. string facename = "宋体"
  66. long textcolor = 33554432
  67. string text = "系统将要升级,30秒后将自动断开连接,请尽快保存正在编辑的内容"
  68. boolean autohscroll = true
  69. borderstyle borderstyle = stylelowered!
  70. end type
  71. type em_1 from editmask within w_kickout_input
  72. integer x = 50
  73. integer y = 568
  74. integer width = 206
  75. integer height = 84
  76. integer taborder = 40
  77. boolean bringtotop = true
  78. integer textsize = -9
  79. integer weight = 400
  80. fontcharset fontcharset = gb2312charset!
  81. fontpitch fontpitch = variable!
  82. string facename = "宋体"
  83. long textcolor = 33554432
  84. string text = "30"
  85. alignment alignment = center!
  86. borderstyle borderstyle = stylelowered!
  87. string mask = "#####"
  88. boolean spin = true
  89. string minmax = "1~~60"
  90. end type
  91. type st_2 from statictext within w_kickout_input
  92. integer x = 270
  93. integer y = 584
  94. integer width = 352
  95. integer height = 52
  96. boolean bringtotop = true
  97. integer textsize = -9
  98. integer weight = 400
  99. fontcharset fontcharset = gb2312charset!
  100. fontpitch fontpitch = variable!
  101. string facename = "宋体"
  102. long textcolor = 33554432
  103. long backcolor = 134217739
  104. string text = "秒后强制退出"
  105. boolean focusrectangle = false
  106. end type
  107. type cb_send from uo_imflatbutton within w_kickout_input
  108. integer x = 987
  109. integer y = 560
  110. integer width = 338
  111. integer taborder = 50
  112. boolean bringtotop = true
  113. string text = "发送指令"
  114. string normalpicname = "p6.bmp"
  115. integer picsize = 16
  116. end type
  117. event clicked;call super::clicked;String ls_msg,ls_time
  118. ls_msg = Trim(mle_1.Text)
  119. IF Trim(ls_msg) = '' THEN
  120. MessageBox('系统提示','请输入要发送给各在线用户的信息')
  121. mle_1.SetFocus()
  122. RETURN
  123. END IF
  124. IF Long(em_1.Text) <= 0 THEN
  125. MessageBox('系统提示','请输入强制断开接连的时间')
  126. em_1.SetFocus()
  127. RETURN
  128. ELSEIF Long(em_1.Text) > 60 THEN
  129. MessageBox('系统提示','强制断开接连的时间最多只能设60秒,请重新输入')
  130. em_1.SetFocus()
  131. RETURN
  132. END IF
  133. ls_time = String(Long(em_1.Text) * 1000)
  134. IF MessageBox('询问','是否确定要强制断开所有用户?',question!,yesno!) = 2 THEN RETURN
  135. s_msgframe s_msg
  136. s_msg.framehead = 101
  137. s_msg.frame_str[1] = ls_msg
  138. s_msg.frame_str[2] = ls_time
  139. sys_wsc.setsendmsg( s_msg, 2)
  140. sys_wsc.TriggerEvent('ue_send') //发送命令
  141. Close(Parent)
  142. end event