1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| Const
XMLFileName = 'configuration.xml';
//============================================================
function NextButtonClick(CurPage: Integer): Boolean;
//============================================================
// selection themes
// selection icons
// selection sounds
// fulscreen
// ISTool Language
var
XMLDoc, xmlNode, NewNode: Variant;
Path: String;
ResultCode: Integer;
begin
if CurPage = wpFinished then begin
// Selection THEME XPERIENCE
if IsComponentSelected('theme')
and IsComponentSelected('theme\xperience') then begin
Path := ExpandConstant('{app}\data\');
{ Load the XML File }
XMLDoc := CreateOleObject('MSXML2.DOMDocument');
XMLDoc.async := False;
XMLDoc.resolveExternals := False;
XMLDoc.load(Path + XMLFileName);
if XMLDoc.parseError.errorCode <> 0 then
RaiseException('Error on line ' + IntToStr(XMLDoc.parseError.line) + ',position ' + IntToStr(XMLDoc.parseError.linepos) + ': ' + XMLDoc.parseError.reason);
//MsgBox('Loaded the XML file.', mbInformation, mb_Ok);
{ Modify the XML document }
xmlNode := XMLDoc.SelectSingleNode('//Entry[@Key="ScreensTheme"]/string');
xmlNode .lastChild.text := 'Xperience1080';
xmlNode := XMLDoc.SelectSingleNode('//Entry[@Key="ImagesTheme"]/string');
xmlNode .lastChild.text := 'Xperience1080';
xmlNode := XMLDoc.SelectSingleNode('//Entry[@Key="PropertyScreenFile"]/string');
xmlNode .lastChild.text := 'Home';
{ Save the XML document }
XMLDoc.Save(Path + XMLFileName);
Result:=True;
end;
end;
end; |
Partager