This commit is contained in:
f1iwq2
2025-12-19 21:24:42 +01:00
parent a70da188fd
commit 4b997f5de1
19 changed files with 1119 additions and 521 deletions
+39 -39
View File
@@ -1,4 +1,4 @@
/ Fichier de configuration de signaux_complexes_GL version 10.53 / Fichier de configuration de signaux_complexes_GL version 10.79
Chemin_progCDM=C:\Program Files (x86) Chemin_progCDM=C:\Program Files (x86)
LargeurF=1120 LargeurF=1120
HauteurF=681 HauteurF=681
@@ -208,30 +208,30 @@ Clignote,
0 0
/------------ /------------
[section_sig] [section_sig]
176,7,0,1,(520,A20),1,FVC0,FRC0 176,7,0,1,(520,A20),1,FVC0,FRC0,T0
190,7,0,1,(523,526),0,FVC0,FRC0 190,7,0,1,(523,526),0,FVC0,FRC0,T0
204,9,0,1,(527,A7),1,FVC0,FRC0 204,9,0,1,(527,A7),1,FVC0,FRC0,T0
218,7,0,1,(525,A17),0,FVC0,FRC0 218,7,0,1,(525,A17),0,FVC0,FRC0,T0
232,2,1,1,(516,A6),0,FVC0,FRC0,CFB(A6D) 232,2,1,1,(516,A6),0,FVC0,FRC0,CFB(A6D),T0
274,3,0,1,(524,521),0,FVC0,FRC0 274,3,0,1,(524,521),0,FVC0,FRC0,T0
288,7,0,1,(522,A103),1,FVC0,FRC0 288,7,0,1,(522,A103),1,FVC0,FRC0,T0
302,9,0,1,(526,A9),1,FVC0,FRC0 302,9,0,1,(526,A9),1,FVC0,FRC0,T0
316,7,1,1,(515,A5),1,FVC0,FRC0 316,7,1,1,(515,A5),1,FVC0,FRC0,T0
330,7,0,1,(519,A2),1,FVC0,FRC0 330,7,0,1,(519,A2),1,FVC0,FRC0,T0
344,9,0,1,(528,A10),1,FVC0,FRC0 344,9,0,1,(528,A10),1,FVC0,FRC0,T0
358,9,0,1,(517,A102),1,FVC0,FRC0 358,9,0,1,(517,A102),1,FVC0,FRC0,T0
372,D3,1,(A10D)(A19S)(A19D,A22D)(A19D,A22S) 372,D3,1,(A10D)(A19S)(A19D,A22D)(A19D,A22S),T0
382,D3,1,(A29S,A10S)(A19S)(A19D,A22D)(A19D,A22S) 382,D3,1,(A29S,A10S)(A19S)(A19D,A22D)(A19D,A22S),T0
392,3,0,1,(535,533),1,FVC0,FRC0 392,3,0,1,(535,533),1,FVC0,FRC0,T0
406,9,0,1,(534,A23),1,FVC0,FRC0 406,9,0,1,(534,A23),1,FVC0,FRC0,T0
420,7,0,1,(529,A25,530,A27,537,A27),1,FVC1,FRC1 420,7,0,1,(529,A25,530,A27,537,A27),1,FVC1,FRC1,T0
448,7,0,1,(533,A24),1,FVC0,FRC0 448,7,0,1,(533,A24),1,FVC0,FRC0,T0
462,9,0,1,(513,A29),1,FVC0,FRC0 462,9,0,1,(513,A29),1,FVC0,FRC0,T0
476,9,0,1,(538,A105),1,FVC0,FRC0 476,9,0,1,(538,A105),1,FVC0,FRC0,T0
497,9,0,4,(531,A19),1,FVC0,FRC0,U14,L1 497,9,0,4,(531,A19),1,FVC0,FRC0,U14,L1,T0
520,9,1,1,(518,A1),1,FVC0,FRC0,(A1S,A3S,A5S),CFB(A1S,A3D,A4D,A6S) 520,9,1,1,(518,A1),1,FVC0,FRC0,(A1S,A3S,A5S),CFB(A1S,A3D,A4D,A6S),T0
620,7,0,0,(521,A8),1,FVC0,FRC0 620,7,0,0,(521,A8),1,FVC0,FRC0,T0
820,4,0,0,(519,A7),0,FVC0,FRC0 820,4,0,0,(519,A7),0,FVC0,FRC0,T0
0 0
/------------ /------------
[section_PN] [section_PN]
@@ -257,7 +257,7 @@ BB16024,3,120,100,60,BB16024.BMP,7,0,0,0,0,0,0.00,0.00,0.00,0,0,0
CC406526,4,120,100,80,CC406526.BMP,10,0,0,0,0,0,0.00,0.00,0.00,0,0,0 CC406526,4,120,100,80,CC406526.BMP,10,0,0,0,0,0,0.00,0.00,0.00,0,0,0
[route_par_pont],0,1 [route_par_pont],0,1
{519->2droit->12dev->517->102crois->18dev->11dev->101crois->525->17dev->528->10dev->101crois->19dev->531->518->1droit->100crois->523} {519->2droit->12dev->517->102crois->18dev->11dev->101crois->525->17dev->528->10dev->101crois->19dev->531->518->1droit->100crois->523}
CAMERA,6,120,0,0,EAD.BMP,8,0,0,0,0,0,0.00,0.00,0.00,0,0,0 CAMERA,6,120,120,60,EAD.BMP,8,0,0,0,0,0,0.00,0.00,0.00,0,0,0
0 0
/------------ /------------
[section_placement] [section_placement]
@@ -351,22 +351,19 @@ DureeMinute=1
0 0
/------------ /------------
[section_logique] [section_logique]
/--- Fonction 1
"0"
FF
0 0
/------------ /------------
[section_blocs_USB] [section_blocs_USB]
B1,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B1,,BR0,0,0,1,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
B2,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B2,,BR0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
B3,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B3,,BR0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
B4,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B4,,BR0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
B5,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B5,,BR0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
B6,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B6,,BR0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
B7,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B7,,BR0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
B8,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B8,,BR0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
B9,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B9,,BR0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
B10,,BR0,0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0,B0,0,0 B10,,BR0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0,B0,0,0,0
0 0
/------------ /------------
[section_compteurs] [section_compteurs]
@@ -376,16 +373,19 @@ Graduations=FFFFFF
Numeros=FFFFFF Numeros=FFFFFF
Fond=000000 Fond=000000
Arc=008000 Arc=008000
Increment=3
Compteur2 Compteur2
Aiguille=0000FF Aiguille=0000FF
Graduations=000000 Graduations=000000
Numeros=FF0000 Numeros=FF0000
Fond=808080 Fond=808080
Arc=008000 Arc=008000
Increment=3
Compteur3 Compteur3
Aiguille=0000FF Aiguille=0000FF
Graduations=FFFFFF Graduations=FFFFFF
Numeros=FFFFFF Numeros=FFFFFF
Fond=000000 Fond=000000
Arc=008000 Arc=008000
Increment=3
0 0
+13 -13
View File
@@ -1,6 +1,6 @@
unit UnitCDF; unit UnitCDF;
// configuration des décodeurs CDM et Digikeijs // configuration des décodeurs CDF et Digikeijs
interface interface
@@ -195,25 +195,25 @@ begin
i:=0; i:=0;
//ImagePilote.Picture.Bitmap:=FormPilote.ImagePilote.picture.bitmap; //ImagePilote.Picture.Bitmap:=FormPilote.ImagePilote.picture.bitmap;
EtatFeuPilote:=Signaux[i].EtatSignal; EtatSignalPilote:=Signaux[i].EtatSignal;
AncienEtat:=Signaux[i].AncienEtat; AncienEtat:=Signaux[i].AncienEtat;
dessineCDF:=true; // demande dessin CDF pour les clignotements dessineCDF:=true; // demande dessin CDF pour les clignotements
Vcanvas:=FormCDF.ImageDigi.picture.bitmap.Canvas; Vcanvas:=FormCDF.ImageDigi.picture.bitmap.Canvas;
case Signaux[i].aspect of case Signaux[i].aspect of
// feux de signalisation // feux de signalisation
2 : dessine_signal2(Vcanvas,0,0,1,1,EtatFeupilote,1,i); 2 : dessine_signal2(Vcanvas,0,0,1,1,EtatSignalPilote,1,i);
3 : dessine_signal3(Vcanvas,0,0,1,1,EtatFeupilote,1,i); 3 : dessine_signal3(Vcanvas,0,0,1,1,EtatSignalPilote,1,i);
4 : dessine_signal4(VCanvas,0,0,1,1,EtatFeupilote,1,i); 4 : dessine_signal4(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
5 : dessine_signal5(VCanvas,0,0,1,1,EtatFeupilote,1,i); 5 : dessine_signal5(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
7 : dessine_signal7(VCanvas,0,0,1,1,EtatFeupilote,1,i); 7 : dessine_signal7(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
9 : dessine_signal9(VCanvas,0,0,1,1,EtatFeupilote,1,i); 9 : dessine_signal9(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
// indicateurs de direction // indicateurs de direction
12 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,2); 12 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,2);
13 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,3); 13 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,3);
14 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,4); 14 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,4);
15 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,5); 15 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,5);
16 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,6); 16 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,6);
end; end;
end; end;
+2 -2
View File
@@ -1,6 +1,6 @@
object FormCompteur: TFormCompteur object FormCompteur: TFormCompteur
Left = 550 Left = 614
Top = 218 Top = 296
Width = 258 Width = 258
Height = 262 Height = 262
BorderStyle = bsSizeToolWin BorderStyle = bsSizeToolWin
+69 -30
View File
@@ -508,31 +508,39 @@ begin
// le compteurs 1 provient de bitmaps // le compteurs 1 provient de bitmaps
// le compteur 2 et 3 sont dessinés par // le compteur 2 et 3 sont dessinés par
with param do with param do
begin begin
case typCompt of case typCompt of
1 : begin 1 : begin
// le compteur 1 provient d'une image // le compteur 1 provient d'une image
StretchDraw(rect(0,0,Lim,Him),Formprinc.ImageCompteur1.Picture.Bitmap); StretchDraw(rect(0,0,Lim,Him),Formprinc.ImageCompteur1.Picture.Bitmap);
Brush.Style:=bsSolid; Brush.Style:=bsSolid;
Brush.Color:=$1F1A17; Brush.Color:=$1F1A17;
font.color:=ParamCompteur[1].CoulNum; font.color:=ParamCompteur[1].CoulNum;
{$IF CompilerVersion >= 28.0} {$IF CompilerVersion >= 28.0}
font.orientation:=0; font.orientation:=0;
{$IFEND} // centre de l'aiguille
font.size:=round(redx*10*RedFonte); AigCX:=round(97*redX); // le centre de l'aiguille est en 97 97
TextOut(round(50*redX),round(128*redY),'0'); AigCY:=round(97*redY);
TextOut(round(36*redX),round(90*redY),'20'); {$ELSE}
TextOut(round(50*redX),round(54*redY),'40'); // centre de l'aiguille
TextOut(round(90*redX),round(36*redY),'60'); AigCX:=round(97*redX*RedFonte); // le centre de l'aiguille est en 97 97
TextOut(round(129*redX),round(53*redY),'80'); AigCY:=round(97*redY*RedFonte);
TextOut(round(137*redX),round(91*redY),'100'); {$IFEND}
TextOut(round(126*redX),round(126*redY),'120'); font.size:=round(redx*10*RedFonte);
// centre de l'aiguille TextOut(round(50*redX),round(128*redY),'0');
AigCX:=round(98*redX); TextOut(round(40*redX),round(92*redY),'20');
AigCY:=round(98*redY); TextOut(round(56*redX),round(56*redY),'40');
rAig:=round(AigCX / 1.5); TextOut(round(94*redX),round(36*redY),'60');
angleFin:=127; // en fait vitesse maxi compteur TextOut(round(129*redX),round(53*redY),'80');
TextOut(round(137*redX),round(91*redY),'100');
TextOut(round(124*redX),round(130*redY),'120');
rAig:=round(AigCX / 1.5);
angleFin:=127; // en fait vitesse maxi compteur
end; end;
2 : begin 2 : begin
// centre de l'aiguille et longueur // centre de l'aiguille et longueur
@@ -565,12 +573,15 @@ begin
init_compteur(1,FormCompteur[1]); init_compteur(1,FormCompteur[1]);
end; end;
// initialise le compteur
// i = rang du compteur
// c : composant de destination
Procedure Init_compteur(i : integer;c : Tcomponent); Procedure Init_compteur(i : integer;c : Tcomponent);
const ofs=30; // décalage entre la taille de l'image et de la fenetre const ofs=30; // décalage entre la taille de l'image et de la fenetre
// compteurs fenetre principale // compteurs fenetre principale
HautTb=10; // hauteur trackbar HautTb=10; // hauteur trackbar
ofsGBH=15; // marge haut du groupbox ofsGBH=15; // marge haut du groupbox
ofsGBB=8; // marge bas du groupbox ofsGBB=8; // marge bas du groupbox
var comptLoc,l,h,lim,him,hfen,mini,maxi,vmax : integer; var comptLoc,l,h,lim,him,hfen,mini,maxi,vmax : integer;
typDest : typ; typDest : typ;
@@ -591,10 +602,10 @@ begin
exit; exit;
end; end;
if (typDest=fen) or (typDest=gb) then ComptLoc:=compteur; if (typDest=fen) or (typDest=gb) then ComptLoc:=compteur; // compteur est une variable globale qui désigne le type de compteur de la grande fenetre de compteur
if typDest=im then ComptLoc:=formconfig.ComboBoxCompt.ItemIndex+1; if typDest=im then ComptLoc:=formconfig.ComboBoxCompt.ItemIndex+1;
case ComptLoc of case ComptLoc of // 1=compteur 1, 2=compteur 2 , 3=compteur tachro
1 : 1 :
begin begin
mini:=-135; mini:=-135;
@@ -679,8 +690,18 @@ begin
paramCompt.imgH:=him; //HautCompt-HautTb-ofsGBH-ofsGBB; paramCompt.imgH:=him; //HautCompt-HautTb-ofsGBH-ofsGBB;
Img.picture.Bitmap.Width:=lim; Img.picture.Bitmap.Width:=lim;
Img.picture.Bitmap.Height:=him; //HautCompt-HautTb-ofsGBH-ofsGBB; Img.picture.Bitmap.Height:=him; //HautCompt-HautTb-ofsGBH-ofsGBB;
paramcompt.redX:=Lim/l;
paramcompt.redY:=Him/h; if ComptLoc=1 then
begin
paramcompt.redX:=Lim/l/RedFonte; // pour le compteur 1; il faut intégrer le facteur de réduction
paramcompt.redY:=Him/h/RedFonte;
end
else
begin
paramcompt.redX:=Lim/l;
paramcompt.redY:=Him/h;
end;
paramcompt.ImgL:=Lim; paramcompt.ImgL:=Lim;
paramcompt.ImgH:=Him; paramcompt.ImgH:=Him;
tb.Top:=him+ofsGBH; // position de la trackbar tb.Top:=him+ofsGBH; // position de la trackbar
@@ -711,8 +732,17 @@ begin
if typDest=fen then if typDest=fen then
begin begin
formCompteur[i].ImageCompteur.width:=Lim; formCompteur[i].ImageCompteur.width:=Lim;
Scompteur[i].paramcompt.redX:=Lim/l; if ComptLoc=1 then
Scompteur[i].paramcompt.redY:=Him/h; begin
Scompteur[i].paramcompt.redX:=Lim/l/RedFonte;
Scompteur[i].paramcompt.redY:=Him/h/RedFonte;
end
else
begin
Scompteur[i].paramcompt.redX:=Lim/l;
Scompteur[i].paramcompt.redY:=Him/h;
end;
Scompteur[i].paramcompt.ImgL:=Lim; Scompteur[i].paramcompt.ImgL:=Lim;
Scompteur[i].paramcompt.ImgH:=Him; Scompteur[i].paramcompt.ImgH:=Him;
case compteur of case compteur of
@@ -803,8 +833,17 @@ begin
Image.Width:=lim; Image.Width:=lim;
Image.Height:=him; Image.Height:=him;
paramcomptIm.redX:=Lim/l; if ComptLoc=1 then
paramcomptIm.redY:=Him/h; begin
paramcomptIm.redX:=Lim/l/RedFonte;
paramcomptIm.redY:=Him/h/RedFonte;
end
else
begin
paramcomptIm.redX:=Lim/l;
paramcomptIm.redY:=Him/h;
end;
paramcomptIm.ImgL:=Lim; paramcomptIm.ImgL:=Lim;
paramcomptIm.ImgH:=Him; paramcomptIm.ImgH:=Him;
i:=formconfig.ComboBoxCompt.Itemindex+1; i:=formconfig.ComboBoxCompt.Itemindex+1;
+2 -2
View File
@@ -1573,7 +1573,7 @@ object FormConfig: TFormConfig
Top = 8 Top = 8
Width = 633 Width = 633
Height = 505 Height = 505
ActivePage = TabSheetBouton ActivePage = TabSheetCDM
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack Font.Color = clBlack
Font.Height = -11 Font.Height = -11
@@ -5099,7 +5099,7 @@ object FormConfig: TFormConfig
Top = 16 Top = 16
Width = 337 Width = 337
Height = 457 Height = 457
ActivePage = TtabSheetEt ActivePage = TabSheetTrGen
TabOrder = 3 TabOrder = 3
object TabSheetTrGen: TTabSheet object TabSheetTrGen: TTabSheet
Caption = 'G'#233'n'#233'ral' Caption = 'G'#233'n'#233'ral'
+37 -1
View File
@@ -1146,7 +1146,7 @@ var s : string;
begin begin
result:=false; result:=false;
// déconnexion de l'ancienne liaison éventuelle // déconnexion de l'ancienne liaison éventuelle
Formprinc.ClientSocketCDM.Close; ClientSocketCDM.Close;
if (AdresseIPCDM<>'0') and IpOk(AdresseIPCDM) then if (AdresseIPCDM<>'0') and IpOk(AdresseIPCDM) then
begin begin
@@ -7551,9 +7551,39 @@ var i,j,x,y,l,k,LongestLength,PixelLength : integer;
trouve : boolean; trouve : boolean;
param : TparamCompt; param : TparamCompt;
p: pointer; p: pointer;
comp : tComponent;
tlE : tLabeledEdit;
re : tEdit;
begin begin
if AffEvt or (debug=1) then Affiche('Création fenêtre config',clLime); if AffEvt or (debug=1) then Affiche('Création fenêtre config',clLime);
{$IF CompilerVersion >= 28.0}
// composants à repasser en style de base car on change la couleur de fond
EditP1.StyleName:='Windows';
EditP2.StyleName:='Windows';
EditP3.StyleName:='Windows';
EditP4.StyleName:='Windows';
EditAigTriple.StyleName:='Windows';
// énumérer tous les composants pour Tedit
for i:=0 to Formconfig.ComponentCount-1 do
begin
comp:=formConfig.Components[i];
if comp is tEdit then
begin
re:=comp as tEdit;
if (re.Name<>'EditLAY') and (re.name<>'EditcomUSB') and (re.name<>'EditNomTrain') and
(re.Name<>'EditNomPeriph') and (re.name<>'EditPortCde') then
re.alignment:=taRightJustify;
end;
if comp is tLabeledEdit then
begin
tle:=comp as tLabeledEdit;
tle.alignment:=taRightJustify;
end;
end;
{$IFEND}
editAdrIPCDM.Hint:='Adresse IP du PC sur lequel CDM rail s''exécute'+#13+'ou 127.0.0.1 pour indiquer ce pc'; editAdrIPCDM.Hint:='Adresse IP du PC sur lequel CDM rail s''exécute'+#13+'ou 127.0.0.1 pour indiquer ce pc';
ValueListEditor.Visible:=true; ValueListEditor.Visible:=true;
ImageAffiche.stretch:=true; ImageAffiche.stretch:=true;
@@ -7570,6 +7600,7 @@ begin
'-> NON_OU'; '-> NON_OU';
ButtonAjouteVar.Hint:='Ajoute une variable'+#13+'->'+NomFonc[5]+#13+'->'+NomFonc[6]+#13+'->'+NomFonc[7]+#13+'->'+NomFonc[8]+#13+'->'+NomFonc[9]; ButtonAjouteVar.Hint:='Ajoute une variable'+#13+'->'+NomFonc[5]+#13+'->'+NomFonc[6]+#13+'->'+NomFonc[7]+#13+'->'+NomFonc[8]+#13+'->'+NomFonc[9];
ButtonAjouteVar.ShowHint:=true; ButtonAjouteVar.ShowHint:=true;
ImageCtc.Stretch:=false;
// liste des paramètres du mode expert de la ValueListEditor // liste des paramètres du mode expert de la ValueListEditor
// syntaxe des masques: // syntaxe des masques:
@@ -17155,6 +17186,7 @@ begin
EditDecal.Text:=IntToSTR(detecteur[adr].distArret); EditDecal.Text:=IntToSTR(detecteur[adr].distArret);
RadioButtonArrFin.Checked:=detecteur[adr].ModeArret=1; RadioButtonArrFin.Checked:=detecteur[adr].ModeArret=1;
RadioButtonARMil.Checked:=detecteur[adr].ModeArret=2; RadioButtonARMil.Checked:=detecteur[adr].ModeArret=2;
if detecteur[adr].ModeArret=1 then editDecal.Enabled:=true else editDecal.Enabled:=false;
end; end;
end; end;
@@ -17657,6 +17689,7 @@ begin
labelInfo.caption:='Erreur : la distance d''arrêt est supérieure à la longueur du détecteur'; labelInfo.caption:='Erreur : la distance d''arrêt est supérieure à la longueur du détecteur';
end; end;
detecteur[r].ModeArret:=1; detecteur[r].ModeArret:=1;
editDecal.Enabled:=true;
ListBoxDet.items[ligneclicDet]:=encode_detecteur(ligneclicDet+1); ListBoxDet.items[ligneclicDet]:=encode_detecteur(ligneclicDet+1);
ListBoxDet.selected[ligneclicDet]:=true; ListBoxDet.selected[ligneclicDet]:=true;
end; end;
@@ -17668,6 +17701,7 @@ begin
r:=adresse_detecteur[ligneclicDet+1]; r:=adresse_detecteur[ligneclicDet+1];
detecteur[r].ModeArret:=2; detecteur[r].ModeArret:=2;
LabelInfo.Caption:=''; LabelInfo.Caption:='';
editDecal.Enabled:=false;
ListBoxDet.items[ligneclicDet]:=encode_detecteur(ligneclicDet+1); ListBoxDet.items[ligneclicDet]:=encode_detecteur(ligneclicDet+1);
ListBoxDet.selected[ligneclicDet]:=true; ListBoxDet.selected[ligneclicDet]:=true;
end; end;
@@ -18025,6 +18059,7 @@ procedure supprime_element_fonction(fonc,index : integer);
var i,n : integer; var i,n : integer;
begin begin
n:=fonction[fonc,0].adresse; n:=fonction[fonc,0].adresse;
if index=0 then fonction[fonc,0].adresse:=0; // si on supprime une fonction
for i:=index to n-1 do for i:=index to n-1 do
begin begin
fonction[fonc,i]:=fonction[fonc,i+1]; fonction[fonc,i]:=fonction[fonc,i+1];
@@ -19736,6 +19771,7 @@ begin
buttonCoulGrad.enabled:=true; buttonCoulGrad.enabled:=true;
buttonCoulFond.enabled:=true; buttonCoulFond.enabled:=true;
end; end;
init_compteur(1,ImageCtC); init_compteur(1,ImageCtC);
end; end;
+21 -20
View File
@@ -1,6 +1,6 @@
object FormDebug: TFormDebug object FormDebug: TFormDebug
Left = 258 Left = 194
Top = 1 Top = 132
VertScrollBar.Increment = 67 VertScrollBar.Increment = 67
VertScrollBar.Tracking = True VertScrollBar.Tracking = True
VertScrollBar.Visible = False VertScrollBar.Visible = False
@@ -32,7 +32,6 @@ object FormDebug: TFormDebug
Width = 872 Width = 872
Height = 677 Height = 677
HorzScrollBar.Visible = False HorzScrollBar.Visible = False
VertScrollBar.Position = 96
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight, akBottom]
Color = clBtnFace Color = clBtnFace
ParentColor = False ParentColor = False
@@ -42,7 +41,7 @@ object FormDebug: TFormDebug
673) 673)
object LabelTitreDebug: TLabel object LabelTitreDebug: TLabel
Left = 475 Left = 475
Top = -88 Top = 4
Width = 131 Width = 131
Height = 18 Height = 18
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -56,7 +55,7 @@ object FormDebug: TFormDebug
end end
object Label1: TLabel object Label1: TLabel
Left = 627 Left = 627
Top = -86 Top = 6
Width = 108 Width = 108
Height = 13 Height = 13
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -72,7 +71,7 @@ object FormDebug: TFormDebug
end end
object RichDebug: TRichEdit object RichDebug: TRichEdit
Left = 0 Left = 0
Top = -96 Top = 0
Width = 454 Width = 454
Height = 753 Height = 753
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
@@ -86,7 +85,7 @@ object FormDebug: TFormDebug
end end
object ButtonRazTout: TButton object ButtonRazTout: TButton
Left = 465 Left = 465
Top = 120 Top = 216
Width = 97 Width = 97
Height = 25 Height = 25
Hint = Hint =
@@ -101,7 +100,7 @@ object FormDebug: TFormDebug
end end
object ButtonCop: TButton object ButtonCop: TButton
Left = 465 Left = 465
Top = 152 Top = 248
Width = 97 Width = 97
Height = 41 Height = 41
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -118,7 +117,7 @@ object FormDebug: TFormDebug
end end
object ButtonAffEvtChrono: TButton object ButtonAffEvtChrono: TButton
Left = 465 Left = 465
Top = 200 Top = 296
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -129,7 +128,7 @@ object FormDebug: TFormDebug
end end
object ButtonCherche: TButton object ButtonCherche: TButton
Left = 465 Left = 465
Top = 240 Top = 336
Width = 97 Width = 97
Height = 25 Height = 25
Hint = 'Cherche la cha'#238'ne "erreur"' Hint = 'Cherche la cha'#238'ne "erreur"'
@@ -142,7 +141,7 @@ object FormDebug: TFormDebug
end end
object ButtonEcrLog: TButton object ButtonEcrLog: TButton
Left = 465 Left = 465
Top = 88 Top = 184
Width = 97 Width = 97
Height = 29 Height = 29
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -152,7 +151,7 @@ object FormDebug: TFormDebug
end end
object ButtonRazTampon: TButton object ButtonRazTampon: TButton
Left = 465 Left = 465
Top = 272 Top = 368
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -163,7 +162,7 @@ object FormDebug: TFormDebug
end end
object ButtonRazLog: TButton object ButtonRazLog: TButton
Left = 465 Left = 465
Top = 312 Top = 408
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -174,7 +173,7 @@ object FormDebug: TFormDebug
end end
object MemoEvtDet: TRichEdit object MemoEvtDet: TRichEdit
Left = 570 Left = 570
Top = 90 Top = 186
Width = 272 Width = 272
Height = 263 Height = 263
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -185,7 +184,7 @@ object FormDebug: TFormDebug
end end
object GroupBox5: TGroupBox object GroupBox5: TGroupBox
Left = 462 Left = 462
Top = 360 Top = 456
Width = 380 Width = 380
Height = 57 Height = 57
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -252,7 +251,7 @@ object FormDebug: TFormDebug
end end
object GroupBox6: TGroupBox object GroupBox6: TGroupBox
Left = 462 Left = 462
Top = 424 Top = 520
Width = 380 Width = 380
Height = 52 Height = 52
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -329,7 +328,7 @@ object FormDebug: TFormDebug
end end
object GroupBoxPrim: TGroupBox object GroupBoxPrim: TGroupBox
Left = 464 Left = 464
Top = 488 Top = 584
Width = 378 Width = 378
Height = 185 Height = 185
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -432,7 +431,9 @@ object FormDebug: TFormDebug
Top = 16 Top = 16
Width = 57 Width = 57
Height = 49 Height = 49
Hint = 'Test si des aiguillages sont d'#233'vi'#233's apr'#232's le signal' Hint =
'Test si des aiguillages pris en pointe sont d'#233'vi'#233's apr'#232's le sign' +
'al'
Caption = 'Aig d'#233'vi'#233' apr'#232's signal' Caption = 'Aig d'#233'vi'#233' apr'#232's signal'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
@@ -500,7 +501,7 @@ object FormDebug: TFormDebug
end end
object GroupBox2: TGroupBox object GroupBox2: TGroupBox
Left = 466 Left = 466
Top = -68 Top = 28
Width = 376 Width = 376
Height = 149 Height = 149
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -713,7 +714,7 @@ object FormDebug: TFormDebug
end end
object EditNivDebug: TEdit object EditNivDebug: TEdit
Left = 751 Left = 751
Top = -88 Top = 4
Width = 49 Width = 49
Height = 21 Height = 21
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
+18 -23
View File
@@ -1,6 +1,6 @@
object FormModifAction: TFormModifAction object FormModifAction: TFormModifAction
Left = 542 Left = 355
Top = 189 Top = 223
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Modifier une action' Caption = 'Modifier une action'
ClientHeight = 443 ClientHeight = 443
@@ -60,7 +60,7 @@ object FormModifAction: TFormModifAction
Top = 64 Top = 64
Width = 729 Width = 729
Height = 337 Height = 337
ActivePage = TabSheetDecl ActivePage = TabSheetOp
MultiLine = True MultiLine = True
TabOrder = 1 TabOrder = 1
object TabSheetDecl: TTabSheet object TabSheetDecl: TTabSheet
@@ -517,7 +517,7 @@ object FormModifAction: TFormModifAction
Top = 32 Top = 32
Width = 217 Width = 217
Height = 21 Height = 21
ItemHeight = 0 ItemHeight = 13
TabOrder = 0 TabOrder = 0
OnChange = ComboBoxFamilleChange OnChange = ComboBoxFamilleChange
end end
@@ -544,6 +544,7 @@ object FormModifAction: TFormModifAction
Hint = 'Liste chronologique des op'#233'rations '#224' effectuer' Hint = 'Liste chronologique des op'#233'rations '#224' effectuer'
ItemHeight = 13 ItemHeight = 13
ParentShowHint = False ParentShowHint = False
PopupMenu = PopupMenuOP
ShowHint = True ShowHint = True
TabOrder = 2 TabOrder = 2
OnDblClick = ListBoxOperationsDblClick OnDblClick = ListBoxOperationsDblClick
@@ -721,7 +722,7 @@ object FormModifAction: TFormModifAction
Height = 21 Height = 21
Hint = 'Nom du p'#233'riph'#233'rique d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"' Hint = 'Nom du p'#233'riph'#233'rique d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
Style = csDropDownList Style = csDropDownList
ItemHeight = 0 ItemHeight = 13
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 4 TabOrder = 4
@@ -837,29 +838,23 @@ object FormModifAction: TFormModifAction
object OpenDialogSon: TOpenDialog object OpenDialogSon: TOpenDialog
Left = 680 Left = 680
end end
object PopupMenuL: TPopupMenu object PopupMenuOP: TPopupMenu
Left = 692 Left = 680
Top = 104 Top = 32
object Monter1: TMenuItem object Monteropration1: TMenuItem
Caption = 'Monter' Caption = 'Monter op'#233'ration'
OnClick = Monteropration1Click
end end
object Descendre1: TMenuItem object Descendreopration1: TMenuItem
Caption = 'Descendre' Caption = 'Descendre op'#233'ration'
OnClick = Descendreopration1Click
end end
object N1: TMenuItem object N1: TMenuItem
Caption = '-' Caption = '-'
end end
object Supprimer1: TMenuItem object Supprimeropration1: TMenuItem
Caption = 'Supprimer' Caption = 'Supprimer op'#233'ration'
end OnClick = Supprimeropration1Click
object N2: TMenuItem
Caption = '-'
end
object outdployer1: TMenuItem
Caption = 'Tout d'#233'ployer'
end
object outcontracter1: TMenuItem
Caption = 'Tout contracter'
end end
end end
end end
+44 -19
View File
@@ -74,19 +74,16 @@ type
RadioEtatSignal: TRadioGroup; RadioEtatSignal: TRadioGroup;
SpinEditEtatop: TSpinEdit; SpinEditEtatop: TSpinEdit;
LabelEtatOp: TLabel; LabelEtatOp: TLabel;
PopupMenuL: TPopupMenu;
Monter1: TMenuItem;
Descendre1: TMenuItem;
N1: TMenuItem;
Supprimer1: TMenuItem;
N2: TMenuItem;
outdployer1: TMenuItem;
outcontracter1: TMenuItem;
ButtonFonction: TButton; ButtonFonction: TButton;
ButtonVoirFonc: TButton; ButtonVoirFonc: TButton;
LabelInfoFonc: TLabel; LabelInfoFonc: TLabel;
Label2InfoFonction: TLabel; Label2InfoFonction: TLabel;
SpeedButton1: TSpeedButton; SpeedButton1: TSpeedButton;
PopupMenuOP: TPopupMenu;
Monteropration1: TMenuItem;
Descendreopration1: TMenuItem;
N1: TMenuItem;
Supprimeropration1: TMenuItem;
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure ListBoxOperDrawItem(Control: TWinControl; Index: Integer; procedure ListBoxOperDrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState); Rect: TRect; State: TOwnerDrawState);
@@ -142,6 +139,9 @@ type
procedure ButtonFonctionClick(Sender: TObject); procedure ButtonFonctionClick(Sender: TObject);
procedure ButtonVoirFoncClick(Sender: TObject); procedure ButtonVoirFoncClick(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject); procedure SpeedButton1Click(Sender: TObject);
procedure Supprimeropration1Click(Sender: TObject);
procedure Monteropration1Click(Sender: TObject);
procedure Descendreopration1Click(Sender: TObject);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -1212,12 +1212,12 @@ begin
supprime_operation; supprime_operation;
end; end;
procedure TFormModifAction.SpinButton1UpClick(Sender: TObject); procedure monte_operation;
var i,indexSrc,idBD,idOp,no : integer; var i,indexSrc,idBD,idOp,no : integer;
top : Toperation; top : Toperation;
s : string; s : string;
begin begin
indexSrc:=listboxOperations.ItemIndex; indexSrc:=FormModifAction.listboxOperations.ItemIndex;
if indexSrc<0 then exit; if indexSrc<0 then exit;
idBD:=ligneClicAct+1; idBD:=ligneClicAct+1;
idop:=indexSrc+1; idop:=indexSrc+1;
@@ -1231,8 +1231,8 @@ begin
// réencoder la ligne // réencoder la ligne
s:=encode_actions(idBD); s:=encode_actions(idBD);
// maj combobox // maj combobox
ComboBoxActions.Items[idBD-1]:=s; FormModifAction.ComboBoxActions.Items[idBD-1]:=s;
ComboBoxActions.ItemIndex:=idbd-1; FormModifAction.ComboBoxActions.ItemIndex:=idbd-1;
// maj opérations // maj opérations
with FormModifAction.ListBoxOperations do with FormModifAction.ListBoxOperations do
@@ -1242,19 +1242,24 @@ begin
begin begin
no:=Tablo_Action[idBD].tabloOp[i].numoperation; no:=Tablo_Action[idBD].tabloOp[i].numoperation;
s:=affecte_operation(no); s:=affecte_operation(no);
ListBoxOperations.Items.add(s); FormModifAction.ListBoxOperations.Items.add(s);
itemHeight:=16; itemHeight:=16;
end; end;
ItemIndex:=indexSrc-1; ItemIndex:=indexSrc-1;
end; end;
end; end;
procedure TFormModifAction.SpinButton1DownClick(Sender: TObject); procedure TFormModifAction.SpinButton1UpClick(Sender: TObject);
var no,i,indexSrc,idBD,idOp : integer; begin
monte_operation;
end;
Procedure Descend_operation;
var no,i,indexSrc,idBD,idOp : integer;
top : Toperation; top : Toperation;
s : string; s : string;
begin begin
indexSrc:=listboxOperations.ItemIndex; indexSrc:=FormModifAction.listboxOperations.ItemIndex;
if indexSrc<0 then exit; if indexSrc<0 then exit;
idBD:=ligneClicAct+1; idBD:=ligneClicAct+1;
idop:=indexSrc+1; idop:=indexSrc+1;
@@ -1269,8 +1274,8 @@ begin
// réencoder la ligne // réencoder la ligne
s:=encode_actions(idBD); s:=encode_actions(idBD);
// maj combobox // maj combobox
ComboBoxActions.Items[idBD-1]:=s; FormModifAction.ComboBoxActions.Items[idBD-1]:=s;
ComboBoxActions.ItemIndex:=idbd-1; FormModifAction.ComboBoxActions.ItemIndex:=idbd-1;
// maj opérations // maj opérations
with FormModifAction.ListBoxOperations do with FormModifAction.ListBoxOperations do
@@ -1280,7 +1285,7 @@ begin
begin begin
no:=Tablo_Action[idBD].tabloOp[i].numoperation; no:=Tablo_Action[idBD].tabloOp[i].numoperation;
s:=affecte_operation(no); s:=affecte_operation(no);
ListBoxOperations.Items.Add(s); FormModifAction.ListBoxOperations.Items.Add(s);
itemHeight:=16; itemHeight:=16;
end; end;
@@ -1289,6 +1294,11 @@ begin
Config_Modifie:=true; Config_Modifie:=true;
end; end;
procedure TFormModifAction.SpinButton1DownClick(Sender: TObject);
begin
Descend_operation;
end;
procedure maj_combocactions(i : integer); procedure maj_combocactions(i : integer);
var s : string; var s : string;
begin begin
@@ -1864,4 +1874,19 @@ begin
close; close;
end; end;
procedure TFormModifAction.Supprimeropration1Click(Sender: TObject);
begin
supprime_operation;
end;
procedure TFormModifAction.Monteropration1Click(Sender: TObject);
begin
monte_operation;
end;
procedure TFormModifAction.Descendreopration1Click(Sender: TObject);
begin
descend_operation;
end;
end. end.
+15 -15
View File
@@ -129,7 +129,7 @@ JauneCliRalen60LEB=19;
var var
FormPilote: TFormPilote; FormPilote: TFormPilote;
EtatFeuPilote : word; EtatSignalPilote : word;
AdrPilote : integer; AdrPilote : integer;
tableLEB : array[1..41,1..19] of tableLEB : array[1..41,1..19] of
record record
@@ -150,29 +150,29 @@ procedure dessine_signal_pilote;
var i,ancienEtat : integer; var i,ancienEtat : integer;
Vcanvas : Tcanvas; Vcanvas : Tcanvas;
begin begin
i:=Index_Signal(AdrPilote); // adresse du feu d'origine i:=Index_Signal(AdrPilote); // adresse du signal d'origine
if i<>0 then if i<>0 then
//ImagePilote.Picture.Bitmap:=FormPilote.ImagePilote.picture.bitmap; //ImagePilote.Picture.Bitmap:=FormPilote.ImagePilote.picture.bitmap;
EtatFeuPilote:=Signaux[0].EtatSignal; EtatSignalPilote:=Signaux[0].EtatSignal;
AncienEtat:=Signaux[0].ancienEtat; AncienEtat:=Signaux[0].ancienEtat;
Vcanvas:=FormPilote.ImagePilote.picture.bitmap.Canvas; Vcanvas:=FormPilote.ImagePilote.picture.bitmap.Canvas;
case Signaux[i].aspect of case Signaux[i].aspect of
// feux de signalisation // feux de signalisation
2 : dessine_signal2(Vcanvas,0,0,1,1,EtatFeupilote,1,i); 2 : dessine_signal2(Vcanvas,0,0,1,1,EtatSignalPilote,1,i);
3 : dessine_signal3(Vcanvas,0,0,1,1,EtatFeupilote,1,i); 3 : dessine_signal3(Vcanvas,0,0,1,1,EtatSignalPilote,1,i);
4 : dessine_signal4(VCanvas,0,0,1,1,EtatFeupilote,1,i); 4 : dessine_signal4(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
5 : dessine_signal5(VCanvas,0,0,1,1,EtatFeupilote,1,i); 5 : dessine_signal5(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
7 : dessine_signal7(VCanvas,0,0,1,1,EtatFeupilote,1,i); 7 : dessine_signal7(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
9 : dessine_signal9(VCanvas,0,0,1,1,EtatFeupilote,1,i); 9 : dessine_signal9(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
20 : dessine_signal20(VCanvas,0,0,1,1,EtatFeupilote,1,Signaux[i].adresse); 20 : dessine_signal20(VCanvas,0,0,1,1,EtatSignalPilote,1,Signaux[i].adresse);
// indicateurs de direction // indicateurs de direction
12 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,2); 12 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,2);
13 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,3); 13 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,3);
14 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,4); 14 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,4);
15 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,5); 15 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,5);
16 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,6); 16 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,6);
end; end;
end; end;
+8 -45
View File
@@ -1,11 +1,11 @@
object FormPrinc: TFormPrinc object FormPrinc: TFormPrinc
Left = 272 Left = 134
Top = 402 Top = 277
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
BorderStyle = bsNone BorderStyle = bsNone
Caption = 'Signaux complexes' Caption = 'Signaux complexes'
ClientHeight = 513 ClientHeight = 513
ClientWidth = 1094 ClientWidth = 847
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@@ -22,7 +22,7 @@ object FormPrinc: TFormPrinc
OnKeyDown = FormKeyDown OnKeyDown = FormKeyDown
OnResize = FormResize OnResize = FormResize
DesignSize = ( DesignSize = (
1094 847
513) 513)
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
@@ -1431,7 +1431,7 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object LabelClock: TLabel object LabelClock: TLabel
Left = 1002 Left = 755
Top = 0 Top = 0
Width = 85 Width = 85
Height = 22 Height = 22
@@ -5421,7 +5421,7 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Label1: TLabel object Label1: TLabel
Left = 792 Left = 545
Top = 4 Top = 4
Width = 89 Width = 89
Height = 13 Height = 13
@@ -5429,7 +5429,7 @@ object FormPrinc: TFormPrinc
Caption = 'Nombre de trains : ' Caption = 'Nombre de trains : '
end end
object LabelNbTrains: TLabel object LabelNbTrains: TLabel
Left = 888 Left = 641
Top = 2 Top = 2
Width = 9 Width = 9
Height = 19 Height = 19
@@ -5445,7 +5445,7 @@ object FormPrinc: TFormPrinc
object StatusBar1: TStatusBar object StatusBar1: TStatusBar
Left = 0 Left = 0
Top = 491 Top = 491
Width = 1094 Width = 847
Height = 22 Height = 22
Panels = < Panels = <
item item
@@ -6460,16 +6460,6 @@ object FormPrinc: TFormPrinc
end end
end end
end end
object ClientSocketCDM: TClientSocket
Active = False
ClientType = ctNonBlocking
Port = 0
OnConnect = ClientSocketCDMConnect
OnDisconnect = ClientSocketCDMDisconnect
OnRead = ClientSocketCDMRead
OnError = ClientSocketCDMError
Left = 296
end
object OpenDialog: TOpenDialog object OpenDialog: TOpenDialog
Left = 584 Left = 584
Top = 16 Top = 16
@@ -6509,33 +6499,6 @@ object FormPrinc: TFormPrinc
OnClick = Informationsdusignal1Click OnClick = Informationsdusignal1Click
end end
end end
object ClientSocketCde1: TClientSocket
Active = False
ClientType = ctNonBlocking
Port = 0
OnConnect = ClientSocketCde1Connect
OnRead = ClientSocketCde1Read
OnError = ClientSocketCde1Error
Left = 360
end
object ClientSocketCde2: TClientSocket
Active = False
ClientType = ctNonBlocking
Port = 0
OnConnect = ClientSocketCde2Connect
OnRead = ClientSocketCde2Read
OnError = ClientSocketCde2Error
Left = 392
end
object ServerSocket: TServerSocket
Active = False
Port = 0
ServerType = stNonBlocking
OnAccept = ServerSocketAccept
OnClientDisconnect = ServerSocketClientDisconnect
OnClientRead = ServerSocketClientRead
Left = 320
end
object PopupMenuTrains: TPopupMenu object PopupMenuTrains: TPopupMenu
OnPopup = PopupMenuTrainsPopup OnPopup = PopupMenuTrainsPopup
Left = 480 Left = 480
+589 -234
View File
File diff suppressed because it is too large Load Diff
+57 -8
View File
@@ -85,13 +85,38 @@ uses UnitDebug,unitTCO,UnitConfig, UnitRouteTrains , Selection_Train;
// efface la route parcoursDet[] du TCO indexTCOcourant // efface la route parcoursDet[] du TCO indexTCOcourant
// si affecte_loco=true : affecte la loco rencontrée aux cantons // si affecte_loco=true : affecte la loco rencontrée aux cantons
procedure efface_route_tco(affecte_loco :boolean); procedure efface_route_tco; //(affecte_loco :boolean);
var n,det1,nti,x,y,det2,i,indexAig : integer; var n,det1,nti,x,y,det2,i,indexAig,tcoC : integer;
t : tequipement; t : tequipement;
trouve : boolean;
begin begin
if Nbretco<1 then exit; if Nbretco<1 then exit;
n:=parcoursdet[0].adresse; n:=parcoursdet[0].adresse;
det1:=parcoursdet[1].adresse; det1:=parcoursdet[1].adresse;
// trouver à quel TCO appartient le det1
tcoC:=1;
repeat
y:=1;
repeat
x:=1;
repeat
trouve:=tco[tcoC,x,y].Adresse=det1;
inc(x);
until (x>NbreCellX[tcoC]) or trouve;
inc(y);
until (y>NbreCellY[tcoC]) or trouve;
inc(tcoC);
until (tcoC>NbreTCO) or trouve;
if trouve then dec(tcoC);
if trouve=false then
begin
Affiche('Erreur 57 : détecteur '+intToSTR(det1)+' trouvé dans aucun des TCO',clOrange);
exit;
end;
for i:=2 to n do for i:=2 to n do
begin begin
det2:=parcoursdet[i].adresse; det2:=parcoursdet[i].adresse;
@@ -104,7 +129,7 @@ begin
end; end;
if t=det then if t=det then
begin begin
zone_tco(indexTCOcourant,det1,det2,1,0,0,true,affecte_loco); // mode "aiguillages mis" zone_tco(TcoC,det1,det2,1,0,0,true); // mode "aiguillages mis"
det1:=det2; det1:=det2;
end; end;
end; end;
@@ -148,14 +173,38 @@ end;
// Affiche sans effacer l'ancienne, la route du TCO indexTCOcourant du tableau ParcoursDet[] // Affiche sans effacer l'ancienne, la route du TCO indexTCOcourant du tableau ParcoursDet[]
function Affiche_route_TCO : boolean ; function Affiche_route_TCO : boolean ;
var i,n,det1,det2,indexAig : integer; var i,n,det1,det2,indexAig,tcoC,x,y : integer;
t :tequipement; t :tequipement;
ok : boolean; ok,trouve : boolean;
begin begin
if Nbretco<1 then begin result:=false;exit;end; if Nbretco<1 then begin result:=false;exit;end;
n:=ParcoursDet[0].adresse; n:=ParcoursDet[0].adresse;
ok:=true; ok:=true;
det1:=parcoursDet[1].adresse; det1:=parcoursDet[1].adresse;
// trouver à quel TCO appartient le det1
tcoC:=1;
repeat
y:=1;
repeat
x:=1;
repeat
trouve:=tco[tcoC,x,y].Adresse=det1;
inc(x);
until (x>NbreCellX[TcoC]) or trouve;
inc(y);
until (y>NbreCellY[TcoC]) or trouve;
inc(tcoC);
until (tcoC>NbreTCO) or trouve;
if trouve then dec(tcoC);
if trouve=false then
begin
Affiche('Erreur 57 : détecteur '+intToSTR(det1)+' trouvé dans aucun des TCO',clOrange);
exit;
end;
for i:=2 to n do for i:=2 to n do
begin begin
t:=ParcoursDet[i].typ; t:=ParcoursDet[i].typ;
@@ -170,7 +219,7 @@ begin
begin begin
det2:=ParcoursDet[i].adresse; det2:=ParcoursDet[i].adresse;
// tco,det1,det2,train,adrTrain,Mode,posAig,affecte_loco // tco,det1,det2,train,adrTrain,Mode,posAig,affecte_loco
ok:=zone_tco(indexTCOcourant,det1,det2,1,0,1,true,false) and ok; //posAig=true=teste les routes en récursif affecte_loco=n'affecte pas la loco ok:=zone_tco(tcoC,det1,det2,1,0,1,true) and ok; //posAig=true=teste les routes en récursif affecte_loco=n'affecte pas la loco
det1:=det2; det1:=det2;
end; end;
end; end;
@@ -677,10 +726,10 @@ begin
if typ=det then if typ=det then
begin // attention on ne gère que le TCO1 begin // attention on ne gère que le TCO1
Zone_TCO(indexTCOcourant,det1,det2,1,0,0,true,false); // faire true et positionner les aiguillages Zone_TCO(indexTCOcourant,det1,det2,1,0,0,true); // faire true et positionner les aiguillages
det1:=det2; det1:=det2;
det2:=tabloroute[j,i].adresse; det2:=tabloroute[j,i].adresse;
Zone_TCO(indexTCOcourant,det1,det2,1,0,1,false,false); Zone_TCO(indexTCOcourant,det1,det2,1,0,1,false);
FormTCO[1].Caption:=intToSTR(i)+'/'+intToSTR(n)+' '+intToSTR(det1)+' '+intToSTR(det2)+ ' Arrêt par touche Echap'; FormTCO[1].Caption:=intToSTR(i)+'/'+intToSTR(n)+' '+intToSTR(det1)+' '+intToSTR(det2)+ ' Arrêt par touche Echap';
//Affiche(intToSTR(det1)+' '+intToSTR(det2),clyellow); //Affiche(intToSTR(det1)+' '+intToSTR(det2),clyellow);
end; end;
+9 -2
View File
@@ -1,6 +1,6 @@
object FormTCO: TFormTCO object FormTCO: TFormTCO
Left = 186 Left = 187
Top = 112 Top = 113
Width = 1013 Width = 1013
Height = 607 Height = 607
VertScrollBar.Visible = False VertScrollBar.Visible = False
@@ -1668,6 +1668,13 @@ object FormTCO: TFormTCO
object N12: TMenuItem object N12: TMenuItem
Caption = '-' Caption = '-'
end end
object MenuSuppTCO: TMenuItem
Caption = 'Supprimer le TCO'
OnClick = MenuSuppTCOClick
end
object N14: TMenuItem
Caption = '-'
end
object ConfigurationduTCO1: TMenuItem object ConfigurationduTCO1: TMenuItem
Caption = 'Configuration du TCO' Caption = 'Configuration du TCO'
OnClick = ConfigurationduTCO1Click OnClick = ConfigurationduTCO1Click
+164 -58
View File
@@ -172,6 +172,8 @@ type
N12: TMenuItem; N12: TMenuItem;
LabelPM: TLabel; LabelPM: TLabel;
Afficherlecompteurdevitessedutrain1: TMenuItem; Afficherlecompteurdevitessedutrain1: TMenuItem;
MenuSuppTCO: TMenuItem;
N14: TMenuItem;
//TimerTCO: TTimer; //TimerTCO: TTimer;
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormActivate(Sender: TObject); procedure FormActivate(Sender: TObject);
@@ -421,6 +423,7 @@ type
procedure Modedplacement1Click(Sender: TObject); procedure Modedplacement1Click(Sender: TObject);
procedure Button1Click(Sender: TObject); procedure Button1Click(Sender: TObject);
procedure Afficherlecompteurdevitessedutrain1Click(Sender: TObject); procedure Afficherlecompteurdevitessedutrain1Click(Sender: TObject);
procedure MenuSuppTCOClick(Sender: TObject);
public public
{ Déclarations publiques } { Déclarations publiques }
end; end;
@@ -666,8 +669,8 @@ var
procedure calcul_reduction(Var frx,fry : single;DimDestX,DimDestY : integer); procedure calcul_reduction(Var frx,fry : single;DimDestX,DimDestY : integer);
procedure calcul_cellules(indextco : integer); procedure calcul_cellules(indextco : integer);
procedure sauve_fichiers_tco; procedure sauve_fichiers_tco;
function zone_tco(indexTCO,det1,det2,train,adrTrain,mode: integer;posAig,affecte_loco : boolean) : boolean; overload; function zone_tco(indexTCO,det1,det2,train,adrTrain,mode: integer;posAig : boolean) : boolean; overload;
function zone_tco(indexTCO,adr : integer;typEl : tequipement;Sens,mode: integer;posAig,affecte_loco : boolean) : boolean; overload; function zone_tco(indexTCO,adr : integer;typEl : tequipement;Sens,mode: integer;posAig : boolean) : boolean; overload;
procedure _entoure_cell_clic(indexTCO: integer); procedure _entoure_cell_clic(indexTCO: integer);
procedure Affiche_TCO(indexTCO : integer) ; procedure Affiche_TCO(indexTCO : integer) ;
procedure affiche_cellule(indexTCO,x,y : integer); procedure affiche_cellule(indexTCO,x,y : integer);
@@ -716,6 +719,9 @@ procedure titre_fenetre(indexTCO : integer);
function IsVoieDroite(i : integer) : boolean; function IsVoieDroite(i : integer) : boolean;
function trouve_canton(el1 : integer;tel1 : tequipement;el2 : integer;tel2 : tequipement) : integer; function trouve_canton(el1 : integer;tel1 : tequipement;el2 : integer;tel2 : tequipement) : integer;
procedure origine_canton(var x,y : integer); procedure origine_canton(var x,y : integer);
procedure Supprimer_TCO(TcoS : integer);
procedure toggle_bandeau(indexTCO : integer);
function sens_train_canton(AdrTrain,Idcanton : integer) : integer;
implementation implementation
@@ -822,7 +828,11 @@ begin
else result:=0; else result:=0;
end; end;
// renvoie l'index de canton encadré par les 2 éléments el1 et el2 // renvoie l'index de canton encadré par les 2 éléments el1 et el2
// il faudrait faire par détecteur.
// ex (526,det,513,det)= 1
function trouve_canton(el1 : integer;tel1 : tequipement;el2 : integer;tel2 : tequipement) : integer; function trouve_canton(el1 : integer;tel1 : tequipement;el2 : integer;tel2 : tequipement) : integer;
var i,eLc1,eLc2 : integer; var i,eLc1,eLc2 : integer;
teLc1,teLc2 : tequipement; teLc1,teLc2 : tequipement;
@@ -833,13 +843,11 @@ begin
repeat repeat
eLc1:=canton[i].el1; teLc1:=canton[i].typ1; eLc1:=canton[i].el1; teLc1:=canton[i].typ1;
eLc2:=canton[i].el2; teLc2:=canton[i].typ2; eLc2:=canton[i].el2; teLc2:=canton[i].typ2;
// ******** modif du 20/09/2025
// il faut que les deux éléments soient présents // il faut que les deux éléments soient présents
{trouve:=((elc1=el1) and (teLc1=tel1) and (elc2=el2) and (teLc2=tel2)) or trouve:=((elc1=el1) and (teLc1=tel1) and (elc2=el2) and (teLc2=tel2)) or
((elc2=el1) and (teLc2=tel1) and (elc1=el2) and (teLc1=tel2)) ; } ((elc2=el1) and (teLc2=tel1) and (elc1=el2) and (teLc1=tel2)) ;
// il faut l'un des deux éléments présents
trouve:=( ((elc1=el1) and (teLc1=tel1)) or ((elc2=el2) and (teLc2=tel2)) ) or
( ((elc2=el1) and (teLc2=tel1)) or ((elc1=el2) and (teLc1=tel2)) ) ;
inc(i); inc(i);
until (trouve) or (i>nCantons); until (trouve) or (i>nCantons);
if trouve then result:=i-1; if trouve then result:=i-1;
@@ -1516,14 +1524,14 @@ begin
if horz then if horz then
begin begin
zone_tco(t,i,SensTCO_O,0,0,11,false,false); // demande éléments contigus à gauche (5) du canton, résultats dans var globales xCanton et tel1 zone_tco(t,i,SensTCO_O,0,0,11,false); // demande éléments contigus à gauche (5) du canton, résultats dans var globales xCanton et tel1
if xCanton=0 then tel1:=buttoir; if xCanton=0 then tel1:=buttoir;
canton[i].el1:=xCanton; canton[i].el1:=xCanton;
canton[i].typ1:=tel1; canton[i].typ1:=tel1;
canton[i].SensEl1:=SensGauche; canton[i].SensEl1:=SensGauche;
if tel1=det then detecteur[xCanton].canton1:=canton[i].numero; if tel1=det then detecteur[xCanton].canton1:=canton[i].numero;
zone_tco(t,i,SensTCO_E,0,0,11,false,false); // demande éléments contigus à droite (6) du canton, résultats dans var globales xCanton et tel1 zone_tco(t,i,SensTCO_E,0,0,11,false); // demande éléments contigus à droite (6) du canton, résultats dans var globales xCanton et tel1
if xCanton=0 then tel1:=buttoir; if xCanton=0 then tel1:=buttoir;
canton[i].el2:=xCanton; canton[i].el2:=xCanton;
canton[i].typ2:=tel1; canton[i].typ2:=tel1;
@@ -1533,14 +1541,14 @@ begin
else else
begin begin
// canton vertical // canton vertical
zone_tco(t,i,SensTCO_N,0,0,11,false,false); // demande éléments contigus en haut (7) du canton, résultats dans var globales xCanton et tel1 zone_tco(t,i,SensTCO_N,0,0,11,false); // demande éléments contigus en haut (7) du canton, résultats dans var globales xCanton et tel1
if xCanton=0 then tel1:=buttoir; if xCanton=0 then tel1:=buttoir;
canton[i].el1:=xCanton; canton[i].el1:=xCanton;
canton[i].typ1:=tel1; canton[i].typ1:=tel1;
canton[i].SensEl1:=SensHaut; canton[i].SensEl1:=SensHaut;
if tel1=det then detecteur[xCanton].canton1:=canton[i].numero; if tel1=det then detecteur[xCanton].canton1:=canton[i].numero;
zone_tco(t,i,SensTCO_S,0,0,11,false,false); // demande éléments contigus en bas (8) du canton, résultats dans var globales xCanton et tel1 zone_tco(t,i,SensTCO_S,0,0,11,false); // demande éléments contigus en bas (8) du canton, résultats dans var globales xCanton et tel1
if xCanton=0 then tel1:=buttoir; if xCanton=0 then tel1:=buttoir;
canton[i].el2:=xCanton; canton[i].el2:=xCanton;
canton[i].typ2:=tel1; canton[i].typ2:=tel1;
@@ -1645,22 +1653,22 @@ begin
// croisements ou tjd // croisements ou tjd
case Bim of case Bim of
21 : begin 21 : begin
zone_tco(t,adr1,typEl,SensTCO_E,13,false,false); // chercher 1er élément à droite - xcanton Tel1 zone_tco(t,adr1,typEl,SensTCO_E,13,false); // chercher 1er élément à droite - xcanton Tel1
tco[t,x,y].SuivE:=xCanton; tco[t,x,y].SuivE:=xCanton;
tco[t,x,y].TypeE:=tel1; tco[t,x,y].TypeE:=tel1;
if deb then Affiche('E='+intToSTR(xcanton),clLime); if deb then Affiche('E='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_SO,13,false,false); // chercher 1er élément SO zone_tco(t,adr1,typEl,SensTCO_SO,13,false); // chercher 1er élément SO
tco[t,x,y].SuivSO:=xCanton; tco[t,x,y].SuivSO:=xCanton;
tco[t,x,y].TypeSO:=tel1; tco[t,x,y].TypeSO:=tel1;
if deb then Affiche('SO='+intToSTR(xcanton),clLime); if deb then Affiche('SO='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_O,13,false,false); // élément à gauche zone_tco(t,adr1,typEl,SensTCO_O,13,false); // élément à gauche
tco[t,x,y].SuivO:=xCanton; tco[t,x,y].SuivO:=xCanton;
tco[t,x,y].TypeO:=tel1; tco[t,x,y].TypeO:=tel1;
if deb then Affiche('O='+intToSTR(xcanton),clLime); if deb then Affiche('O='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_NE,13,false,false); // chercher 1er élément NE zone_tco(t,adr1,typEl,SensTCO_NE,13,false); // chercher 1er élément NE
tco[t,x,y].SuivNE:=xCanton; tco[t,x,y].SuivNE:=xCanton;
tco[t,x,y].TypeNE:=tel1; tco[t,x,y].TypeNE:=tel1;
if deb then Affiche('NE='+intToSTR(xcanton),clLime); if deb then Affiche('NE='+intToSTR(xcanton),clLime);
@@ -1693,22 +1701,22 @@ begin
end; end;
22 : begin 22 : begin
zone_tco(t,adr1,typEl,SensTCO_E,13,false,false); // chercher 1er élément à droite - xcanton Tel1 zone_tco(t,adr1,typEl,SensTCO_E,13,false); // chercher 1er élément à droite - xcanton Tel1
tco[t,x,y].SuivE:=xCanton; tco[t,x,y].SuivE:=xCanton;
tco[t,x,y].TypeE:=tel1; tco[t,x,y].TypeE:=tel1;
if deb then Affiche('E='+intToSTR(xcanton),clLime); if deb then Affiche('E='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_SE,13,false,false); // chercher 1er élément à droite - xcanton Tel1 zone_tco(t,adr1,typEl,SensTCO_SE,13,false); // chercher 1er élément à droite - xcanton Tel1
tco[t,x,y].SuivSE:=xCanton; tco[t,x,y].SuivSE:=xCanton;
tco[t,x,y].TypeSE:=tel1; tco[t,x,y].TypeSE:=tel1;
if deb then Affiche('SE='+intToSTR(xcanton),clLime); if deb then Affiche('SE='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_O,13,false,false); // élément à gauche zone_tco(t,adr1,typEl,SensTCO_O,13,false); // élément à gauche
tco[t,x,y].SuivO:=xCanton; tco[t,x,y].SuivO:=xCanton;
tco[t,x,y].TypeO:=tel1; tco[t,x,y].TypeO:=tel1;
if deb then Affiche('O='+intToSTR(xcanton),clLime); if deb then Affiche('O='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_NO,13,false,false); // chercher 1er élément à droite - xcanton Tel1 zone_tco(t,adr1,typEl,SensTCO_NO,13,false); // chercher 1er élément à droite - xcanton Tel1
tco[t,x,y].SuivNO:=xCanton; tco[t,x,y].SuivNO:=xCanton;
tco[t,x,y].TypeNO:=tel1; tco[t,x,y].TypeNO:=tel1;
if deb then Affiche('NO='+intToSTR(xcanton),clLime); if deb then Affiche('NO='+intToSTR(xcanton),clLime);
@@ -1739,22 +1747,22 @@ begin
end; end;
end; end;
23 : begin 23 : begin
zone_tco(t,adr1,typEl,SensTCO_N,13,false,false); // haut zone_tco(t,adr1,typEl,SensTCO_N,13,false); // haut
tco[t,x,y].SuivN:=xCanton; tco[t,x,y].SuivN:=xCanton;
tco[t,x,y].TypeN:=tel1; tco[t,x,y].TypeN:=tel1;
if deb then Affiche('N='+intToSTR(xcanton),clLime); if deb then Affiche('N='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_S,13,false,false); // élément bas zone_tco(t,adr1,typEl,SensTCO_S,13,false); // élément bas
tco[t,x,y].SuivS:=xCanton; tco[t,x,y].SuivS:=xCanton;
tco[t,x,y].TypeS:=tel1; tco[t,x,y].TypeS:=tel1;
if deb then Affiche('S='+intToSTR(xcanton),clLime); if deb then Affiche('S='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_NE,13,false,false); zone_tco(t,adr1,typEl,SensTCO_NE,13,false);
tco[t,x,y].SuivNE:=xCanton; tco[t,x,y].SuivNE:=xCanton;
tco[t,x,y].TypeNE:=tel1; tco[t,x,y].TypeNE:=tel1;
if deb then Affiche('NE='+intToSTR(xcanton),clLime); if deb then Affiche('NE='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_SO,13,false,false); zone_tco(t,adr1,typEl,SensTCO_SO,13,false);
tco[t,x,y].SuivSO:=xCanton; tco[t,x,y].SuivSO:=xCanton;
tco[t,x,y].TypeSO:=tel1; tco[t,x,y].TypeSO:=tel1;
if deb then Affiche('SO='+intToSTR(xcanton),clLime); if deb then Affiche('SO='+intToSTR(xcanton),clLime);
@@ -1786,22 +1794,22 @@ begin
end; end;
25 : begin 25 : begin
zone_tco(t,adr1,typEl,SensTCO_N,13,false,false); // haut zone_tco(t,adr1,typEl,SensTCO_N,13,false); // haut
tco[t,x,y].SuivN:=xCanton; tco[t,x,y].SuivN:=xCanton;
tco[t,x,y].TypeN:=tel1; tco[t,x,y].TypeN:=tel1;
if deb then Affiche('N='+intToSTR(xcanton),clLime); if deb then Affiche('N='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_S,13,false,false); // élément bas zone_tco(t,adr1,typEl,SensTCO_S,13,false); // élément bas
tco[t,x,y].SuivS:=xCanton; tco[t,x,y].SuivS:=xCanton;
tco[t,x,y].TypeS:=tel1; tco[t,x,y].TypeS:=tel1;
if deb then Affiche('S='+intToSTR(xcanton),clLime); if deb then Affiche('S='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_NO,13,false,false); // chercher 1er élément à droite - xcanton Tel1 zone_tco(t,adr1,typEl,SensTCO_NO,13,false); // chercher 1er élément à droite - xcanton Tel1
tco[t,x,y].SuivNO:=xCanton; tco[t,x,y].SuivNO:=xCanton;
tco[t,x,y].TypeNO:=tel1; tco[t,x,y].TypeNO:=tel1;
if deb then Affiche('NO='+intToSTR(xcanton),clLime); if deb then Affiche('NO='+intToSTR(xcanton),clLime);
zone_tco(t,adr1,typEl,SensTCO_SE,13,false,false); // chercher 1er élément à droite - xcanton Tel1 zone_tco(t,adr1,typEl,SensTCO_SE,13,false); // chercher 1er élément à droite - xcanton Tel1
tco[t,x,y].SuivSE:=xCanton; tco[t,x,y].SuivSE:=xCanton;
tco[t,x,y].TypeSE:=tel1; tco[t,x,y].TypeSE:=tel1;
if deb then Affiche('SE='+intToSTR(xcanton),clLime); if deb then Affiche('SE='+intToSTR(xcanton),clLime);
@@ -2488,7 +2496,7 @@ begin
closefile(fichier); closefile(fichier);
renseigne_tous_cantons; renseigne_tous_cantons;
trier_cantons; trier_cantons;
affecte_trains_config; //affecte_trains_config;
sauve_styles_tco(indexTCO); // sauver le jeu sombre sauve_styles_tco(indexTCO); // sauver le jeu sombre
if jeucouleurs=2 then jeu_clair(indexTCO); if jeucouleurs=2 then jeu_clair(indexTCO);
@@ -4456,7 +4464,7 @@ begin
Brush.Color:=Couleur; Brush.Color:=Couleur;
pen.color:=Couleur; pen.color:=Couleur;
Pen.Mode:=pmCopy; Pen.Mode:=pmCopy;
if testbit(ep,6) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; if testbit(ep,6) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur;
MoveTo(x0,y0+hauteurCell[indexTCO]);lineto(xc,yc); MoveTo(x0,y0+hauteurCell[indexTCO]);lineto(xc,yc);
if testbit(ep,3) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; if testbit(ep,3) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur;
@@ -11193,8 +11201,8 @@ begin
if orientation=2 then //90°G if orientation=2 then //90°G
begin begin
if aspect=20 then begin x0:=0; y0:=0;end; if aspect=20 then begin x0:=0; y0:=0;end;
if aspect=9 then begin x0:=round(10*frX); y0:=hauteurCell[indexTCO]-round(tailleX*frY);end; if aspect=9 then begin x0:=round(10*frX); y0:=round(4*frY);end;
if aspect=7 then begin x0:=round(10*frX); y0:=hauteurCell[indexTCO]-round(tailleX*frY);end; if aspect=7 then begin x0:=round(10*frX); y0:=round(4*frY);end;
if aspect=5 then begin x0:=round(10*frX); y0:=round((tailleX/2)*frY);end; if aspect=5 then begin x0:=round(10*frX); y0:=round((tailleX/2)*frY);end;
if aspect=4 then begin x0:=round(10*frX); y0:=round((tailleX/2)*frY);end; if aspect=4 then begin x0:=round(10*frX); y0:=round((tailleX/2)*frY);end;
if aspect=3 then begin x0:=round(8*frX); y0:=round((tailleX/2)*frY);end; if aspect=3 then begin x0:=round(8*frX); y0:=round((tailleX/2)*frY);end;
@@ -11238,7 +11246,7 @@ begin
inverse_image(FormTCO[indexTCO].ImageTemp,ImageFeu); inverse_image(FormTCO[indexTCO].ImageTemp,ImageFeu);
// copie avec mise à l'échelle de l'image du signal // copie avec mise à l'échelle de l'image du signal
TransparentBlt(canvasDest.Handle,x0,y0,round(TailleX*frX),round(TailleY*frY), TransparentBlt(canvasDest.Handle,x0,y0,round(TailleX*frX),round(TailleY*frY),
FormTCO[indexTCO].ImageTemp.Canvas.Handle,0,0,TailleX,TailleY,clBlue); FormTCO[indexTCO].ImageTemp.Canvas.Handle,0,0,TailleX,TailleY,clBlue);
end end
else else
// copie avec mise à l'échelle de l'image du signal // copie avec mise à l'échelle de l'image du signal
@@ -11465,7 +11473,7 @@ begin
if Bimage=3 then begin xt:=3;yt:=hauteurCell[indexTCO]-round(18*fryGlob[indexTCO]);end; if Bimage=3 then begin xt:=3;yt:=hauteurCell[indexTCO]-round(18*fryGlob[indexTCO]);end;
if Bimage=4 then begin xt:=10*round(frxGlob[indexTCO]);yt:=1;end; if Bimage=4 then begin xt:=10*round(frxGlob[indexTCO]);yt:=1;end;
if Bimage=5 then begin xt:=3;yt:=hauteurCell[indexTCO]-round(18*fryGlob[indexTCO]);end; if Bimage=5 then begin xt:=3;yt:=hauteurCell[indexTCO]-round(18*fryGlob[indexTCO]);end;
if Bimage=12 then begin xt:=round(35*frxGlob[indexTCO]);yt:=2;end; if Bimage=12 then begin xt:=round(33*fryGlob[indexTCO]);yt:=1;end;
if Bimage=13 then begin xt:=LargeurCell[indexTCO]-round(30*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO]-round(15*fryGlob[indexTCO]);end; if Bimage=13 then begin xt:=LargeurCell[indexTCO]-round(30*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO]-round(15*fryGlob[indexTCO]);end;
if Bimage=14 then begin xt:=LargeurCell[indexTCO]-round(30*frxGlob[indexTCO]);yt:=1;end; if Bimage=14 then begin xt:=LargeurCell[indexTCO]-round(30*frxGlob[indexTCO]);yt:=1;end;
if Bimage=15 then begin xt:=3;yt:=1;end; if Bimage=15 then begin xt:=3;yt:=1;end;
@@ -11718,13 +11726,13 @@ begin
end; end;
end; end;
if (aspect=9) and (Oriente=1) then begin xt:=LargeurCell[indexTCO]-round(25*frxGlob[indexTCO]);yt:=round(60*fryGlob[indexTCO]);end; if (aspect=9) and (Oriente=1) then begin xt:=LargeurCell[indexTCO]-round(25*frxGlob[indexTCO]);yt:=round(60*fryGlob[indexTCO]);end;
if (aspect=9) and (Oriente=2) then begin xt:=round(10*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO]-round(17*fryGlob[indexTCO]);end; // orientation G if (aspect=9) and (Oriente=2) then begin xt:=round(10*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO]-round(20*fryGlob[indexTCO]);end; // orientation G
if (aspect=9) and (Oriente=3) then begin xt:=LargeurCell[indexTCO]+round(20*frxGlob[indexTCO]);yt:=round(10*frYGlob[indexTCO]);end; if (aspect=9) and (Oriente=3) then begin xt:=LargeurCell[indexTCO]+round(20*frxGlob[indexTCO]);yt:=round(10*frYGlob[indexTCO]);end;
if (aspect=9) and (Oriente=4) and (pied=1) then begin xt:=round(2*frxGlob[indexTCO]);yt:=round(10*frYGlob[indexTCO]);end; if (aspect=9) and (Oriente=4) and (pied=1) then begin xt:=round(2*frxGlob[indexTCO]);yt:=round(10*frYGlob[indexTCO]);end;
if (aspect=9) and (Oriente=4) and (pied=2) then begin xt:=round(3*frxGlob[indexTCO]);yt:=round(1*frYGlob[indexTCO]);end; if (aspect=9) and (Oriente=4) and (pied=2) then begin xt:=round(3*frxGlob[indexTCO]);yt:=round(1*frYGlob[indexTCO]);end;
if (aspect=7) and (Oriente=1) then begin xt:=LargeurCell[indexTCO]-round(25*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO];end; if (aspect=7) and (Oriente=1) then begin xt:=LargeurCell[indexTCO]-round(25*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO];end;
if (aspect=7) and (Oriente=2) then begin xt:=round(10*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO]-round(25*fryGlob[indexTCO]);end; if (aspect=7) and (Oriente=2) then begin xt:=round(10*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO]-round(20*fryGlob[indexTCO]);end;
if (aspect=7) and (Oriente=3) then begin xt:=LargeurCell[indexTCO]+2;yt:=round(4*frYGlob[indexTCO]);end; if (aspect=7) and (Oriente=3) then begin xt:=LargeurCell[indexTCO]+2;yt:=round(4*frYGlob[indexTCO]);end;
if (aspect=7) and (Oriente=4) and (pied=1) then begin xt:=round(2*frxGlob[indexTCO]);yt:=round(10*frYGlob[indexTCO]);end; if (aspect=7) and (Oriente=4) and (pied=1) then begin xt:=round(2*frxGlob[indexTCO]);yt:=round(10*frYGlob[indexTCO]);end;
if (aspect=7) and (Oriente=4) and (pied=2) then begin xt:=round(3*frxGlob[indexTCO]);yt:=round(1*frYGlob[indexTCO]);end; if (aspect=7) and (Oriente=4) and (pied=2) then begin xt:=round(3*frxGlob[indexTCO]);yt:=round(1*frYGlob[indexTCO]);end;
@@ -11997,6 +12005,7 @@ begin
//Screen.OnActiveControlChange := ActiveControlChanged; //Screen.OnActiveControlChange := ActiveControlChanged;
{$IF CompilerVersion >= 28.0} {$IF CompilerVersion >= 28.0}
ScrollBox.StyleName:='Windows';
BallonHint:=TballoonHint.Create(self); BallonHint:=TballoonHint.Create(self);
with BallonHint do with BallonHint do
begin begin
@@ -12097,7 +12106,7 @@ begin
xMiniSel:=99999;yMiniSel:=99999; // coordonnées cellules xMiniSel:=99999;yMiniSel:=99999; // coordonnées cellules
xMaxiSel:=0;yMaxiSel:=0; xMaxiSel:=0;yMaxiSel:=0;
SelectionAffichee[indexTCOCreate]:=false; SelectionAffichee[indexTCOCreate]:=false;
//ImageTCO.Canvas.font.Name:='Arial'; //<--- peut générer exception out of ressource!! ImageTCO.Canvas.font.Name:='Arial'; //<--- peut générer exception out of ressource!!
clTexte:=ClLime; clTexte:=ClLime;
// évite le clignotement pendant les affichages mais ne marche pas // évite le clignotement pendant les affichages mais ne marche pas
//DoubleBuffered:=true; //DoubleBuffered:=true;
@@ -12261,13 +12270,13 @@ begin
end; end;
// affiche le trajet Trace_Train[] dans le tco du train,ir =nombre d'éléments du tableau trace_train mode=couleur // affiche le trajet Trace_Train[] dans le tco du train,ir =nombre d'éléments du tableau trace_train mode=couleur
// ir=index route
// mode=0 : effacement du trajet // mode=0 : effacement du trajet
// sinon mode = couleur du train // sinon mode = couleur du train
// affecte_loco = true : procède à l'affectation du train dans les cantons procedure affiche_trajet(indexTCO,train,AdrTrain,ir,mode : integer);
// = false : ne change pas le train dans le canton var i,sx,sy,x,y,ax,ay,Bimage,adresse,IdCanton,IdTrain,AncTrain,elPrec,
procedure affiche_trajet(indexTCO,train,AdrTrain,ir,mode : integer;affecte_loco : boolean);
var i,sx,sy,x,y,ax,ay,Bimage,adresse,IdCanton,IdTrain,AncTrain,
DernierDet,sens : integer; DernierDet,sens : integer;
TypePrec: tEquipement;
cant : boolean; cant : boolean;
begin begin
// et affichage de la route // et affichage de la route
@@ -12303,7 +12312,22 @@ begin
if adresse<>0 then if adresse<>0 then
begin begin
// si l'adresse est un détecteur // si l'adresse est un détecteur
if (index_adresse_detecteur(adresse)<>0) then DernierDet:=adresse; if (index_adresse_detecteur(adresse)<>0) then
begin
DernierDet:=adresse;
elprec:=detecteur[adresse].precedent;
typePrec:=detecteur[adresse].TypPrecedent;
idCanton:=trouve_canton(adresse,det,elPrec,typePrec);
// si canton adjacent au détecteur suivant le sens d'avance du train et que le détecteur passe à 0,
// désaffecter le train du canton
// annulé car désaffecte le train apr_s 2 tours sur le canton 7
{if (idCanton<>0) and (detecteur[adresse].Etat=false) then
begin
affiche('Canton='+IntToSTR(canton[idCanton].numero),clYellow);
affecte_train_canton(0,idCanton,0);
end;
}
end;
end; end;
tco[indextco,x,y].trajet:=0; tco[indextco,x,y].trajet:=0;
@@ -12319,6 +12343,7 @@ begin
IdCanton:=index_canton_numero(TCO[indexTCO,x,y].NumCanton); // index canton IdCanton:=index_canton_numero(TCO[indexTCO,x,y].NumCanton); // index canton
AncTrain:=0; AncTrain:=0;
{
if (idcanton<>0) and affecte_loco then if (idcanton<>0) and affecte_loco then
begin begin
if mode=0 then // désaffecter le train if mode=0 then // désaffecter le train
@@ -12338,8 +12363,8 @@ begin
end; end;
end; end;
end; end;
end; end;
}
//if (idcanton<>0) and not affecte_Loco then Affiche('Pas en mode affecte_loco',clOrange); //if (idcanton<>0) and not affecte_Loco then Affiche('Pas en mode affecte_loco',clOrange);
end; end;
@@ -12442,10 +12467,9 @@ end;
// Ne nécessite pas que les aiguillages en talon soient bien positionnés entre det1 et det2 // Ne nécessite pas que les aiguillages en talon soient bien positionnés entre det1 et det2
// PosAig = False: teste toutes les routes en récursif les aiguillages en pointe // PosAig = False: teste toutes les routes en récursif les aiguillages en pointe
// True: suit les aiguillages en pointe qui doivent être positionnés // True: suit les aiguillages en pointe qui doivent être positionnés
// affecte_loco : true : efface la loco
// en sortie : true si det2 a été trouvé // en sortie : true si det2 a été trouvé
// //
function zone_tco_gx(indexTCO,det1: integer;typEL : tequipement;det2,train,adrTrain,mode: integer;posAig,affecte_loco : boolean) : boolean; function zone_tco_gx(indexTCO,det1: integer;typEL : tequipement;det2,train,adrTrain,mode: integer;posAig : boolean) : boolean;
var i,ir,adresse,But,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteration,indexIr,AdrTr, var i,ir,adresse,But,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteration,indexIr,AdrTr,
NbTrouve,AdrTr1,adrTr2 : integer; NbTrouve,AdrTr1,adrTr2 : integer;
memtrouve,sortir,indextrouve : boolean; memtrouve,sortir,indextrouve : boolean;
@@ -14009,7 +14033,7 @@ begin
AdrTr:=Adrtr2; AdrTr:=Adrtr2;
//Affiche(intToSTR(det1)+' '+intToSTR(det2)+' Mode '+intToSTR(mode)+' Le détecteur2 '+intToSTR(Det2)+ ' est affecté au train @'+intToSTR(AdrTr2),clYellow); //Affiche(intToSTR(det1)+' '+intToSTR(det2)+' Mode '+intToSTR(mode)+' Le détecteur2 '+intToSTR(Det2)+ ' est affecté au train @'+intToSTR(AdrTr2),clYellow);
end; end;
Affiche_trajet(indexTCO,train,AdrTrain,indexIr,mode,affecte_loco); // affiche le trajet dans le TCO Affiche_trajet(indexTCO,train,AdrTrain,indexIr,mode); // affiche le trajet dans le TCO
end; end;
end; end;
end; end;
@@ -14018,17 +14042,15 @@ end;
// affiche le tracé de det1 à det2; n°Train n°i (pas son index), adresseTrain, mode=0=éteint =1 allumejaune =2 allume selon index, // affiche le tracé de det1 à det2; n°Train n°i (pas son index), adresseTrain, mode=0=éteint =1 allumejaune =2 allume selon index,
// posAig=false : ne tient pas compte de la position des aiguillages pour le tracé (cherche en récursif det2 // posAig=false : ne tient pas compte de la position des aiguillages pour le tracé (cherche en récursif det2
// = true : suit le tracé suivant la position des aiguillages jusque det2 // = true : suit le tracé suivant la position des aiguillages jusque det2
// affecte_loco=true : affecte loco si on rencontre un canton. Si mode=0 çà désaffecte la loco du canton function zone_tco(indexTCO,det1,det2,train,adrTrain,mode: integer;posAig : boolean) : boolean; overload;
// =false : ne change pas l'affectation d'un canton rencontré
function zone_tco(indexTCO,det1,det2,train,adrTrain,mode: integer;posAig,affecte_loco : boolean) : boolean; overload;
begin begin
result:=zone_tco_gx(indexTCO,det1,det,det2,train,adrTrain,mode,posAig,affecte_loco); result:=zone_tco_gx(indexTCO,det1,det,det2,train,adrTrain,mode,posAig);
end; end;
// fonction appellable en mode 13 // fonction appellable en mode 13
function zone_tco(indexTCO,adr : integer;typEl : tequipement;sens,mode: integer;posAig,affecte_loco : boolean) : boolean; overload; function zone_tco(indexTCO,adr : integer;typEl : tequipement;sens,mode: integer;posAig : boolean) : boolean; overload;
begin begin
result:=zone_tco_gx(indexTCO,adr,typEL,sens,0,0,mode,posAig,affecte_loco); result:=zone_tco_gx(indexTCO,adr,typEL,sens,0,0,mode,posAig);
end; end;
@@ -17471,7 +17493,7 @@ begin
end; end;
// mise à jour des cellules de l'adresse "adresse" // Affichage : mise à jour des cellules de l'adresse "adresse"
procedure Maj_TCO(indexTCO,Adresse : integer); procedure Maj_TCO(indexTCO,Adresse : integer);
var x,y: integer; var x,y: integer;
begin begin
@@ -17896,7 +17918,7 @@ begin
aiguillage[Index_Aig(117)].position:=const_devie; aiguillage[Index_Aig(117)].position:=const_devie;
//debugTco:=true; //debugTco:=true;
zone_tco(1,527,519,1,0,1,false,false); zone_tco(1,527,519,1,0,1,false);
// zone_tco(518,515,1); // zone_tco(518,515,1);
//zone_tco(522,514,1); //zone_tco(522,514,1);
@@ -19048,6 +19070,8 @@ begin
screen.cursor:=crUpArrow; screen.cursor:=crUpArrow;
end end
else stop_modetrace(indexTCO); else stop_modetrace(indexTCO);
FormTCO[indexTCO].DessinerleTCO1.Checked:=modetrace[indexTCO];
end; end;
procedure TFormTCO.ButtonDessinerClick(Sender: TObject); procedure TFormTCO.ButtonDessinerClick(Sender: TObject);
@@ -19314,11 +19338,9 @@ begin
end; end;
end; end;
procedure TFormTCO.BandeauClick(Sender: TObject); procedure toggle_bandeau(indexTCO : integer);
var indexTCO : integer;
begin begin
indexTCO:=index_TCOMainMenu; if bandeauMasque then with formTCO[indexTCO] do
if bandeauMasque then
begin begin
PanelBas.Show; PanelBas.Show;
PanelBas.Visible:=true; PanelBas.Visible:=true;
@@ -19333,6 +19355,11 @@ begin
end; end;
end; end;
procedure TFormTCO.BandeauClick(Sender: TObject);
begin
toggle_bandeau(index_TCOMainMenu);
end;
procedure TFormTCO.Mosaquehorizontale1Click(Sender: TObject); procedure TFormTCO.Mosaquehorizontale1Click(Sender: TObject);
begin begin
mosaiqueH; mosaiqueH;
@@ -19769,6 +19796,85 @@ begin
formCompteur[1].Show; formCompteur[1].Show;
end; end;
procedure Supprimer_TCO(TcoS : integer);
var c,x,y,i,SauvNbreTCO : integer;
s : string;
begin
if Tcos>NbreTCO then exit;
s:='Voulez-vous supprimer le TCO '+intToSTR(TcoS)+' ('+NomFichierTCO[tcoS]+')';
if Application.MessageBox(pchar(s),pchar('confirm'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit;
SauvNbreTCO:=NbreTCO; // dire au programme Timer qu'il n'y a plus de TCO le temps de supprimer sinon il peut tenter d'allumer un feu sur le TCO qu'on supprime->violation
NbreTCO:=0;
TCOActive:=false;
Affiche('Suppression du TCO '+intToSTR(Tcos),clOrange);
// supprimer les cantons
for y:=1 to NbreCellY[tcos] do
for x:=1 to NbreCellX[tcos] do
begin
if isCanton(tco[tcos,x,y].Bimage) then
begin
c:=tco[tcos,x,y].NumCanton;
if c<>0 then supprime_canton(c);
end;
end;
FormTCO[tcos].Release; // annuler le pointeur et raz les mémoires de la form
for i:=tCos to SauvNbreTCO-1 do
begin
NomFichierTCO[i]:=NomFichierTCO[i+1];
FormTCO[i]:=FormTCO[i+1];
FormTCO[i].Name:='TCO'+intToSTR(i); // renommer le TCO
TCO[i]:=Tco[i+1]; // déplacer les données
// et toutes les variables du tco
PcanvasTCO[i]:=PcanvasTCO[i+1];
PBitMapTCO[i]:=PBitMapTCO[i+1];
PImageTCO[i]:=PImageTCO[i+1];
PImageTemp[i]:=PImageTemp[i+1];
frXGlob[i]:=frXGlob[i+1];
frYGlob[i]:=frYGlob[i+1];
SelectionAffichee[i]:=SelectionAffichee[i+1];
forminit[i]:=forminit[i+1];
modeTrace[i]:=modeTrace[i+1];
entoure[i]:=entoure[i+1];
avecGrille[i]:=avecGrille[i+1];
NbreCellX[i]:=NbreCellX[i+1];
NbreCellY[i]:=NbreCellY[i+1];
largeurCelld2[i]:=largeurCelld2[i+1];
HauteurCelld2[i]:=HauteurCelld2[i+1];
largeurCell[i]:=largeurCell[i+1];
HauteurCell[i]:=HauteurCell[i+1];
EcranTCO[i]:=EcranTCO[i+1];
Forminit[i]:=false;
end;
setlength(TCO[SauvNbreTCO],0);
PcanvasTCO[SauvNbreTCO]:=nil;
dec(SauvNbreTCO);
Menu_tco(SauvNbreTCO);
config_modifie:=true;
if SauvNbreTCO<>0 then Affiche('La nouvelle liste des noms des fichiers des TCO est la suivante:',ClLime);
for i:=1 to SauvNbreTCO do
begin
Affiche(IntToSTR(i)+' '+NomFichierTCO[i],clLime);
end;
NbreTCO:=SauvNbreTCO;
tcoActive:=true;
end;
procedure TFormTCO.MenuSuppTCOClick(Sender: TObject);
var indexTCO : integer;
begin
indexTCO:=index_TCOMainMenu;
Supprimer_TCO(indexTCO);
end;
end. end.
+3 -2
View File
@@ -173,7 +173,7 @@ function trouve_det_suiv_canton(idcanton,detecteur,sensTCO : integer) : integer;
var t : integer; var t : integer;
begin begin
t:=canton[idcanton].ntco; t:=canton[idcanton].ntco;
zone_tco(t,detecteur,sensTCO,0,0,12,false,false); // élément contigu à droite (6) du canton , résultat dans xcanton , teste les 2 pos des aig zone_tco(t,detecteur,sensTCO,0,0,12,false); // élément contigu à droite (6) du canton , résultat dans xcanton , teste les 2 pos des aig
if tel1=Aig then xcanton:=detecteur_suivant(detecteur,det,xcanton,aig,1); if tel1=Aig then xcanton:=detecteur_suivant(detecteur,det,xcanton,aig,1);
result:=xcanton; result:=xcanton;
end; end;
@@ -253,7 +253,7 @@ var idTrain,t,el1,el2 : integer;
begin begin
if ProcPrinc then if ProcPrinc then
AfficheDebug('Affecte_train_canton: @='+intToSTR(AdrTrain)+' Idcanton='+intToSTR(idcanton),clorange); AfficheDebug('Affecte_train_canton: @='+intToSTR(AdrTrain)+' Idcanton='+intToSTR(idcanton),clorange);
//Affiche('Affecte_train_canton: @='+intToSTR(AdrTrain)+' Idcanton='+intToSTR(idcanton),clyellow); // Affiche('Affecte_train_canton: @='+intToSTR(AdrTrain)+' Idcanton='+intToSTR(idcanton),clyellow);
if (IdCanton>0) and (idCanton<=nCantons) then if (IdCanton>0) and (idCanton<=nCantons) then
begin begin
idTrain:=0; idTrain:=0;
@@ -313,6 +313,7 @@ begin
end; end;
maj_signaux(false); maj_signaux(false);
dessin_canton(idCanton,0); // redessine le canton
//affiche('Det du canton '+intToSTR(canton[Idcanton].numero)+' det1='+intToSTR(canton[Idcanton].det1)+' det2='+intToSTR(canton[Idcanton].det2),clyellow); //affiche('Det du canton '+intToSTR(canton[Idcanton].numero)+' det1='+intToSTR(canton[Idcanton].det1)+' det2='+intToSTR(canton[Idcanton].det2),clyellow);
end; end;
+21 -7
View File
@@ -26,7 +26,7 @@ var
f : textFile; f : textFile;
Const Const
VersionSC = '10.78'; // sert à la comparaison de la version publiée VersionSC = '10.8'; // sert à la comparaison de la version publiée
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
// pour unzip // pour unzip
SHCONTCH_NOPROGRESSBOX=4; SHCONTCH_NOPROGRESSBOX=4;
@@ -463,16 +463,21 @@ begin
closefile(fichier); closefile(fichier);
if DebugVV then affiche('Fermeture du fichier d''échange',clYellow); if DebugVV then affiche('Fermeture du fichier d''échange',clYellow);
if trouve_version and trouve_zip then //if trouve_version and trouve_zip then
if trouve_version then
begin begin
//---------------------------------------------------- //----------------------------------------------------
//isoler le nom du fichier //isoler le nom du fichier
i:=length(s3); i:=length(s3);
repeat if i<>0 then
dec(i); begin
locZip:=s3[i]='/'; repeat
until (i=1) or LocZip; dec(i);
nomfichier:=copy(s3,i+1,length(s3)-i); locZip:=s3[i]='/';
until (i=1) or LocZip;
nomfichier:=copy(s3,i+1,length(s3)-i);
end
else nomfichier:='';
//affiche(nombre_tel,cllime); //affiche(nombre_tel,cllime);
//Affiche(s3,clLime); //Affiche(s3,clLime);
@@ -495,6 +500,7 @@ begin
FormVersion.Top:=10; FormVersion.Top:=10;
FormVersion.Left:=10; FormVersion.Left:=10;
FormVersion.show; FormVersion.show;
s:='Vous utilisez la version '+versionSC+SousVersion+' mais il existe la version '+Version_p+SV_publie; s:='Vous utilisez la version '+versionSC+SousVersion+' mais il existe la version '+Version_p+SV_publie;
if nComm>0 then if nComm>0 then
begin begin
@@ -503,6 +509,14 @@ begin
Aff(' '); Aff(' ');
for i:=1 to ncomm do aff(comm[i]); for i:=1 to ncomm do aff(comm[i]);
end; end;
if not(trouve_zip) then
begin
ShowMessage('Pas de version téléchargeable');
result:=0;
exit;
end;
if MessageDlg(s+#13+'Voulez-vous la télécharger, l''installer et l''exécuter?',mtConfirmation,[mbYes,mbNo],0)=mrYes then if MessageDlg(s+#13+'Voulez-vous la télécharger, l''installer et l''exécuter?',mtConfirmation,[mbYes,mbNo],0)=mrYes then
begin begin
// récupérer depuis la variable d'environnement windows USERPROFILE le repertoire de la session ouverte // récupérer depuis la variable d'environnement windows USERPROFILE le repertoire de la session ouverte
+8 -1
View File
@@ -356,7 +356,14 @@ version 10.77 : Am
Correction du non affichage de la position des aiguillages dans le TCO. Correction du non affichage de la position des aiguillages dans le TCO.
version 10.78 : Correction affichage aiguillages dans l'écran de config des versions D13. version 10.78 : Correction affichage aiguillages dans l'écran de config des versions D13.
Correction pilotage des décodeurs LEB en mode binaire. Correction pilotage des décodeurs LEB en mode binaire.
Ajout temps de retombée fonction F trains dans les blocs claviers USB. Ajout temps de retombée fonction F trains dans les blocs claviers USB.
version 10.79 : Prise en compte du facteur réduction affichage windows pour les compteurs.
version 10.8 : Amélioration de la création des compteurs de vitesse en mode CDM rail
et de l'affectation des trains dans les cantons.
Corrections diverses.