summaryrefslogtreecommitdiff
path: root/unit4.pas
diff options
context:
space:
mode:
Diffstat (limited to 'unit4.pas')
-rw-r--r--unit4.pas101
1 files changed, 101 insertions, 0 deletions
diff --git a/unit4.pas b/unit4.pas
new file mode 100644
index 0000000..8d11c99
--- /dev/null
+++ b/unit4.pas
@@ -0,0 +1,101 @@
+unit Unit4;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes,SysUtils,FileUtil,Forms,Controls,Graphics,Dialogs,StdCtrls,unit2;
+
+type
+
+ { TForm3 }
+
+ TForm3 = class(TForm)
+ ListBox1: TListBox;
+ ListBox2: TListBox;
+ ListBox3: TListBox;
+ Memo1: TMemo;
+ procedure FormDestroy(Sender: TObject);
+ procedure FormResize(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure ListBox1Click(Sender: TObject);
+ procedure Memo1Change(Sender: TObject);
+ private
+ { private declarations }
+ public
+ { public declarations }
+ loesung: tLoesung;
+ tmpInhalt: array of tStringList;
+ end;
+
+var
+ Form3: TForm3;
+
+implementation
+
+{$R *.lfm}
+
+{ TForm3 }
+
+procedure TForm3.FormResize(Sender: TObject);
+begin
+ listBox1.height:=form3.clientHeight-listBox1.top;
+ listBox1.width:=(form3.clientWidth-listBox1.left-12) div 4;
+ listBox2.height:=form3.clientHeight-listBox2.top;
+ listBox2.left:=listBox1.left+listBox1.width+4;
+ listBox2.width:=(form3.clientWidth-listBox2.left-8) div 3;
+ memo1.height:=form3.clientHeight-memo1.top;
+ memo1.left:=listBox2.left+listBox2.width+4;
+ memo1.width:=(form3.clientWidth-memo1.left-4) div 2;
+ listBox3.height:=form3.clientHeight-listBox3.top;
+ listBox3.left:=memo1.left+memo1.width+4;
+ listBox3.width:=form3.clientWidth-listBox3.left;
+end;
+
+procedure TForm3.FormDestroy(Sender: TObject);
+var
+ i: longint;
+begin
+ loesung.free;
+ for i:=0 to length(tmpInhalt)-1 do
+ tmpInhalt[i].free;
+ setlength(tmpInhalt,0);
+end;
+
+procedure TForm3.FormShow(Sender: TObject);
+var
+ i: longint;
+begin
+ loesung.filterUebersicht(listBox1.items);
+ for i:=0 to length(tmpInhalt)-1 do
+ tmpInhalt[i].free;
+ setlength(tmpInhalt,listBox1.items.count);
+ for i:=0 to length(tmpInhalt)-1 do
+ tmpInhalt[i]:=nil;
+ listBox2.items.clear;
+ listBox3.items.clear;
+ memo1.lines.clear;
+end;
+
+procedure TForm3.ListBox1Click(Sender: TObject);
+begin
+ if (listBox1.itemIndex>=0) and
+ (listBox1.itemIndex<length(loesung.filter)) then begin
+ loesung.filter[listBox1.itemIndex].sortenreinAnzeigen(listBox3.items,listBox2.items);
+ if tmpInhalt[listBox1.itemIndex]=nil then begin
+ tmpInhalt[listBox1.itemIndex]:=tStringList.create;
+ tmpInhalt[listBox1.itemIndex].text:=listBox2.items.text;
+ end;
+ memo1.lines.text:=tmpInhalt[listBox1.itemIndex].text;
+ end;
+end;
+
+procedure TForm3.Memo1Change(Sender: TObject);
+begin
+ tmpInhalt[listBox1.itemIndex].text:=memo1.lines.text;
+ loesung.filter[listBox1.itemIndex].findeRsZuAnderenCs(memo1.lines,listBox3.items);
+end;
+
+end.
+