unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, Buttons, Grids, ComCtrls, Menus, Unit2;
type
TForm1 =
class(TForm)
Label1: TLabel;
Image1: TImage;
Image2: TImage;
StringGrid1: TStringGrid;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
MainMenu1: TMainMenu;
Datei: TMenuItem;
Neu1: TMenuItem;
SpeichernUnter1: TMenuItem;
Speicher1: TMenuItem;
N1: TMenuItem;
Hilfe1: TMenuItem;
Sortrieren1: TMenuItem;
Kurzhilfe1: TMenuItem;
Titel1: TMenuItem;
Bildqualitt1: TMenuItem;
Humor1: TMenuItem;
Action1: TMenuItem;
Spannung1: TMenuItem;
Medium1: TMenuItem;
AnzahlDatentrger1: TMenuItem;
N2: TMenuItem;
ArchivSchlieen1: TMenuItem;
ProgrammBeenden1: TMenuItem;
Ansicht: TMenuItem;
Archiv1: TMenuItem;
BearbeitDingBlatt1: TMenuItem;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ProgrammBeenden1Click(Sender: TObject);
procedure Archiv1Click(Sender: TObject);
procedure BearbeitDingBlatt1Click(Sender: TObject);
procedure ArchivSchlieen1Click(Sender: TObject);
procedure Neu1Click(Sender: TObject);
procedure N1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
Type TDatei =
File Of TFilm;
{$R *.DFM}
Var Movie:TDatei;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Form1.close;
Form2.close;
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
Form1.Hide;
Form2.Show;
end;
procedure TForm1.FormCreate(Sender: TObject);
Begin
With Stringgrid1
Do
Begin
cells[0,0]:='
Filmtitel';
cells[1,0]:='
Bildqualität (1-10)';
cells[2,0]:='
Humor (1-5)';
cells[3,0]:='
Spannung (1-5)';
cells[4,0]:='
Action (1-5)';
cells[5,0]:='
Medium';
cells[6,0]:='
Anzahl Datenträger';
End;
Assignfile(Movie,'
Movie.fur');
If fileexists('
Movie.fur')
Then
begin
reset(Movie);
end
else
Begin
rewrite(Movie);
Stringgrid1.rowcount:=filesize(Movie)+1;
End;
end;
procedure TForm1.ProgrammBeenden1Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Archiv1Click(Sender: TObject);
begin
Form1.Show;
Form2.Hide;
end;
procedure TForm1.BearbeitDingBlatt1Click(Sender: TObject);
begin
Form1.hide;
Form2.show;
end;
procedure TForm1.ArchivSchlieen1Click(Sender: TObject);
begin
CloseFile(Movie);
end;
procedure TForm1.Neu1Click(Sender: TObject);
begin
rewrite(Movie);
end;
procedure TForm1.N1Click(Sender: TObject);
begin
reset(Movie);
end;
end.