PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
Wx - Trabalhando com arquivos .ini (Arquivos de Configuração)
Wx - Trabalhando com arquivos .ini (Arquivos de Configuração)
Started by adrianoboller, Oct., 27 2015 5:07 PM - 1 reply
Connect yourself…
adrianoboller
#1
Registered member
3,659 messages
Popularité : +175 (223 votes)
Posted on October, 27 2015 - 5:07 PM
Prezados,
Segue um exemplo de como trabalhar com arquivo de configuração do tipo ini.
Procedure
Arquivo_INI
(
)
PathFile is
string
=
fCurrentDir
(
fCurrentDrive
(
)
) +
"\Sistema.ini"
IF
fFileExist
(
PathFile
) =
True
IF
EDT_
Servidor
=
""
EDT_
Servidor
=
INIRead
(
"Sistema"
,
"Server"
,
""
,
PathFile
)
IF
ErrorOccurred
=
True
AND
EDT_
Servidor
=
""
THEN
Error
(
)
END
END
IF
EDT_
Usuario
=
""
EDT_
Usuario
=
INIRead
(
"Sistema"
,
"User"
,
""
,
PathFile
)
IF
ErrorOccurred
=
True
AND
EDT_
Usuario
=
""
THEN
Error
(
)
ELSE
Usuario
=
EDT_
Usuario
END
END
IF
EDT_
Base_Dados
=
""
EDT_
Base_Dados
=
INIRead
(
"Sistema"
,
"BD"
,
""
,
PathFile
)
IF
ErrorOccurred
=
True
AND
EDT_
Base_Dados
=
""
THEN
Error
(
)
END
END
ELSE
INIWrite
(
"Sistema"
,
"Server"
,
EDT_
Servidor
,
PathFile
)
INIWrite
(
"Sistema"
,
"User"
,
EDT_
Usuario
,
PathFile
)
INIWrite
(
"Sistema"
,
"BD"
,
EDT_
Base_Dados
,
PathFile
)
END
--
Adriano Jose Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
______________________________________________
Report
0
0
adrianoboller
#2
Registered member
3,659 messages
Popularité : +175 (223 votes)
Posted on October, 27 2015 - 5:10 PM
Links:
http://help.windev.com/en-US/…
http://help.windev.com/en-US/…
--
Adriano Jose Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
______________________________________________
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text