home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Direkt 1995 #1
/
Image.iso
/
cdd
/
winanw
/
demo_pf
/
adress.prf
< prev
next >
Wrap
Text File
|
1994-01-05
|
4KB
|
172 lines
Declare Ende%,Nr%,Nr$,CR$
Declare Name$,Vorname$,Strasse$,Ort$,Telefon$
DIM$ 999
PopUp "&Adresse"
AppendMenu 101,"&Hinzufⁿgen"
AppendMenu 102,"&Suchen"
AppendMenu 103,"&Liste"
Separator
AppendMenu 109,"&Ende"
AppendMenuBar 130,"&Info"
PROC Info
@MessageBox("MINI-ADRESS-KARTEI","Info",64)
ENDPROC
PROC Ueber
@MessageBox(@Add$(@Add$("MINI-ADRESS-KARTEI",CR$),"Autor: Roland G. Hⁿlsmann"),\
"▄ber ...",48)
ENDPROC
PROC Zeige
Parameters I%
Declare Text$
Let Name$ = @ReadIni$("ADRESS.DAT",@Str$(I%),"NAME")
Let VorName$ = @ReadIni$("ADRESS.DAT",@Str$(I%),"VORNAME")
Let Strasse$ = @ReadIni$("ADRESS.DAT",@Str$(I%),"STRASSE")
Let Ort$ = @ReadIni$("ADRESS.DAT",@Str$(I%),"PLZ_ORT")
Let Telefon$ = @ReadIni$("ADRESS.DAT",@Str$(I%),"TELEFON")
Let Text$=@Add$(@Add$(@Add$(VorName$," "),Name$),CR$)
Let Text$=@Add$(@Add$(Text$,Strasse$),CR$)
Let Text$=@Add$(@Add$(Text$,Ort$),CR$)
Let Text$=@Add$(@Add$(Text$,Telefon$),CR$)
@MessageBox(Text$,"ADRESSE:",48)
ENDPROC
PROC Hinzufⁿgen
Declare Ok%
Let Ok% = 7
Let Nr$=@ReadIni$("ADRESS.DAT","Header","Anzahl")
Let Nr% = @Val(Nr$)
While @Equ(Ok%,7)
Cls
TBox 4,4-16,40;0
Color 15,1
Locate 5,5
Print " Adresse hinzufⁿgen "
Color 0,15
Locate 7,5
Print "Nachname: ";
Locate 9,5
Print "Vorname: ";
Locate 11,5
Print "Stra▀e: ";
Locate 13,5
Print "PLZ Ort: ";
Locate 15,5
Print "Telefon: ";
Locate 7,16
Input Name$
Locate 9,16
Input VorName$
Locate 11,16
Input Strasse$
Locate 13,16
Input Ort$
Locate 15,16
Input Telefon$
Let Ok% = @MessageBox("Ist die Adresse richtig eingeben?","Frage:",35)
Wend
If @Equ(OK%,6)
WriteIni "ADRESS.DAT",@Str$(Nr%),"NAME"=Name$
WriteIni "ADRESS.DAT",@Str$(Nr%),"VORNAME"=VorName$
WriteIni "ADRESS.DAT",@Str$(Nr%),"STRASSE"=Strasse$
WriteIni "ADRESS.DAT",@Str$(Nr%),"PLZ_ORT"=Ort$
WriteIni "ADRESS.DAT",@Str$(Nr%),"TELEFON"=Telefon$
Inc Nr%
WriteIni "ADRESS.DAT","Header","Anzahl"=@Str$(Nr%)
EndIf
Cls
ENDPROC
PROC Liste
Declare I%,T$
Let I% = 1
ClearList
While @NEQ(I%,Nr%)
Let T$ = @Add$(" #",@Str$(I%))
AddString @Add$( @Add$( @Add$(\
@ReadIni$("ADRESS.DAT",@Str$(I%),"NAME"),", "), \
@ReadIni$("ADRESS.DAT",@Str$(I%),"VORNAME"),T$)
Inc I%
Wend
Let T$ = @ListBox$("Namen",0)
If @NEQ$(T$,"")
Let I% = @Instr("#",T$)
Let I% = @Val(@Mid$(T$,@Add(I%,1),255)
Zeige I%
EndIf
ENDPROC
PROC Suche
Declare Such$,T$,I%,Gef%
Let Such$=@Input$("Name (oder Teil) eingeben:","Adresse suchen","")
Let I% = 1
Let Gef% = 0
ClearList
While @NEQ(I%,Nr%)
Let T$ = @Add$(" #",@Str$(I%))
Let Name$ = @ReadIni$("ADRESS.DAT",@Str$(I%),"NAME")
If @Instr(@Upper$(Such$),@Upper$(Name$)) Then
AddString @Add$( @Add$( @Add$( Name$,", "), \
@ReadIni$("ADRESS.DAT",@Str$(I%),"VORNAME"),T$)
Inc Gef%
EndIf
Inc I%
Wend
If @GT(Gef%,1)
Let T$ = @ListBox$("Namen",0)
If @NEQ$(T$,"")
Let I% = @Instr("#",T$)
Let I% = @Val(@Mid$(T$,@Add(I%,1),255)
Zeige I%
EndIf
ElseIf @Equ(Gef%,1)
Let T$ = @ListBoxItem$(0)
Let I% = @Instr("#",T$)
Let I% = @Val(@Mid$(T$,@Add(I%,1),255)
Zeige I%
Else
@MessageBox("Adresse nicht gefunden!","Hinweis:",64)
EndIf
ENDPROC
PROC WasAnderes
Parameters Punkt%
Print "GewΣhlter Menⁿpunkt ";Punkt%
ENDPROC
'HAUPTPROGRAMM
'-------------
REM WindowTitle "MINI-ADRESS-KARTEI"
Cls
Let CR$ = @Chr$(13)
Let Nr$ = @ReadIni$("ADRESS.DAT","Header","Anzahl")
Let Nr% = @Val(Nr$)
If @Equ(Nr%,0)
WriteIni "ADRESS.DAT","Header","Anzahl"="1"
EndIf
Let Ende% = 0
WhileNot Ende%
WaitInput
If @MenuItem(109)
Let Ende% = 1
ElseIf @MenuItem(130)
Info
ElseIf @MenuItem(254)
Ueber
ElseIf @MenuItem(101)
Hinzufⁿgen
ElseIf @MenuItem(102)
Suche
ElseIf @MenuItem(103)
Liste
Else
WasAnderes %MenuItem
EndIf
Wend
End