w_plugins_view.srw 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. $PBExportHeader$w_plugins_view.srw
  2. forward
  3. global type w_plugins_view from w_publ_base
  4. end type
  5. type dw_uc from u_dw_rbtnfilter within w_plugins_view
  6. end type
  7. type ln_bar2 from line within w_plugins_view
  8. end type
  9. type ln_bar from line within w_plugins_view
  10. end type
  11. type r_bar from rectangle within w_plugins_view
  12. end type
  13. end forward
  14. global type w_plugins_view from w_publ_base
  15. integer width = 3351
  16. integer height = 2380
  17. string title = "外挂程序"
  18. event retrieve_uc ( )
  19. event ue_run_file ( )
  20. dw_uc dw_uc
  21. ln_bar2 ln_bar2
  22. ln_bar ln_bar
  23. r_bar r_bar
  24. end type
  25. global w_plugins_view w_plugins_view
  26. event retrieve_uc();
  27. dw_UC.retrieve(sys_user_plugins, -1)
  28. end event
  29. event ue_run_file();Int cur_row, ll_dftWinState
  30. cur_row = dw_uc.GetRow()
  31. IF cur_row <= 0 THEN
  32. MessageBox(publ_operator,'请先选择行!')
  33. RETURN
  34. END IF
  35. ll_dftWinState = dw_uc.Object.dftWinState[cur_row]
  36. WindowState lwstmp
  37. IF ll_dftWinState = -1 THEN
  38. lwstmp = Minimized!
  39. ELSEIF ll_dftWinState = 0 THEN
  40. lwstmp = Normal!
  41. ELSE
  42. lwstmp = Maximized!
  43. END IF
  44. String ls_run
  45. ls_run = dw_uc.Object.psw[cur_row] + '&'
  46. ls_run += publ_userid + '&'
  47. ls_run += sqlca.Database + '&'
  48. ls_run += sqlca.UserID + '&'
  49. ls_run += f_psw_bczh(sqlca.DBPass,0,sys_power_key) + '&'
  50. ls_run += sqlca.LogID + '&'
  51. ls_run += sqlca.LogPass + '&'
  52. ls_run += sqlca.ServerName + '&'
  53. IF Run(sys_cur_path + dw_uc.Object.filepath[cur_row] + ' - ' +ls_run) = -1 THEN
  54. MessageBox('错误','运行程序失败!',stopsign!,ok!)
  55. RETURN
  56. END IF
  57. RETURN
  58. end event
  59. on w_plugins_view.create
  60. int iCurrent
  61. call super::create
  62. this.dw_uc=create dw_uc
  63. this.ln_bar2=create ln_bar2
  64. this.ln_bar=create ln_bar
  65. this.r_bar=create r_bar
  66. iCurrent=UpperBound(this.Control)
  67. this.Control[iCurrent+1]=this.dw_uc
  68. this.Control[iCurrent+2]=this.ln_bar2
  69. this.Control[iCurrent+3]=this.ln_bar
  70. this.Control[iCurrent+4]=this.r_bar
  71. end on
  72. on w_plugins_view.destroy
  73. call super::destroy
  74. destroy(this.dw_uc)
  75. destroy(this.ln_bar2)
  76. destroy(this.ln_bar)
  77. destroy(this.r_bar)
  78. end on
  79. event open;call super::open;dw_UC.SetTransObject (sqlca)
  80. this.triggerevent('retrieve_uc')
  81. end event
  82. event resize;call super::resize;ln_bar.endx = this.width
  83. ln_bar2.endx = this.width
  84. r_bar.width = this.width
  85. end event
  86. type cb_func from w_publ_base`cb_func within w_plugins_view
  87. boolean visible = false
  88. end type
  89. type cb_exit from w_publ_base`cb_exit within w_plugins_view
  90. integer x = 0
  91. integer width = 151
  92. integer height = 164
  93. integer picsize = 16
  94. toolbaralignment pic_align = alignattop!
  95. boolean border = false
  96. end type
  97. type dw_uc from u_dw_rbtnfilter within w_plugins_view
  98. integer x = 5
  99. integer y = 180
  100. integer width = 3310
  101. integer height = 2092
  102. integer taborder = 20
  103. boolean bringtotop = true
  104. string dataobject = "u_plugins_index"
  105. end type
  106. event clicked;call super::clicked;IF row > 0 THEN
  107. THIS.AcceptText()
  108. THIS.SetRow(row)
  109. THIS.SelectRow(0,FALSE)
  110. THIS.SelectRow(row,TRUE)
  111. IF dwo.Name = 'b_run' THEN
  112. PARENT.TriggerEvent('ue_run_file')
  113. END IF
  114. END IF
  115. end event
  116. event rowfocuschanged;call super::rowfocuschanged;THIS.SetRow(currentrow)
  117. THIS.ScrollToRow(currentrow)
  118. THIS.SelectRow(0,FALSE)
  119. THIS.SelectRow(currentrow,TRUE)
  120. end event
  121. type ln_bar2 from line within w_plugins_view
  122. long linecolor = 16777215
  123. integer linethickness = 4
  124. integer beginy = 172
  125. integer endx = 1513
  126. integer endy = 172
  127. end type
  128. type ln_bar from line within w_plugins_view
  129. long linecolor = 268435456
  130. integer linethickness = 4
  131. integer beginy = 168
  132. integer endx = 1481
  133. integer endy = 168
  134. end type
  135. type r_bar from rectangle within w_plugins_view
  136. long linecolor = 16777215
  137. integer linethickness = 4
  138. long fillcolor = 1073741824
  139. integer x = 1257
  140. integer width = 146
  141. integer height = 68
  142. end type
  143. event constructor;this.fillcolor = 14215660
  144. this.linecolor = 14215660
  145. this.x = -1
  146. this.y = -1
  147. this.height = ln_bar.beginy - 5
  148. end event