del delphi

Skelbti atsakymą
Žinutė
Autorius
Vartotojo avataras
alach
naujokas
naujokas
Pranešimai: 14
Užsiregistravo: 2006 11 14 20:14
Miestas: vilnius

del delphi

#1 Standartinė alach » 2007 04 29 10:48

del delphi noriu paklaust ka blogai padariau?

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, ExtCtrls, StdCtrls;


type

stud=record
Vardas:string[15];
Pavarde:string[20];
Gimimodata:integer;
Slaptazodis:string[10];
Kurstudijuoji:string;
end;
masyvas = array [1..30] of stud;
TForm1 = class(TForm)
MainMenu1: TMainMenu;
valdymas1: TMenuItem;
Skolos1: TMenuItem;
Informacijaapiestudent1: TMenuItem;
Ijungtiprogram1: TMenuItem;
Prisijungti1: TMenuItem;
Atsijungti1: TMenuItem;
Registracija1: TMenuItem;
Panel1: TPanel;
Label1: TLabel;
ListBox1: TListBox;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Panel2: TPanel;
Label5: TLabel;
Button2: TButton;
ListBox2: TListBox;
Edit3: TEdit;
Edit4: TEdit;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Edit5: TEdit;
Label9: TLabel;
Edit6: TEdit;
Label10: TLabel;
Edit7: TEdit;
Label11: TLabel;
Label12: TLabel;
Edit8: TEdit;
Panel3: TPanel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Panel4: TPanel;
Label17: TLabel;
Panel5: TPanel;
Button3: TButton;
Label18: TLabel;
Label19: TLabel;
Button4: TButton;
Panel6: TPanel;
Label20: TLabel;
Label21: TLabel;
Button5: TButton;
Button6: TButton;
Panel7: TPanel;
procedure Prisijungti1Click(Sender: TObject);
procedure Registracija1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Informacijaapiestudent1Click(Sender: TObject);
procedure Skolos1Click(Sender: TObject);
procedure Atsijungti1Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Ijungtiprogram1Click(Sender: TObject);
procedure Panel2Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
st:masyvas; s:stud; n:integer;
F: File of stud;
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Prisijungti1Click(Sender: TObject);
begin
panel1.Visible:=true;
panel2.Visible:=false;
panel3.Visible:=false;
panel4.Visible:=false;
panel5.Visible:=false;
panel6.Visible:=false;
panel7.Visible:=false;



end;

procedure TForm1.Registracija1Click(Sender: TObject);
begin
panel1.Visible:=false;
panel2.Visible:=true;
panel3.Visible:=false;
panel4.Visible:=false;
panel5.Visible:=false;
panel6.Visible:=false;
panel7.Visible:=false;
end;

procedure TForm1.Button1Click(Sender: TObject);
var x,y,z:string;
begin
z:=edit1.Text;
y:=edit2.Text;
x:=edit7.Text;
if x='12345'
then begin
Prisijungti1.Enabled:=false;
Registracija1.Enabled:=false;
Atsijungti1.Enabled:=true;
Informacijaapiestudent1.Enabled:=true;
Skolos1.Enabled:=true;
Ijungtiprogram1.Enabled:=false;
panel7.Visible:=false;
panel1.Visible:=false; end
else panel7.Visible:=true;
if y='ignat'
then begin
Prisijungti1.Enabled:=false;
Registracija1.Enabled:=false;
Atsijungti1.Enabled:=true;
Informacijaapiestudent1.Enabled:=true;
Skolos1.Enabled:=true;
Ijungtiprogram1.Enabled:=false;
panel7.Visible:=false;
panel1.Visible:=false; end
else panel7.Visible:=true;
if z='lukas'
then begin
Prisijungti1.Enabled:=false;
Registracija1.Enabled:=false;
Atsijungti1.Enabled:=true;
Informacijaapiestudent1.Enabled:=true;
Skolos1.Enabled:=true;
Ijungtiprogram1.Enabled:=false;
panel7.Visible:=false;
panel1.Visible:=false; end
else panel7.Visible:=true;

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Prisijungti1.Enabled:=true;
Registracija1.Enabled:=true;
Atsijungti1.Enabled:=false;
Informacijaapiestudent1.Enabled:=false;
Skolos1.Enabled:=false;
Ijungtiprogram1.Enabled:=true;

panel1.Visible:=false;
panel2.Visible:=false;
panel3.Visible:=false;
panel4.Visible:=false;
panel5.Visible:=false;
panel6.Visible:=false;
panel7.Visible:=false;
end;

procedure TForm1.Informacijaapiestudent1Click(Sender: TObject);

begin
panel1.Visible:=false;
panel2.Visible:=false;
panel3.Visible:=true;
panel4.Visible:=false;
panel5.Visible:=false;
panel6.Visible:=false;
panel7.Visible:=false;
end;

procedure TForm1.Skolos1Click(Sender: TObject);
begin
panel1.Visible:=false;
panel2.Visible:=false;
panel3.Visible:=false;
panel4.Visible:=true;
panel5.Visible:=false;
panel6.Visible:=false;
panel7.Visible:=false;
end;

procedure TForm1.Atsijungti1Click(Sender: TObject);
begin
panel1.Visible:=false;
panel2.Visible:=false;
panel3.Visible:=false;
panel4.Visible:=false;
panel5.Visible:=false;
panel6.Visible:=true;
panel7.Visible:=false;
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
Atsijungti1.Enabled:=false;
Informacijaapiestudent1.Enabled:=false;
Skolos1.Enabled:=false;
Ijungtiprogram1.Enabled:=true;

panel1.Visible:=true;
panel2.Visible:=false;
panel3.Visible:=false;
panel4.Visible:=false;
panel5.Visible:=false;
panel6.Visible:=false;

end;

procedure TForm1.Ijungtiprogram1Click(Sender: TObject);
begin
Form1.Close;
end;



procedure TForm1.Panel2Click(Sender: TObject);

begin


Assignfile (F,'reg.std');
Rewrite (F);
Write (F, s);
Closefile (F);
ShowMessage ('Irasyta');
end;


procedure TForm1.Button2Click(Sender: TObject);
var e,m: string; i,j: integer;
begin
s.Vardas:=edit4.Text;
s.Pavarde:=edit3.Text;
s.Gimimodata:=edit5.integer;
s.Slaptazodis:=edit8.text
s.Kurstudijuoji:=listbox2.text;
end;

end.

ir va kokiu erorus ismeta

[Error] Unit1.pas(88): Type 'stud' needs finalization - not allowed in file type
[Error] Unit1.pas(258): Undeclared identifier: 'TCaption'
[Error] Unit1.pas(260): Missing operator or semicolon
[Error] Unit1.pas(260): Undeclared identifier: 'text'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'



:roll:

Skelbti atsakymą

Grįžti į

Dabar prisijungę

Vartotojai naršantys šį forumą: 1 ir 0 svečias(ių)