procedure
TForm1
.
ReadButClick(Sender: TObject);
var
s: TStringList;
begin
if
((AddrEdit1
.
Text =
''
)
or
(AddrEdit2
.
Text =
''
)
or
(AddrEdit3
.
Text =
''
))
then
begin
ShowMessage(
' Вы не заполнили поля'
+ #
13
+
'адресов концентраторов'
);
Exit;
end
;
if
PhoneEdit
.
Text =
'+7'
then
begin
ShowMessage(
'Вы не ввели номер телефона'
);
Exit;
end
;
s := TStringList
.
Create;
s
.
LoadFromFile(
'Config.dat'
);
s
.
Text:=StringReplace(s
.
Text,
'Phone'
,PhoneEdit
.
Text,[rfreplaceall]);
s
.
Text:=StringReplace(s
.
Text,
'Addr1'
,AddrEdit1
.
Text,[rfreplaceall]);
s
.
Text:=StringReplace(s
.
Text,
'Addr2'
,AddrEdit2
.
Text,[rfreplaceall]);
s
.
Text:=StringReplace(s
.
Text,
'Addr3'
,AddrEdit3
.
Text,[rfreplaceall]);
s
.
SaveToFile(
'Root.dat'
);
FreeAndNil(s);
ShellExecute(Handle,
'open'
,
'BQuark.Rev.3.3.exe'
,
'Root.dat'
,
nil
, SW_SHOWNORMAL);