Einzelnen Beitrag anzeigen

Adrenalin

Registriert seit: 8. Sep 2012
16 Beiträge
 
#7

AW: OmniXML TOmniXMLReader / TOmniXMLWriter

  Alt 9. Sep 2012, 19:04
Conf ist Public

Speichern:

Delphi-Quellcode:
procedure TMainForm.Button4Click(Sender: TObject);
var ConfPath: String;
begin
  ConfPath := TPath.Combine(ExtractFilePath(Application.ExeName), 'data\');
  Conf := TAppConf.Create;
  Conf.MemoInhalt.Text := Memo1.Lines.Text;
  try
    Conf.SaveConfig(ConfPath + 'data.xml');
  finally
     Conf.Free;
  end;
end;
Laden:
Delphi-Quellcode:
var ConfPath: String;
begin
  ConfPath := TPath.Combine(ExtractFilePath(Application.ExeName), 'data\');
  Conf := TAppConf.Create();
  try
    Conf.LoadTemplate(ConfPath + 'data.xml');
    Memo1.Lines.Text := Conf.MemoInhalt.Text;
  finally
     Conf.Free;
  end;
  Mit Zitat antworten Zitat