/////////////////////////////////////////////////////////////////////////////// // // Vom Xbase++ FormDesigner erstellter Funktions Code // Erstellt am: 15.05.01 Zeit: 11:10:48 // /////////////////////////////////////////////////////////////////////////////// #include "Gra.ch" #include "Xbp.ch" #include "Appevent.ch" #include "Font.ch" PROCEDURE RadCheck() LOCAL nEvent, mp1, mp2 LOCAL oDlg, oXbp, drawingArea, aEditControls := {}, oXbp1, oXbp2 LOCAL aSizeDesktop := AppDesktop():currentSize() LOCAL nBSb := aSizeDesktop[1] LOCAL nBSh := aSizeDesktop[2] // folgende Zahlen-Werte basieren auf 800x600: LOCAL nV := nBSb/800 // Korrekturfaktor fr tats„chliche Aufl”sung LOCAL n5 := int(5*nV) LOCAL n10 := int(10*nV) LOCAL n15 := int(15*nV) LOCAL n20 := int(20*nV) LOCAL n30 := int(30*nV) LOCAL nRo := int(450*nV) // oberstes Eingabefeld LOCAL nBo := nRo LOCAL nR1 := n10 // linker Rand Bezeichnungsfeld LOCAL nR2 := int((nBSb-5*nR1)/8) // kleiner Abstand LOCAL nR3 := 2*nR2 //int(*nV) // groáer Abstand LOCAL nBl1 := nR2-n5 // RadioButton-Breite inkl. Text LOCAL nBl2 := nR3-n5 // RadioButton-Breite inkl. Text LOCAL nBG := nBSb-3*nR1 LOCAL nBh := n20 LOCAL nBH1 := int(nBh*2) LOCAL nBH2 := int(nBh*3) LOCAL nBH3 := int(nBh*4) LOCAL nBH4 := int(nBh*5) LOCAL cSonst1 := Space( 28 ) // 1->SONST1 LOCAL cSonst2 := Space( 28 ) // 1->SONST2 LOCAL cSonst2a := Space( 14 ) // substr( cSonst2,1,14 ) LOCAL cSonst2b := Space( 14 ) // substr( cSonst2,15,14 ) LOCAL nG1a := 0 // Val(substr(cSonst1,2,1)) LOCAL nG1b := 0 // Val(substr(cSonst1,3,1)) LOCAL nG2 := 0 // Val(substr(cSonst1,4,1)) LOCAL nG3 := 0 // Val(substr(cSonst1,5,1)) LOCAL nG4 := 0 // Val(substr(cSonst1,6,1)) LOCAL nG5 := 0 // Val(substr(cSonst1,7,1)) LOCAL nG6 := 0 // Val(substr(cSonst1,8,1)) LOCAL nAnf := 0 // Val(substr(cSonst1,9,5)) LOCAL nEnd := 0 // Val(substr(cSonst1,14,5)) LOCAL dDat := CtoD( Trim (" ") ) // CtoD(substr(cSonst1,19,10)) LOCAL dDat1 := CtoD( Trim (" ") ), dDat2 := CtoD( Trim (" ") ) oDlg := XbpDialog():new( AppDesktop(), SetAppWindow(), {n5,n30}, {nBSb-n10,nBSh-n30}, , .F.) oDlg:taskList := .T. oDlg:title := "Statistik-Seite" oDlg:create() drawingArea := oDlg:drawingArea IF nBSb > 1000 drawingArea:setFontCompoundName( "12.Arial" ) ELSE drawingArea:setFontCompoundName( "8.Arial" ) ENDIF oXbp1 := XbpStatic():new( drawingArea, , {nR1,nBo}, {nBG,nBH3} ) oXbp1:caption := "Eine pers”nliche Frage an die Angeh”rigen" oXbp1:clipSiblings := .T. oXbp1:type := XBPSTATIC_TYPE_GROUPBOX oXbp1:create() nBo := 2*nBh oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "OB" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1a==1,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1a := 1, nG1b := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "MH" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1a==2,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1a := 2, nG1b := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "DU" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1a==3,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1a := 3, nG1b := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "BOT" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1a==4,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1a := 4, nG1b := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "E" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1a==5,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1a := 5, nG1b := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "GE" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1a==6,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1a := 6, nG1b := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "GL" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1a==7,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1a := 7, nG1b := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "sonst." oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1a==8,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1a := 8, nG1b := 0 } nR1 := nBG-n20 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {n20,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( (nG1a==0 .AND. nG1b==0),.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1a := 0, nG1b := 0 } nBo := 1*nBh nR1 := n10 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1b==1,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1b := 1, nG1a := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1b==2,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1b := 2, nG1a := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1b==3,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1b := 3, nG1a := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1b==4,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1b := 4, nG1a := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1b==5,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1b := 5, nG1a := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1b==6,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1b := 6, nG1a := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1b==7,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1b := 7, nG1a := 0 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp1, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG1b==8,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG1b := 8, nG1a := 0 } nBo := nRo-3*nBh nR1 := n10 oXbp2 := XbpStatic():new( drawingArea, , {nR1,nBo}, {nBG,nBH2} ) // oXbp1:caption := "Auftrag" oXbp2:clipSiblings := .T. oXbp2:type := XBPSTATIC_TYPE_GROUPBOX oXbp2:create() nBo := 1*nBh nR1 := n10 oXbp := XbpRadiobutton():new( oXbp2, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Beh”rdenauftrag" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG2==1,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG2 := 1 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp2, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Vorvertrag" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG2==2,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG2 := 2 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp2, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Empfehlung" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG2==3,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG2 := 3 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp2, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "Hausbestatter" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG2==4,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG2 := 4 } nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp2, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "Neukunde" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG2==5,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG2 := 5 } nR1 := nBG-n20 oXbp := XbpRadiobutton():new( oXbp2, , {nR1,nBo}, {n20,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG2==0,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG2 := 0 } nBo := nRo-6*nBh nR1 := n10 oXbp3 := XbpStatic():new( drawingArea, , {nR1,nBo}, {nBG,nBH2} ) // oXbp1:caption := "Gespr„chszeit" oXbp3:clipSiblings := .T. oXbp3:type := XBPSTATIC_TYPE_GROUPBOX oXbp3:create() nBo := 1*nBh oXbp := XbpStatic():new( oXbp3, , {nR1,nBo}, {nBl1,nBh} ) oXbp:caption := "Gespr„chszeit:" oXbp:clipSiblings := .T. oXbp:options := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT oXbp:create() nR1 := nR1+nR3 oXbp := XbpStatic():new( oXbp3, , {nR1,nBo}, {n30,nBh} ) oXbp:caption := "von:" oXbp:clipSiblings := .T. oXbp:options := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT oXbp:create() nFa := 5 oXbp := XbpSLE():new( oXbp3, , {nR1+n30,nBo}, {n30+n20,nBh}, { { XBP_PP_BGCLR, XBPSYSCLR_ENTRYFIELD } } ) oXbp:bufferLength := nFa oXbp:tabStop := .T. oXbp:clipSiblings := .T. oXbp:setInputFocus := {|mp1,mp2,obj| HiliteSle( obj ) } oXbp:killInputFocus := {|mp1,mp2,obj| DeHiliteSle( obj ) } oXbp:group := XBP_WITHIN_GROUP oXbp:dataLink := {|x| IIf( PCOUNT()==0, Transform( nAnf, '99.99' ), nAnf := ; Val( IIf( ","$x, Stuff( x, At(",",x), 1, "." ), x ) ) ) } oXbp:create():setData( str( 0,5,2 ) ) AAdd ( aEditControls, oXbp ) nR1 := nR1+nR2 oXbp := XbpStatic():new( oXbp3, , {nR1,nBo}, {n30,nBh} ) oXbp:caption := "bis:" oXbp:clipSiblings := .T. oXbp:options := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT oXbp:create() nFa := 5 oXbp := XbpSLE():new( oXbp3, , {nR1+n30,nBo}, {n30+n20,nBh}, { { XBP_PP_BGCLR, XBPSYSCLR_ENTRYFIELD } } ) oXbp:bufferLength := nFa oXbp:tabStop := .T. oXbp:clipSiblings := .T. oXbp:setInputFocus := {|mp1,mp2,obj| HiliteSle( obj ) } oXbp:killInputFocus := {|mp1,mp2,obj| DeHiliteSle( obj ) } oXbp:group := XBP_WITHIN_GROUP oXbp:dataLink := {|x| IIf( PCOUNT()==0, Transform( nEnd, '99.99' ), nEnd := ; Val( IIf( ","$x, Stuff( x, At(",",x), 1, "." ), x ) ) ) } oXbp:create():setData( str( 24,5,2 ) ) AAdd ( aEditControls, oXbp ) nR1 := nR1+nR2 oXbp := XbpStatic():new( oXbp3, , {nR1,nBo}, {n30,nBh} ) oXbp:caption := "Dat1:" oXbp:clipSiblings := .T. oXbp:options := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT oXbp:create() nFa := 10 oXbp := XbpSLE():new( oXbp3, , {nR1+n30,nBo}, {nBl1,nBh}, { { XBP_PP_BGCLR, XBPSYSCLR_ENTRYFIELD } } ) oXbp:bufferLength := nFa oXbp:tabStop := .T. oXbp:clipSiblings := .T. oXbp:setInputFocus := {|mp1,mp2,obj| HiliteSle( obj ) } oXbp:killInputFocus := {|mp1,mp2,obj| DeHiliteSle( obj ) } oXbp:group := XBP_WITHIN_GROUP oXbp:dataLink := {|x| IIf( PCOUNT()==0, ; IIf( DtoC( dDat1 )=" ", trim(" "), DtoC( dDat1 )), ; IIf( len(x)<7, dDat1 := CtoD(x+str(year(date(),4,0))), ; dDat1 := CtoD(x) ) ) } oXbp:create():setData( "01.01.2001" ) AAdd ( aEditControls, oXbp ) nR1 := nR1+nR3 oXbp := XbpStatic():new( oXbp3, , {nR1,nBo}, {n30,nBh} ) oXbp:caption := "Dat2:" oXbp:clipSiblings := .T. oXbp:options := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT oXbp:create() nFa := 10 oXbp := XbpSLE():new( oXbp3, , {nR1+n30,nBo}, {nBl1,nBh}, { { XBP_PP_BGCLR, XBPSYSCLR_ENTRYFIELD } } ) oXbp:bufferLength := nFa oXbp:tabStop := .T. oXbp:clipSiblings := .T. oXbp:setInputFocus := {|mp1,mp2,obj| HiliteSle( obj ) } oXbp:killInputFocus := {|mp1,mp2,obj| DeHiliteSle( obj ) } oXbp:group := XBP_WITHIN_GROUP oXbp:dataLink := {|x| IIf( PCOUNT()==0, ; IIf( DtoC( dDat2 )=" ", trim(" "), DtoC( dDat2 )), ; IIf( len(x)<7, dDat2 := CtoD(x+str(year(date(),4,0))), ; dDat2 := CtoD(x) ) ) } oXbp:create():setData( "31.12.2001" ) AAdd ( aEditControls, oXbp ) nR1 := nBG-n30-n30 oXbpGo := XbpPushButton():new( oXbp3, , {nR1,nBo}, {n30+n20,nBh} ) oXbpGo:caption := "Z„hle" oXbpGo:clipSiblings := .T. oXbpGo:create() oXbpGo:activate := {|| Gather( aEditControls ), ; cSonst1 := "~"+str(nG1a,1,0)+str(nG1b,1,0)+str(nG2,1,0)+str(nG3,1,0)+ ; str(nG4,1,0)+str(nG5,1,0)+str(nG6,1,0)+str(nAnf,5,2)+ ; str(nEnd,5,2)+DtoC(dDat), ; AuswSeite2( cSonst1, "Anzahl:", drawingArea, dDat1, dDat2 ) , ; Scatter ( aEditControls ), ; oXbp:enable() } nBo := nRo-10*nBh nR1 := n10 oXbp4 := XbpStatic():new( drawingArea, , {nR1,nBo}, {nBG,nBH3} ) // oXbp1:caption := "Gespr„chsort" oXbp4:clipSiblings := .T. oXbp4:type := XBPSTATIC_TYPE_GROUPBOX oXbp4:create() nBo := 2*nBh nR1 := n10 oXbp := XbpStatic():new( oXbp4, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Gespr„chsort:" oXbp:clipSiblings := .T. oXbp:create() nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp4, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Trauerhaus" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG3==1,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG3 := 1 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp4, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Zentrale" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG3==2,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG3 := 2 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp4, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Filiale" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG3==3,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG3 := 3 } nR1 := nBG-n20 oXbp := XbpRadiobutton():new( oXbp4, , {nR1,nBo}, {n20,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG3==0,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG3 := 0 } nBo := nBh nR1 := 3*nR3 nFa := 14 oXbp := XbpSLE():new( oXbp4, , {nR1,nBo}, {nBl1,nBh}, { { XBP_PP_BGCLR, XBPSYSCLR_ENTRYFIELD } } ) oXbp:bufferLength := nFa oXbp:tabStop := .T. oXbp:clipSiblings := .T. oXbp:setInputFocus := {|mp1,mp2,obj| HiliteSle( obj ) } oXbp:killInputFocus := {|mp1,mp2,obj| DeHiliteSle( obj ) } oXbp:group := XBP_WITHIN_GROUP oXbp:dataLink := {|x| IIf( PCOUNT()==0, Trim( cSONST2a ), cSONST2a := x ) } oXbp:create():setData( Trim( cSonst2a ) ) AAdd ( aEditControls, oXbp ) nBo := nRo-13*nBh nR1 := n10 oXbp5 := XbpStatic():new( drawingArea, , {nR1,nBo}, {nBG,nBH2} ) oXbp5:caption := "Das Gespr„ch ist zustande gekommen, weil der Kunde: / weil:" oXbp5:clipSiblings := .T. oXbp5:type := XBPSTATIC_TYPE_GROUPBOX oXbp5:create() nBo := 1*nBh nR1 := n10 oXbp := XbpRadiobutton():new( oXbp5, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "angerufen hat" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG4==1,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG4 := 1 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp5, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "geklingelt hat" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG4==2,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG4 := 2 } nBo := nBh nR1 := nR1+nR2 nFa := 14 oXbp := XbpSLE():new( oXbp5, , {nR1,nBo}, {nBl1,nBh}, { { XBP_PP_BGCLR, XBPSYSCLR_ENTRYFIELD } } ) oXbp:bufferLength := nFa oXbp:tabStop := .T. oXbp:clipSiblings := .T. oXbp:setInputFocus := {|mp1,mp2,obj| HiliteSle( obj ) } oXbp:killInputFocus := {|mp1,mp2,obj| DeHiliteSle( obj ) } oXbp:group := XBP_WITHIN_GROUP oXbp:dataLink := {|x| IIf( PCOUNT()==0, Trim( cSONST2b ), cSONST2b := x ) } oXbp:create():setData( Trim( cSonst2b ) ) AAdd ( aEditControls, oXbp ) nR1 := nR1+nR2 oXbp := XbpRadiobutton():new( oXbp5, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "KH/Heim angerufen hat" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG4==3,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG4 := 3 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp5, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Filiale besetzt war" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG4==4,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG4 := 4 } nR1 := nBG-n20 oXbp := XbpRadiobutton():new( oXbp5, , {nR1,nBo}, {n20,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG4==0,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG4 := 0 } nBo := nRo-18*nBh nR1 := n10 oXbp6 := XbpStatic():new( drawingArea, , {nR1,nBo}, {nBG,nBH4} ) oXbp6:caption := "Wie wurden Sie auf uns aufmerksam?" oXbp6:clipSiblings := .T. oXbp6:type := XBPSTATIC_TYPE_GROUPBOX oXbp6:create() nBo := 3*nBh nR1 := n10 oXbp := XbpRadiobutton():new( oXbp6, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Internet" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG5==1,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG5 := 1 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp6, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Tageszeitung" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG5==2,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG5 := 2 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp6, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Wochenanzeiger" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG5==3,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG5 := 3 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp6, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "sonstiges" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG5==4,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG5 := 4 } nR1 := nBG-n20 oXbp := XbpRadiobutton():new( oXbp6, , {nR1,nBo}, {n20,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG5==0,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG5 := 0 } nBo := 2*nBh nR1 := n10 oXbp := XbpRadiobutton():new( oXbp6, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Filialn„he" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG5==5,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG5 := 5 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp6, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "V-Karte" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG5==6,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG5 := 6 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp6, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "™rtliches" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG5==7,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG5 := 7 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp6, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Gelbe Seiten" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG5==8,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG5 := 8 } nBo := nBh nR1 := 3*nR3 nFa := 28 oXbp := XbpSLE():new( oXbp6, , {nR1,nBo}, {nBl2,nBh}, { { XBP_PP_BGCLR, XBPSYSCLR_ENTRYFIELD } } ) oXbp:bufferLength := nFa oXbp:tabStop := .T. oXbp:clipSiblings := .T. oXbp:setInputFocus := {|mp1,mp2,obj| HiliteSle( obj ) } oXbp:killInputFocus := {|mp1,mp2,obj| DeHiliteSle( obj ) } oXbp:group := XBP_WITHIN_GROUP oXbp:dataLink := {|x| IIf( PCOUNT()==0, Trim( 1->SONST3 ), 1->SONST3 := x ) } oXbp:create():setData() AAdd ( aEditControls, oXbp ) nBo := nRo-22*nBh nR1 := n10 oXbp7 := XbpStatic():new( drawingArea, , {nR1,nBo}, {nBG,nBH3} ) oXbp7:caption := "Wo haben Sie unsere Telefonnummer gefunden?" oXbp7:clipSiblings := .T. oXbp7:type := XBPSTATIC_TYPE_GROUPBOX oXbp7:create() nBo := 2*nBh nR1 := n10 oXbp := XbpRadiobutton():new( oXbp7, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Internet" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG6==1,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG6 := 1 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp7, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Tageszeitung" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG6==2,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG6 := 2 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp7, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Wochenanzeiger" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG6==3,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG6 := 3 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp7, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "kein Anr./bekannt" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG6==4,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG6 := 4 } nR1 := nBG-n20 oXbp := XbpRadiobutton():new( oXbp7, , {nR1,nBo}, {n20,nBh} ) oXbp:caption := "" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG6==0,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG6 := 0 } nBo := 1*nBh nR1 := n10 oXbp := XbpRadiobutton():new( oXbp7, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Filiale" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG6==5,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG6 := 5 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp7, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "V-Karte" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG6==6,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG6 := 6 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp7, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "™rtliches" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG6==7,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG6 := 7 } nR1 := nR1+nR3 oXbp := XbpRadiobutton():new( oXbp7, , {nR1,nBo}, {nBl2,nBh} ) oXbp:caption := "Gelbe Seiten" oXbp:clipSiblings := .T. oXbp:selection := IIf( nG6==8,.T.,.F. ) oXbp:create() oXbp:selected := {|| nG6 := 8 } oDlg:setModalState( XBP_DISP_APPMODAL ) oDlg:show() oFocus := SetAppFocus( oDlg ) nEvent := xbe_None DO WHILE nEvent <> xbeP_Close nEvent := AppEvent( @mp1, @mp2, @oXbp ) IF nEvent == xbeP_Keyboard DO CASE CASE mp1 == xbeK_ESC .or. mp1 == xbeK_F10 PostAppEvent( xbeP_Close ) CASE mp1 == xbeK_ALT_D StatistikSDr( nG1a, nG1b, nG2, nG3, nG4, nG5, nG6, cSonst2a, ; cSonst2b, 1->Sonst3, nAnf, nEnd, dDat ) CASE mp1 == xbeK_ALT_Z PostAppEvent( xbeP_Activate,,, oXbpGo) ENDCASE ENDIF oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO // Satzsp() // Gather( aEditcontrols ) // cSonst1 := "~"+str(nG1a,1,0)+str(nG1b,1,0)+str(nG2,1,0)+str(nG3,1,0)+ ; // str(nG4,1,0)+str(nG5,1,0)+str(nG6,1,0)+str(nAnf,5,2)+ ; // str(nEnd,5,2)+DtoC(dDat) // REPLACE 1->SONST1 with cSonst1 // cSonst2 := Padr(cSonst2a,14) + Padr(cSonst2b,14) // REPLACE 1->SONST2 with cSonst2 oDlg:setModalState( XBP_DISP_MODELESS ) oDlg:destroy() SetAppFocus( oFocus ) RETURN FUNCTION AuswSeite2( cSonst1, cTitle, drawingArea, dDat1, dDat2 ) LOCAL nEvent, mp1, mp2, oXbp, lExit LOCAL oDlg, oSle, oFocus, aPos, aSize //, drawingArea LOCAL nXsize := 240 LOCAL nYsize := 180 LOCAL nCount := 0 LOCAL nG1a := 0 // Val(substr(cSonst1,2,1)) LOCAL nG1b := 0 // Val(substr(cSonst1,3,1)) LOCAL nG2 := 0 // Val(substr(cSonst1,4,1)) LOCAL nG3 := 0 // Val(substr(cSonst1,5,1)) LOCAL nG4 := 0 // Val(substr(cSonst1,6,1)) LOCAL nG5 := 0 // Val(substr(cSonst1,7,1)) LOCAL nG6 := 0 // Val(substr(cSonst1,8,1)) LOCAL nAnf := 0 // Val(substr(cSonst1,9,5)) LOCAL nEnd := 0 // Val(substr(cSonst1,14,5)) LOCAL dDat := CtoD( Trim (" ") ) // CtoD(substr(cSonst1,19,10)) DO CASE CASE nG2>0 SET FILTER TO nAnf<=Val(Substr(best->SONST1,9,5)) ; .AND. nEnd>=Val(Substr(best->SONST1,14,5)) ; .AND. dDat1<=CtoD(Substr(best->SONST1,19,10)) ; .AND. dDat2>=CtoD(Substr(best->SONST1,19,10)) ; .AND. nG2==Val(Substr(best->SONST1,4,1)) ; .AND. Val( Substr(best->SONST1,2,1) ) == IIf( nG1a=0, ; Val( Substr(best->SONST1,2,1) ), nG1a ) CASE nG3>0 SET FILTER TO nAnf<=Val(Substr(best->SONST1,9,5)) ; .AND. nEnd>=Val(Substr(best->SONST1,14,5)) ; .AND. dDat1<=CtoD(Substr(best->SONST1,19,10)) ; .AND. dDat2>=CtoD(Substr(best->SONST1,19,10)) ; .AND. nG3==Val(Substr(best->SONST1,5,1)) ; .AND. Val( Substr(best->SONST1,2,1) ) == IIf( nG1a=0, ; Val( Substr(best->SONST1,2,1) ), nG1a ) CASE nG4>0 SET FILTER TO nAnf<=Val(Substr(best->SONST1,9,5)) ; .AND. nEnd>=Val(Substr(best->SONST1,14,5)) ; .AND. dDat1<=CtoD(Substr(best->SONST1,19,10)) ; .AND. dDat2>=CtoD(Substr(best->SONST1,19,10)) ; .AND. nG4==Val(Substr(best->SONST1,6,1)) ; .AND. Val( Substr(best->SONST1,2,1) ) == IIf( nG1a=0, ; Val( Substr(best->SONST1,2,1) ), nG1a ) CASE nG5>0 SET FILTER TO nAnf<=Val(Substr(best->SONST1,9,5)) ; .AND. nEnd>=Val(Substr(best->SONST1,14,5)) ; .AND. dDat1<=CtoD(Substr(best->SONST1,19,10)) ; .AND. dDat2>=CtoD(Substr(best->SONST1,19,10)) ; .AND. nG5==Val(Substr(best->SONST1,7,1)) ; .AND. Val( Substr(best->SONST1,2,1) ) == IIf( nG1a=0, ; Val( Substr(best->SONST1,2,1) ), nG1a ) CASE nG6>0 SET FILTER TO nAnf<=Val(Substr(best->SONST1,9,5)) ; .AND. nEnd>=Val(Substr(best->SONST1,14,5)) ; .AND. dDat1<=CtoD(Substr(best->SONST1,19,10)) ; .AND. dDat2>=CtoD(Substr(best->SONST1,19,10)) ; .AND. nG6==Val(Substr(best->SONST1,8,1)) ; .AND. Val( Substr(best->SONST1,2,1) ) == IIf( nG1a=0, ; Val( Substr(best->SONST1,2,1) ), nG1a ) CASE nAnf0 SET FILTER TO nAnf<=Val(Substr(best->SONST1,9,5)) ; .AND. nEnd>=Val(Substr(best->SONST1,14,5)) ; .AND. dDat1<=CtoD(Substr(best->SONST1,19,10)) ; .AND. dDat2>=CtoD(Substr(best->SONST1,19,10)) ; .AND. Val( Substr(best->SONST1,2,1) ) == IIf( nG1a=0, ; Val( Substr(best->SONST1,2,1) ), nG1a ) CASE nG1a>0 SET FILTER TO nAnf<=Val(Substr(best->SONST1,9,5)) ; .AND. nEnd>=Val(Substr(best->SONST1,14,5)) ; .AND. dDat1<=CtoD(Substr(best->SONST1,19,10)) ; .AND. dDat2>=CtoD(Substr(best->SONST1,19,10)) ; .AND. nG1a==Val(Substr(best->SONST1,2,1)) CASE nG1b>0 SET FILTER TO nAnf<=Val(Substr(best->SONST1,9,5)) ; .AND. nEnd>=Val(Substr(best->SONST1,14,5)) ; .AND. dDat1<=CtoD(Substr(best->SONST1,19,10)) ; .AND. dDat2>=CtoD(Substr(best->SONST1,19,10)) ; .AND. nG1b==Val(Substr(best->SONST1,3,1)) ENDCASE GO TOP COUNT TO nCount // aSize := AppDeskTop():currentSize() aSize := drawingArea:currentSize() aPos := { ( aSize[1]-nXsize )/2, ( aSize[2]-nYsize+20 ) / 2 } // oDlg := XbpDialog():new( AppDesktop(), SetAppWindow(), aPos, {nXsize,nYsize} ) oDlg := XbpDialog():new( drawingArea, SetAppWindow(), aPos, {nXsize,nYsize} ) oDlg:title := cTitle oDlg:taskList := .T. oDlg:minButton := .F. oDlg:maxButton := .F. oDlg:create() oDlg:drawingArea:setFontCompoundName( FONT_HELV_SMALL ) oDlg:Close := {|| lExit := .T. } SetAppFocus( oDlg ) aSize := oDlg:drawingArea:currentSize() aPos := { 12, ( aSize[2] - 20 ) / 2 } oSle := XbpSle():new( oDlg:drawingArea,, aPos, { aSize[1] - 24, 20 } ) oSle:TabStop := .T. oSle:create() oSle:setData( Str(nCount) ) aPos := { ( aSize[1]-72 ) / 2, 12 } oXbpBok := XbpPushbutton():new( oDlg:drawingArea, , aPos, {72,24} ) oXbpBok:caption := "OK" oXbpBok:activate := {|| lExit := .T. } oXbpBok:TabStop := .T. oXbpBok:create() oFocus := SetAppFocus( oSle ) oDlg:setModalState( XBP_DISP_APPMODAL ) lExit := .F. DO WHILE ! lExit nEvent := AppEvent( @mp1, @mp2, @oXbp ) IF nEvent == xbeP_Keyboard DO CASE CASE mp1 == xbeK_RETURN PostAppEvent( xbeP_Activate,,, oXbpBok ) ENDCASE ENDIF oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO oDlg:setModalState( XBP_DISP_MODELESS ) // cString := oSle:getData() oDlg:destroy() SetAppFocus( oFocus ) RETURN .T.