unité unité 1;
Interface
Usages
Windows, messages, synutililles, variantes, classes, graphiques, contrôles, formulaires,
Dialogues, comctrls, stdctrls, extctrls, grilles, calendrier, jauges, jpeg;
taper
Tform1 = classe (tform)
Shape1: Ford;
Shape2: pour la marée;
Shape3: pour l'inverse;
Shape4: pour la marée;
Shape5: Tabs;
Shape6: pour la marée;
Shape7: pour la marée;
Shape8: pour l'inverse;
Shape9: pour la marée;
Shape10: pour une pause;
Shape11: pour l'inverse;
Forme12: Formore;
StaticText1: tStatictExt;
StaticText2: tStatictExt;
StaticText3: tStatictExt;
StaticText4: tStatictExt;
StaticText5: tStatictExt;
StaticText6: tStatictExt;
StaticText7: tStatictExt;
Edit1: Tedit;
Edit2: TiTiT;
Edit3: Tedit;
Edit4: TiTiT;
Edit5: TiTiT;
Edit6: TiTiT;
Edit7: Teded;
Edit8: TiTiT;
Edit9: TiTiT;
Edit10: Titit;
Edit11: Tened;
Edit12: Tedit;
Edit13: Titit;
Edit16: Tedit;
Edit15: Titit;
Edit16: Tedit;
Edit17: Titit;
Edit18: Tedit;
Edit19: Tedod;
Edit20: Tened;
Edity21: Titit;
Edit22: Teep;
Edit23: Titit;
Edit24: Tedit;
Edit25: Titit;
Edit26: Titit;
Edit27: Titit;
Edit22: Titit;
Button1: Tbutton;
Edit2t2: Tited;
TIMER1: Timtimer;
TIMER2: Temps;
Listbox1: tlistbox;
Gauge1: Tgauge;
Gauge2: Tgauge;
Gauge3: Tgauge;
Gauge4: TGG;
Label1: Tlabel;
Label2: Tlabel;
Label3: Tlabel;
Label4: Tlabel;
Edit30: Tedit;
Image1: Timage;
Label5: Tlabel;
Button2: TBUTTON;
TIMER3: Timère;
Button4: Tbutton;
Button5: Tbutton;
Button3: Tbutton;
Label6: Tlabel;
Button6: Tbutton;
TIMER4: Timère;
Procédure Timer1Stimer (expéditeur: tobject);
Procédure Button1Click (expéditeur: tobject);
Procédure Timer2Timer (expéditeur: tobject);
Procédure Button2Click (expéditeur: tobject);
Procédure Timer33Timer (expéditeur: tobject);
Procédure Button3Click (expéditeur: tobject);
Procédure Button4Click (expéditeur: tobject);
Procédure Button5Click (expéditeur: tobject);
Procédure FormCreate (expéditeur: tobject);
Procédure Button6Click (expéditeur: tobject);
Procédure Timer4Timer (expéditeur: tobject);
Privé
{Déclarations privées}
publique
{Déclarations publiques}
fin;
taper
PCB = enregistrement
Nom: String;
Arv: entier;
SVT: entier;
STT: entier;
Fnt: entier;
ZZSJ: entier;
Dqsj: réel;
fnhflflg: bool;
STTFLG: boob;
fin;
Pcbx = array [1.4] de PCB;
var
Nullflag: bol = false;
Forword: bol = false;
Subemp: entier = 0;
J: entier = 1;
Openflg: bolo = true;
Tempid: entier = 1;
fnehnum: entier = 0;
Pcbum: entier = 0;
Ntp: bol = false;
Tempok: bol = false;
Flag: bol = false;
FORM1: TFORM1;
Spectacle: tdatetime;
Count: Integer = -1;
Pro: entier = 0;
// pcbad: entier = 1;
writeflg: entier = 0;
PCBS: PCBX;
Cependant, Min, Sec, Mme: Word;
Méthode: entier = 1;
mise en œuvre
Utiliser l'unité3;
{$ R * .dfm}
Procédure tform1.timer1p1.timer1Timer (expéditeur: tobject);
var
W: entier;
F: entier;
commencer
Si Flag = true et nullflag = false alors et false 远为 true
commencer
Count: = Count + 1;
listboxes1.items.add (inttoStr (count);
pour w: = 1 à 4 faire
commencer
Si les PCB [w] .arv =
commencer
TIMER2.Enabled: = false;
Pcbum: = pcbnum + 1;
TIMER2.Enabled: = true;
fin;
fin;
Si openflg = false alors
commencer
Si compter (count = pcbs [tempid] .stt + pcbs [tempid] .svt) alors
commencer
Pcbs [tempid] .fnhflg: = true;
fnehnum: = fnehre + 1;
Si fnehnum = 4 alors
commencer
Flag: = false;
Pcbs [1] .fnt: = pcbs [1] .stt + pcbs [1] .svt;
Pcbs [1] .zzzsj: = pcbs [1] .fnt-pcbb [1] .arv;
Pcbs [1] .dqsj: = pcbs [1] .zzsj / (pcbs [1] .lnt);
Pcbs [2] .fnt: = pcbs [2] .stt + pcbs [2] .svt;
Pcbs [2] .zzzsj: = pcbs [2] .fnt-pcbs [2] .arv;
Pcbs [2] .dqsj: = pcbs [2] .zzsj / (pcbs [2] .ltt);
Pcbs [3] .fnt: = pcbs [3] .stt + pcbs [3] .svt;
Pcbs [3] .zzzsj: = pcbs [3] .fnt-pcbs [3 .arv;
Pcbs [3] .dqsj: = pcbs [3] .zzsj / (pcbs [3] .ltt);
Pcbs [4] .fnt: = pcbs [4] .stt + pcbs [4] .svt;
Pcbs [4] .zzzsj: = pcbs [4] .fnt-pcbs [4] .arv;
Pcbs [4] .dqsj: = pcbs [4] .zzsj / (pcbs [4] .tt);
Edit13.Text: = intToStr (pcbs [1] .tt);
Edit14.Text: = intToStr (pcbs [1] .stt + pcbs [1] .svt);
Edit15.Text: = intToStr (pcbs [1] .zzsj);
Edit16.text: = flattoStr (pcbs [1] .dqsj);
Editi7.text: = intToStr (pcbs [2] .stt);
Editi.text: = intToStr (pcbs [2] .stt + pcbs [2] .svt);
Edit19.Text: = intToStr (pcbs [2] .zzsj);
Edit20.text: = flattoStr (pcbs [2] .dqsj);
Edit21.text: = intToStr (pcbs [3] .tt);
edit22.text: = intToStr (pcbs [3] .stt + pcbs [3 .svt);
Edit23.text: = intToStr (pcbs [3] .zzsj);
edit24.Text: = flattoStr (pcbs [3] .dqsj);
edit25.Text: = intToStr (pcbs [4] .tt);
Edit26.text: = intToStr (pcbs [4] .stt + pcbs [4] .svt);
Edit27.text: = intToStr (pcbs [4] .zzsj);
Edit22.text: = flofoStr (pcbs [4] .dqsj);
fin;
Openflg: = true; // 改 !!!!!!!! Key 应为 False
Tempok: = false;
fin;
fin;
pour f: = 1 à 4 faire
commencer
if (count = pcbs [f] .stt + pcbs [f] .svt) et pcbsvt1
Listbr.idds.add (pcbs [f] .name + '完成 !!!!');
fin; // pour
fin;
Si openflg = false alors
commencer
Cas tempide de
1: commencer
ifcls [1] .svt = 1 alors
commencer
Gauge1.maxValue: = 2;
GAUGE1.PROGRESS: = 2;
fin
autre
commencer
Gauge1.maxValue: = PCBS [1] .svt;
GAUGE1.PROGRESS: = COUNT-PCBS [1] .STT;
fin;
fin;
2: commencer
GAUGE2.MaxValue: = PCB [2] .svt;
GAUGE2.PROGRESS: = COUNT-PCBS [2] .STT;
fin;
3: commencer
GAUGE3.MaxValue: = PCB [3] .svt;
GAUGE3.Progress: = count-pcbs [3] .stt;
fin;
4: commencer
GAUGE4.MaxValue: = PCB [4] .svt;
GAUGE4.PROGRESS: = COUNT-PCBS [4] .TT;
fin; // 4;
fin;
end;
Si les PCB [1] .fnhflg = true alors
GAUGE1.PROGRESS: = PCBS [1] .SVT;
Si les PCB [2] .fnhflg = mar
GAUGE2.PROGRESS: = PCBS [2] .svt;
Si les pcs [3] .fnhflg = mar
GAUGE3.Progress: = PCB [3] .svt;
Iff pcs [4] .fnhflg = true alors
Gauge4.Progress: = PCB [4] .svt;
fin; procédure
Procédure tform1.button1Click (expéditeur: tobject);
commencer
Button2.Enabled: = false;
timer3.enabled: = false;
TIMER2.Enabled: = true;
timer1.enabled: = true;
TIMER4.Enabled: = false;
essayer
Flag: = true;
Pcbs [1] .name: = edit1.orthtatext;
Pcbs [1] .arv: = strtint (edit2.text);
Pcbs [1] .svt: = strtouch (edit3.text);
PCBS [1].
Pcbs [1] .fnhflg: = false;
Pcbs [2] .name: = edit4.Text;
Pcbs [2] .arv: = strtint (editt5.Text);
Pcbs [2] .svt: = strtouch.Text);
Pcbs [2] .sttflg: = false;
Pcbs [2] .fnhflg: = false;
Pcbs [3] .name: = edit7.text;
Pcbs [3] .arv: = strtint (edit8.text);
Pcbs [3] .svt: = strtouch (edit9.Text);
Pcbs [3] .sttflg: = false;
Pcbs [3] .fnhflg: = false;
Pcbs [4] .name: = edit10.text;
Pcbs [4] .arv: = strtint (edit11.text);
Pcbs [4] .svt: = strtoot (edit12.text);
PCBS [4].
Pcbs [4] .fnhflg: = false;
Nullflag: = false;
Sauf
nullflag: = true;
Responsable ('请将数据填完整');
fin;
fin;
Procédure TForm1.Timer2Timer (expéditeur: tobject);
var
I: entier;
commencer
Si fnehnum <pcbox alors
commencer
if (openflg = true) et (pcbumd> 0)))))
commencer
pour i: = 1 à pcbruc remuer
commencer
Si pcbs [i] .fnhflg = false
commencer
Si tempok = false alors
commencer
Suremp: = Tempid;
Tempid: = i;
Tempok: = true;
fin;
Si PCBS [i] .svt <pcbs [Tempid] .svt alors
commencer
//timer1.enabled:/false;
Tempid: = i;
//timer1.enabled: Lue;
fin;
fin;
fin;
Openflg: = false;
Pcbs [tempid] .stt: = count;
Pcbs [tempid] .sttflg: = true;
//listBox1.idd.add ('进程' + pcbs [subtem] .name + 'fnh');
listboxes.atms.add ('进程' + pcbs [tempid] .name + '被调度');
end;
fin;
fin; // procédure
Procédure tform1.button2click (expéditeur: tobject);
commencer
Button1.Enabled: = false;
timer1.enabled: = false;
TIMER2.Enabled: = false;
TIMER3.Enabled: = true;
TIMER4.Enabled: = true;
essayer
Flag: = true;
Pcbs [1] .name: = edit1.orthtatext;
Pcbs [1] .arv: = strtint (edit2.text);
Pcbs [1] .svt: = strtouch (edit3.text);
Pcbs [1] .sttflg: = true;
Pcbs [1] .fnhflg: = false;
Pcbs [2] .name: = edit4.Text;
Pcbs [2] .arv: = strtint (editt5.Text);
Pcbs [2] .svt: = strtouch.Text);
Pcbs [2] .sttflg: = false;
Pcbs [2] .fnhflg: = false;
Pcbs [3] .name: = edit7.text;
Pcbs [3] .arv: = strtint (edit8.text);
Pcbs [3] .svt: = strtouch (edit9.Text);
Pcbs [3] .sttflg: = false;
Pcbs [3] .fnhflg: = false;
Pcbs [4] .name: = edit10.text;
Pcbs [4] .arv: = strtint (edit11.text);
Pcbs [4] .svt: = strtoot (edit12.text);
PCBS [4].
Pcbs [4] .fnhflg: = false;
Nullflag: = false;
Sauf
nullflag: = true;
Responsable ('请将数据填完整');
fin;
fin;
Procédure TForm1.Timer3Timer3Timerter (Sender: Tobject);
var
M: entier;
commencer
if (flag = true) et (ntp = false) et (nullflag = false)) puis
Commencer // si falg = true alors
Count: = Count + 1;
listboxes1.items.add (inttoStr (count);
pour m: = 1 à 4do
Commencer // pour m: = 1 à 5 faire
If ((pcbs [m] .sttfg = true) et (pcbs [m] .fnhflg = false))
Begin // if (pcb [m] .sttflg = true et pcb [m] .fnhflg = false)
Si Count = PCBS [M] .STT + PCBS [M] .SVT alors
Begin // if (count = pcbs [m] .stt + pcbs [m] .svt) puis
Pcbs [m] .fnhflg: = true;
//timer4.enportdi: = false;
Pro: = 0;
//timer4.enportd: = true;
Listbox1.itms.add ('进程:' + pcbs [m] .name + '完成 !!!!');
Si m <4 alors
Commencer // Si m <4 alors
// pcbs losm + 1 de.stttlg: = true;
// pcbs losm + 1 de.stt: = count;
forword: = true;
fin;
Pcbs [m] .fnt: = count;
Pcbs [m] .zzzsj: = pcbs [m] .fnt-pcbs [m] .arv;
Pcbs [m] .dqsj: = pcbs [m] .zzsj / (pcbs [m] .ldt);
end;
end;
fin;
Iff pcs [4] .fnhflg = true alors
commencer
Ntp: = true;
Edit13.Text: = intToStr (pcbs [1] .tt);
Edit14.Text: = intToStr (pcbs [1] .stt + pcbs [1] .svt);
Edit15.Text: = intToStr (pcbs [1] .zzsj);
Edit16.text: = flattoStr (pcbs [1] .dqsj);
Editi7.text: = intToStr (pcbs [2] .stt);
Editi.text: = intToStr (pcbs [2] .stt + pcbs [2] .svt);
Edit19.Text: = intToStr (pcbs [2] .zzsj);
Edit20.text: = flattoStr (pcbs [2] .dqsj);
Edit21.text: = intToStr (pcbs [3] .tt);
edit22.text: = intToStr (pcbs [3] .stt + pcbs [3 .svt);
Edit23.text: = intToStr (pcbs [3] .zzsj);
edit24.Text: = flattoStr (pcbs [3] .dqsj);
edit25.Text: = intToStr (pcbs [4] .tt);
Edit26.text: = intToStr (pcbs [4] .stt + pcbs [4] .svt);
Edit27.text: = intToStr (pcbs [4] .zzsj);
Edit22.text: = flofoStr (pcbs [4] .dqsj);
fin;
pour m: = 1 à 4 faire
commencer
If (count> = pcbs [m] .arv) et (pcbs [m] .sttfg = false)) puis
Si forword = true alors
commencer
Pcbs [m] .sttfg: = true;
Pcbs [m] .stt: = count;
forword: = false;
fin;
fin;
Gauge1.maxValue: = PCBS [1] .svt;
GAUGE2.MaxValue: = PCB [2] .svt;
GAUGE3.MaxValue: = PCB [3] .svt;
GAUGE4.MaxValue: = PCB [4] .svt;
Si pcbs [1] .sttflg = true et pcbs [1] .fnhflg = false
commencer
//gauge1.progressif:=gaugh1.maxValue: = PCBS CES1 est disponible.shtt;
GAUGE1.PROGRESS: = COUNT-PCBS [1] .STT;
End // iffbs [1] .sttflg = true et pcbs [1] .fnhflg = false
Else iff pcs [1] .fnhflg = true alors
GAUGE1.PROGRESS: = PCBS [1] .SVT;
Si les pcs [2] .sttfg = true et les PCB [2] .fnhflg = false
commencer
GAUGE2.PROGRESS: = COUNT-PCBS [2] .STT;
End // iffbs [1] .sttflg = true et pcbs [1] .fnhflg = false
Elee si pcbs [2] .fnhflg = mar alors
GAUGE2.PROGRESS: = PCBS [2] .svt;
Si les pcs [3] .sttfg = true et les PCB [3 .fnhflg = false
commencer
GAUGE3.Progress: = count-pcbs [3] .stt;
End // iffbs [1] .sttflg = true et pcbs [1] .fnhflg = false
Elee si pcbs [3] .fnhflg = mar alors
GAUGE3.Progress: = PCB [3] .svt;
Si les pcs [4] .sttflg = true et les PCB [4] .fnhflg = false
commencer
GAUGE4.PROGRESS: = COUNT-PCBS [4] .TT;
End // iffbs [1] .sttflg = true et pcbs [1] .fnhflg = false
Elee si pcbs [4] .fnhflg = mar alors
Gauge4.Progress: = PCB [4] .svt;
fin; // Si falg = true alors
fin; procédure
procédure tform1.button3click (expéditeur);
commencer
Form1.close;
//end.//do sur
fin;
Procédure tform1.button4click (expéditeur: tobject);
commencer
forword: = false;
Subemp: = 0;
J: = 1;
Openflg: = true;
Tempid: = 1;
fnehnum: = 0;
Pcbum: = 0;
Ntp: = false;
Tempok: = false;
Flag: = false;
jauge1.progress: = 0;
GAUGE2.PROGRESS: = 0;
GAUGE3.Progress: = 0;
GAUGE4.PROGRESS: = 0;
Button2.EnportEd: = true;
Button1.Enabled: = true;
Count: = - 1;
Pro: = 0;
// pcbad: entier = 1;
writeflg: = 0;
Flag: = false;
Nullflag: = false;
edit1.text: = ';
Edit2.text: = ';
Edit3.text: = ';
Edit4.Text: = ';
Edit5.Text: = ';
Edit6.text: = ';
edit7.text: = ';
edit8.text: = ';
Edit9.Text: = ';
edit9.Text: = ';
edit11.text: = ';
edit12.text: = ';
Edit13.Text: = '系统填写';
Edit14.Text: = '系统填写';
Edit15.Text: = '系统填写';
edit16.text: = '系统填写';
Editian.Text: = '系统填写';
Editi.text: = '系统填写';
Edit19.Text: = '系统填写';
Edit20.text: = '系统填写';
Edit21.text: = '系统填写';
edit22.text: = '系统填写';
Edit23.Text: = '系统填写';
edit24.Text: = '系统填写';
edit25.Text: = '系统填写';
Edit26.text: = '系统填写';
Edit27.text: = '系统填写';
Edit22.text: = '系统填写';
Pcbs [1] .fnhflg: = false;
PCBS [1].
Pcbs [2] .fnhflg: = false;
Pcbs [2] .sttflg: = false;
Pcbs [3] .fnhflg: = false;
Pcbs [3] .sttflg: = false;
Pcbs [4] .fnhflg: = false;
PCBS [4].
fin;
Procédure tform1.button5click (expéditeur: tobject);
commencer
form3.show;
fin;
procédure tform1.field: objectif);
commencer
Form100FieldStyle: = FSSSTyontop;
EposateWindow (Handle, 2000, AW_Center);
Form100formStyle: = fsNormal;
fin;
Procédure tform1.button6click (expéditeur: tobject);
commencer
edit1.text: = 'a';
Edit2.text: = '0';
Edit3.text: = '3';
edit4.Text: = 'b';
Edit5.Text: = '5';
Edit6.text: = '2';
edit7.text: = 'c';
edit8.text: = '5';
Edit9.Text: = '3';
edit19.Text: = 'D';
edit11.text: = '5';
edit12.text: = '2';
fin;
Procédure TForm1.Timer4Timer4timer (expéditeur: tobject);
commencer
If ((pcbs [1] .arv = count) et (pcbs [1] .sttflg = false)) puis
commencer
forword: = true;
fin;
fin;
Fin.
unité unité 2;
Interface
Usages
Windows, messages, synutililles, variantes, classes, graphiques, contrôles, formulaires,
Dialogues, JPEG, extctrls, stdctrls;
taper
Tform2 = classe (tform)
Image1: Timage;
Label1: Tlabel;
Label2: Tlabel;
Label3: Tlabel;
Privé
{Déclarations privées}
publique
{Déclarations publiques}
fin;
taper
PCB = enregistrement
Nom: String;
Arv: entier;
SVT: entier;
STT: entier;
Fnt: entier;
ZZSJ: entier;
Dqsj: réel;
fnhflflg: bool;
STTFLG: boob;
fin;
Pcbx = array [1.4] de PCB;
var
Form2: tform2;
PCBS: PCBX;
mise en œuvre
Utiliser l'unité1;
{$ R * .dfm}
Fin.
unité unité3;
Interface
Usages
Windows, messages, synutililles, variantes, classes, graphiques, contrôles, formulaires,
Dialogues, stdctrls, comctrls, jpeg, extctrls;
taper
Tform3 = classe (tform)
RICHEDIT1: Trichit;
Privé
{Déclarations privées}
publique
{Déclarations publiques}
fin;
var
Form3: TForm3;
mise en œuvre
{$ R * .dfm}
Fin.