unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, jpeg, ExtCtrls, ComCtrls, Buttons, OleCtrls, SHDocVw, ImgList,
StdCtrls, Spin;
type
TForm2 = class(TForm)
Notebook1: TNotebook;
Panel1: TPanel;
Image1: TImage;
b_1: TImage;
Image2: TImage;
Panel2: TPanel;
TreeView1: TTreeView;
Panel3: TPanel;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
Splitter1: TSplitter;
WebBrowser1: TWebBrowser;
ImageList1: TImageList;
b_2: TImage;
Surak: TLabel;
variant1: TLabel;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
variant2: TLabel;
variant3: TLabel;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
variant4: TLabel;
RadioButton5: TRadioButton;
variant5: TLabel;
Status: TStaticText;
BitBtn7: TBitBtn;
BitBtn1: TBitBtn;
ScrollBox1: TScrollBox;
Label8: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
SurakMemo: TMemo;
Memo1: TMemo;
Memo2: TMemo;
Memo3: TMemo;
Memo4: TMemo;
Memo5: TMemo;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
SpinEdit1: TSpinEdit;
SpinEdit2: TSpinEdit;
ComboBox1: TComboBox;
Timer1: TTimer;
StaticText5: TStaticText;
Labelresult: TLabel;
BitBtn8: TBitBtn;
StaticText6: TStaticText;
b_3: TImage;
Panel7: TPanel;
LabeledEdit5: TLabeledEdit;
BitBtn5: TBitBtn;
BitBtn6: TBitBtn;
b_4: TImage;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure FormResize(Sender: TObject);
procedure b_1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure b_1Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure TreeView1Click(Sender: TObject);
procedure b_2Click(Sender: TObject);
procedure BitBtn7Click(Sender: TObject);
procedure variant1Click(Sender: TObject);
procedure BitBtn8Click(Sender: TObject);
procedure BitBtn5Click(Sender: TObject);
procedure BitBtn6Click(Sender: TObject);
procedure b_3Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure b_4Click(Sender: TObject);
private
{ Private declarations }
procedure RefreshMemo(Sender:TObject);
procedure RefreshFileFur(Sender:TObject);
procedure Action1Execute(Sender: TObject);
procedure StClickExecute(Sender: TObject);
public
{ Public declarations }
end;
type
dannie=record // Òåñò³í ÁÊ
ati:shortstring;
procent:string[4];
BarSurSani:word;
Djauap:word;
KalUak:word;
end;
usr=record
ati:ShortString;
password:ShortString;//îíûí ïàðîë³
end;
SurFile=record
N:Integer;
sur:String[255];
j,j1,j2,j3,j4:string[255];
end;
surak=record
sur:string;
no,yes:array[1..7]of string;
end;
surakType=(tizim,caykes,onevariant);
const FileName='\test\data.dat';
var
Form2: TForm2;
bt_name_on,cdir:ShortString;
xWidth,xHeigth:Integer;
FileSur:array[1..500]of SurFile;
AgimdiElement:integer;
ST:surakType;
shoblon:surak;
f,f1:text;
s:string;
psk,ochered:array[1..200]of word;
katarsani,p,brl,uak:word;
Tizim_jauap,suraksani,bal,no_otv,ver,jauap:word;
m:array[1..7]of word;
n:Longint;
implementation
uses unit1;
{$R *.dfm}
procedure TForm2.RefreshMemo(Sender:TObject);
begin
Label8.Caption:='Ñóðàê '+IntToStr(filesur[AgimdiElement].N);
SurakMemo.Lines.Text:=filesur[AgimdiElement].sur;
Memo1.Lines.Text:=filesur[AgimdiElement].j;
Memo2.Lines.Text:=filesur[AgimdiElement].j1;
Memo3.Lines.Text:=filesur[AgimdiElement].j2;
Memo4.Lines.Text:=filesur[AgimdiElement].j3;
Memo5.Lines.Text:=filesur[AgimdiElement].j4;
end;
procedure TForm2.RefreshFileFur(Sender:TObject);
begin
FileSur[AgimdiElement].sur:=SurakMemo.Lines.Text;
FileSur[AgimdiElement].j:=Memo1.Lines.Text;
FileSur[AgimdiElement].j1:=Memo2.Lines.Text;
FileSur[AgimdiElement].j2:=Memo3.Lines.Text;
FileSur[AgimdiElement].j3:=Memo4.Lines.Text;
FileSur[AgimdiElement].j4:=Memo5.Lines.Text;
end;
procedure init;
label 1;
var o,i,j:word;
begin
suraksani:=0;
katarsani:=0;
for i:=1 to 200 do
begin
psk[i]:=0;ochered[i]:=0;
end;
if not(FileExists(cdir+FileName))then
begin
showmessage('Òåñòîâûé ôàéë íå íàéäåí '+'"'+FileName+'"');
Halt;
end;
assignfile(f,cdir+FileName);reset(f);
katarsani:=3;
suraksani:=0;
readln(f,s);
readln(f,s);brl:=strtoint(s);
readln(f,s);uak:=strtoint(s);
while not(eof(f))do
begin
readln(f,s);
katarsani:=katarsani+1;
if s[1]='!'then
begin
suraksani:=suraksani+1;
ochered[suraksani]:=katarsani;
end;
end;
closefile(f);
Randomize;
repeat
for i:=1 to suraksani do
for j:=1 to suraksani do
1: if (psk[i]=psk[j])and(i<>j)or(psk[i]=0)then
begin
Application.ProcessMessages;
Randomize;
psk[i]:=random(suraksani)+1;
goto 1;
end;
j:=0;o:=0;
for i:=1 to suraksani do
begin
j:=j+psk[i];
o:=o+i;
end;
until j=o;
p:=1;
end;
procedure init_one_surak(surakN:word);
var q:word;
begin
assignFile(f,cdir+FileName);reset(f);
for q:=1 to ochered[surakN] do
readln(f,s);
if s='!'then
begin
ST:=onevariant;
readln(f,s);
shoblon.sur:=s;
readln(f,s);
shoblon.yes[1]:=s;
no_otv:=0;
while not(eof(f))do
begin
readln(f,s);
if s[1]='!'then break;
no_otv:=no_otv+1;
shoblon.no[no_otv]:=s;
end;
end;
closefile(f);
end;
procedure TForm2.Action1Execute(Sender: TObject);
begin
StClickExecute(Sender);
//Íèæíÿÿ ñòðîêà ñîñòîÿíèå è Ïåðåõîä íà ñëåäóþùèé âîïðîñ
Status.Caption:=' Æèíà¹àí áàëû»ûç: '+inttostr(bal)+'²àë¹àíû:'+inttostr(brl-p+1)+ ' ' + inttostr(uak)+' ìèíóò ºàëäû';
end;
procedure TForm2.StClickExecute(Sender: TObject);
var Dan:file of dannie;
Vd:dannie;
o,i,j:word;
m:array[1..7]of word;
procedure vn(ss,_s:TLabel;di:word;r:TRadioButton);
begin
ss.show;r.Show;
if (m[di]<=no_otv+1)and(m[di]>0) then
begin
ss.AutoSize:=false;
ss.Width:=xwidth-100;
Ss.Caption:=shoblon.no[m[di]];
ss.AutoSize:=true;
end
else begin ss.hide;r.Hide;end;
ss.Top:=_s.Top+_s.Height+20;
r.Top:=ss.Top;
end;
label 1,2;
var dan1:file of dannie;
vd1:dannie;
proc:real;
ocenka:word;
procS:string[4];
begin
if (p>brl)or(uak<=0) then
begin
Timer1.Enabled:=false;
proc:=(bal*100)/brl;
if proc<=47 then ocenka:=2;
if (proc>47)and(proc<=71)then ocenka:=3;
if (proc>71)and(proc<=88)then ocenka:=4;
if (proc>88)then ocenka:=5;
procS:=floattostr(proc);
// StaticText6.Caption:=ListBox1.Items.Strings[ListBox1.itemindex];
StaticText5.Caption:='Òåñò í¸òèæåñi';
Labelresult.Caption:='ѽðຠñàíû: '+inttostr(brl)+#$D#$A+
'Ľðûñ æàóàï ñàíû: '+inttostr(bal)+#$D#$A+
'Ïðîöåíò: '+procS+'%'+#$D#$A+
'Áà¹à: '+inttostr(ocenka);
Labelresult.Left:=round(xWidth/2)-round(Labelresult.Width/2);
Labelresult.Top:=round(xHeigth/2)-round(Labelresult.Height/2);
BitBtn8.Left:=round(xWidth/2)-round(BitBtn8.Width/2);
BitBtn8.Top:=Labelresult.Top+Labelresult.Height+30;
variant1.Hide;variant2.Hide;variant3.Hide;variant4.Hide;variant5.Hide;
RadioButton1.Hide;RadioButton2.Hide;RadioButton3.Hide;
RadioButton4.Hide;RadioButton5.Hide;
Notebook1.ActivePage:='natige';
// Vd.ati:=ListBox1.Items.Strings[ListBox1.itemindex];
vd.baga:=ocenka;
vd.procent:=procS;
Vd.BarSurSani:=brl;
Vd.Djauap:=bal;
Vd.KalUak:=uak;
// assignfile(dan,cdir+usr_file+'.rst');
AssignFile(dan1,'vr');rewrite(dan1);
// if fileexists(cdir+usr_file+'.rst') then
// reset(dan) else rewrite(dan);
// while not(eof(dan))do
// begin
// read(dan,vd1);
// write(dan1,vd1);
// end;
// write(dan1,vd);
// CloseFile(dan);CloseFile(dan1);
// Erase(dan);RenameFile('vr',cdir+usr_file+'.rst');
exit;
end;//Êîíåö Çàïèñü â ôàéë èíôîðìàöèè îá îöåíêàõ
init_one_surak(psk[p]);
p:=p+1;
Surak.AutoSize:=false;
Surak.Width:=xwidth-50;
Surak.Caption:=shoblon.sur;
Surak.AutoSize:=true;
if ST=onevariant then
begin
ver:=random(no_otv)+1;
m[ver]:=ver;
shoblon.no[no_otv+1]:=shoblon.no[ver];
shoblon.no[ver]:=shoblon.yes[1];
randomize;//
repeat
for i:=1 to no_otv+1 do
for j:=1 to no_otv+1 do
1: if (m[i]=m[j])and(i<>j)and(ver<>i)or(m[i]=0)or(m[i]>no_otv+1)then
begin
m[i]:=round(random(no_otv+1)+1);
goto 1;
end;
j:=0;o:=0;
for i:=1 to no_otv+1 do
begin
j:=j+m[i];
o:=o+i;
end;
until j=o;
Surak.AutoSize:=false;
Surak.Width:=xwidth-100;
Surak.Caption:=shoblon.sur;
Surak.AutoSize:=true;
vn(variant1,Surak,1,RadioButton1);
vn(variant2,variant1,2,RadioButton2);
vn(variant3,variant2,3,RadioButton3);
vn(variant4,variant3,4,RadioButton4);
vn(variant5,variant4,5,RadioButton5);
end else begin
variant1.Hide;variant2.Hide;variant3.Hide;variant4.Hide;variant5.Hide;
RadioButton1.Hide;RadioButton2.Hide;RadioButton3.Hide;
RadioButton4.Hide;RadioButton5.Hide;
end;
end;
procedure ClearExecute(Sender: TObject);
var ii:word;
begin
with shoblon do
begin
sur:='';
no_otv:=0;
for ii:=1 to 7 do
begin
no[ii]:='';
yes[ii]:='';
m[ii]:=0;
end;
end;
end;
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if Notebook1.ActivePage='Default' then halt(1)
else
begin
Action:=caNone;
ShowMessage('Íåãiçãi òåðåçåãå îòiíiç!');
end;
end;
procedure TForm2.FormCreate(Sender: TObject);
var tf:TextFile; fn:ShortString;i:integer;
begin
ComboBox1.Items:=Screen.Fonts;
xWidth:=Screen.WorkAreaWidth;
xHeigth:=Screen.WorkAreaHeight;
cdir:=ExtractFileDir(Application.ExeName);
WindowState:=wsMaximized;
Panel1.Top:=round(Height/2)-round(Panel1.Height/2);
Panel1.Left:=round(Width/2)-round(Panel1.Width/2);
TreeView1.LoadFromFile(cdir+'\teor\maz.txt');
AssignFile(tf,cdir+'\test\font.dat');
reset(tf);read(tf,fn);CloseFile(tf);
SurakMemo.Font.Name:=fn;
Memo1.Font.Name:=fn;
Memo2.Font.Name:=fn;
Memo3.Font.Name:=fn;
Memo4.Font.Name:=fn;
Memo5.Font.Name:=fn;
ComboBox1.Text:=fn;
i:=TreeView1.Items.Count;
repeat
try
dec(i);
TreeView1.Items.Item[i].Expand(true);
Except
end;
until i=0;
end;
procedure TForm2.FormResize(Sender: TObject);
begin
Panel1.Top:=round(Height/2)-round(Panel1.Height/2);
Panel1.Left:=round(Width/2)-round(Panel1.Width/2);
Panel7.Top:=round(Height/2)-round(Panel7.Height/2);
Panel7.Left:=round(Width/2)-round(Panel7.Width/2);
ScrollBox1.Top:=round(Height/2)-round(ScrollBox1.Height/2);
ScrollBox1.Left:=round(Width/2)-round(ScrollBox1.Width/2);
end;
procedure TForm2.b_1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure bt_move_off(var g:TImage);
begin
if (g.Tag=1)and((Sender as TImage).Name<>g.Name)then
begin
g.Tag:=0;
g.Picture.Graphic.LoadFromFile(cdir+'\main\'+g.Name+'.jpg');
end;
end;
begin
bt_move_off(b_1);
bt_move_off(b_2);
bt_move_off(b_3);
bt_move_off(b_4);
if (Sender as TImage).Tag=1 then exit;
(Sender as TImage).Tag:=1;
(Sender as TImage).Picture.Graphic.LoadFromFile(cdir+'\main\'+(Sender as TImage).Name+'_m.jpg');
bt_name_on:=(Sender as TImage).Name;
end;
procedure TForm2.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure bt_move_off(var g:TImage);
begin
if (g.Tag=1) then
begin
g.Tag:=0;
g.Picture.Graphic.LoadFromFile(cdir+'\main\'+g.Name+'.jpg');
end;
end;
begin
bt_move_off(b_1);
bt_move_off(b_2);
bt_move_off(b_3);
bt_move_off(b_4);
end;
procedure TForm2.b_1Click(Sender: TObject);
begin
WebBrowser1.Navigate(cdir+'\teor\t1.htm');
Notebook1.ActivePage:='oku';
end;
procedure TForm2.SpeedButton1Click(Sender: TObject);
begin
Notebook1.ActivePage:='default';
end;
procedure TForm2.SpeedButton2Click(Sender: TObject);
begin
try
WebBrowser1.ExecWB(OLECMDID_PRINT,1);
except;
end;
end;
procedure TForm2.TreeView1Click(Sender: TObject);
begin
if (TreeView1.Selected.AbsoluteIndex<>-1)then
if fileexists(cdir+'\teor\t'+inttostr(TreeView1.Selected.AbsoluteIndex)+'.htm')then
begin
WebBrowser1.Navigate(cdir+'\teor\t'+inttostr(TreeView1.Selected.AbsoluteIndex)+'.htm');
end;
end;
procedure TForm2.b_2Click(Sender: TObject);
var usrfile:file of usr;usrD:usr;pass_enable:Boolean;
tf:TextFile;fn:ShortString;
begin
AssignFile(tf,cdir+'\test\font.dat');
reset(tf);read(tf,fn);CloseFile(tf);
Surak.Font.Name:=fn;
variant1.Font.Name:=fn;variant2.Font.Name:=fn;
variant3.Font.Name:=fn;variant4.Font.Name:=fn;
variant5.Font.Name:=fn;
//Panel9.Caption:=
Timer1.Enabled:=true;
init;
// Timer2.Enabled:=true;
randomize;
bal:=0;
Action1Execute(Sender);
// Timer2.Enabled:=true;
Notebook1.ActivePage:='test';
end;
procedure TForm2.BitBtn7Click(Sender: TObject);
var cn:integer;belg:Boolean;
begin
belg:=false;
for cn:=1 to 5 do
if (FindComponent(Format('RadioButton%d',[cn]))as TRadioButton).Checked then belg:=true;
if not (belg) then exit;
if (RadioButton1.Checked)and(ver=1) then inc(bal);
if (RadioButton2.Checked)and(ver=2) then inc(bal);
if (RadioButton3.Checked)and(ver=3) then inc(bal);
if (RadioButton4.Checked)and(ver=4) then inc(bal);
if (RadioButton5.Checked)and(ver=5) then inc(bal);
for cn:=1 to 5 do
(FindComponent(Format('RadioButton%d',[cn]))as TRadioButton).Checked:=False;
ClearExecute(Sender);
Action1Execute(Sender);
end;
procedure TForm2.variant1Click(Sender: TObject);
var cn:integer;
begin
cn:=strtoint(copy((Sender as TLabel).Name,length(variant1.Name),1));
(FindComponent(Format('radiobutton%d',[cn]))as TRadioButton).Checked:=true;
BitBtn7Click(Sender);
end;
procedure TForm2.BitBtn8Click(Sender: TObject);
begin
Notebook1.ActivePage:='default';
end;
procedure TForm2.BitBtn5Click(Sender: TObject);
label 1;
var FSur:file of SurFile;i:Integer;
begin
AssignFile(F,cdir+'\test\data.dat');
if FileExists(cdir+'\test\data.dat') then
reset(F)
else exit;
readln(f,s);
if s<>LabeledEdit5.Text then
begin
CloseFile(f);
ShowMessage('êàòå ïàðîëü!');
LabeledEdit5.SetFocus;
LabeledEdit5.SelectAll;
Exit;
end;
CloseFile(f);
LabeledEdit5.Text:='';
AssignFile(F,cdir+'\test\data.dat');
if FileExists(cdir+'\test\data.dat') then
reset(F)
else exit;
readln(f,s);
Readln(f,s);SpinEdit2.Value:=StrToInt(s);
Readln(f,s);
SpinEdit1.Value:=strtoint(s);
i:=0;
while not eof(F)do
begin
Readln(f,s);// !
1:Inc(i);
FileSur[i].N:=i;
readln(F,FileSur[i].Sur);
if eof(f)then Break;
if FileSur[i].sur='!' then begin FileSur[i].sur:=''; goto 1;end;
readln(F,FileSur[i].j);
if eof(f)then Break;
if FileSur[i].j='!' then begin FileSur[i].j:=''; goto 1;end;
readln(F,FileSur[i].j1);
if eof(f)then Break;
if FileSur[i].j1='!' then begin FileSur[i].j1:=''; goto 1;end;
readln(F,FileSur[i].j2);
if eof(f)then Break;
if FileSur[i].j2='!' then begin FileSur[i].j2:=''; goto 1;end;
readln(F,FileSur[i].j3);
if eof(f)then Break;
if FileSur[i].j3='!' then begin FileSur[i].j3:=''; goto 1;end;
readln(F,FileSur[i].j4);
if eof(f)then Break;
if FileSur[i].j4='!' then begin FileSur[i].j4:=''; goto 1;end;
end;
CloseFile(f);
AgimdiElement:=1;
filesur[1].N:=1;
Label8.Caption:=IntToStr(filesur[1].N);
SurakMemo.Lines.Text:=filesur[1].sur;
Memo1.Lines.Text:=filesur[1].j;
Memo2.Lines.Text:=filesur[1].j1;
Memo3.Lines.Text:=filesur[1].j2;
Memo4.Lines.Text:=filesur[1].j3;
Memo5.Lines.Text:=filesur[1].j4;
Notebook1.ActivePage:='testedit';
end;
procedure TForm2.BitBtn6Click(Sender: TObject);
begin
Notebook1.ActivePage:='default';
end;
procedure TForm2.b_3Click(Sender: TObject);
begin
Notebook1.ActivePage:='root';
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
if FileSur[AgimdiElement].N<=1 then exit;
RefreshFileFur(Sender);
Dec(AgimdiElement);
if AgimdiElement<=0 then AgimdiElement:=1;
RefreshMemo(Sender);
end;
procedure TForm2.Button3Click(Sender: TObject);
begin
if FileSur[AgimdiElement+1].N<1 then exit;
RefreshFileFur(Sender);
inc(AgimdiElement);
if AgimdiElement>=500 then AgimdiElement:=500;
RefreshMemo(Sender);
end;
procedure TForm2.Button4Click(Sender: TObject);
begin
RefreshFileFur(Sender);
repeat
inc(AgimdiElement);
if FileSur[AgimdiElement].N=0 then
begin
Break;
end;
until(false);
filesur[AgimdiElement].N:=filesur[AgimdiElement-1].N+1;
if AgimdiElement>=500 then AgimdiElement:=500;
RefreshMemo(Sender);
end;
procedure TForm2.Button5Click(Sender: TObject);
var i:integer;
begin
i:=AgimdiElement;
repeat
if FileSur[i+1].N=0 then
begin
FileSur[i].N:=0;
filesur[i].sur:='';
FileSur[i].j:='';FileSur[i].j1:='';FileSur[i].j2:='';
FileSur[i].j3:='';FileSur[i].j4:='';
dec(AgimdiElement);
if AgimdiElement<=0 then AgimdiElement:=1;
break;
end else
begin
FileSur[i].N:=i;
FileSur[i].sur:=filesur[i+1].sur;
FileSur[i].j:=FileSur[i+1].j;
FileSur[i].j1:=FileSur[i+1].j1;
FileSur[i].j2:=FileSur[i+1].j2;
FileSur[i].j3:=FileSur[i+1].j3;
FileSur[i].j4:=FileSur[i+1].j4;
end;
inc(i);
until(false);
RefreshMemo(Sender);
end;
procedure TForm2.Button6Click(Sender: TObject);
var i,j:integer;
begin
AssignFile(f,cdir+'\test\data.dat');reset(f);
read(f,s);CloseFile(f);
RefreshFileFur(Sender);
i:=0;
while FileSur[i].N<>0 do
inc(i);
dec(i);
j:=1;
AssignFile(f,cdir+'\test\data.dat');
Rewrite(f);
Writeln(f,s);
Writeln(f,inttostr(SpinEdit2.value));
writeln(f,inttostr(SpinEdit1.Value));
for j:=1 to i do
begin
writeln(f,'!');
Writeln(f,FileSur[j].sur);
if FileSur[j].j<>'' then Writeln(f,FileSur[j].j);
if FileSur[j].j1<>'' then Writeln(f,FileSur[j].j1);
if FileSur[j].j2<>'' then Writeln(f,FileSur[j].j2);
if FileSur[j].j3<>'' then Writeln(f,FileSur[j].j3);
if FileSur[j].j4<>'' then Writeln(f,FileSur[j].j4);
end;
CloseFile(f);Notebook1.ActivePage:='default';;
for i:=1 to 500 do
begin
FileSur[i].N:=0;
FileSur[i].sur:='';
FileSur[i].j:='';
FileSur[i].j1:='';
FileSur[i].j2:='';
FileSur[i].j3:='';
FileSur[i].j4:='';
end;
end;
procedure TForm2.ComboBox1Change(Sender: TObject);
var tf:TextFile;
begin
SurakMemo.Font.Name:=ComboBox1.Text;
Memo1.Font.Name:=ComboBox1.Text;
Memo2.Font.Name:=ComboBox1.Text;
Memo3.Font.Name:=ComboBox1.Text;
Memo4.Font.Name:=ComboBox1.Text;
Memo5.Font.Name:=ComboBox1.Text;
AssignFile(tf,cdir+'\test\font.dat');rewrite(tf);
write(tf,combobox1.text);CloseFile(tf);
end;
procedure TForm2.b_4Click(Sender: TObject);
begin
Form1.Gauge1.Hide;
Form1.BitBtn1.Show;
Form1.Show;
Hide;
Form1.Tag:=1;
end;
end.
|