unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,unit1,unit3, sSkinManager, ComCtrls, ExtCtrls,jpeg, acImage;

type
  TForm2 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Label1: TLabel;
    ComboBox1: TComboBox;
    Button4: TButton;
    sSkinManager1: TsSkinManager;
    Label2: TLabel;
    TrackBar1: TTrackBar;
    Image1: TImage;
    Button5: TButton;
    Label3: TLabel;
    Panel1: TPanel;
    Image2: TImage;
    Panel2: TPanel;
    Image4: TImage;
    Panel3: TPanel;
    Image3: TImage;
    procedure Button3Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure TrackBar1Change(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure Image2Click(Sender: TObject);
    procedure Image4Click(Sender: TObject);
    procedure Image3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;
  f7,f8:textfile;
  s:string;
implementation

uses Unit4;

{$R *.dfm}

procedure TForm2.Button3Click(Sender: TObject);
begin
close;
end;

procedure TForm2.Button1Click(Sender: TObject);
begin
try
form1.ShowModal;
except
on e:exception do;
end;
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
try
form3.ShowModal;
except
on e:exception do;
end;
end;

procedure TForm2.FormCreate(Sender: TObject);
var
i:integer;
begin
unit1.lang:='ua';
unit3.lang:='ua';
unit4.lang:='ua';
image1.Picture.LoadFromFile('Geo2.png');
for i:=0 to sskinmanager1.InternalSkins.Count-1 do
combobox1.Items.Add(sskinmanager1.InternalSkins.Items[i].Name);
assignfile(f7,'SData.txt');
reset(f7);
readln(f7,s);
sskinmanager1.skinname:=s;
closefile(f7);

{assignfile(f8,'AData.txt');
reset(f8);
readln(f8,s);
closefile(f8);
form1.AlphaBlend:=true;
form3.AlphaBlend:=true;
form1.AlphaBlendValue:=strtoint(s);
form2.AlphaBlendValue:=form1.AlphaBlendValue;
form3.AlphaBlendValue:=form1.AlphaBlendValue; }
end;

procedure TForm2.Button4Click(Sender: TObject);
begin
assignfile(f7,'SData.txt');
rewrite(f7);
s:=combobox1.Items[combobox1.ItemIndex];
writeln(f7,s);
sskinmanager1.skinname:=s;
closefile(f7);
end;

procedure TForm2.TrackBar1Change(Sender: TObject);
begin
assignfile(f8,'AData.txt');
rewrite(f8);
form1.AlphaBlend:=true;
form3.AlphaBlend:=true;
form1.AlphaBlendValue:=255-100+trackbar1.Position;
form2.AlphaBlendValue:=form1.AlphaBlendValue;
form3.AlphaBlendValue:=form1.AlphaBlendValue;

writeln(f8,form1.AlphaBlendValue);
closefile(f8);
end;

procedure TForm2.Button5Click(Sender: TObject);
begin
try
form4.ShowModal;
except
on e:exception do;
end;
end;

procedure TForm2.Image2Click(Sender: TObject);
begin
unit1.lang:='ua';
unit3.lang:='ua';
unit4.lang:='ua';
button1.Caption:='Тести';
button2.Caption:='Задача1';
button5.Caption:='Задача2';
button3.Caption:='Закрити';
label3.Caption:='МОВА';
label1.Caption:='Тема';
label2.Caption:='Прозорість';
end;

procedure TForm2.Image4Click(Sender: TObject);
begin
unit1.lang:='en';
unit3.lang:='en';
unit4.lang:='en';
button1.Caption:='Tests';
button2.Caption:='Lesson1';
button5.Caption:='Lesson2';
button3.Caption:='Close';
label3.Caption:='LANGUAGE';
label1.Caption:='Theme';
label2.Caption:='Transparency';
end;

procedure TForm2.Image3Click(Sender: TObject);
begin
unit1.lang:='ru';
unit3.lang:='ru';
unit4.lang:='ru';
button1.Caption:='Тесты';
button2.Caption:='Задача1';
button5.Caption:='Задача2';
button3.Caption:='Закрыть';
label3.Caption:='ЯЗЫК';
label1.Caption:='Тема';
label2.Caption:='Прозрачность';
end;

end.
