1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-02-07 02:30:19 -05:00

Removed settings project

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@393 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2010-01-10 19:52:59 +00:00
parent 01be7fef21
commit 1b4706f1fd
8 changed files with 0 additions and 6180 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

View File

@ -1,292 +0,0 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="7"/>
<General>
<Flags>
<UseDefaultCompilerOptions Value="True"/>
</Flags>
<MainUnit Value="0"/>
<TargetFileExt Value=""/>
<Icon Value="0"/>
<UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
<Language Value=""/>
<CharSet Value=""/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="13">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="project1"/>
<UsageCount Value="39"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<CursorPos X="1" Y="24"/>
<TopLine Value="5"/>
<EditorIndex Value="0"/>
<UsageCount Value="39"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="../SAMufasaGUI/colourhistory.pas"/>
<ComponentName Value="ColourHistoryForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="colourhistory"/>
<CursorPos X="67" Y="236"/>
<TopLine Value="211"/>
<UsageCount Value="16"/>
</Unit2>
<Unit3>
<Filename Value="../../../../Documents/fpc/packages/fcl-xml/src/dom.pp"/>
<UnitName Value="DOM"/>
<CursorPos X="25" Y="115"/>
<TopLine Value="97"/>
<UsageCount Value="9"/>
</Unit3>
<Unit4>
<Filename Value="../SAMufasaGUI/framefunctionlist.pas"/>
<ComponentName Value="FunctionListFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="framefunctionlist"/>
<CursorPos X="70" Y="204"/>
<TopLine Value="184"/>
<UsageCount Value="16"/>
</Unit4>
<Unit5>
<Filename Value="settings.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="settings"/>
<CursorPos X="32" Y="483"/>
<TopLine Value="453"/>
<EditorIndex Value="1"/>
<UsageCount Value="37"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="../../Units/MMLAddon/updater.pas"/>
<UnitName Value="updater"/>
<CursorPos X="2" Y="88"/>
<TopLine Value="55"/>
<UsageCount Value="16"/>
</Unit6>
<Unit7>
<Filename Value="../../../../Documents/lazarus/lcl/comctrls.pp"/>
<UnitName Value="ComCtrls"/>
<CursorPos X="3" Y="2190"/>
<TopLine Value="2172"/>
<UsageCount Value="13"/>
</Unit7>
<Unit8>
<Filename Value="../../../../Documents/lazarus/lcl/include/treeview.inc"/>
<CursorPos X="72" Y="2253"/>
<TopLine Value="2219"/>
<UsageCount Value="10"/>
</Unit8>
<Unit9>
<Filename Value="../../../../Documents/fpc/rtl/inc/strings.pp"/>
<UnitName Value="strings"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="78"/>
<UsageCount Value="8"/>
</Unit9>
<Unit10>
<Filename Value="../../../../Documents/fpc/rtl/objpas/strutils.pp"/>
<UnitName Value="strutils"/>
<CursorPos X="70" Y="25"/>
<TopLine Value="1"/>
<EditorIndex Value="2"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="../../../../Documents/fpc/packages/unixutil/src/unixutils.pp"/>
<UnitName Value="UnixUtils"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="9"/>
</Unit11>
<Unit12>
<Filename Value="../../../../Documents/lazarus/lcl/include/control.inc"/>
<CursorPos X="1" Y="2289"/>
<TopLine Value="2271"/>
<UsageCount Value="9"/>
</Unit12>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="settings.pas"/>
<Caret Line="40" Column="21" TopLine="22"/>
</Position1>
<Position2>
<Filename Value="settings.pas"/>
<Caret Line="325" Column="30" TopLine="306"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
<Caret Line="49" Column="61" TopLine="23"/>
</Position3>
<Position4>
<Filename Value="settings.pas"/>
<Caret Line="242" Column="6" TopLine="215"/>
</Position4>
<Position5>
<Filename Value="settings.pas"/>
<Caret Line="235" Column="31" TopLine="213"/>
</Position5>
<Position6>
<Filename Value="settings.pas"/>
<Caret Line="14" Column="46" TopLine="1"/>
</Position6>
<Position7>
<Filename Value="settings.pas"/>
<Caret Line="288" Column="26" TopLine="270"/>
</Position7>
<Position8>
<Filename Value="settings.pas"/>
<Caret Line="337" Column="1" TopLine="319"/>
</Position8>
<Position9>
<Filename Value="settings.pas"/>
<Caret Line="248" Column="38" TopLine="224"/>
</Position9>
<Position10>
<Filename Value="settings.pas"/>
<Caret Line="42" Column="28" TopLine="23"/>
</Position10>
<Position11>
<Filename Value="unit1.pas"/>
<Caret Line="169" Column="51" TopLine="141"/>
</Position11>
<Position12>
<Filename Value="settings.pas"/>
<Caret Line="251" Column="63" TopLine="1"/>
</Position12>
<Position13>
<Filename Value="settings.pas"/>
<Caret Line="23" Column="53" TopLine="1"/>
</Position13>
<Position14>
<Filename Value="settings.pas"/>
<Caret Line="194" Column="12" TopLine="176"/>
</Position14>
<Position15>
<Filename Value="settings.pas"/>
<Caret Line="224" Column="9" TopLine="209"/>
</Position15>
<Position16>
<Filename Value="settings.pas"/>
<Caret Line="40" Column="21" TopLine="22"/>
</Position16>
<Position17>
<Filename Value="settings.pas"/>
<Caret Line="32" Column="21" TopLine="12"/>
</Position17>
<Position18>
<Filename Value="settings.pas"/>
<Caret Line="98" Column="22" TopLine="88"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
<Caret Line="48" Column="69" TopLine="1"/>
</Position19>
<Position20>
<Filename Value="unit1.pas"/>
<Caret Line="105" Column="29" TopLine="85"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
<Caret Line="110" Column="16" TopLine="85"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
<Caret Line="113" Column="29" TopLine="85"/>
</Position22>
<Position23>
<Filename Value="unit1.pas"/>
<Caret Line="206" Column="7" TopLine="180"/>
</Position23>
<Position24>
<Filename Value="unit1.pas"/>
<Caret Line="25" Column="60" TopLine="14"/>
</Position24>
<Position25>
<Filename Value="settings.pas"/>
<Caret Line="509" Column="65" TopLine="481"/>
</Position25>
<Position26>
<Filename Value="settings.pas"/>
<Caret Line="464" Column="5" TopLine="448"/>
</Position26>
<Position27>
<Filename Value="settings.pas"/>
<Caret Line="471" Column="1" TopLine="451"/>
</Position27>
<Position28>
<Filename Value="settings.pas"/>
<Caret Line="481" Column="19" TopLine="453"/>
</Position28>
<Position29>
<Filename Value="unit1.pas"/>
<Caret Line="79" Column="1" TopLine="72"/>
</Position29>
<Position30>
<Filename Value="unit1.pas"/>
<Caret Line="26" Column="2" TopLine="8"/>
</Position30>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<Target>
<Filename Value="project1"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)/"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -1,21 +0,0 @@
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, Unit1, LResources, settings
{ you can add units after this };
{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
begin
{$I project1.lrs}
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
MAINICON ICON "project1.ico"

View File

@ -1,489 +0,0 @@
unit settings;
{$mode objfpc}
interface
uses
Classes, SysUtils, ComCtrls, xmlread, xmlwrite, DOM;
type
// remove later
TStringArray = Array Of String;
TSettingData = class(TObject)
public
Val: String;
constructor Create;
destructor Destroy; override;
end;
TMMLSettings = class(TObject)
public
constructor Create(aNodes: TTreeNodes);
destructor Destroy; override;
private
Nodes: TTreeNodes;
function KeyNameToKeys(KeyName: String): TStringArray;
function WalkToNode(KeyName: String): TTreeNode;
procedure InternalLoadFromXML(XMLDoc: TXMLDocument);
procedure WriteXMLData(n: TTreeNode;
XMLNode: TDOMNode; XMLDoc: TXMLDocument;
var XMLChild: TDOMNode; var C: Integer);
procedure WalkTree(Node: TTreeNode; XMLNode: TDOMNode; XMLDoc: TXMLDocument;
var C: Integer);
public
function GetNodePath(Node: TTreeNode): String;
function ListKeys(KeyName: String): TStringArray;
function KeyExists(KeyName: String): Boolean;
function IsKey(KeyName: String): Boolean;
function IsDirectory(KeyName: String): Boolean;
procedure SetKeyValue(KeyName: String; KeyValue: String);
function CreateKey(KeyName: String; CreatePath: Boolean = False): Boolean;
function GetKeyValue(KeyName: String): String;
function GetSetDefaultKeyValue(KeyName, defVal: String): String;
public
procedure LoadFromXML(fileName: String);
procedure SaveToXML(fileName: String);
end;
implementation
uses
strutils;
constructor TSettingData.Create;
begin
inherited;
Val := '';
end;
destructor TSettingData.Destroy;
begin
Val := '';
inherited;
end;
constructor TMMLSettings.Create(aNodes: TTreeNodes);
begin
Self.Nodes := aNodes;
end;
destructor TMMLSettings.Destroy;
begin
Nodes := nil;
inherited;
end;
procedure TMMLSettings.InternalLoadFromXML(XMLDoc: TXMLDocument);
var
iNode: TDOMNode;
procedure ProcessNode(Node: TDOMNode; TreeNode: TTreeNode);
var
cNode: TDOMNode;
s: string;
d: TSettingData;
begin
if Node = nil then Exit; // Stops if reached a leaf
// Adds a node to the tree
if (Node.NodeType = 3) then
s := 'Data'
else
s := Node.NodeName;
TreeNode := Nodes.AddChild(TreeNode, s);
if (Node.NodeType = 3) then
begin
d := TSettingData.Create;
D.Val := Node.NodeValue;
TreeNode.Data := D;
TreeNode.Text := 'Value';
end;
// Goes to the child node
cNode := Node.FirstChild;
// Processes all child nodes
while cNode <> nil do
begin
ProcessNode(cNode, TreeNode);
cNode := cNode.NextSibling;
end;
end;
begin
iNode := XMLDoc.DocumentElement;
while iNode <> nil do
begin
ProcessNode(iNode, nil); // Recursive
iNode := iNode.NextSibling;
end;
end;
function TMMLSettings.KeyNameToKeys(KeyName: String): TStringArray;
// yay for SRL!
function srl_Explode(str, del: string): TStringArray;
var
i, l, dL: Integer;
begin
i := 0;
l := -1;
SetLength(Result, 0);
if (str = '') then
Exit;
dL := Length(del) - 1;
repeat
Inc(l);
SetLength(Result, l + 1);
i := Pos(del, str);
if i <= 0 then
Break;
Result[l] := Copy(str, 1, i - 1);
Delete(str, 1, i + dL);
until false;
Result[l] := Copy(str, 1, Length(str));
end;
begin
Result := srl_Explode(KeyName, '/');
end;
function TMMLSettings.WalkToNode(KeyName: String): TTreeNode;
var
N: TTreeNode;
i: Integer;
S: TStringArray;
begin
Result := nil;
if KeyName[length(KeyName)]='/' then setlength(KeyName,length(KeyName)-1);
S := KeyNameToKeys(KeyName);
if not assigned(s) then
Exit(nil);
N := Nodes.GetFirstNode;
i := 0;
while N <> nil do
begin
if N.Text = s[i] then
begin
inc(i);
if i = length(s) then
break;
N := N.GetFirstChild;
end else
N := N.GetNextSibling;
end;
Result := N;
end;
function TMMLSettings.GetNodePath(Node: TTreeNode): String;
var
N: TTreeNode;
s: TStringArray;
i: Integer;
begin
if Node = nil then
Exit('');
N := Node;
setlength(s, 0);
while N <> nil do
begin
setlength(s,length(s) + 1);
s[high(s)] := N.Text;
N := N.Parent;
end;
result := '';
for i := high(s) downto 0 do
result := result + s[i] + '/';
end;
function TMMLSettings.ListKeys(KeyName: String): TStringArray;
var
N: TTreeNode;
i: Integer;
S: TStringArray;
begin
SetLength(Result, 0);
N := WalkToNode(KeyName);
if N <> nil then
N := N.GetFirstChild;
while N <> nil do
begin
setlength(result,length(result)+1);
result[high(result)] := N.Text;
N := N.GetNextSibling;
end;
end;
function TMMLSettings.KeyExists(KeyName: String): Boolean;
begin
Result := WalkToNode(KeyName) <> nil;
end;
function TMMLSettings.IsKey(KeyName: String): Boolean;
var
N: TTreeNode;
i: Integer;
begin
N := WalkToNode(KeyName);
if N = nil then
Exit(False);
i := 0;
N := N.GetNextSibling;
while N <> nil do
begin
if N.Text <> 'Value' then
inc(i);
N := N.GetNextSibling;
end;
Exit(i = 0);
end;
function TMMLSettings.IsDirectory(KeyName: String): Boolean;
var
N: TTreeNode;
begin
N := WalkToNode(KeyName);
if N <> nil then
Exit(N.HasChildren);
Exit(False);
end;
function TMMLSettings.GetKeyValue(KeyName: String): String;
var
N: TTreeNode;
begin
if not KeyExists(KeyName) then
Exit('');
N := WalkToNode(KeyName);
if N <> nil then
N := N.GetFirstChild;
while N <> nil do
begin
if N.Text = 'Value' then
if assigned(n.Data) then
Exit(TSettingData(n.Data).Val);
N := N.GetNextSibling;
end;
Exit('');
end;
function TMMLSettings.GetSetDefaultKeyValue(KeyName, defVal: String): String;
var
Res: String;
begin
if not IsKey(KeyName) then
begin
CreateKey(KeyName, True);
SetKeyValue(KeyName, defVal);
exit(defVal);
end;
Res := GetKeyValue(KeyName);
if Res = '' then
begin
SetKeyValue(KeyName, defVal);
exit(defVal);
end;
Exit(Res);
end;
function TMMLSettings.CreateKey(KeyName: String; CreatePath: Boolean = False): Boolean;
var
N, newN, nParent: TTreeNode;
Path: TStringArray;
NewPath: String;
i: Integer;
begin
if KeyExists(KeyName) then
begin
Exit(False);
end;
NewPath := '';
N := nil;
nParent := Nodes.GetFirstNode;
Path := KeyNameToKeys(KeyName);
if length(path) < 2 then
begin
writeln('Path too short!');
exit(false);
end;
if path[0] <> nParent.Text then
begin
writeln('First key doesn''t match. First key should always match');
exit(false);
end;
for i := 0 to length(Path) - 2 do
begin
if Path[i] = '' then
begin
writeln('Invalid Key Path / Name');
exit(false);
end;
NewPath := NewPath + Path[i] + '/';
N := WalkToNode(NewPath);
if (N = nil) and (not CreatePath) then
begin
writeln('(N = nil) and (not CreatePath)');
exit(false);
end;
if (N = nil) and CreatePath then
begin
newN := TTreeNode.Create(Nodes);
newN.Text := Path[i];
if (nParent = nil) then
begin
writeln('This shouldn''t happen...');
newN.MoveTo(Nodes.GetFirstNode, naAddChild);
nParent := newN;
end
else
begin
newN.MoveTo(nParent, naAddChild);
nParent := newN;
end;
end;
if N <> nil then
nParent := N;
end;
if nParent = nil then
exit(false);
newN := TTreeNode.Create(Nodes);
newN.Text := Path[High(Path)];
newN.MoveTo(nParent, naAddChild);
end;
procedure TMMLSettings.SetKeyValue(KeyName: String; KeyValue: String);
var
N, NN: TTreeNode;
begin
if not KeyExists(KeyName) then
Exit;
if not IsKey(KeyName) then
Exit;
N := WalkToNode(KeyName);
if not N.HasChildren then
begin
NN := TTreeNode.Create(Nodes);
NN.Text := 'Value';
NN.MoveTo(N, naAddChild);
end;
if n <> nil then
N := N.GetFirstChild;
while N <> nil do
begin
if N.Text = 'Value' then
begin
if Assigned(N.Data) then
TSettingData(N.Data).Free;
N.Data := TSettingData.Create;
TSettingData(N.Data).Val := KeyValue;
end;
N := N.GetNextSibling;
end;
end;
procedure TMMLSettings.LoadFromXML(fileName: String);
var
Doc: TXMLDocument;
begin
ReadXMLFile(Doc, fileName);
InternalLoadFromXML(Doc);
Doc.Free;
end;
procedure TMMLSettings.WriteXMLData(n: TTreeNode;
XMLNode: TDOMNode; XMLDoc: TXMLDocument;
var XMLChild: TDOMNode; var C: Integer);
var
DDataNode, DataNode: TDOMNode;
begin
if n.Text = 'Value' then
begin
XMLChild := XMLDoc.CreateTextNode(TSettingData(N.Data).Val);
end else
begin
XMLChild := XMLDoc.CreateElement(n.Text);
end;
Inc(C);
XMLNode.AppendChild(XMLChild);
end;
procedure TMMLSettings.WalkTree(Node: TTreeNode; XMLNode: TDOMNode; XMLDoc: TXMLDocument;
var C: Integer);
var
N: TTreeNode;
XMLChild: TDOMNode;
begin
N := Node.GetFirstChild;
while assigned(n) do
begin
WriteXMLData(n, XMLNode, XMLDoc, XMLChild, C);
WalkTree(n, XMLChild, XMLDoc, C);
n := n.GetNextSibling;
end;
end;
procedure TMMLSettings.SaveToXML(fileName: String);
var
XMLDoc: TXMLDocument;
RootNode: TDOMNode;
C: Integer;
begin
XMLDoc := TXMLDocument.Create;
RootNode := XMLDoc.CreateElement('Settings');
XMLDoc.AppendChild(RootNode);
RootNode := XMLDoc.DocumentElement;
C := 0;
if Nodes.GetFirstNode <> nil then
WalkTree(Nodes.GetFirstNode, RootNode, XMLDoc, C);
WriteXMLFile(XMLDoc, fileName);
XMLDoc.Free;
end;
end.

View File

@ -1,46 +0,0 @@
object Form1: TForm1
Left = 264
Height = 467
Top = 183
Width = 734
ActiveControl = TreeView1
Caption = 'Form1'
ClientHeight = 467
ClientWidth = 734
LCLVersion = '0.9.29'
object TreeView1: TTreeView
Left = 16
Height = 376
Top = 24
Width = 344
DefaultItemHeight = 19
TabOrder = 0
end
object SaveButton: TButton
Left = 272
Height = 25
Top = 432
Width = 88
Caption = 'SaveButton'
OnClick = SaveButtonClick
TabOrder = 1
end
object LoadButton: TButton
Left = 16
Height = 25
Top = 432
Width = 91
Caption = 'LoadButton'
OnClick = LoadButtonClick
TabOrder = 2
end
object ListView1: TListView
Left = 376
Height = 376
Top = 24
Width = 336
Columns = <>
ItemIndex = -1
TabOrder = 3
end
end

View File

@ -1,94 +0,0 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ComCtrls, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
ListView1: TListView;
SaveButton: TButton;
LoadButton: TButton;
TreeView1: TTreeView;
procedure SaveButtonClick(Sender: TObject);
procedure LoadButtonClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
uses
settings;
{ TForm1 }
procedure TForm1.SaveButtonClick(Sender: TObject);
var
sett: TMMLSettings;
s: TStringArray;
i: Integer;
begin
sett := TMMLSettings.Create(TreeView1.Items);
sett.CreateKey('Settings/FullScreen/wat', true);
sett.SetKeyValue('Settings/FullScreen/wat', 'TRUE');
writeln(sett.GetKeyValue('Settings/FullScreen/wat'));
writeln(sett.GetSetDefaultKeyValue('Settings/FullScreen/wat2', 'OWAT'));
writeln(sett.GetSetDefaultKeyValue('Settings/Component1/hoiii', 'NO U'));
writeln(sett.GetSetDefaultKeyValue('Settings/Component2/hoi', 'OK'));
s := sett.ListKeys('Settings/FullScreen');
for i := 0 to high(s) do
writeln(s[i]);
{ ss:='Settings' + '/' + s[0];
while length(s) > 0 do
begin
s := sett.ListKeys(ss);
if(length(s)>0) then
ss:=ss +'/' + s[0];
end; }
sett.SaveToXML('settings.xml');
sett.Free;
//SaveToXML('settings.xml');
end;
procedure TForm1.LoadButtonClick(Sender: TObject);
var
s: TMMLSettings;
begin
if not FileExists('settings.xml') then
begin
TreeView1.Items.Clear;
s := TMMLSettings.Create(TreeView1.Items);
s.SaveToXML('settings.xml');
s.Free;
end;
TreeView1.Items.Clear;
s := TMMLSettings.Create(TreeView1.Items);
s.LoadFromXML('settings.xml');
end;
initialization
{$I unit1.lrs}
end.