witam
erorki
Build
[Error] Unit2.pas(40): Undeclared identifier: 'GetP' / z tym mam problem
[Error] Unit2.pas(46): Undeclared identifier: 'getp' / no wlasnie
[Error] Unit2.pas(70): Undeclared identifier: 'getp' / ?
[Error] Unit2.pas(84): ';' not allowed before 'ELSE' / z tym tez nie daje rady zmarze ; i mam inny erorek
[Error] Unit2.pas(88): ';' expected but '.' found /to to pikus (chyba )
[Error] Unit2.pas(90): Declaration expected but end of file found /?
[Fatal Error] Unit1.pas(28): Could not compile used unit 'Unit2.pas /? mam nadzieje ze samo sie rozwiarze'
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, INIFiles, ShlObj;
type
TForm2 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Edit3: TEdit;
Button2: TButton;
Edit4: TEdit;
Edit5: TEdit;
ListBox1: TListBox;
procedure ListBox1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
INI: TINIFile;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm2.ListBox1Click(Sender: TObject);
begin
INI := TINIFile.Create(GetP(CSIDL_STARTUP) +'profiletk3.ini');
Edit1.Text:= INI.ReadString(ListBox1.Items[ListBox1.ItemIndex], 'login','błąd w budowie pliku ini');
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
INI := TINIFile.Create(getp(CSIDL_PERSONAL)+'profiletk3.ini');
try
INI.ReadSections(ListBox1.Items);
finally
INI.Free;
end;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
if
Edit2.Text = INI.ReadString(Edit1.Text, 'haslo','')
then
begin
Form1.Label3.Caption:= Edit1.Text;
Form2.Close;
Form1.Visible:= True
end
else
Application.Terminate;
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
INI := TINIFile.Create(getp(CSIDL_PERSONAL)+'profiletk3.ini');
if
Edit4.Text=Edit5.Text
then
begin
INI.WriteString(Edit3.Text, 'login',Edit3.Text);
INI.WriteString(Edit3.Text, 'haslo',Edit4.Text);
INI := TINIFile.Create(getp(CSIDL_PERSONAL)+'profiletk3.ini');
INI.ReadSections(ListBox1.Items);
INI.Free;
Edit3.Text:='';
Edit4.Text:='';
Edit5.Text:='';
else
Application.MessageBox('Hasła są różne od siebie.','Profile Demo', MB_OK+MB_ICONERROR);
end;
end.
z gory dziekuje za pomoc!