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)
LargeurF=1120
HauteurF=681
@@ -208,30 +208,30 @@ Clignote,
0
/------------
[section_sig]
176,7,0,1,(520,A20),1,FVC0,FRC0
190,7,0,1,(523,526),0,FVC0,FRC0
204,9,0,1,(527,A7),1,FVC0,FRC0
218,7,0,1,(525,A17),0,FVC0,FRC0
232,2,1,1,(516,A6),0,FVC0,FRC0,CFB(A6D)
274,3,0,1,(524,521),0,FVC0,FRC0
288,7,0,1,(522,A103),1,FVC0,FRC0
302,9,0,1,(526,A9),1,FVC0,FRC0
316,7,1,1,(515,A5),1,FVC0,FRC0
330,7,0,1,(519,A2),1,FVC0,FRC0
344,9,0,1,(528,A10),1,FVC0,FRC0
358,9,0,1,(517,A102),1,FVC0,FRC0
372,D3,1,(A10D)(A19S)(A19D,A22D)(A19D,A22S)
382,D3,1,(A29S,A10S)(A19S)(A19D,A22D)(A19D,A22S)
392,3,0,1,(535,533),1,FVC0,FRC0
406,9,0,1,(534,A23),1,FVC0,FRC0
420,7,0,1,(529,A25,530,A27,537,A27),1,FVC1,FRC1
448,7,0,1,(533,A24),1,FVC0,FRC0
462,9,0,1,(513,A29),1,FVC0,FRC0
476,9,0,1,(538,A105),1,FVC0,FRC0
497,9,0,4,(531,A19),1,FVC0,FRC0,U14,L1
520,9,1,1,(518,A1),1,FVC0,FRC0,(A1S,A3S,A5S),CFB(A1S,A3D,A4D,A6S)
620,7,0,0,(521,A8),1,FVC0,FRC0
820,4,0,0,(519,A7),0,FVC0,FRC0
176,7,0,1,(520,A20),1,FVC0,FRC0,T0
190,7,0,1,(523,526),0,FVC0,FRC0,T0
204,9,0,1,(527,A7),1,FVC0,FRC0,T0
218,7,0,1,(525,A17),0,FVC0,FRC0,T0
232,2,1,1,(516,A6),0,FVC0,FRC0,CFB(A6D),T0
274,3,0,1,(524,521),0,FVC0,FRC0,T0
288,7,0,1,(522,A103),1,FVC0,FRC0,T0
302,9,0,1,(526,A9),1,FVC0,FRC0,T0
316,7,1,1,(515,A5),1,FVC0,FRC0,T0
330,7,0,1,(519,A2),1,FVC0,FRC0,T0
344,9,0,1,(528,A10),1,FVC0,FRC0,T0
358,9,0,1,(517,A102),1,FVC0,FRC0,T0
372,D3,1,(A10D)(A19S)(A19D,A22D)(A19D,A22S),T0
382,D3,1,(A29S,A10S)(A19S)(A19D,A22D)(A19D,A22S),T0
392,3,0,1,(535,533),1,FVC0,FRC0,T0
406,9,0,1,(534,A23),1,FVC0,FRC0,T0
420,7,0,1,(529,A25,530,A27,537,A27),1,FVC1,FRC1,T0
448,7,0,1,(533,A24),1,FVC0,FRC0,T0
462,9,0,1,(513,A29),1,FVC0,FRC0,T0
476,9,0,1,(538,A105),1,FVC0,FRC0,T0
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),T0
620,7,0,0,(521,A8),1,FVC0,FRC0,T0
820,4,0,0,(519,A7),0,FVC0,FRC0,T0
0
/------------
[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
[route_par_pont],0,1
{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
/------------
[section_placement]
@@ -351,22 +351,19 @@ DureeMinute=1
0
/------------
[section_logique]
/--- Fonction 1
"0"
FF
0
/------------
[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
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
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
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
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
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
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
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
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
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
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,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,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,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,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,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,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,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,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,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
/------------
[section_compteurs]
@@ -376,16 +373,19 @@ Graduations=FFFFFF
Numeros=FFFFFF
Fond=000000
Arc=008000
Increment=3
Compteur2
Aiguille=0000FF
Graduations=000000
Numeros=FF0000
Fond=808080
Arc=008000
Increment=3
Compteur3
Aiguille=0000FF
Graduations=FFFFFF
Numeros=FFFFFF
Fond=000000
Arc=008000
Increment=3
0
+13 -13
View File
@@ -1,6 +1,6 @@
unit UnitCDF;
// configuration des décodeurs CDM et Digikeijs
// configuration des décodeurs CDF et Digikeijs
interface
@@ -195,25 +195,25 @@ begin
i:=0;
//ImagePilote.Picture.Bitmap:=FormPilote.ImagePilote.picture.bitmap;
EtatFeuPilote:=Signaux[i].EtatSignal;
EtatSignalPilote:=Signaux[i].EtatSignal;
AncienEtat:=Signaux[i].AncienEtat;
dessineCDF:=true; // demande dessin CDF pour les clignotements
Vcanvas:=FormCDF.ImageDigi.picture.bitmap.Canvas;
case Signaux[i].aspect of
// feux de signalisation
2 : dessine_signal2(Vcanvas,0,0,1,1,EtatFeupilote,1,i);
3 : dessine_signal3(Vcanvas,0,0,1,1,EtatFeupilote,1,i);
4 : dessine_signal4(VCanvas,0,0,1,1,EtatFeupilote,1,i);
5 : dessine_signal5(VCanvas,0,0,1,1,EtatFeupilote,1,i);
7 : dessine_signal7(VCanvas,0,0,1,1,EtatFeupilote,1,i);
9 : dessine_signal9(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,EtatSignalPilote,1,i);
4 : dessine_signal4(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
5 : dessine_signal5(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
7 : dessine_signal7(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
9 : dessine_signal9(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
// indicateurs de direction
12 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,2);
13 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,3);
14 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,4);
15 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,5);
16 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,6);
12 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,2);
13 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,3);
14 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,4);
15 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,5);
16 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,6);
end;
end;
+2 -2
View File
@@ -1,6 +1,6 @@
object FormCompteur: TFormCompteur
Left = 550
Top = 218
Left = 614
Top = 296
Width = 258
Height = 262
BorderStyle = bsSizeToolWin
+69 -30
View File
@@ -508,31 +508,39 @@ begin
// le compteurs 1 provient de bitmaps
// le compteur 2 et 3 sont dessinés par
with param do
begin
case typCompt of
1 : begin
// le compteur 1 provient d'une image
StretchDraw(rect(0,0,Lim,Him),Formprinc.ImageCompteur1.Picture.Bitmap);
Brush.Style:=bsSolid;
Brush.Color:=$1F1A17;
font.color:=ParamCompteur[1].CoulNum;
{$IF CompilerVersion >= 28.0}
font.orientation:=0;
{$IFEND}
font.size:=round(redx*10*RedFonte);
TextOut(round(50*redX),round(128*redY),'0');
TextOut(round(36*redX),round(90*redY),'20');
TextOut(round(50*redX),round(54*redY),'40');
TextOut(round(90*redX),round(36*redY),'60');
TextOut(round(129*redX),round(53*redY),'80');
TextOut(round(137*redX),round(91*redY),'100');
TextOut(round(126*redX),round(126*redY),'120');
// centre de l'aiguille
AigCX:=round(98*redX);
AigCY:=round(98*redY);
rAig:=round(AigCX / 1.5);
angleFin:=127; // en fait vitesse maxi compteur
// le compteur 1 provient d'une image
StretchDraw(rect(0,0,Lim,Him),Formprinc.ImageCompteur1.Picture.Bitmap);
Brush.Style:=bsSolid;
Brush.Color:=$1F1A17;
font.color:=ParamCompteur[1].CoulNum;
{$IF CompilerVersion >= 28.0}
font.orientation:=0;
// centre de l'aiguille
AigCX:=round(97*redX); // le centre de l'aiguille est en 97 97
AigCY:=round(97*redY);
{$ELSE}
// centre de l'aiguille
AigCX:=round(97*redX*RedFonte); // le centre de l'aiguille est en 97 97
AigCY:=round(97*redY*RedFonte);
{$IFEND}
font.size:=round(redx*10*RedFonte);
TextOut(round(50*redX),round(128*redY),'0');
TextOut(round(40*redX),round(92*redY),'20');
TextOut(round(56*redX),round(56*redY),'40');
TextOut(round(94*redX),round(36*redY),'60');
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;
2 : begin
// centre de l'aiguille et longueur
@@ -565,12 +573,15 @@ begin
init_compteur(1,FormCompteur[1]);
end;
// initialise le compteur
// i = rang du compteur
// c : composant de destination
Procedure Init_compteur(i : integer;c : Tcomponent);
const ofs=30; // décalage entre la taille de l'image et de la fenetre
// compteurs fenetre principale
HautTb=10; // hauteur trackbar
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;
typDest : typ;
@@ -591,10 +602,10 @@ begin
exit;
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;
case ComptLoc of
case ComptLoc of // 1=compteur 1, 2=compteur 2 , 3=compteur tachro
1 :
begin
mini:=-135;
@@ -679,8 +690,18 @@ begin
paramCompt.imgH:=him; //HautCompt-HautTb-ofsGBH-ofsGBB;
Img.picture.Bitmap.Width:=lim;
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.ImgH:=Him;
tb.Top:=him+ofsGBH; // position de la trackbar
@@ -711,8 +732,17 @@ begin
if typDest=fen then
begin
formCompteur[i].ImageCompteur.width:=Lim;
Scompteur[i].paramcompt.redX:=Lim/l;
Scompteur[i].paramcompt.redY:=Him/h;
if ComptLoc=1 then
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.ImgH:=Him;
case compteur of
@@ -803,8 +833,17 @@ begin
Image.Width:=lim;
Image.Height:=him;
paramcomptIm.redX:=Lim/l;
paramcomptIm.redY:=Him/h;
if ComptLoc=1 then
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.ImgH:=Him;
i:=formconfig.ComboBoxCompt.Itemindex+1;
+2 -2
View File
@@ -1573,7 +1573,7 @@ object FormConfig: TFormConfig
Top = 8
Width = 633
Height = 505
ActivePage = TabSheetBouton
ActivePage = TabSheetCDM
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
@@ -5099,7 +5099,7 @@ object FormConfig: TFormConfig
Top = 16
Width = 337
Height = 457
ActivePage = TtabSheetEt
ActivePage = TabSheetTrGen
TabOrder = 3
object TabSheetTrGen: TTabSheet
Caption = 'G'#233'n'#233'ral'
+37 -1
View File
@@ -1146,7 +1146,7 @@ var s : string;
begin
result:=false;
// déconnexion de l'ancienne liaison éventuelle
Formprinc.ClientSocketCDM.Close;
ClientSocketCDM.Close;
if (AdresseIPCDM<>'0') and IpOk(AdresseIPCDM) then
begin
@@ -7551,9 +7551,39 @@ var i,j,x,y,l,k,LongestLength,PixelLength : integer;
trouve : boolean;
param : TparamCompt;
p: pointer;
comp : tComponent;
tlE : tLabeledEdit;
re : tEdit;
begin
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';
ValueListEditor.Visible:=true;
ImageAffiche.stretch:=true;
@@ -7570,6 +7600,7 @@ begin
'-> NON_OU';
ButtonAjouteVar.Hint:='Ajoute une variable'+#13+'->'+NomFonc[5]+#13+'->'+NomFonc[6]+#13+'->'+NomFonc[7]+#13+'->'+NomFonc[8]+#13+'->'+NomFonc[9];
ButtonAjouteVar.ShowHint:=true;
ImageCtc.Stretch:=false;
// liste des paramètres du mode expert de la ValueListEditor
// syntaxe des masques:
@@ -17155,6 +17186,7 @@ begin
EditDecal.Text:=IntToSTR(detecteur[adr].distArret);
RadioButtonArrFin.Checked:=detecteur[adr].ModeArret=1;
RadioButtonARMil.Checked:=detecteur[adr].ModeArret=2;
if detecteur[adr].ModeArret=1 then editDecal.Enabled:=true else editDecal.Enabled:=false;
end;
end;
@@ -17657,6 +17689,7 @@ begin
labelInfo.caption:='Erreur : la distance d''arrêt est supérieure à la longueur du détecteur';
end;
detecteur[r].ModeArret:=1;
editDecal.Enabled:=true;
ListBoxDet.items[ligneclicDet]:=encode_detecteur(ligneclicDet+1);
ListBoxDet.selected[ligneclicDet]:=true;
end;
@@ -17668,6 +17701,7 @@ begin
r:=adresse_detecteur[ligneclicDet+1];
detecteur[r].ModeArret:=2;
LabelInfo.Caption:='';
editDecal.Enabled:=false;
ListBoxDet.items[ligneclicDet]:=encode_detecteur(ligneclicDet+1);
ListBoxDet.selected[ligneclicDet]:=true;
end;
@@ -18025,6 +18059,7 @@ procedure supprime_element_fonction(fonc,index : integer);
var i,n : integer;
begin
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
begin
fonction[fonc,i]:=fonction[fonc,i+1];
@@ -19736,6 +19771,7 @@ begin
buttonCoulGrad.enabled:=true;
buttonCoulFond.enabled:=true;
end;
init_compteur(1,ImageCtC);
end;
+21 -20
View File
@@ -1,6 +1,6 @@
object FormDebug: TFormDebug
Left = 258
Top = 1
Left = 194
Top = 132
VertScrollBar.Increment = 67
VertScrollBar.Tracking = True
VertScrollBar.Visible = False
@@ -32,7 +32,6 @@ object FormDebug: TFormDebug
Width = 872
Height = 677
HorzScrollBar.Visible = False
VertScrollBar.Position = 96
Anchors = [akLeft, akTop, akRight, akBottom]
Color = clBtnFace
ParentColor = False
@@ -42,7 +41,7 @@ object FormDebug: TFormDebug
673)
object LabelTitreDebug: TLabel
Left = 475
Top = -88
Top = 4
Width = 131
Height = 18
Anchors = [akTop, akRight]
@@ -56,7 +55,7 @@ object FormDebug: TFormDebug
end
object Label1: TLabel
Left = 627
Top = -86
Top = 6
Width = 108
Height = 13
Anchors = [akTop, akRight]
@@ -72,7 +71,7 @@ object FormDebug: TFormDebug
end
object RichDebug: TRichEdit
Left = 0
Top = -96
Top = 0
Width = 454
Height = 753
Anchors = [akLeft, akTop, akRight]
@@ -86,7 +85,7 @@ object FormDebug: TFormDebug
end
object ButtonRazTout: TButton
Left = 465
Top = 120
Top = 216
Width = 97
Height = 25
Hint =
@@ -101,7 +100,7 @@ object FormDebug: TFormDebug
end
object ButtonCop: TButton
Left = 465
Top = 152
Top = 248
Width = 97
Height = 41
Anchors = [akTop, akRight]
@@ -118,7 +117,7 @@ object FormDebug: TFormDebug
end
object ButtonAffEvtChrono: TButton
Left = 465
Top = 200
Top = 296
Width = 97
Height = 33
Anchors = [akTop, akRight]
@@ -129,7 +128,7 @@ object FormDebug: TFormDebug
end
object ButtonCherche: TButton
Left = 465
Top = 240
Top = 336
Width = 97
Height = 25
Hint = 'Cherche la cha'#238'ne "erreur"'
@@ -142,7 +141,7 @@ object FormDebug: TFormDebug
end
object ButtonEcrLog: TButton
Left = 465
Top = 88
Top = 184
Width = 97
Height = 29
Anchors = [akTop, akRight]
@@ -152,7 +151,7 @@ object FormDebug: TFormDebug
end
object ButtonRazTampon: TButton
Left = 465
Top = 272
Top = 368
Width = 97
Height = 33
Anchors = [akTop, akRight]
@@ -163,7 +162,7 @@ object FormDebug: TFormDebug
end
object ButtonRazLog: TButton
Left = 465
Top = 312
Top = 408
Width = 97
Height = 33
Anchors = [akTop, akRight]
@@ -174,7 +173,7 @@ object FormDebug: TFormDebug
end
object MemoEvtDet: TRichEdit
Left = 570
Top = 90
Top = 186
Width = 272
Height = 263
Anchors = [akTop, akRight]
@@ -185,7 +184,7 @@ object FormDebug: TFormDebug
end
object GroupBox5: TGroupBox
Left = 462
Top = 360
Top = 456
Width = 380
Height = 57
Anchors = [akTop, akRight]
@@ -252,7 +251,7 @@ object FormDebug: TFormDebug
end
object GroupBox6: TGroupBox
Left = 462
Top = 424
Top = 520
Width = 380
Height = 52
Anchors = [akTop, akRight]
@@ -329,7 +328,7 @@ object FormDebug: TFormDebug
end
object GroupBoxPrim: TGroupBox
Left = 464
Top = 488
Top = 584
Width = 378
Height = 185
Anchors = [akTop, akRight]
@@ -432,7 +431,9 @@ object FormDebug: TFormDebug
Top = 16
Width = 57
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'
ParentShowHint = False
ShowHint = True
@@ -500,7 +501,7 @@ object FormDebug: TFormDebug
end
object GroupBox2: TGroupBox
Left = 466
Top = -68
Top = 28
Width = 376
Height = 149
Anchors = [akTop, akRight]
@@ -713,7 +714,7 @@ object FormDebug: TFormDebug
end
object EditNivDebug: TEdit
Left = 751
Top = -88
Top = 4
Width = 49
Height = 21
Anchors = [akTop, akRight]
+18 -23
View File
@@ -1,6 +1,6 @@
object FormModifAction: TFormModifAction
Left = 542
Top = 189
Left = 355
Top = 223
BorderStyle = bsDialog
Caption = 'Modifier une action'
ClientHeight = 443
@@ -60,7 +60,7 @@ object FormModifAction: TFormModifAction
Top = 64
Width = 729
Height = 337
ActivePage = TabSheetDecl
ActivePage = TabSheetOp
MultiLine = True
TabOrder = 1
object TabSheetDecl: TTabSheet
@@ -517,7 +517,7 @@ object FormModifAction: TFormModifAction
Top = 32
Width = 217
Height = 21
ItemHeight = 0
ItemHeight = 13
TabOrder = 0
OnChange = ComboBoxFamilleChange
end
@@ -544,6 +544,7 @@ object FormModifAction: TFormModifAction
Hint = 'Liste chronologique des op'#233'rations '#224' effectuer'
ItemHeight = 13
ParentShowHint = False
PopupMenu = PopupMenuOP
ShowHint = True
TabOrder = 2
OnDblClick = ListBoxOperationsDblClick
@@ -721,7 +722,7 @@ object FormModifAction: TFormModifAction
Height = 21
Hint = 'Nom du p'#233'riph'#233'rique d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
ParentShowHint = False
ShowHint = True
TabOrder = 4
@@ -837,29 +838,23 @@ object FormModifAction: TFormModifAction
object OpenDialogSon: TOpenDialog
Left = 680
end
object PopupMenuL: TPopupMenu
Left = 692
Top = 104
object Monter1: TMenuItem
Caption = 'Monter'
object PopupMenuOP: TPopupMenu
Left = 680
Top = 32
object Monteropration1: TMenuItem
Caption = 'Monter op'#233'ration'
OnClick = Monteropration1Click
end
object Descendre1: TMenuItem
Caption = 'Descendre'
object Descendreopration1: TMenuItem
Caption = 'Descendre op'#233'ration'
OnClick = Descendreopration1Click
end
object N1: TMenuItem
Caption = '-'
end
object Supprimer1: TMenuItem
Caption = 'Supprimer'
end
object N2: TMenuItem
Caption = '-'
end
object outdployer1: TMenuItem
Caption = 'Tout d'#233'ployer'
end
object outcontracter1: TMenuItem
Caption = 'Tout contracter'
object Supprimeropration1: TMenuItem
Caption = 'Supprimer op'#233'ration'
OnClick = Supprimeropration1Click
end
end
end
+44 -19
View File
@@ -74,19 +74,16 @@ type
RadioEtatSignal: TRadioGroup;
SpinEditEtatop: TSpinEdit;
LabelEtatOp: TLabel;
PopupMenuL: TPopupMenu;
Monter1: TMenuItem;
Descendre1: TMenuItem;
N1: TMenuItem;
Supprimer1: TMenuItem;
N2: TMenuItem;
outdployer1: TMenuItem;
outcontracter1: TMenuItem;
ButtonFonction: TButton;
ButtonVoirFonc: TButton;
LabelInfoFonc: TLabel;
Label2InfoFonction: TLabel;
SpeedButton1: TSpeedButton;
PopupMenuOP: TPopupMenu;
Monteropration1: TMenuItem;
Descendreopration1: TMenuItem;
N1: TMenuItem;
Supprimeropration1: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure ListBoxOperDrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
@@ -142,6 +139,9 @@ type
procedure ButtonFonctionClick(Sender: TObject);
procedure ButtonVoirFoncClick(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure Supprimeropration1Click(Sender: TObject);
procedure Monteropration1Click(Sender: TObject);
procedure Descendreopration1Click(Sender: TObject);
private
{ Déclarations privées }
public
@@ -1212,12 +1212,12 @@ begin
supprime_operation;
end;
procedure TFormModifAction.SpinButton1UpClick(Sender: TObject);
procedure monte_operation;
var i,indexSrc,idBD,idOp,no : integer;
top : Toperation;
s : string;
begin
indexSrc:=listboxOperations.ItemIndex;
indexSrc:=FormModifAction.listboxOperations.ItemIndex;
if indexSrc<0 then exit;
idBD:=ligneClicAct+1;
idop:=indexSrc+1;
@@ -1231,8 +1231,8 @@ begin
// réencoder la ligne
s:=encode_actions(idBD);
// maj combobox
ComboBoxActions.Items[idBD-1]:=s;
ComboBoxActions.ItemIndex:=idbd-1;
FormModifAction.ComboBoxActions.Items[idBD-1]:=s;
FormModifAction.ComboBoxActions.ItemIndex:=idbd-1;
// maj opérations
with FormModifAction.ListBoxOperations do
@@ -1242,19 +1242,24 @@ begin
begin
no:=Tablo_Action[idBD].tabloOp[i].numoperation;
s:=affecte_operation(no);
ListBoxOperations.Items.add(s);
FormModifAction.ListBoxOperations.Items.add(s);
itemHeight:=16;
end;
ItemIndex:=indexSrc-1;
end;
end;
procedure TFormModifAction.SpinButton1DownClick(Sender: TObject);
var no,i,indexSrc,idBD,idOp : integer;
procedure TFormModifAction.SpinButton1UpClick(Sender: TObject);
begin
monte_operation;
end;
Procedure Descend_operation;
var no,i,indexSrc,idBD,idOp : integer;
top : Toperation;
s : string;
begin
indexSrc:=listboxOperations.ItemIndex;
indexSrc:=FormModifAction.listboxOperations.ItemIndex;
if indexSrc<0 then exit;
idBD:=ligneClicAct+1;
idop:=indexSrc+1;
@@ -1269,8 +1274,8 @@ begin
// réencoder la ligne
s:=encode_actions(idBD);
// maj combobox
ComboBoxActions.Items[idBD-1]:=s;
ComboBoxActions.ItemIndex:=idbd-1;
FormModifAction.ComboBoxActions.Items[idBD-1]:=s;
FormModifAction.ComboBoxActions.ItemIndex:=idbd-1;
// maj opérations
with FormModifAction.ListBoxOperations do
@@ -1280,7 +1285,7 @@ begin
begin
no:=Tablo_Action[idBD].tabloOp[i].numoperation;
s:=affecte_operation(no);
ListBoxOperations.Items.Add(s);
FormModifAction.ListBoxOperations.Items.Add(s);
itemHeight:=16;
end;
@@ -1289,6 +1294,11 @@ begin
Config_Modifie:=true;
end;
procedure TFormModifAction.SpinButton1DownClick(Sender: TObject);
begin
Descend_operation;
end;
procedure maj_combocactions(i : integer);
var s : string;
begin
@@ -1864,4 +1874,19 @@ begin
close;
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.
+15 -15
View File
@@ -129,7 +129,7 @@ JauneCliRalen60LEB=19;
var
FormPilote: TFormPilote;
EtatFeuPilote : word;
EtatSignalPilote : word;
AdrPilote : integer;
tableLEB : array[1..41,1..19] of
record
@@ -150,29 +150,29 @@ procedure dessine_signal_pilote;
var i,ancienEtat : integer;
Vcanvas : Tcanvas;
begin
i:=Index_Signal(AdrPilote); // adresse du feu d'origine
i:=Index_Signal(AdrPilote); // adresse du signal d'origine
if i<>0 then
//ImagePilote.Picture.Bitmap:=FormPilote.ImagePilote.picture.bitmap;
EtatFeuPilote:=Signaux[0].EtatSignal;
EtatSignalPilote:=Signaux[0].EtatSignal;
AncienEtat:=Signaux[0].ancienEtat;
Vcanvas:=FormPilote.ImagePilote.picture.bitmap.Canvas;
case Signaux[i].aspect of
// feux de signalisation
2 : dessine_signal2(Vcanvas,0,0,1,1,EtatFeupilote,1,i);
3 : dessine_signal3(Vcanvas,0,0,1,1,EtatFeupilote,1,i);
4 : dessine_signal4(VCanvas,0,0,1,1,EtatFeupilote,1,i);
5 : dessine_signal5(VCanvas,0,0,1,1,EtatFeupilote,1,i);
7 : dessine_signal7(VCanvas,0,0,1,1,EtatFeupilote,1,i);
9 : dessine_signal9(VCanvas,0,0,1,1,EtatFeupilote,1,i);
20 : dessine_signal20(VCanvas,0,0,1,1,EtatFeupilote,1,Signaux[i].adresse);
2 : dessine_signal2(Vcanvas,0,0,1,1,EtatSignalPilote,1,i);
3 : dessine_signal3(Vcanvas,0,0,1,1,EtatSignalPilote,1,i);
4 : dessine_signal4(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
5 : dessine_signal5(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
7 : dessine_signal7(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
9 : dessine_signal9(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
20 : dessine_signal20(VCanvas,0,0,1,1,EtatSignalPilote,1,Signaux[i].adresse);
// indicateurs de direction
12 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,2);
13 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,3);
14 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,4);
15 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,5);
16 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,6);
12 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,2);
13 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,3);
14 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,4);
15 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,5);
16 : dessine_dirN(VCanvas,0,0,1,1,EtatSignalPilote,1,6);
end;
end;
+8 -45
View File
@@ -1,11 +1,11 @@
object FormPrinc: TFormPrinc
Left = 272
Top = 402
Left = 134
Top = 277
Anchors = [akLeft, akTop, akRight]
BorderStyle = bsNone
Caption = 'Signaux complexes'
ClientHeight = 513
ClientWidth = 1094
ClientWidth = 847
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -22,7 +22,7 @@ object FormPrinc: TFormPrinc
OnKeyDown = FormKeyDown
OnResize = FormResize
DesignSize = (
1094
847
513)
PixelsPerInch = 96
TextHeight = 13
@@ -1431,7 +1431,7 @@ object FormPrinc: TFormPrinc
Visible = False
end
object LabelClock: TLabel
Left = 1002
Left = 755
Top = 0
Width = 85
Height = 22
@@ -5421,7 +5421,7 @@ object FormPrinc: TFormPrinc
Visible = False
end
object Label1: TLabel
Left = 792
Left = 545
Top = 4
Width = 89
Height = 13
@@ -5429,7 +5429,7 @@ object FormPrinc: TFormPrinc
Caption = 'Nombre de trains : '
end
object LabelNbTrains: TLabel
Left = 888
Left = 641
Top = 2
Width = 9
Height = 19
@@ -5445,7 +5445,7 @@ object FormPrinc: TFormPrinc
object StatusBar1: TStatusBar
Left = 0
Top = 491
Width = 1094
Width = 847
Height = 22
Panels = <
item
@@ -6460,16 +6460,6 @@ object FormPrinc: TFormPrinc
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
Left = 584
Top = 16
@@ -6509,33 +6499,6 @@ object FormPrinc: TFormPrinc
OnClick = Informationsdusignal1Click
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
OnPopup = PopupMenuTrainsPopup
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
// si affecte_loco=true : affecte la loco rencontrée aux cantons
procedure efface_route_tco(affecte_loco :boolean);
var n,det1,nti,x,y,det2,i,indexAig : integer;
procedure efface_route_tco; //(affecte_loco :boolean);
var n,det1,nti,x,y,det2,i,indexAig,tcoC : integer;
t : tequipement;
trouve : boolean;
begin
if Nbretco<1 then exit;
n:=parcoursdet[0].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
begin
det2:=parcoursdet[i].adresse;
@@ -104,7 +129,7 @@ begin
end;
if t=det then
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;
end;
end;
@@ -148,14 +173,38 @@ end;
// Affiche sans effacer l'ancienne, la route du TCO indexTCOcourant du tableau ParcoursDet[]
function Affiche_route_TCO : boolean ;
var i,n,det1,det2,indexAig : integer;
var i,n,det1,det2,indexAig,tcoC,x,y : integer;
t :tequipement;
ok : boolean;
ok,trouve : boolean;
begin
if Nbretco<1 then begin result:=false;exit;end;
n:=ParcoursDet[0].adresse;
ok:=true;
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
begin
t:=ParcoursDet[i].typ;
@@ -170,7 +219,7 @@ begin
begin
det2:=ParcoursDet[i].adresse;
// 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;
end;
end;
@@ -677,10 +726,10 @@ begin
if typ=det then
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;
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';
//Affiche(intToSTR(det1)+' '+intToSTR(det2),clyellow);
end;
+9 -2
View File
@@ -1,6 +1,6 @@
object FormTCO: TFormTCO
Left = 186
Top = 112
Left = 187
Top = 113
Width = 1013
Height = 607
VertScrollBar.Visible = False
@@ -1668,6 +1668,13 @@ object FormTCO: TFormTCO
object N12: TMenuItem
Caption = '-'
end
object MenuSuppTCO: TMenuItem
Caption = 'Supprimer le TCO'
OnClick = MenuSuppTCOClick
end
object N14: TMenuItem
Caption = '-'
end
object ConfigurationduTCO1: TMenuItem
Caption = 'Configuration du TCO'
OnClick = ConfigurationduTCO1Click
+164 -58
View File
@@ -172,6 +172,8 @@ type
N12: TMenuItem;
LabelPM: TLabel;
Afficherlecompteurdevitessedutrain1: TMenuItem;
MenuSuppTCO: TMenuItem;
N14: TMenuItem;
//TimerTCO: TTimer;
procedure FormCreate(Sender: TObject);
procedure FormActivate(Sender: TObject);
@@ -421,6 +423,7 @@ type
procedure Modedplacement1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Afficherlecompteurdevitessedutrain1Click(Sender: TObject);
procedure MenuSuppTCOClick(Sender: TObject);
public
{ Déclarations publiques }
end;
@@ -666,8 +669,8 @@ var
procedure calcul_reduction(Var frx,fry : single;DimDestX,DimDestY : integer);
procedure calcul_cellules(indextco : integer);
procedure sauve_fichiers_tco;
function zone_tco(indexTCO,det1,det2,train,adrTrain,mode: integer;posAig,affecte_loco : boolean) : boolean; overload;
function zone_tco(indexTCO,adr : integer;typEl : tequipement;Sens,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 : boolean) : boolean; overload;
procedure _entoure_cell_clic(indexTCO: integer);
procedure Affiche_TCO(indexTCO : integer) ;
procedure affiche_cellule(indexTCO,x,y : integer);
@@ -716,6 +719,9 @@ procedure titre_fenetre(indexTCO : integer);
function IsVoieDroite(i : integer) : boolean;
function trouve_canton(el1 : integer;tel1 : tequipement;el2 : integer;tel2 : tequipement) : 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
@@ -822,7 +828,11 @@ begin
else result:=0;
end;
// 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;
var i,eLc1,eLc2 : integer;
teLc1,teLc2 : tequipement;
@@ -833,13 +843,11 @@ begin
repeat
eLc1:=canton[i].el1; teLc1:=canton[i].typ1;
eLc2:=canton[i].el2; teLc2:=canton[i].typ2;
// ******** modif du 20/09/2025
// il faut que les deux éléments soient présents
{trouve:=((elc1=el1) and (teLc1=tel1) and (elc2=el2) and (teLc2=tel2)) or
((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)) ) ;
trouve:=((elc1=el1) and (teLc1=tel1) and (elc2=el2) and (teLc2=tel2)) or
((elc2=el1) and (teLc2=tel1) and (elc1=el2) and (teLc1=tel2)) ;
inc(i);
until (trouve) or (i>nCantons);
if trouve then result:=i-1;
@@ -1516,14 +1524,14 @@ begin
if horz then
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;
canton[i].el1:=xCanton;
canton[i].typ1:=tel1;
canton[i].SensEl1:=SensGauche;
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;
canton[i].el2:=xCanton;
canton[i].typ2:=tel1;
@@ -1533,14 +1541,14 @@ begin
else
begin
// 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;
canton[i].el1:=xCanton;
canton[i].typ1:=tel1;
canton[i].SensEl1:=SensHaut;
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;
canton[i].el2:=xCanton;
canton[i].typ2:=tel1;
@@ -1645,22 +1653,22 @@ begin
// croisements ou tjd
case Bim of
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].TypeE:=tel1;
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].TypeSO:=tel1;
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].TypeO:=tel1;
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].TypeNE:=tel1;
if deb then Affiche('NE='+intToSTR(xcanton),clLime);
@@ -1693,22 +1701,22 @@ begin
end;
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].TypeE:=tel1;
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].TypeSE:=tel1;
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].TypeO:=tel1;
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].TypeNO:=tel1;
if deb then Affiche('NO='+intToSTR(xcanton),clLime);
@@ -1739,22 +1747,22 @@ begin
end;
end;
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].TypeN:=tel1;
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].TypeS:=tel1;
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].TypeNE:=tel1;
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].TypeSO:=tel1;
if deb then Affiche('SO='+intToSTR(xcanton),clLime);
@@ -1786,22 +1794,22 @@ begin
end;
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].TypeN:=tel1;
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].TypeS:=tel1;
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].TypeNO:=tel1;
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].TypeSE:=tel1;
if deb then Affiche('SE='+intToSTR(xcanton),clLime);
@@ -2488,7 +2496,7 @@ begin
closefile(fichier);
renseigne_tous_cantons;
trier_cantons;
affecte_trains_config;
//affecte_trains_config;
sauve_styles_tco(indexTCO); // sauver le jeu sombre
if jeucouleurs=2 then jeu_clair(indexTCO);
@@ -4456,7 +4464,7 @@ begin
Brush.Color:=Couleur;
pen.color:=Couleur;
Pen.Mode:=pmCopy;
if testbit(ep,6) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur;
MoveTo(x0,y0+hauteurCell[indexTCO]);lineto(xc,yc);
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
begin
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=7 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:=round(4*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=3 then begin x0:=round(8*frX); y0:=round((tailleX/2)*frY);end;
@@ -11238,7 +11246,7 @@ begin
inverse_image(FormTCO[indexTCO].ImageTemp,ImageFeu);
// copie avec mise à l'échelle de l'image du signal
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
else
// 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=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=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=14 then begin xt:=LargeurCell[indexTCO]-round(30*frxGlob[indexTCO]);yt:=1;end;
if Bimage=15 then begin xt:=3;yt:=1;end;
@@ -11718,13 +11726,13 @@ begin
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=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=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=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=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;
@@ -11997,6 +12005,7 @@ begin
//Screen.OnActiveControlChange := ActiveControlChanged;
{$IF CompilerVersion >= 28.0}
ScrollBox.StyleName:='Windows';
BallonHint:=TballoonHint.Create(self);
with BallonHint do
begin
@@ -12097,7 +12106,7 @@ begin
xMiniSel:=99999;yMiniSel:=99999; // coordonnées cellules
xMaxiSel:=0;yMaxiSel:=0;
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;
// évite le clignotement pendant les affichages mais ne marche pas
//DoubleBuffered:=true;
@@ -12261,13 +12270,13 @@ begin
end;
// 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
// sinon mode = couleur du train
// affecte_loco = true : procède à l'affectation du train dans les cantons
// = false : ne change pas le train dans le canton
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,
procedure affiche_trajet(indexTCO,train,AdrTrain,ir,mode : integer);
var i,sx,sy,x,y,ax,ay,Bimage,adresse,IdCanton,IdTrain,AncTrain,elPrec,
DernierDet,sens : integer;
TypePrec: tEquipement;
cant : boolean;
begin
// et affichage de la route
@@ -12303,7 +12312,22 @@ begin
if adresse<>0 then
begin
// 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;
tco[indextco,x,y].trajet:=0;
@@ -12319,6 +12343,7 @@ begin
IdCanton:=index_canton_numero(TCO[indexTCO,x,y].NumCanton); // index canton
AncTrain:=0;
{
if (idcanton<>0) and affecte_loco then
begin
if mode=0 then // désaffecter le train
@@ -12338,8 +12363,8 @@ begin
end;
end;
end;
end;
}
//if (idcanton<>0) and not affecte_Loco then Affiche('Pas en mode affecte_loco',clOrange);
end;
@@ -12442,10 +12467,9 @@ end;
// 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
// 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é
//
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,
NbTrouve,AdrTr1,adrTr2 : integer;
memtrouve,sortir,indextrouve : boolean;
@@ -14009,7 +14033,7 @@ begin
AdrTr:=Adrtr2;
//Affiche(intToSTR(det1)+' '+intToSTR(det2)+' Mode '+intToSTR(mode)+' Le détecteur2 '+intToSTR(Det2)+ ' est affecté au train @'+intToSTR(AdrTr2),clYellow);
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;
@@ -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,
// 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
// affecte_loco=true : affecte loco si on rencontre un canton. Si mode=0 çà désaffecte la loco du canton
// =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;
function zone_tco(indexTCO,det1,det2,train,adrTrain,mode: integer;posAig : boolean) : boolean; overload;
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;
// 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
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;
@@ -17471,7 +17493,7 @@ begin
end;
// mise à jour des cellules de l'adresse "adresse"
// Affichage : mise à jour des cellules de l'adresse "adresse"
procedure Maj_TCO(indexTCO,Adresse : integer);
var x,y: integer;
begin
@@ -17896,7 +17918,7 @@ begin
aiguillage[Index_Aig(117)].position:=const_devie;
//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(522,514,1);
@@ -19048,6 +19070,8 @@ begin
screen.cursor:=crUpArrow;
end
else stop_modetrace(indexTCO);
FormTCO[indexTCO].DessinerleTCO1.Checked:=modetrace[indexTCO];
end;
procedure TFormTCO.ButtonDessinerClick(Sender: TObject);
@@ -19314,11 +19338,9 @@ begin
end;
end;
procedure TFormTCO.BandeauClick(Sender: TObject);
var indexTCO : integer;
procedure toggle_bandeau(indexTCO : integer);
begin
indexTCO:=index_TCOMainMenu;
if bandeauMasque then
if bandeauMasque then with formTCO[indexTCO] do
begin
PanelBas.Show;
PanelBas.Visible:=true;
@@ -19333,6 +19355,11 @@ begin
end;
end;
procedure TFormTCO.BandeauClick(Sender: TObject);
begin
toggle_bandeau(index_TCOMainMenu);
end;
procedure TFormTCO.Mosaquehorizontale1Click(Sender: TObject);
begin
mosaiqueH;
@@ -19769,6 +19796,85 @@ begin
formCompteur[1].Show;
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.
+3 -2
View File
@@ -173,7 +173,7 @@ function trouve_det_suiv_canton(idcanton,detecteur,sensTCO : integer) : integer;
var t : integer;
begin
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);
result:=xcanton;
end;
@@ -253,7 +253,7 @@ var idTrain,t,el1,el2 : integer;
begin
if ProcPrinc then
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
begin
idTrain:=0;
@@ -313,6 +313,7 @@ begin
end;
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);
end;
+21 -7
View File
@@ -26,7 +26,7 @@ var
f : textFile;
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
// pour unzip
SHCONTCH_NOPROGRESSBOX=4;
@@ -463,16 +463,21 @@ begin
closefile(fichier);
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
//----------------------------------------------------
//isoler le nom du fichier
i:=length(s3);
repeat
dec(i);
locZip:=s3[i]='/';
until (i=1) or LocZip;
nomfichier:=copy(s3,i+1,length(s3)-i);
if i<>0 then
begin
repeat
dec(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(s3,clLime);
@@ -495,6 +500,7 @@ begin
FormVersion.Top:=10;
FormVersion.Left:=10;
FormVersion.show;
s:='Vous utilisez la version '+versionSC+SousVersion+' mais il existe la version '+Version_p+SV_publie;
if nComm>0 then
begin
@@ -503,6 +509,14 @@ begin
Aff(' ');
for i:=1 to ncomm do aff(comm[i]);
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
begin
// 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.
version 10.78 : Correction affichage aiguillages dans l'écran de config des versions D13.
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.