unit Hauptformular;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Menus, StdActns, ActnList;
type
TForm1 =
class(TForm)
MainMenu1: TMainMenu;
Datei1: TMenuItem;
ffnen1: TMenuItem;
ffnen2: TMenuItem;
N1: TMenuItem;
Beenden1: TMenuItem;
Memo1: TMemo;
OpenDialog1: TOpenDialog;
ActionList1: TActionList;
EditPaste1: TEditPaste;
EditSelectAll1: TEditSelectAll;
Einfgen1: TMenuItem;
Edit1: TEdit;
Button1: TButton;
Memo2: TMemo;
Button2: TButton;
procedure ffnen2Click(Sender: TObject);
procedure ffnen1Click(Sender: TObject);
procedure Beenden1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
i: integer;
implementation
{$R *.dfm}
procedure TForm1.ffnen2Click(Sender: TObject);
begin
opendialog1.Execute;
memo1.Lines.LoadFromFile(opendialog1.FileName);
end;
procedure TForm1.ffnen1Click(Sender: TObject);
begin
memo1.Lines.SaveToFile(opendialog1.FileName);
end;
procedure TForm1.Beenden1Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.Clear;
memo1.Clear;
Edit1.PasteFromClipboard;
memo1.PasteFromClipboard;
end;
procedure TForm1.Button2Click(Sender: TObject);
var i: integer;
begin
Memo2.Clear;
for i := 0
to Memo1.Lines.Count - 1
do
begin
if Pos('
Ihre Artikelnummer: ', Memo1.Lines.Strings[i]) > 0
then
Memo2.Lines.Add(Memo1.Lines.Strings[i]);
end;
for i := 0
to Memo1.Lines.Count - 1
do
begin
if Pos('
Artikel: ', Memo1.Lines.Strings[i]) > 0
then
Memo2.Lines.Add(Memo1.Lines.Strings[i]);
end;
for i := 0
to Memo1.Lines.Count - 1
do
begin
if Pos('
Farbe: ', Memo1.Lines.Strings[i]) > 0
then
Memo2.Lines.Add(Memo1.Lines.Strings[i]);
end;
for i := 0
to Memo1.Lines.Count - 1
do
begin
if Pos('
Preis: ', Memo1.Lines.Strings[i]) > 0
then
Memo2.Lines.Add(Memo1.Lines.Strings[i]);
end;
for i := 0
to Memo1.Lines.Count - 1
do
begin
if Pos('
Hersteller: ', Memo1.Lines.Strings[i]) > 0
then
Memo2.Lines.Add(Memo1.Lines.Strings[i]);
end;
for i := 0
to Memo1.Lines.Count - 1
do
begin
if Pos('
Preisgültigkeit: ', Memo1.Lines.Strings[i]) > 0
then
Memo2.Lines.Add(Memo1.Lines.Strings[i]);
end;
end;
end.