123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- $PBExportHeader$w_props_ch.srw
- forward
- global type w_props_ch from window
- end type
- type st_1 from statictext within w_props_ch
- end type
- type sle_usual_query from singlelineedit within w_props_ch
- end type
- type cb_1 from uo_imflatbutton within w_props_ch
- end type
- type r_bar from rectangle within w_props_ch
- end type
- type dw_ch from datawindow within w_props_ch
- end type
- end forward
- global type w_props_ch from window
- integer width = 1394
- integer height = 1208
- boolean titlebar = true
- boolean controlmenu = true
- windowtype windowtype = response!
- long backcolor = 134217739
- string icon = "AppIcon!"
- event ue_usual_query_filt ( )
- st_1 st_1
- sle_usual_query sle_usual_query
- cb_1 cb_1
- r_bar r_bar
- dw_ch dw_ch
- end type
- global w_props_ch w_props_ch
- type variables
- String rst_str
- end variables
- event ue_usual_query_filt();String obj_expr = ''
- string ls_name = 'proname'
- IF Trim(sle_usual_query.Text) <> '' THEN
- IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
- obj_expr = obj_expr+' ('+ls_name+' LIKE "%'+Trim(sle_usual_query.Text)+'%")'
- ELSE
- obj_expr = obj_expr+' ('+ls_name+' LIKE "'+Trim(sle_usual_query.Text)+'")'
- END IF
- END IF
- dw_ch.SetFilter(obj_expr)
- dw_ch.SetRedraw(FALSE)
- dw_ch.Filter()
- IF dw_ch.RowCount() >= 1 THEN
- dw_ch.SelectRow(0,FALSE)
- dw_ch.SelectRow(1,TRUE)
- END IF
- dw_ch.SetRedraw(TRUE)
- end event
- on w_props_ch.create
- this.st_1=create st_1
- this.sle_usual_query=create sle_usual_query
- this.cb_1=create cb_1
- this.r_bar=create r_bar
- this.dw_ch=create dw_ch
- this.Control[]={this.st_1,&
- this.sle_usual_query,&
- this.cb_1,&
- this.r_bar,&
- this.dw_ch}
- end on
- on w_props_ch.destroy
- destroy(this.st_1)
- destroy(this.sle_usual_query)
- destroy(this.cb_1)
- destroy(this.r_bar)
- destroy(this.dw_ch)
- end on
- event open;s_props_openwin s_win
- s_win = Message.PowerObjectParm
- environment exerun_env
- GetEnvironment(exerun_env )
- This.X = s_win.arg_x
- This.Y = s_win.arg_y
- //计算窗口位置
- IF This.X + This.Width > PixelsToUnits(exerun_env.ScreenWidth, XPixelsToUnits!) THEN
- This.X = PixelsToUnits(exerun_env.ScreenWidth, XPixelsToUnits!) - This.Width
- END IF
- IF This.Y + This.Height > PixelsToUnits(exerun_env.ScreenHeight, XPixelsToUnits!) - 350 THEN
- This.Y = PixelsToUnits(exerun_env.ScreenHeight, XPixelsToUnits!) - This.Height - 350
- END IF
- String parms[], parm[]
- Long i, ll_row
- uo_strhelper uo_str
- uo_str = Create uo_strhelper
- uo_str.split(s_win.props, ";", parms)
- FOR i = 1 To UpperBound(parms)
- uo_str.split(parms[i], ":", parm)
- IF parm[1] <> '' THEN
- ll_row = dw_ch.InsertRow(0)
- dw_ch.Object.proname[ll_row] = parm[1]
- END IF
- NEXT
- dw_ch.SetFocus()
- SetNull(rst_str)
- end event
- event close;CloseWithReturn(THIS,rst_str)
- end event
- event resize;r_bar.width = this.width
- end event
- type st_1 from statictext within w_props_ch
- integer x = 9
- integer y = 24
- integer width = 210
- integer height = 56
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "内容含:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type sle_usual_query from singlelineedit within w_props_ch
- event keyup pbm_keyup
- integer x = 224
- integer y = 12
- integer width = 507
- integer height = 84
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- end type
- event keyup;PARENT.TRIGGEREVENT("ue_usual_query_filt")
- end event
- type cb_1 from uo_imflatbutton within w_props_ch
- integer y = 120
- integer width = 110
- integer height = 96
- integer taborder = 30
- string text = ""
- boolean cancel = true
- string normalpicname = "exit.bmp"
- integer picsize = 16
- boolean border = false
- end type
- event clicked;call super::clicked;rst_str = ''
- Close(PARENT)
- end event
- type r_bar from rectangle within w_props_ch
- boolean visible = false
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 402
- integer width = 146
- integer height = 104
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = dw_ch.y - 5
- end event
- type dw_ch from datawindow within w_props_ch
- event ue_mousemove pbm_dwnmousemove
- event dwnkey pbm_dwnkey
- integer y = 104
- integer width = 1376
- integer height = 1016
- integer taborder = 20
- boolean bringtotop = true
- string title = "none"
- string dataobject = "dw_props_ch"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event ue_mousemove;IF row > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(row,TRUE)
- END IF
- end event
- event dwnkey;IF Key = KeyEnter! THEN
- Long row
- row = THIS.GetRow()
- IF row > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(row,TRUE)
-
- String ls_column1_name
- ls_column1_name = THIS.Describe("#1.name")
- rst_str = THIS.GetItemString(row,ls_column1_name)
-
- Close(PARENT)
- END IF
- ELSE
- IF NOT KeyDown(keydownarrow!) and NOT KeyDown(keyuparrow!) THEN
- sle_usual_query.SetFocus()
- END IF
- END IF
- end event
- event clicked;IF row > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(row,TRUE)
-
- String ls_column1_name
- ls_column1_name = THIS.Describe("#1.name")
- rst_str = THIS.GetItemString(row,ls_column1_name)
- END IF
- Close(PARENT)
- end event
- event constructor;f_title_change(this)
- end event
- event rowfocuschanged; IF currentrow <= 0 THEN RETURN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- end event
|