Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms



Download 17,7 Kb.
Sana14.07.2022
Hajmi17,7 Kb.
#794936
Bog'liq
unit Unit1


unit Unit1;

interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, jpeg, ExtCtrls, StdCtrls, Buttons, Series, TeEngine, TeeProcs,
Chart, OleCtrls, SHDocVw;

type
TForm1 = class(TForm)


Edit1: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Edit8: TEdit;
Edit9: TEdit;
Edit10: TEdit;
BitBtn1: TBitBtn;
Chart1: TChart;
Series1: TFastLineSeries;
Timer1: TTimer;
BitBtn2: TBitBtn;
Label1: TLabel;
BitBtn3: TBitBtn;
Bevel1: TBevel;
Bevel2: TBevel;
Bevel3: TBevel;
BitBtn4: TBitBtn;
Bevel5: TBevel;
BitBtn5: TBitBtn;
Bevel6: TBevel;
StaticText1: TStaticText;
StaticText2: TStaticText;
StaticText3: TStaticText;
Image2: TImage;
lbl2: TLabel;
bvl1: TBevel;
lbl3: TLabel;
lbl4: TLabel;
lbl6: TLabel;
lbl7: TLabel;
lbl9: TLabel;
lbl10: TLabel;
lbl12: TLabel;
lbl13: TLabel;
bvl2: TBevel;
Chart2: TChart;
Series3: TLineSeries;
Bevel9: TBevel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Bevel4: TBevel;
Panel1: TPanel;
BitBtn6: TBitBtn;
Bevel7: TBevel;
Panel2: TPanel;
StaticText4: TStaticText;
StaticText5: TStaticText;
StaticText6: TStaticText;
StaticText7: TStaticText;
StaticText8: TStaticText;
Panel3: TPanel;
StaticText9: TStaticText;
StaticText10: TStaticText;
StaticText11: TStaticText;
StaticText12: TStaticText;
StaticText13: TStaticText;
StaticText14: TStaticText;
Memo1: TMemo;
procedure BitBtn1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
procedure BitBtn5Click(Sender: TObject);
procedure Dek(ds1,ds2,ds3,ds4:integer);
procedure FormCanResize(Sender: TObject; var NewWidth,
NewHeight: Integer; var Resize: Boolean);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure BitBtn6Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;


a1, h:Real;


l, e:Real;
ii,jj:Real;

i, j, n, m:Integer;


a, b:Real;


c, d:Real;
e1, e2:Real;

x,y:array [0..100000] of Real;


xtao,ytao:array [0..100000] of Real;
xtao_2,ytao_2:array [0..100000] of Real;
fxtao,fytao:array [0..100000] of Real;

t,ttao:array [0..100000] of Real;


t_2,ttao_2:array [0..100000] of Real;
ft,ftao:array [0..100000] of Real;

sigma1,sigma2:array [0..100000] of Real;


sigma1_2,sigma2_2:array [0..100000] of Real;
sigma1f,sigma2f:array [0..100000] of Real;

k1,k2,k3,k4:Real;


l1,l2,l3,l4:Real;

f1:text;

implementation

{$R *.dfm}


procedure TForm1.Dek (ds1,ds2,ds3,ds4:integer);


var
di,dk,dl:integer;
begin
Form1.Image2.Canvas.Pen.Style:=psSolid;
with Form1.Image2.Canvas do
begin
Pen.Color:=clBlack;
MoveTo(ds1,ds2);LineTo(ds1,ds4);
MoveTo(ds1,ds4);LineTo(ds3,ds4);
MoveTo(ds1,ds2-3);LineTo(ds1-3,ds2+7);
MoveTo(ds1,ds2-3);LineTo(ds1+3,ds2+7);
MoveTo(ds3+3,ds4);LineTo(ds3-7,ds4+3);
MoveTo(ds3+3,ds4);LineTo(ds3-7,ds4-3);
dl:=Round((abs(ds1-ds3))/15);
dk:=Round((abs(ds2-ds4))/10);
for di:=1 to 14 do
begin
MoveTo(ds1+di*dl,ds4+4);LineTo(ds1+di*dl,ds4-4);
end;
for di:=1 to 9 do
begin
MoveTo(ds1+4,ds4-di*dk);LineTo(ds1-4,ds4-di*dk);
end;
end;
end;

procedure TForm1.BitBtn1Click(Sender: TObject);


begin
StaticText4.Enabled:=false;
StaticText5.Enabled:=false;
StaticText6.Enabled:=false;
StaticText7.Enabled:=false;
StaticText8.Enabled:=false;
form1.Memo1.Lines.Text:='Analysis of expected cases in liver cells of under the pressure of hepatitis B viruses.';

Form1.Image2.Canvas.Brush.Color:=clHighlightText;


Form1.Image2.Canvas.Pen.Color:=clHighlightText;
Form1.Image2.Canvas.Rectangle(0,0,Image2.Width,Image2.Height);

a:=StrToFloat(edit1.Text);


c:=StrToFloat(edit3.Text);
e1:=StrToFloat(edit4.Text);

b:=StrToFloat(edit5.Text);


d:=StrToFloat(Edit6.Text);
e2:=StrToFloat(Edit8.Text);

x[0]:=StrToFloat(Edit9.Text);


y[0]:=StrToFloat(Edit10.Text);

Series1.Clear;


Series3.Clear;

h:=0.009;


i:=0;
a1:=0;

Dek(20,20,600,300);


Form1.Image2.Canvas.Pen.Color:=clRed;


Form1.Image2.Canvas.MoveTo(round(100*x[0])+20,295-1);
Form1.Image2.Canvas.LineTo(round(100*x[0])+20,295+10);
Form1.Image2.Canvas.TextOut(round(100*x[0])+20+10,300+10,'Xo');

Form1.Image2.Canvas.TextOut(1,300-round(100*y[0]*0.25)-15,'Yo');


Form1.Image2.Canvas.MoveTo(17,300-round(100*y[0]*0.25));
Form1.Image2.Canvas.LineTo(25,300-round(100*y[0]*0.25));

Form1.Image2.Canvas.Pen.Color:=clBlue;


Form1.Image2.Canvas.Pen.Style:=psDot;
Form1.Image2.Canvas.MoveTo(round(100*x[0])+20,295-1);
Form1.Image2.Canvas.LineTo(round(100*x[0])+20,300-round(100*y[0]*0.25));

Form1.Image2.Canvas.MoveTo(25,300-round(100*y[0]*0.25));


Form1.Image2.Canvas.LineTo(round(100*x[0])+20,300-round(100*y[0]*0.25));

Form1.Image2.Canvas.Pen.Style:=psSolid;


Form1.Image2.Canvas.Ellipse(round(100*x[0])+18,298-round(100*y[0]*0.25),round(100*x[0])+23,303-round(100*y[0]*0.25));


Form1.Image2.Canvas.Pen.Color:=clRed;
Form1.Image2.canvas.MoveTo(20+round(100*x[i]),300-round(100*y[i]*0.25));
Form1.Image2.canvas.LineTo(20+round(100*x[i+1]),300-round(100*y[i+1]*0.25));

i:=i+1;
end;


procedure TForm1.BitBtn2Click(Sender: TObject);


begin
Timer1.Enabled:=False;

Form1.Image2.Canvas.Pen.Color:=clRed;


Form1.Image2.Canvas.MoveTo(round(100*l)+20,295-1);
Form1.Image2.Canvas.LineTo(round(100*l)+20,295+10);
Form1.Image2.Canvas.TextOut(round(100*l)+20+10,300+10,'Xn');

Form1.Image2.Canvas.TextOut(1,300-round(100*e*0.25)-15,'Yn');


Form1.Image2.Canvas.MoveTo(17,300-round(100*e*0.25));
Form1.Image2.Canvas.LineTo(25,300-round(100*e*0.25));

Form1.Image2.Canvas.Pen.Color:=clBlue;


Form1.Image2.Canvas.Pen.Style:=psDot;
Form1.Image2.Canvas.MoveTo(round(100*l)+20,295-1);
Form1.Image2.Canvas.LineTo(round(100*l)+20,300-round(100*e*0.25));

Form1.Image2.Canvas.MoveTo(25,300-round(100*e*0.25));


Form1.Image2.Canvas.LineTo(round(100*l)+20,300-round(100*e*0.25));

Form1.Image2.Canvas.Pen.Style:=psSolid;


Form1.Image2.Canvas.Ellipse(round(100*l)+18,298-round(100*e*0.25),round(100*l)+23,303-round(100*e*0.25));

AssignFile(f1,'Natija.txt');


rewrite(f1);
for m:=1 to i do
writeln(f1,'x[',m,']=',x[m]:4:4,' ','y[',m,']=',y[m]:4:4);
CloseFile(f1);

end;

procedure TForm1.BitBtn3Click(Sender: TObject);
begin
Timer1.Enabled:=False;

AssignFile(f1,'Natija.txt');


rewrite(f1);
for m:=1 to i do
writeln(f1,'x[',m,']=',x[m]:4:4,' ','y[',m,']=',y[m]:4:4);
CloseFile(f1);

Close;
end;


procedure TForm1.BitBtn4Click(Sender: TObject);


begin
Series3.Clear;
Series1.Clear;
Form1.Image2.Canvas.Pen.Style:=psSolid;
Form1.Image2.Canvas.Brush.Color:=clHighlightText;
Form1.Image2.Canvas.Pen.Color:=clHighlightText;
Form1.Image2.Canvas.Rectangle(0,0,Image2.Width,Image2.Height);
Dek(20,20,600,300);

Form1.Image2.Canvas.Pen.Color:=clRed;


Form1.Image2.Canvas.MoveTo(round(100*l)+20,295-1);
Form1.Image2.Canvas.LineTo(round(100*l)+20,295+10);
Form1.Image2.Canvas.TextOut(round(100*l)+20+10,300+10,'X');

Form1.Image2.Canvas.TextOut(1,300-round(100*e*0.25)-15,'Y');


Form1.Image2.Canvas.MoveTo(17,300-round(100*e*0.25));
Form1.Image2.Canvas.LineTo(25,300-round(100*e*0.25));

Form1.Image2.Canvas.Pen.Color:=clBlue;


Form1.Image2.Canvas.Pen.Style:=psDot;
Form1.Image2.Canvas.MoveTo(round(100*l)+20,295-1);
Form1.Image2.Canvas.LineTo(round(100*l)+20,300-round(100*e*0.25));

Form1.Image2.Canvas.MoveTo(25,300-round(100*e*0.25));


Form1.Image2.Canvas.LineTo(round(100*l)+20,300-round(100*e*0.25));

Form1.Image2.Canvas.Pen.Style:=psSolid;


Form1.Image2.Canvas.Ellipse(round(100*l)+18,298-round(100*e*0.25),round(100*l)+23,303-round(100*e*0.25));
Timer1.Enabled:=true;
end;

procedure TForm1.BitBtn5Click(Sender: TObject);


begin
Form1.Image2.Canvas.Brush.Color:=clHighlightText;
Form1.Image2.Canvas.Pen.Color:=clHighlightText;
Form1.Image2.Canvas.Rectangle(0,0,Image2.Width,Image2.Height);
Dek(20,20,600,300);
i:=0;
Series3.Clear;
Series1.Clear;
Form1.Image2.Canvas.Pen.Style:=psSolid;
Timer1.Enabled:=false;
end;

procedure TForm1.FormCanResize(Sender: TObject; var NewWidth,


NewHeight: Integer; var Resize: Boolean);
begin
Form1.Image2.Canvas.Brush.Color:=clHighlightText;
Form1.Image2.Canvas.Pen.Color:=clHighlightText;
Form1.Image2.Canvas.Rectangle(0,0,Image2.Width,Image2.Height);

Dek(20,20,600,300);


i:=1;

end;

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);


begin
if key=#13 then form1.BitBtn1.Click;

case key of


'0'..'9': ; // цифры
#8: ; // забой
'-': ;
'.', ',':
if Pos(DecimalSeparator, Text) = 0 then
Key := DecimalSeparator
else
Key := #0; // десятичный разделитель
else
key := #0;
end; // case
end;

procedure TForm1.BitBtn6Click(Sender: TObject);


begin
if StrtoFloat(Edit5.Text)>=0 then begin
if StrtoFloat(Edit5.Text)<=0.4 then

StaticText4.Enabled:=true;


StaticText5.Enabled:=false;
StaticText6.Enabled:=false;
StaticText7.Enabled:=false;
StaticText8.Enabled:=false;
form1.Memo1.Lines.Text:='Under the pressure of hepatitis B viruses, the liver cells defeated the viruses as a result of the fight against the hepatitis viruses, and the liver cells reached the dominant regime.';
end;

if StrtoFloat(Edit5.Text)>=0.5 then begin


if StrtoFloat(Edit5.Text)<=1.9 then
StaticText4.Enabled:=false;
StaticText5.Enabled:=true;
StaticText6.Enabled:=false;
StaticText7.Enabled:=false;
StaticText8.Enabled:=false;
form1.Memo1.Lines.Text:='This condition means that the liver cells are now in a healthy state during viral stress.';
end;

if StrtoFloat(Edit5.Text)>=2.0 then begin


if StrtoFloat(Edit5.Text)<=2.95 then

StaticText4.Enabled:=false;


StaticText5.Enabled:=false;
StaticText6.Enabled:=true;
StaticText7.Enabled:=false;
StaticText8.Enabled:=false;
form1.Memo1.Lines.Text:='This means that liver cells are healthy but disease can form during of under the pressure of hepatitis B viruses.';
end;

if StrtoFloat(Edit5.Text)>=2.96 then begin


if StrtoFloat(Edit5.Text)<=3.252 then

StaticText4.Enabled:=false;


StaticText5.Enabled:=false;
StaticText6.Enabled:=false;
StaticText7.Enabled:=true;
StaticText8.Enabled:=false;
form1.Memo1.Lines.Text:='Hepatitis B viruses are present in liver cells and indicate that they are active and that a clinical form of the disease has been formed.';
end;

if StrtoFloat(Edit5.Text)>=3.253 then begin


if StrtoFloat(Edit5.Text)<=3.5 then
StaticText4.Enabled:=false;
StaticText5.Enabled:=false;
StaticText6.Enabled:=false;
StaticText7.Enabled:=false;
StaticText8.Enabled:=true;
form1.Memo1.Lines.Text:='This means that as a result of the pressure of the viruses, the liver cells fall into a "black hole" and they cease to function.';
end;

if StrtoFloat(Edit5.Text)>=3.6 then begin


StaticText4.Enabled:=false;


StaticText5.Enabled:=false;
StaticText6.Enabled:=false;
StaticText7.Enabled:=false;
StaticText8.Enabled:=false;
form1.Memo1.Lines.Text:='Please, enter the values of parameter b to [0; 3.5].';
end;


end;
end.
Download 17,7 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish