unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DB, ADODB, ExtCtrls, sPanel, sSkinManager;

type
  TForm1 = class(TForm)
    Button1: TButton;
    ADOTable3: TADOTable;
    ADOTable3FIO: TWideStringField;
    ADOTable3Spec: TWideStringField;
    ADOTable3Kurs: TSmallintField;
    ADOTable3Prav: TSmallintField;
    ADOTable3NePrav: TSmallintField;
    ADOTable3Ocenka: TSmallintField;
    ADOTable3Data: TDateTimeField;
    DataSource1: TDataSource;
    ADOTable1: TADOTable;
    ADOTable1CompanyID: TIntegerField;
    ADOTable1ParentID: TIntegerField;
    ADOTable1Name: TWideStringField;
    ADOTable1Track: TWideStringField;
    DataSource2: TDataSource;
    ADOTable2: TADOTable;
    ADOTable2CompanyID: TIntegerField;
    ADOTable2ParentID: TIntegerField;
    ADOTable2Name: TWideStringField;
    ADOTable2Track: TWideStringField;
    ADOConnection1: TADOConnection;
    Memo1: TMemo;
    Button2: TButton;
    sPanel1: TsPanel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    sSkinManager1: TsSkinManager;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure FormResize(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  f:TextFile;
  s:String;
implementation

uses Unit3;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Form3.Show;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin

ADOConnection1.Connected:=False;
ADOConnection1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Учебник\Data\Base.mdb;Persist Security Info=False';
ADOConnection1.Connected:=True;
ADOTable1.Active:=True;
ADOTable2.Active:=True;
ADOTable3.Active:=True;

sSkinManager1.SkinDirectory:=ExtractFilePath(Application.ExeName)+'\'; {тоесть скин должен лежать в корневой директории, и тд}
sSkinManager1.Active:=true;
end;

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

procedure TForm1.FormActivate(Sender: TObject);
begin
 Memo1.Lines.LoadFromFile('C:\Учебник\Users.log');
AssignFile(f,'C:\Учебник\Users.log');reset(f);
 Readln(f,s);// прочитать из файла строку
Label1.Caption:=s;// принимает знаечение первой строки текстового файла
Readln(f,s);
Label2.Caption:=s;
Readln(f,s);
Label3.Caption:=s;
Readln(f,s);
end;

procedure TForm1.FormResize(Sender: TObject);
begin
Height:=223;
Width:=233;
end;

end.
