Моделирование системы автоматизации проектирования
Рефераты >> Кибернетика >> Моделирование системы автоматизации проектирования

Form1.Label43.Caption:='( )';

Form1.Label44.Caption:='( )';

Form1.Label45.Caption:='( )';

Form1.Label5.Caption:='( )';

Form1.Label7.Caption:=' -го терминала';

Form1.Shape18.Pen.Color:=clblack;

Form1.Shape19.Pen.Color:=clblack;

Form1.Shape20.Pen.Color:=clblack;

Form1.Shape21.Pen.Color:=clblack;

Form1.Shape22.Pen.Color:=clblack;

Form1.Shape15.Pen.Color:=clblack;

Form1.Shape16.Pen.Color:=clblack;

Form1.Shape17.Pen.Color:=clblack;

Form1.Shape12.Pen.Color:=clblack;

Form1.Shape13.Pen.Color:=clblack;

Form1.Shape14.Pen.Color:=clblack;

Form1.Shape26.Pen.Color:=clblack;

Form1.Shape27.Pen.Color:=clblack;

Form1.Shape37.Pen.Color:=clblack;

Form1.Shape30.Pen.Color:=clblack;

Form1.Shape31.Pen.Color:=clblack;

Form1.Shape32.Pen.Color:=clblack;

Form1.Shape28.Pen.Color:=clblack;

Form1.Shape29.Pen.Color:=clblack;

Form1.Shape32.Pen.Color:=clblack;

Form1.Shape8.Pen.Color:=clblack;

Form1.Shape36.Pen.Color:=clblack;

Form1.Shape6.Pen.Color:=clblack;

Form1.Shape9.Pen.Color:=clblack;

Form1.Shape7.Pen.Color:=clblack;

Form1.Shape25.Pen.Color:=clblack;

Form1.Shape24.Pen.Color:=clblack;

Form1.Shape23.Pen.Color:=clblack;

Form1.Shape10.Pen.Color:=clblack;

Form1.Shape33.Pen.Color:=clblack;

Form1.Shape34.Pen.Color:=clblack;

Form1.Edit1.Text:='0';

Form1.Edit2.Text:='0';

Form1.Edit3.Text:='0';

Form1.Edit4.Text:='0';

Form1.Edit5.Text:='0';

Form1.Edit6.Text:='0';

Form1.Edit7.Text:='0';

Form1.Edit8.Text:='0';

Form5.Edit1.Text:='0';

Form5.Edit2.Text:='0';

Form5.Edit3.Text:='0';

Form5.Edit4.Text:='0';

Form5.Edit5.Text:='0';

Form5.Edit6.Text:='0';

Form5.Edit7.Text:='0';

Form5.Edit8.Text:='0';

Form5.Edit9.Text:='0';

Form5.Edit10.Text:='0';

Form5.Edit11.Text:='0';

Form5.Edit12.Text:='0';

Form5.Edit13.Text:='0';

Form5.Edit14.Text:='0';

Form5.Edit15.Text:='0';

Form5.Edit16.Text:='0';

Form1.SpinEdit1.Value:=10;

Form1.SpinEdit3.Value:=5;

Form1.SpinEdit4.Value:=3;

Form1.SpinEdit2.Value:=5;

Form1.SpinEdit6.Value:=500;

Form1.SpinEdit5.Value:=10;

Form1.SpinEdit7.Value:=10;

Form1.SpinEdit10.Value:=3;

Form1.SpinEdit8.Value:=30;

Form1.SpinEdit9.Value:=6;

Form8.SpinEdit1.Value:=10;

Form8.SpinEdit3.Value:=5;

Form8.SpinEdit4.Value:=3;

Form8.SpinEdit2.Value:=5;

Form8.SpinEdit6.Value:=500;

Form8.SpinEdit5.Value:=10;

Form8.SpinEdit7.Value:=10;

Form8.SpinEdit10.Value:=3;

Form8.SpinEdit8.Value:=30;

Form8.SpinEdit9.Value:=6;

end;

procedure TForm1.N9Click(Sender: TObject);

begin

Form2.Show;

end;

procedure TForm1.Q1Click(Sender: TObject);

begin

Form6.Show;

end;

procedure TForm1.N11Click(Sender: TObject);

begin

Form4.Show;

end;

procedure TForm1.N12Click(Sender: TObject);

begin

AboutBox2.Show;

end;

procedure TForm1.N8Click(Sender: TObject);

begin

close;

end;

procedure TForm1.Image10Click(Sender: TObject);

begin

close;

end;

procedure TForm1.ToolButton8Click(Sender: TObject);

begin

Form2.Show;

end;

procedure TForm1.ToolButton9Click(Sender: TObject);

begin

Form6.Show;

end;

procedure TForm1.ToolButton12Click(Sender: TObject);

begin

Form4.Show;

end;

procedure TForm1.ToolButton13Click(Sender: TObject);

begin

AboutBox2.Show;

end;

procedure TForm1.N6Click(Sender: TObject);

begin

Form5.Show;

end;

procedure TForm1.N5Click(Sender: TObject);

begin

Form8.Show;

end;

procedure TForm1.ToolButton5Click(Sender: TObject);

begin

Form8.Show;

end;

procedure TForm1.ToolButton6Click(Sender: TObject);

begin

Form5.Show;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

Randomize;

takt1:=0;takt2:=0;takt3:=0;

get_stroka1;

get_stroka2;

get_stroka3;

time_st1:=0;

time_st2:=0;

time_st3:=0;

index_nakop:=0;

Timer1.Enabled:=false;

work_system:=0;

time_stEVM:=0;

i1:=0;i2:=0;i3:=0;

time_EVM_zadan:=0;

flag1:=false;flag2:=false;flag3:=false;flag4:=false;

time1_analiz:=0;time2_analiz:=0;time3_analiz:=0;

time_zanytat1:=0;time_zanytat2:=0;time_zanytat3:=0;

time_obch:=0;time_zagruz:=0;

end;

procedure TForm1.Timer1Timer(Sender: TObject);

var

i:integer;

begin

Timer1.Interval:=SpinEdit6.Value;

Timer1.Interval:=Form8.SpinEdit6.Value;

inc(work_system);

Gauge1.Progress:=round((work_system*100)/(SpinEdit9.Value*360));

Gauge1.Progress:=round((work_system*100)/(Form8.SpinEdit9.Value*360));

time_st_term:=SpinEdit2.Value;

time_st_EVM:=SpinEdit4.Value;

Shape10.Pen.Color:=clblack;

Shape33.Pen.Color:=clblack;

Shape34.Pen.Color:=clblack;

time_analiz:=SpinEdit8.Value;

if work_system>SpinEdit9.Value*360 then

begin

stop;

Timer1.Enabled:=false;

Form11.Show;

end;

begin

if time1_analiz=0 then inc(takt1);

if time2_analiz=0 then inc(takt2);

if time3_analiz=0 then inc(takt3);

{если сформировалась строка от первого терминала}

if takt1=a.time then

begin

Shape23.Pen.Color:=clred;

takt1:=0;

get_stroka1;

inc(time_st1);

Gauge9.Progress:=Gauge9.Progress+Round(100/time_st_term);

Shape1.Brush.Color:=clyellow;

Edit1.Text:=IntToStr(StrToInt(Edit1.Text)+1);

Form5.Edit1.Text:=IntToStr(StrToInt(Form5.Edit1.Text)+1);

end

else

begin

Shape23.Pen.Color:=clblack;

end;

{если сформировалась строка от второго терминала}

if takt2=b.time then

begin

Shape24.Pen.Color:=clred;

takt2:=0;

get_stroka2;

inc(time_st2);

Gauge3.Progress:=Gauge3.Progress+Round(100/time_st_term);

Shape2.Brush.Color:=clyellow;

Edit1.Text:=IntToStr(StrToInt(Edit1.Text)+1);

Form5.Edit2.Text:=IntToStr(StrToInt(Form5.Edit2.Text)+1);

end

else

Shape24.Pen.Color:=clblack;

{если сформировалась строка от третьего терминала}

if takt3=c.time then

begin

Shape25.Pen.Color:=clred;

takt3:=0;

get_stroka3;

inc(time_st3);

Gauge5.Progress:=Gauge5.Progress+Round(100/time_st_term);

Shape3.Brush.Color:=clyellow;

Edit1.Text:=IntToStr(StrToInt(Edit1.Text)+1);

Form5.Edit3.Text:=IntToStr(StrToInt(Form5.Edit3.Text)+1);

end

else

Shape25.Pen.Color:=clblack;

{время обработки строки первым терминалом}

if (time_st1<>0)and(time_st1<=time_st_term) then

begin

inc(time_st1);

if time_st1>2 then begin

Shape1.Brush.Color:=clyellow;

Gauge9.Progress:=Gauge9.Progress+Round(100/time_st_term);

end;

end

else

begin

time_st1:=0;

Shape1.Brush.Color:=clwhite;


Страница: