************************************************** *-- Class: thermo (m:\rad\vfprc\generall.vcx) *-- ParentClass: container *-- BaseClass: container *-- Time Stamp: 08/28/06 01:03:01 PM * * DEFINE CLASS thermo AS container Width = 348 Height = 60 BackStyle = 0 BorderWidth = 0 uretval = 0 nmax = 0 Name = "thermo" ADD OBJECT shpback AS shape WITH ; Top = 32, ; Left = 8, ; Height = 24, ; Width = 336, ; BackStyle = 1, ; BackColor = RGB(255,255,255), ; ZOrderSet = 5, ; Name = "shpBack" ADD OBJECT lblstatus AS label WITH ; BackStyle = 0, ; Caption = "", ; Height = 16, ; Left = 8, ; Top = 8, ; Width = 240, ; TabIndex = 6, ; Name = "lblStatus" ADD OBJECT lblpercent AS label WITH ; BackStyle = 0, ; Caption = "", ; Height = 18, ; Left = 167, ; Top = 36, ; Width = 30, ; ForeColor = RGB(0,0,255), ; Name = "lblPercent" ADD OBJECT shpfore AS shape WITH ; Top = 32, ; Left = 8, ; Height = 24, ; Width = 12, ; BackStyle = 1, ; DrawMode = 14, ; BackColor = RGB(182,146,1), ; ZOrderSet = 6, ; Name = "shpFore" PROCEDURE hidethermo LPARAMETERS tnCnt, tcWhat this.shpBack.Visible=.f. this.shpfore.Visible=.f. this.lblstatus.caption=TRANSFORM(tnCnt)+" "+tcWhat this.uretval=this.uretval+tncnt ENDPROC PROCEDURE showthermo this.shpBack.Visible=.t. this.shpfore.Visible=.t. this.shpfore.Width=0 this.lblStatus.Caption="" this.lblPercent.ZOrder(1) this.shpback.ZOrder(1) This.shpFore.ZOrder(0) this.Visible=.t. ENDPROC PROCEDURE update Lparameters tNumber, cText If Vartype(cText)="C" This.lblStatus.Caption=cText Endif Do Case Case Pcount()=0 Or Vartype(tNumber)#"N" lnFraction=Recno()/Reccount() Case Between(tNumber,1,This.nmax) lnFraction=tNumber/This.nmax Otherwise lnFraction=0 Endcase This.shpfore.Width=This.shpBack.Width*lnFraction this.lblPercent.Caption=Transform(lnFraction*100,"999%") ENDPROC ENDDEFINE * *-- EndDefine: thermo **************************************************