123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- $PBExportHeader$uov_price.sru
- forward
- global type uov_price from userobject
- end type
- type dw_mx from u_dw_rbtnfilter within uov_price
- end type
- type st_1 from statictext within uov_price
- end type
- type dw_remind from u_dw_rbtnfilter within uov_price
- end type
- end forward
- global type uov_price from userobject
- integer width = 1755
- integer height = 896
- long backcolor = 67108864
- string text = "none"
- long tabtextcolor = 33554432
- long picturemaskcolor = 536870912
- event ue_retrieve ( )
- event losefocus pbm_dwnkillfocus
- dw_mx dw_mx
- st_1 st_1
- dw_remind dw_remind
- end type
- global uov_price uov_price
- type prototypes
- function ulong SetCapture(ulong hwnd) library "user32.dll"
- function boolean ReleaseCapture() library "user32.dll"
- function ulong GetCapture() library "user32.dll"
- end prototypes
- type variables
- long cur_mtrlid
- decimal cur_price = 6
- window parentwin
- boolean ib_Captured = false
- end variables
- forward prototypes
- public subroutine setmtrlid (long arg_mtrlid)
- public subroutine setprice (decimal arg_price)
- public subroutine closethis ()
- public subroutine wf_retrievemx (string arg_type)
- end prototypes
- event ue_retrieve();Long ll_rowcnt, i
- String ls_value
- ll_rowcnt = dw_remind.Retrieve( cur_mtrlid , cur_price)
- //IF cur_price > 0 THEN
- FOR i = 1 To ll_rowcnt
- IF dw_remind.Object.buy_price[i] > cur_price THEN
- ls_value = "bitmap ('graphics\上升_red.bmp')"
- ELSEIF dw_remind.Object.buy_price[i] = cur_price THEN
- ls_value = "bitmap ('graphics\平_dot.bmp')"
- ELSE
- ls_value = "bitmap ('graphics\下跌_green.bmp')"
- END IF
- ls_value = dw_remind.Modify('buy_pic.expression = "'+ls_value+'"')
-
- IF dw_remind.Object.bir_price[i] > cur_price THEN
- ls_value = "bitmap ('graphics\上升_red.bmp')"
- ELSEIF dw_remind.Object.bir_price[i] = cur_price THEN
- ls_value = "bitmap ('graphics\平_dot.bmp')"
- ELSE
- ls_value = "bitmap ('graphics\下跌_green.bmp')"
- END IF
- ls_value = dw_remind.Modify('bir_pic.expression = "'+ls_value+'"')
-
- IF dw_remind.Object.p_price[i] > cur_price THEN
- ls_value = "bitmap ('graphics\上升_red.bmp')"
- ELSEIF dw_remind.Object.p_price[i] = cur_price THEN
- ls_value = "bitmap ('graphics\平_dot.bmp')"
- ELSE
- ls_value = "bitmap ('graphics\下跌_green.bmp')"
- END IF
- ls_value = dw_remind.Modify('p_pic.expression = "'+ls_value+'"')
-
- IF dw_remind.Object.ipv_price[i] > cur_price THEN
- ls_value = "bitmap ('graphics\上升_red.bmp')"
- ELSEIF dw_remind.Object.ipv_price[i] = cur_price THEN
- ls_value = "bitmap ('graphics\平_dot.bmp')"
- ELSE
- ls_value = "bitmap ('graphics\下跌_green.bmp')"
- END IF
- ls_value = dw_remind.Modify('ipv_pic.expression = "'+ls_value+'"')
- NEXT
- //ELSE
- //
- //END IF
- end event
- public subroutine setmtrlid (long arg_mtrlid);cur_mtrlid = arg_mtrlid
- end subroutine
- public subroutine setprice (decimal arg_price);cur_price = arg_price
- end subroutine
- public subroutine closethis ();parentwin.CloseUserObject(this)
- return
- end subroutine
- public subroutine wf_retrievemx (string arg_type);this.height = dw_mx.y + dw_mx.height + 5
- CHOOSE CASE arg_type
- CASE "BUY"
- dw_mx.DataObject = 'dw_price_remind_buy'
- CASE "BIR"
- dw_mx.DataObject = 'dw_price_remind_bir'
-
- CASE ELSE
-
- END CHOOSE
- dw_mx.SetTransObject(sqlca)
- dw_mx.Retrieve(cur_mtrlid)
- end subroutine
- on uov_price.create
- this.dw_mx=create dw_mx
- this.st_1=create st_1
- this.dw_remind=create dw_remind
- this.Control[]={this.dw_mx,&
- this.st_1,&
- this.dw_remind}
- end on
- on uov_price.destroy
- destroy(this.dw_mx)
- destroy(this.st_1)
- destroy(this.dw_remind)
- end on
- event constructor;dw_remind.settransobject(sqlca)
- this.height = dw_remind.y + dw_remind.height + 5
- end event
- type dw_mx from u_dw_rbtnfilter within uov_price
- event mousemove pbm_mousemove
- integer y = 348
- integer width = 1760
- integer height = 536
- string dataobject = "dw_price_remind_buy"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- borderstyle borderstyle = stylebox!
- end type
- event mousemove;//st_1.Text = "X:"+String(xpos)+" Y:"+String(ypos)
- ////if xpos = 0 or ypos = 0 or xpos >= this.width - 5 or ypos >= this.height - 5 then
- //// messagebox('','超出边界了')
- //// CloseThis()
- ////end if
- ////
- ////
- //
- //If (xpos < 0 Or ypos < 0) Or (xpos >= This.Width Or ypos > This.Height) THEN //not in region
- // IF ib_Captured THEN //release mouse
- // ib_Captured = False
- // ReleaseCapture()
- // CloseThis()
- // END IF
- //ELSEIF GetCapture() <> Handle(This) THEN
- // SetCapture(Handle(This))
- // ib_Captured = True
- //END IF
- //
- end event
- event constructor;//
- end event
- event doubleclicked;call super::doubleclicked;//messagebox('', '关闭')
- //CloseThis()
- end event
- type st_1 from statictext within uov_price
- integer x = 27
- integer width = 869
- integer height = 72
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "双击相应字段查询明细"
- boolean focusrectangle = false
- end type
- type dw_remind from u_dw_rbtnfilter within uov_price
- event mousemove pbm_mousemove
- integer y = 72
- integer width = 1760
- integer height = 264
- string dataobject = "dw_price_remind"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- borderstyle borderstyle = stylebox!
- end type
- event mousemove;//st_1.Text = "X:"+String(xpos)+" Y:"+String(ypos)
- If (xpos < 0 Or ypos < 0) Or (xpos >= This.Width Or ypos > This.Height) THEN //not in region
- IF ib_Captured THEN //release mouse
- ib_Captured = False
- ReleaseCapture()
- //CloseThis()
- END IF
- ELSEIF GetCapture() <> Handle(This) THEN
- SetCapture(Handle(This))
- ib_Captured = True
- END IF
- end event
- event doubleclicked;call super::doubleclicked;//messagebox('', '关闭')
- //CloseThis()
- CHOOSE CASE dwo.Name
- CASE 'buy_price', 'buy_pic'
- wf_retrievemx('BUY')
- CASE 'bir_price', 'bir_pic'
- wf_retrievemx('BIR')
- CASE ELSE
-
- END CHOOSE
- end event
- event constructor;//
- end event
|