Compare commits

...
11 Commits
Author SHA1 Message Date
Serge NOEL f132962bba Ajout README.md 2026-02-25 11:50:09 +01:00
f1iwq2 3702de2726 V10.91 2026-02-14 10:24:01 +01:00
f1iwq2 7daf7e28aa V10.82 2026-01-17 11:19:04 +01:00
f1iwq2 4b997f5de1 V10.8 2025-12-19 21:24:42 +01:00
f1iwq2 a70da188fd V10.78 2025-11-22 10:54:34 +01:00
f1iwq2 f806646a5d V10.77 2025-11-06 18:07:27 +01:00
f1iwq2 2ef4c7b07a doc 2025-10-30 19:12:43 +01:00
f1iwq2 e1c2f6b40c V10.75 2025-10-26 09:50:37 +01:00
f1iwq2 f053df40f9 V10.75 2025-09-28 09:52:09 +02:00
f1iwq2 aad2526b3d V10.73 2025-09-18 20:54:43 +02:00
f1iwq2 c1fe725ab3 V10.71 2025-09-14 14:15:59 +02:00
41 changed files with 3964 additions and 3574 deletions

No files matched your search

+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
Binary file not shown.
+28
View File
@@ -0,0 +1,28 @@
# Signaux_complexes_GL
![Titre](Imtitre.jpg)
Client signaux complexes pour CDM rail ou centrales pilotées par XpressNet
en USB ou Ethernet.
![TCO](tco.jpg)
![Presentation](sigpresentation.gif)
## Fichiers sources.
Signaux_complexes_GL est client de CDM rail mais fonctionne aussi de façon autonome si vous disposez d'une centrale compatible Xpressnet.
Il pilote les signaux complexes belges et français de façon automatique de votre réseau après modélisation (il existe une importation automatique du réseau CDM rail).
Il permet également de piloter des fonctions F de locomotives, jouer des sons et actionner des passages à niveaux à plusieurs voies d'après des actionneurs,
piloter des périphériques via port COM/USB (ex=Arduinos) et Socket réseau.
Il gère des TCOs et peut lancer CDM rail automatiquement avec votre LAY et l'interface choisie.
Ce logiciel nécessite une installation : faire clic droit en sélectionnant "exécuter en tant qu'administrateur" sur `installeur.exe`.
Vous pouvez voir les nouveautés de chaque version dans le fichier versions.txt.
## Liens
- [Topic sur **Forum CDM**](http://cdmrail.free.fr/ForumCDR/viewtopic.php?f=77&t=3906#p50499)
- [CDMRail](http://cdmrail.free.fr/SiteCDR/index.html)
- Lien vers le téléchargement de l'installateur choisir le fichier .zip [Versions](https://github.com/f1iwq2/Signaux_complexes_GL/releases)
+3 -3
View File
@@ -1,6 +1,6 @@
object FormAnalyseCDM: TFormAnalyseCDM object FormAnalyseCDM: TFormAnalyseCDM
Left = 206 Left = 210
Top = 145 Top = 94
AutoScroll = False AutoScroll = False
Caption = 'Fen'#234'tre r'#233'seau CDM' Caption = 'Fen'#234'tre r'#233'seau CDM'
ClientHeight = 596 ClientHeight = 596
@@ -62,7 +62,7 @@ object FormAnalyseCDM: TFormAnalyseCDM
object Label5: TLabel object Label5: TLabel
Left = 1005 Left = 1005
Top = 528 Top = 528
Width = 24 Width = 12
Height = 13 Height = 13
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Caption = '+ -' Caption = '+ -'
+37 -18
View File
@@ -73,7 +73,6 @@ type
procedure ImageCDMMouseMove(Sender: TObject; Shift: TShiftState; X, procedure ImageCDMMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer); Y: Integer);
procedure ButtonAnimeClick(Sender: TObject); procedure ButtonAnimeClick(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure ImageCDMMouseDown(Sender: TObject; Button: TMouseButton; procedure ImageCDMMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer); Shift: TShiftState; X, Y: Integer);
procedure ImageCDMMouseUp(Sender: TObject; Button: TMouseButton; procedure ImageCDMMouseUp(Sender: TObject; Button: TMouseButton;
@@ -220,6 +219,8 @@ function isole_valeur(var s : string; chercher : string;afficheErr : boolean) :
var i : integer; var i : integer;
serr : string; serr : string;
begin begin
chercher:=lowercase(chercher);
s:=lowercase(s);
i:=pos(chercher,s); i:=pos(chercher,s);
if i=0 then if i=0 then
begin begin
@@ -235,8 +236,8 @@ begin
delete(s,1,i+length(chercher)-1); delete(s,1,i+length(chercher)-1);
repeat repeat
if s[1]=' ' then delete(s,1,1); if (s[1]=' ') or (s[1]='=') then delete(s,1,1);
until (s[1]<>' ') or (length(s)=0); until ((s[1]<>' ') and (s[1]<>'=')) or (length(s)=0);
i:=pos(' ',s); i:=pos(' ',s);
if i<>0 then isole_valeur:=copy(s,1,i-1) else isole_valeur:=s; if i<>0 then isole_valeur:=copy(s,1,i-1) else isole_valeur:=s;
@@ -301,7 +302,28 @@ begin
Segment[nSeg-1].periph[nperiph-1].location:=i; Segment[nSeg-1].periph[nperiph-1].location:=i;
s:=AnsiLowerCase(lignes[nligne]); s:=AnsiLowerCase(lignes[nligne]);
// ne pas faire inc(nligne) car on va regarder la ligne suivante en indiçant en +1 inc(nligne);
{non utilisé mais doit être pris en compte
Actionneurs Tickets horaire ou gestionnaire de voie unique,
tickets = le type de l'actionneur, soit :
0 = ACT_STD, Actionneur standard.
1 = ACT_MANO, Actionneur manuel, non actionné par les trains mais par un clic souris.
2 = ACT_VUH Actionneur Voie Unique ou Tickets Horaire, actionné dans les deux sens par les trains. Ils vont toujours par paire.
Twined = RefIndex de l'actionneur associé en cas d'un ACT_VUH.
}
s2:=isole_valeur(s,'tckets',false); // nouveau
if s2<>'' then
begin
s:=AnsiLowerCase(lignes[nligne]);
inc(nLigne);
end;
s2:=isole_valeur(s,'tickets',false); // nouveau Tickets = 0 Twined = 0
if s2<>'' then
begin
s:=AnsiLowerCase(lignes[nligne]);
inc(nLigne);
end;
s2:=isole_valeur(s,'address',true); s2:=isole_valeur(s,'address',true);
val(s2,i,erreur); val(s2,i,erreur);
@@ -325,7 +347,7 @@ begin
val(s2,i,erreur); val(s2,i,erreur);
Segment[nSeg-1].periph[nperiph-1].status:=i; Segment[nSeg-1].periph[nperiph-1].status:=i;
// peut être suivi de 'On device port' si une adresse de détecteur ou d'actionneur se trouve sur l'appareil de voie // peut être suivi de 'on device port' si une adresse de détecteur ou d'actionneur se trouve sur l'appareil de voie
Segment[nSeg-1].periph[nperiph-1].OnDevicePort:=-1; // marqueur d'invalidité Segment[nSeg-1].periph[nperiph-1].OnDevicePort:=-1; // marqueur d'invalidité
s:=AnsiLowerCase(lignes[nligne+1]); s:=AnsiLowerCase(lignes[nligne+1]);
if pos('on device port',s)<>0 then if pos('on device port',s)<>0 then
@@ -343,6 +365,7 @@ begin
end; end;
procedure compile_inter; procedure compile_inter;
var i,erreur : integer; var i,erreur : integer;
s,s2: string; s,s2: string;
@@ -370,6 +393,7 @@ begin
s2:=isole_valeur(s,'type:',true); s2:=isole_valeur(s,'type:',true);
Segment[nSeg-1].inter[nInter-1].typ:=s2; Segment[nSeg-1].inter[nInter-1].typ:=s2;
// nouvelle ligne: Mirror: Z= 1416
s:=AnsiLowerCase(lignes[nligne]); s:=AnsiLowerCase(lignes[nligne]);
inc(nLigne); inc(nLigne);
s2:=isole_valeur(s,'z=',true); s2:=isole_valeur(s,'z=',true);
@@ -4328,7 +4352,7 @@ begin
s:=lowercase(Formprinc.fenRich.Lines[0]); s:=lowercase(Formprinc.fenRich.Lines[0]);
if pos('module',s)=0 then if pos('module',s)=0 then
begin begin
Affiche('Pas de module CDM détecté',clred); Affiche('Pas de module CDM détecté - Abandon',clred);
exit; exit;
end; end;
end end
@@ -4387,7 +4411,12 @@ begin
end; end;
inc(nligne); inc(nligne);
until (nligne>nombre); until (nligne>nombre);
Affiche('Fin de la compilation des segments',cllime); if nseg<>0 then Affiche('Fin de la compilation des segments',cllime)
else
begin
Affiche('Aucun segment trouvé - Abandon',clred);
exit;
end;
// balayer les segments pour transformer les bjd en créant 1 croisement et 4 aiguillages dans les segments, puis on supprime la bjd des segments // balayer les segments pour transformer les bjd en créant 1 croisement et 4 aiguillages dans les segments, puis on supprime la bjd des segments
i:=0; i:=0;
@@ -4765,7 +4794,7 @@ var pt : Tpoint;
canvasI : Tcanvas; canvasI : Tcanvas;
begin begin
clic:=true; clic:=true;
pt:= formAnalyseCDM.ImageCDM.ScreenToClient(Mouse.CursorPos); // coordonnées par rapport à l'image pt:=formAnalyseCDM.ImageCDM.ScreenToClient(Mouse.CursorPos); // coordonnées par rapport à l'image
xSouris:=pt.x; xSouris:=pt.x;
ySouris:=pt.y; ySouris:=pt.y;
@@ -5555,19 +5584,9 @@ begin
sleep(40); sleep(40);
Application.processMessages; Application.processMessages;
until x>800; until x>800;
//until x>500;
end; end;
procedure TFormAnalyseCDM.Button1Click(Sender: TObject);
begin
dessine_det(523);
end;
procedure TFormAnalyseCDM.ImageCDMMouseDown(Sender: TObject; procedure TFormAnalyseCDM.ImageCDMMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin begin
+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;
+1 -1
View File
@@ -16,7 +16,7 @@ object FormClock: TFormClock
OnResize = FormResize OnResize = FormResize
DesignSize = ( DesignSize = (
234 234
212) 211)
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
object BitBtnMarHor: TBitBtn object BitBtnMarHor: TBitBtn
+1 -1
View File
@@ -487,7 +487,7 @@ end;
procedure TFormClock.TjsVerClick(Sender: TObject); procedure TFormClock.TjsVerClick(Sender: TObject);
begin begin
SetWindowPos(Handle,HWND_TOPMOST,0,0,0,0,SWP_NoMove or SWP_NoSize); SetWindowPos(Handle,HWND_TOPMOST,0,0,0,0,SWP_NoMove or SWP_NoSize);
// le checked ne fonctionne pas sous D7, fonctionne sous D12. // le checked ne fonctionne pas sous D7, fonctionne sous D13.
TjsDev.Checked:=true; TjsDev.Checked:=true;
Dverrouiller1.Checked:=false; Dverrouiller1.Checked:=false;
VerrouilleClock:=true; VerrouilleClock:=true;
+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
+52 -13
View File
@@ -66,6 +66,7 @@ var
Scompteur : TTCompteur; // Scompteur : associé à grande fenetre compteur Scompteur : TTCompteur; // Scompteur : associé à grande fenetre compteur
ParamCompteur : array[1..3] of record ParamCompteur : array[1..3] of record
coulAig,coulGrad,CoulNum,CoulFond,CoulArc : tcolor; coulAig,coulGrad,CoulNum,CoulFond,CoulArc : tcolor;
increment : integer; // incrément rapide
end; end;
VerrouilleCompteur,affTrainCompteur,VitCrans : boolean; VerrouilleCompteur,affTrainCompteur,VitCrans : boolean;
@@ -162,7 +163,7 @@ begin
end; end;
end; end;
// change l'aiguille du compteur // change l'aiguille du compteur "c" en fonction de la vitesse du train "idTrain" dans le composant "comp"
// c : n° de fenetre du compteur idTrain : index du train comp : composant dans lequel se trouve le compteur (form, groupbox ou image) // c : n° de fenetre du compteur idTrain : index du train comp : composant dans lequel se trouve le compteur (form, groupbox ou image)
procedure aiguille_compteur(c,idTrain : integer ; comp : Tcomponent); procedure aiguille_compteur(c,idTrain : integer ; comp : Tcomponent);
var ComptLoc,x1,y1,x2,y2,x3,y3,x4,y4,vitesse,vitesseFin,lim,him : integer; var ComptLoc,x1,y1,x2,y2,x3,y3,x4,y4,vitesse,vitesseFin,lim,him : integer;
@@ -278,6 +279,7 @@ begin
end; end;
end; end;
// dessine le fond du compteur 2 (graduations et chiffres)
procedure compteur_2(c : integer;bm : tbitmap;var param : tparamcompt); procedure compteur_2(c : integer;bm : tbitmap;var param : tparamcompt);
var n,v,rayon2,rayon3,rayon4,x1,y1,x2,y2,xt,yt,lim,him,rg : integer; var n,v,rayon2,rayon3,rayon4,x1,y1,x2,y2,xt,yt,lim,him,rg : integer;
angle,incr,r : single; angle,incr,r : single;
@@ -376,6 +378,7 @@ begin
end; end;
end; end;
// dessine le fond du compteur tachro
procedure compteur_tachro(c : integer;bm : tbitmap;var param : tparamcompt); procedure compteur_tachro(c : integer;bm : tbitmap;var param : tparamcompt);
var l,av,n,v,rayon2,rayon3,rayon4,x1,y1,x2,y2,xt,yt,lim,him,rg : integer; var l,av,n,v,rayon2,rayon3,rayon4,x1,y1,x2,y2,xt,yt,lim,him,rg : integer;
angle,incr,r,a,sinA,cosA : single; angle,incr,r,a,sinA,cosA : single;
@@ -488,7 +491,7 @@ begin
end; end;
// dessine dans le FbitMap // dessine le fond du compteur pour tous les compteurs dans le FbitMap
// le var est obligatoire // le var est obligatoire
// typecompt : type du compteur 1 2 ou 3 // typecompt : type du compteur 1 2 ou 3
procedure dessin_fond_compteur(var param : TparamCompt;i: integer ; Im : tbitmap;typCompt : integer); procedure dessin_fond_compteur(var param : TparamCompt;i: integer ; Im : tbitmap;typCompt : integer);
@@ -507,6 +510,7 @@ 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
@@ -518,18 +522,23 @@ begin
font.color:=ParamCompteur[1].CoulNum; font.color:=ParamCompteur[1].CoulNum;
{$IF CompilerVersion >= 28.0} {$IF CompilerVersion >= 28.0}
font.orientation:=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} {$IFEND}
font.size:=round(redx*10*RedFonte); font.size:=round(redx*10*RedFonte);
TextOut(round(50*redX),round(128*redY),'0'); TextOut(round(50*redX),round(128*redY),'0');
TextOut(round(36*redX),round(90*redY),'20'); TextOut(round(40*redX),round(92*redY),'20');
TextOut(round(50*redX),round(54*redY),'40'); TextOut(round(56*redX),round(56*redY),'40');
TextOut(round(90*redX),round(36*redY),'60'); TextOut(round(94*redX),round(36*redY),'60');
TextOut(round(129*redX),round(53*redY),'80'); TextOut(round(129*redX),round(53*redY),'80');
TextOut(round(137*redX),round(91*redY),'100'); TextOut(round(137*redX),round(91*redY),'100');
TextOut(round(126*redX),round(126*redY),'120'); TextOut(round(124*redX),round(130*redY),'120');
// centre de l'aiguille
AigCX:=round(98*redX);
AigCY:=round(98*redY);
rAig:=round(AigCX / 1.5); rAig:=round(AigCX / 1.5);
angleFin:=127; // en fait vitesse maxi compteur angleFin:=127; // en fait vitesse maxi compteur
end; end;
@@ -564,6 +573,9 @@ 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
@@ -590,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;
@@ -678,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;
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.redX:=Lim/l;
paramcompt.redY:=Him/h; 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
@@ -694,7 +716,7 @@ begin
3 : compteurT[i].paramcompt.rav:=round(115*compteurT[i].paramcompt.redx); 3 : compteurT[i].paramcompt.rav:=round(115*compteurT[i].paramcompt.redx);
end; end;
//ne pas faire compteurT[i].FCBitMap.Free çà fait une exception si il est déja en nil, contrairement à D12. //ne pas faire compteurT[i].FCBitMap.Free çà fait une exception si il est déja en nil, contrairement à D13.
compteurT[i].fcBitMap:=tbitmap.Create; compteurT[i].fcBitMap:=tbitmap.Create;
with compteurT[i].FCBitMap do with compteurT[i].FCBitMap do
begin begin
@@ -710,8 +732,17 @@ begin
if typDest=fen then if typDest=fen then
begin begin
formCompteur[i].ImageCompteur.width:=Lim; formCompteur[i].ImageCompteur.width:=Lim;
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.redX:=Lim/l;
Scompteur[i].paramcompt.redY:=Him/h; 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
@@ -802,8 +833,17 @@ begin
Image.Width:=lim; Image.Width:=lim;
Image.Height:=him; Image.Height:=him;
if ComptLoc=1 then
begin
paramcomptIm.redX:=Lim/l/RedFonte;
paramcomptIm.redY:=Him/h/RedFonte;
end
else
begin
paramcomptIm.redX:=Lim/l; paramcomptIm.redX:=Lim/l;
paramcomptIm.redY:=Him/h; 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;
@@ -981,7 +1021,6 @@ begin
afficherIconeDuTrain1.Checked:=affTrainCompteur; afficherIconeDuTrain1.Checked:=affTrainCompteur;
init_compteur(1,formcompteur[1]); init_compteur(1,formcompteur[1]);
affiche_train_compteur(1); affiche_train_compteur(1);
end; end;
procedure TFormCompteur.Vitesseencrans1Click(Sender: TObject); procedure TFormCompteur.Vitesseencrans1Click(Sender: TObject);
+248 -120
View File
@@ -1,6 +1,6 @@
object FormConfig: TFormConfig object FormConfig: TFormConfig
Left = 265 Left = 254
Top = 106 Top = 172
Hint = 'Modifie la configuration selon les s'#233'lections choisies' Hint = 'Modifie la configuration selon les s'#233'lections choisies'
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Configuration g'#233'n'#233'rale' Caption = 'Configuration g'#233'n'#233'rale'
@@ -1542,12 +1542,12 @@ object FormConfig: TFormConfig
Visible = False Visible = False
WordWrap = True WordWrap = True
end end
object LabelD12: TLabel object LabelD13: TLabel
Left = 752 Left = 752
Top = 64 Top = 64
Width = 40 Width = 40
Height = 31 Height = 31
Caption = 'D12' Caption = 'D13'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -27 Font.Height = -27
@@ -1573,7 +1573,7 @@ object FormConfig: TFormConfig
Top = 8 Top = 8
Width = 633 Width = 633
Height = 505 Height = 505
ActivePage = TabSheetAutonome ActivePage = TabSheetDet
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack Font.Color = clBlack
Font.Height = -11 Font.Height = -11
@@ -1638,7 +1638,6 @@ object FormConfig: TFormConfig
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 1 TabOrder = 1
Text = '123'
end end
object ButtonPFCDM: TButton object ButtonPFCDM: TButton
Left = 16 Left = 16
@@ -1669,6 +1668,17 @@ object FormConfig: TFormConfig
Height = 13 Height = 13
Caption = 'Nom du fichier LAY '#224' utiliser au d'#233'marrage de CDM' Caption = 'Nom du fichier LAY '#224' utiliser au d'#233'marrage de CDM'
end end
object SpeedButtonLay: TSpeedButton
Left = 232
Top = 192
Width = 23
Height = 22
Hint = 'Choix du fichier LAY'
Caption = '...'
ParentShowHint = False
ShowHint = True
OnClick = SpeedButtonLayClick
end
object CheckVerifVersion: TCheckBox object CheckVerifVersion: TCheckBox
Left = 8 Left = 8
Top = 56 Top = 56
@@ -1730,7 +1740,7 @@ object FormConfig: TFormConfig
object EditLAY: TEdit object EditLAY: TEdit
Left = 8 Left = 8
Top = 192 Top = 192
Width = 249 Width = 217
Height = 21 Height = 21
Hint = 'Nom du LAY avec .lay' Hint = 'Nom du LAY avec .lay'
ParentShowHint = False ParentShowHint = False
@@ -2032,7 +2042,7 @@ object FormConfig: TFormConfig
end end
object CheckBoxVerifXpressNet: TCheckBox object CheckBoxVerifXpressNet: TCheckBox
Left = 8 Left = 8
Top = 90 Top = 88
Width = 233 Width = 233
Height = 17 Height = 17
Hint = Hint =
@@ -2098,7 +2108,7 @@ object FormConfig: TFormConfig
'S'#233'lection du style d'#39#39'affichage - Le style sera chang'#233' '#224' la ferm' + 'S'#233'lection du style d'#39#39'affichage - Le style sera chang'#233' '#224' la ferm' +
'eture de la fen'#234'tre'#39 'eture de la fen'#234'tre'#39
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 0 TabOrder = 0
@@ -2147,7 +2157,7 @@ object FormConfig: TFormConfig
object Label4: TLabel object Label4: TLabel
Left = 16 Left = 16
Top = 45 Top = 45
Width = 135 Width = 196
Height = 26 Height = 26
Caption = '2. Temporisation d'#39'envoi des octets de la trame (ms)' Caption = '2. Temporisation d'#39'envoi des octets de la trame (ms)'
WordWrap = True WordWrap = True
@@ -2155,7 +2165,7 @@ object FormConfig: TFormConfig
object Label5: TLabel object Label5: TLabel
Left = 16 Left = 16
Top = 75 Top = 75
Width = 148 Width = 192
Height = 26 Height = 26
Caption = Caption =
'3. Temporisation d'#39'attente de la r'#233'ponse de l'#39'interface (x 50 ms' + '3. Temporisation d'#39'attente de la r'#233'ponse de l'#39'interface (x 50 ms' +
@@ -2295,10 +2305,10 @@ object FormConfig: TFormConfig
BevelInner = bvLowered BevelInner = bvLowered
BevelKind = bkFlat BevelKind = bkFlat
Lines.Strings = ( Lines.Strings = (
'3. Valeur maximale par tranche de 100 ms qui d'#233'finit le temps ' '3. Valeur maximale par tranche de 50 ms qui d'#233'finit le temps '
'd'#39'attente de la r'#233'ponse de l'#39'interface apr'#232's ' 'd'#39'attente de la r'#233'ponse de l'#39'interface apr'#232's une trame qui lui '
'une trame qui lui est transf'#233'r'#233'e. Cette valeur est '#224' tester en ' 'est transf'#233'r'#233'e. Cette valeur est '#224' tester en fonction de votre '
'fonction de votre interface. ' 'interface. '
'En cas de d'#233'passement de la valeur, un message '#171' pas de ' 'En cas de d'#233'passement de la valeur, un message '#171' pas de '
'r'#233'ponse de l'#39'interface '#187' sera affich'#233'.') 'r'#233'ponse de l'#39'interface '#187' sera affich'#233'.')
ReadOnly = True ReadOnly = True
@@ -2420,8 +2430,11 @@ object FormConfig: TFormConfig
Top = 24 Top = 24
Width = 145 Width = 145
Height = 21 Height = 21
Hint = 'Echelle'
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 13
ParentShowHint = False
ShowHint = True
TabOrder = 0 TabOrder = 0
OnChange = ComboBoxEchelleChange OnChange = ComboBoxEchelleChange
Items.Strings = ( Items.Strings = (
@@ -2917,7 +2930,7 @@ object FormConfig: TFormConfig
OnClick = RadioButtonTJD4Click OnClick = RadioButtonTJD4Click
end end
end end
object ButtonPropage: TButton object ButtonPropageAig: TButton
Left = 192 Left = 192
Top = 56 Top = 56
Width = 89 Width = 89
@@ -2930,7 +2943,7 @@ object FormConfig: TFormConfig
ShowHint = True ShowHint = True
TabOrder = 9 TabOrder = 9
WordWrap = True WordWrap = True
OnClick = ButtonPropageClick OnClick = ButtonPropageAigClick
end end
end end
object ButtonNouvAig: TButton object ButtonNouvAig: TButton
@@ -3140,21 +3153,6 @@ object FormConfig: TFormConfig
object TabSheetSig: TTabSheet object TabSheetSig: TTabSheet
Caption = 'Signaux' Caption = 'Signaux'
ImageIndex = 4 ImageIndex = 4
object Label15: TLabel
Left = 0
Top = 8
Width = 531
Height = 13
Caption =
'Liste de mod'#233'lisation des signaux - cliquez sur une ligne pour a' +
'fficher la description du signal'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label35: TLabel object Label35: TLabel
Left = 72 Left = 72
Top = 436 Top = 436
@@ -3164,14 +3162,14 @@ object FormConfig: TFormConfig
end end
object GroupBox12: TGroupBox object GroupBox12: TGroupBox
Left = 328 Left = 328
Top = 24 Top = 8
Width = 297 Width = 297
Height = 449 Height = 465
Caption = 'Description du signal' Caption = 'Description du signal'
TabOrder = 0 TabOrder = 0
object ImageSignal: TImage object ImageSignal: TImage
Left = 8 Left = 8
Top = 48 Top = 64
Width = 81 Width = 81
Height = 105 Height = 105
end end
@@ -3190,30 +3188,30 @@ object FormConfig: TFormConfig
end end
object LabelDec: TLabel object LabelDec: TLabel
Left = 92 Left = 92
Top = 52 Top = 76
Width = 53 Width = 53
Height = 13 Height = 13
Caption = 'D'#233'codeur: ' Caption = 'D'#233'codeur: '
end end
object LabelDetAss: TLabel object LabelDetAss: TLabel
Left = 96 Left = 96
Top = 104 Top = 120
Width = 86 Width = 86
Height = 13 Height = 13
Caption = 'D'#233'tecteur associ'#233 Caption = 'D'#233'tecteur associ'#233
end end
object LabelElSuiv: TLabel object LabelElSuiv: TLabel
Left = 192 Left = 192
Top = 104 Top = 120
Width = 75 Width = 75
Height = 13 Height = 13
Caption = 'Element suivant' Caption = 'Element suivant'
end end
object Label17: TLabel object Label17: TLabel
Left = 8 Left = 8
Top = 326 Top = 344
Width = 115 Width = 128
Height = 52 Height = 39
Hint = Hint =
'Permet d'#39'afficher un carr'#233' si les aiguillages sont dans les posi' + 'Permet d'#39'afficher un carr'#233' si les aiguillages sont dans les posi' +
'tions d'#233'crites ci dessous' 'tions d'#233'crites ci dessous'
@@ -3225,8 +3223,8 @@ object FormConfig: TFormConfig
WordWrap = True WordWrap = True
end end
object Label24: TLabel object Label24: TLabel
Left = 104 Left = 120
Top = 124 Top = 140
Width = 8 Width = 8
Height = 13 Height = 13
Caption = '1' Caption = '1'
@@ -3238,8 +3236,8 @@ object FormConfig: TFormConfig
ParentFont = False ParentFont = False
end end
object Label25: TLabel object Label25: TLabel
Left = 104 Left = 120
Top = 148 Top = 164
Width = 8 Width = 8
Height = 13 Height = 13
Caption = '2' Caption = '2'
@@ -3251,8 +3249,8 @@ object FormConfig: TFormConfig
ParentFont = False ParentFont = False
end end
object Label26: TLabel object Label26: TLabel
Left = 104 Left = 120
Top = 172 Top = 188
Width = 8 Width = 8
Height = 13 Height = 13
Caption = '3' Caption = '3'
@@ -3264,8 +3262,8 @@ object FormConfig: TFormConfig
ParentFont = False ParentFont = False
end end
object Label27: TLabel object Label27: TLabel
Left = 104 Left = 120
Top = 196 Top = 212
Width = 8 Width = 8
Height = 13 Height = 13
Caption = '4' Caption = '4'
@@ -3278,22 +3276,22 @@ object FormConfig: TFormConfig
end end
object Label33: TLabel object Label33: TLabel
Left = 104 Left = 104
Top = 76 Top = 100
Width = 36 Width = 36
Height = 13 Height = 13
Caption = 'Aspect:' Caption = 'Aspect:'
end end
object LabelUni: TLabel object LabelUni: TLabel
Left = 8 Left = 8
Top = 176 Top = 200
Width = 72 Width = 72
Height = 13 Height = 13
Caption = 'Spec Unisemaf' Caption = 'Spec Unisemaf'
Visible = False Visible = False
end end
object Label43: TLabel object Label43: TLabel
Left = 48 Left = 72
Top = 160 Top = 176
Width = 38 Width = 38
Height = 16 Height = 16
Caption = 'Voies:' Caption = 'Voies:'
@@ -3306,8 +3304,8 @@ object FormConfig: TFormConfig
end end
object Label69: TLabel object Label69: TLabel
Left = 152 Left = 152
Top = 326 Top = 350
Width = 107 Width = 122
Height = 39 Height = 39
Hint = Hint =
'Permet d'#39'afficher un feu blanc si les aiguillages sont dans les ' + 'Permet d'#39'afficher un feu blanc si les aiguillages sont dans les ' +
@@ -3318,11 +3316,19 @@ object FormConfig: TFormConfig
ShowHint = True ShowHint = True
WordWrap = True WordWrap = True
end end
object Label15: TLabel
Left = 64
Top = 46
Width = 171
Height = 13
Caption = 'Temporisation commandes (x100ms)'
WordWrap = True
end
object MemoCarre: TMemo object MemoCarre: TMemo
Left = 8 Left = 8
Top = 368 Top = 392
Width = 137 Width = 137
Height = 73 Height = 65
Hint = Hint =
'Une ligne contient les conditions en ET. Les lignes sont cha'#238'n'#233'e' + 'Une ligne contient les conditions en ET. Les lignes sont cha'#238'n'#233'e' +
's en OU' 's en OU'
@@ -3336,17 +3342,17 @@ object FormConfig: TFormConfig
end end
object ComboBoxDec: TComboBox object ComboBoxDec: TComboBox
Left = 144 Left = 144
Top = 48 Top = 72
Width = 137 Width = 137
Height = 21 Height = 21
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
TabOrder = 1 TabOrder = 1
OnChange = ComboBoxDecChange OnChange = ComboBoxDecChange
end end
object EditDet1: TEdit object EditDet1: TEdit
Left = 136 Left = 136
Top = 120 Top = 136
Width = 41 Width = 41
Height = 21 Height = 21
Hint = 'D'#233'tecteur 1 (obligatoire) associ'#233' au signal' Hint = 'D'#233'tecteur 1 (obligatoire) associ'#233' au signal'
@@ -3357,7 +3363,7 @@ object FormConfig: TFormConfig
end end
object EditSuiv1: TEdit object EditSuiv1: TEdit
Left = 200 Left = 200
Top = 120 Top = 136
Width = 41 Width = 41
Height = 21 Height = 21
Hint = Hint =
@@ -3370,7 +3376,7 @@ object FormConfig: TFormConfig
end end
object EditDet2: TEdit object EditDet2: TEdit
Left = 136 Left = 136
Top = 144 Top = 160
Width = 41 Width = 41
Height = 21 Height = 21
Hint = 'D'#233'tecteur 2 (optionnel) associ'#233' au signal' Hint = 'D'#233'tecteur 2 (optionnel) associ'#233' au signal'
@@ -3381,7 +3387,7 @@ object FormConfig: TFormConfig
end end
object EditSuiv2: TEdit object EditSuiv2: TEdit
Left = 200 Left = 200
Top = 144 Top = 160
Width = 41 Width = 41
Height = 21 Height = 21
Hint = Hint =
@@ -3394,7 +3400,7 @@ object FormConfig: TFormConfig
end end
object EditDet3: TEdit object EditDet3: TEdit
Left = 136 Left = 136
Top = 168 Top = 184
Width = 41 Width = 41
Height = 21 Height = 21
Hint = 'D'#233'tecteur 3 (optionnel) associ'#233' au signal' Hint = 'D'#233'tecteur 3 (optionnel) associ'#233' au signal'
@@ -3405,7 +3411,7 @@ object FormConfig: TFormConfig
end end
object EditSuiv3: TEdit object EditSuiv3: TEdit
Left = 200 Left = 200
Top = 168 Top = 184
Width = 41 Width = 41
Height = 21 Height = 21
Hint = Hint =
@@ -3418,7 +3424,7 @@ object FormConfig: TFormConfig
end end
object EditDet4: TEdit object EditDet4: TEdit
Left = 136 Left = 136
Top = 192 Top = 208
Width = 41 Width = 41
Height = 21 Height = 21
Hint = 'D'#233'tecteur 4 (optionnel) associ'#233' au signal' Hint = 'D'#233'tecteur 4 (optionnel) associ'#233' au signal'
@@ -3429,7 +3435,7 @@ object FormConfig: TFormConfig
end end
object EditSuiv4: TEdit object EditSuiv4: TEdit
Left = 200 Left = 200
Top = 192 Top = 208
Width = 41 Width = 41
Height = 21 Height = 21
Hint = Hint =
@@ -3442,7 +3448,7 @@ object FormConfig: TFormConfig
end end
object CheckVerrouCarre: TCheckBox object CheckVerrouCarre: TCheckBox
Left = 136 Left = 136
Top = 216 Top = 240
Width = 137 Width = 137
Height = 17 Height = 17
Hint = Hint =
@@ -3467,17 +3473,17 @@ object FormConfig: TFormConfig
end end
object ComboBoxAsp: TComboBox object ComboBoxAsp: TComboBox
Left = 144 Left = 144
Top = 72 Top = 96
Width = 137 Width = 137
Height = 21 Height = 21
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
TabOrder = 2 TabOrder = 2
OnChange = ComboBoxAspChange OnChange = ComboBoxAspChange
end end
object EditSpecUni: TEdit object EditSpecUni: TEdit
Left = 8 Left = 8
Top = 192 Top = 216
Width = 33 Width = 33
Height = 21 Height = 21
TabOrder = 14 TabOrder = 14
@@ -3485,8 +3491,8 @@ object FormConfig: TFormConfig
OnChange = EditSpecUniChange OnChange = EditSpecUniChange
end end
object Buttonrestaure: TButton object Buttonrestaure: TButton
Left = 24 Left = 32
Top = 272 Top = 288
Width = 75 Width = 75
Height = 25 Height = 25
Hint = 'Restaure la configuration du feu d'#39'avant sa modification' Hint = 'Restaure la configuration du feu d'#39'avant sa modification'
@@ -3498,7 +3504,7 @@ object FormConfig: TFormConfig
end end
object CheckBoxFB: TCheckBox object CheckBoxFB: TCheckBox
Left = 136 Left = 136
Top = 264 Top = 288
Width = 153 Width = 153
Height = 17 Height = 17
Caption = 'Avec demande feu blanc' Caption = 'Avec demande feu blanc'
@@ -3506,8 +3512,8 @@ object FormConfig: TFormConfig
OnClick = CheckBoxFBClick OnClick = CheckBoxFBClick
end end
object ButtonConfigSR: TButton object ButtonConfigSR: TButton
Left = 24 Left = 32
Top = 296 Top = 312
Width = 75 Width = 75
Height = 25 Height = 25
Caption = 'Configuration' Caption = 'Configuration'
@@ -3517,7 +3523,7 @@ object FormConfig: TFormConfig
end end
object CheckFVC: TCheckBox object CheckFVC: TCheckBox
Left = 136 Left = 136
Top = 232 Top = 256
Width = 121 Width = 121
Height = 17 Height = 17
Hint = 'Remplace le feu vert par un feu vert clignotant' Hint = 'Remplace le feu vert par un feu vert clignotant'
@@ -3529,7 +3535,7 @@ object FormConfig: TFormConfig
end end
object CheckFRC: TCheckBox object CheckFRC: TCheckBox
Left = 136 Left = 136
Top = 248 Top = 272
Width = 129 Width = 129
Height = 17 Height = 17
Hint = 'Remplace le s'#233'maphore par un feu rouge clignotant' Hint = 'Remplace le s'#233'maphore par un feu rouge clignotant'
@@ -3541,7 +3547,7 @@ object FormConfig: TFormConfig
end end
object CheckBoxVersContrevoie: TCheckBox object CheckBoxVersContrevoie: TCheckBox
Left = 136 Left = 136
Top = 280 Top = 304
Width = 137 Width = 137
Height = 17 Height = 17
Hint = 'Permet d'#39'afficher le chevron si l'#39'aiguillage du signal est devi'#233 Hint = 'Permet d'#39'afficher le chevron si l'#39'aiguillage du signal est devi'#233
@@ -3553,7 +3559,7 @@ object FormConfig: TFormConfig
end end
object CheckBoxContreVoie: TCheckBox object CheckBoxContreVoie: TCheckBox
Left = 136 Left = 136
Top = 296 Top = 320
Width = 129 Width = 129
Height = 17 Height = 17
Hint = 'Signal clignotant' Hint = 'Signal clignotant'
@@ -3565,9 +3571,9 @@ object FormConfig: TFormConfig
end end
object MemoBlanc: TMemo object MemoBlanc: TMemo
Left = 152 Left = 152
Top = 368 Top = 392
Width = 129 Width = 129
Height = 73 Height = 65
Hint = Hint =
'Une ligne contient les conditions en ET. Les lignes sont cha'#238'n'#233'e' + 'Une ligne contient les conditions en ET. Les lignes sont cha'#238'n'#233'e' +
's en OU' 's en OU'
@@ -3579,8 +3585,8 @@ object FormConfig: TFormConfig
OnChange = MemoBlancChange OnChange = MemoBlancChange
end end
object RadioGroupLEB: TRadioGroup object RadioGroupLEB: TRadioGroup
Left = 8 Left = 16
Top = 224 Top = 248
Width = 113 Width = 113
Height = 41 Height = 41
Caption = 'Pilotage' Caption = 'Pilotage'
@@ -3593,10 +3599,33 @@ object FormConfig: TFormConfig
Visible = False Visible = False
OnClick = RadioGroupLEBClick OnClick = RadioGroupLEBClick
end end
object EditTempoSig: TEdit
Left = 240
Top = 40
Width = 33
Height = 21
TabOrder = 23
OnChange = EditTempoSigChange
end
object ButtonPropageSig: TButton
Left = 224
Top = 16
Width = 57
Height = 17
Hint =
'Change les adresses dans les TCOs si on a chang'#233' l'#39'adresse d'#39'un ' +
'signal'
Caption = 'Propage'
ParentShowHint = False
ShowHint = True
TabOrder = 24
WordWrap = True
OnClick = ButtonPropageSigClick
end
end end
object ButtonNouvSig: TButton object ButtonNouvSig: TButton
Left = 0 Left = 0
Top = 32 Top = 16
Width = 65 Width = 65
Height = 17 Height = 17
Caption = 'Nouveau' Caption = 'Nouveau'
@@ -3605,7 +3634,7 @@ object FormConfig: TFormConfig
end end
object ButtonSupSig: TButton object ButtonSupSig: TButton
Left = 72 Left = 72
Top = 32 Top = 16
Width = 65 Width = 65
Height = 17 Height = 17
Caption = 'Supprime' Caption = 'Supprime'
@@ -3614,7 +3643,7 @@ object FormConfig: TFormConfig
end end
object ButtonInsSig: TButton object ButtonInsSig: TButton
Left = 144 Left = 144
Top = 32 Top = 16
Width = 153 Width = 153
Height = 17 Height = 17
Caption = 'Ajouter le signal supprim'#233 Caption = 'Ajouter le signal supprim'#233
@@ -3642,7 +3671,7 @@ object FormConfig: TFormConfig
end end
object ListBoxSig: TListBox object ListBoxSig: TListBox
Left = 0 Left = 0
Top = 56 Top = 48
Width = 321 Width = 321
Height = 337 Height = 337
Color = clBlack Color = clBlack
@@ -3779,7 +3808,7 @@ object FormConfig: TFormConfig
Top = 56 Top = 56
Width = 193 Width = 193
Height = 21 Height = 21
ItemHeight = 13 ItemHeight = 0
TabOrder = 0 TabOrder = 0
OnChange = ComboBoxDecodeurPersoChange OnChange = ComboBoxDecodeurPersoChange
end end
@@ -3798,7 +3827,7 @@ object FormConfig: TFormConfig
Width = 145 Width = 145
Height = 21 Height = 21
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
TabOrder = 2 TabOrder = 2
OnChange = ComboBoxNationChange OnChange = ComboBoxNationChange
end end
@@ -3844,7 +3873,7 @@ object FormConfig: TFormConfig
Width = 193 Width = 193
Height = 21 Height = 21
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
TabOrder = 6 TabOrder = 6
OnChange = ComboBoxDecCdeChange OnChange = ComboBoxDecCdeChange
end end
@@ -4057,7 +4086,7 @@ object FormConfig: TFormConfig
Top = 96 Top = 96
Width = 137 Width = 137
Height = 21 Height = 21
ItemHeight = 13 ItemHeight = 0
TabOrder = 2 TabOrder = 2
OnChange = ComboBoxOperateurChange OnChange = ComboBoxOperateurChange
OnDrawItem = ComboBoxOperateurDrawItem OnDrawItem = ComboBoxOperateurDrawItem
@@ -4077,7 +4106,7 @@ object FormConfig: TFormConfig
Top = 96 Top = 96
Width = 161 Width = 161
Height = 21 Height = 21
ItemHeight = 13 ItemHeight = 0
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 4 TabOrder = 4
@@ -4147,8 +4176,8 @@ object FormConfig: TFormConfig
OnChange = LabeledEditTrainChange OnChange = LabeledEditTrainChange
end end
object RadioGroupOP: TRadioGroup object RadioGroupOP: TRadioGroup
Left = 48 Left = 72
Top = 32 Top = 24
Width = 89 Width = 89
Height = 57 Height = 57
Caption = 'Op'#233'rateur' Caption = 'Op'#233'rateur'
@@ -4159,6 +4188,17 @@ object FormConfig: TFormConfig
TabOrder = 4 TabOrder = 4
OnClick = RadioGroupOPClick OnClick = RadioGroupOPClick
end end
object LabeledEditZone: TLabeledEdit
Left = 16
Top = 44
Width = 41
Height = 21
EditLabel.Width = 25
EditLabel.Height = 13
EditLabel.Caption = 'Zone'
TabOrder = 5
OnChange = LabeledEditZoneChange
end
end end
object ButtonSupLog: TButton object ButtonSupLog: TButton
Left = 288 Left = 288
@@ -4178,7 +4218,7 @@ object FormConfig: TFormConfig
Width = 145 Width = 145
Height = 21 Height = 21
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
TabOrder = 7 TabOrder = 7
OnChange = ComboBoxFLChange OnChange = ComboBoxFLChange
end end
@@ -4543,6 +4583,57 @@ object FormConfig: TFormConfig
OnChange = EditDecalChange OnChange = EditDecalChange
end end
end end
object GroupBox13: TGroupBox
Left = 336
Top = 272
Width = 265
Height = 137
Caption = 'Changement de l'#39'adresse d'#39'un d'#233'tecteur'
TabOrder = 5
object Label85: TLabel
Left = 16
Top = 24
Width = 92
Height = 13
Caption = 'D'#233'tecteur courant :'
end
object LabelDetCour: TLabel
Left = 208
Top = 24
Width = 3
Height = 13
Caption = '.'
end
object LabeledNvleAdrDet: TLabeledEdit
Left = 200
Top = 48
Width = 40
Height = 21
Hint = 'Nouvelle adresse du d'#233'tecteur'
EditLabel.Width = 145
EditLabel.Height = 13
EditLabel.Caption = 'Nouvelle adresse du d'#233'tecteur'
EditLabel.Layout = tlBottom
LabelPosition = lpLeft
LabelSpacing = 40
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
object ButtonValideDet: TButton
Left = 72
Top = 88
Width = 137
Height = 33
Hint =
'Propage l'#39'adresse du d'#233'tecteur dans les branches, les aiguillage' +
's, les signaux et les TCO'
Caption = 'Valider et propager le d'#233'tecteur'
TabOrder = 1
WordWrap = True
OnClick = ButtonValideDetClick
end
end
end end
object TabSheetPN: TTabSheet object TabSheetPN: TTabSheet
Caption = 'PN' Caption = 'PN'
@@ -4714,7 +4805,7 @@ object FormConfig: TFormConfig
Hint = 'action par accessoire DCC ou commande COM/USB' Hint = 'action par accessoire DCC ou commande COM/USB'
Caption = 'Type d'#39'action' Caption = 'Type d'#39'action'
Items.Strings = ( Items.Strings = (
'Accessoire' 'Accessoire DCC'
'Commande COM/USB ou Socket') 'Commande COM/USB ou Socket')
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
@@ -4728,7 +4819,7 @@ object FormConfig: TFormConfig
Height = 21 Height = 21
Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"' Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 10 TabOrder = 10
@@ -5088,7 +5179,7 @@ object FormConfig: TFormConfig
Top = 16 Top = 16
Width = 337 Width = 337
Height = 457 Height = 457
ActivePage = TabSheet1 ActivePage = TabSheetTrGen
TabOrder = 3 TabOrder = 3
object TabSheetTrGen: TTabSheet object TabSheetTrGen: TTabSheet
Caption = 'G'#233'n'#233'ral' Caption = 'G'#233'n'#233'ral'
@@ -5681,7 +5772,7 @@ object FormConfig: TFormConfig
Left = 312 Left = 312
Top = 72 Top = 72
Width = 249 Width = 249
Height = 265 Height = 289
Caption = 'Param'#232'tres de couleur' Caption = 'Param'#232'tres de couleur'
TabOrder = 0 TabOrder = 0
object Label76: TLabel object Label76: TLabel
@@ -5795,6 +5886,22 @@ object FormConfig: TFormConfig
Height = 265 Height = 265
end end
end end
object LabeledEditCr: TLabeledEdit
Left = 152
Top = 424
Width = 33
Height = 21
Hint = 'Valeur de l'#39'incr'#233'ment en crans de vitesse (1-6)'
EditLabel.Width = 98
EditLabel.Height = 13
EditLabel.Caption = 'Incr'#233'ment de vitesse'
LabelPosition = lpLeft
LabelSpacing = 10
ParentShowHint = False
ShowHint = True
TabOrder = 2
OnChange = LabeledEditCrChange
end
end end
object TabSheetPeriph: TTabSheet object TabSheetPeriph: TTabSheet
Caption = 'P'#233'riph'#233'riques' Caption = 'P'#233'riph'#233'riques'
@@ -6081,7 +6188,7 @@ object FormConfig: TFormConfig
Top = 328 Top = 328
Width = 329 Width = 329
Height = 110 Height = 110
Hint = 'R'#233'f'#233'rences crois'#233'es de l'#39#39'utilisation des p'#233'riph'#233'riques' Hint = 'R'#233'f'#233'rences crois'#233'es de l'#39'utilisation des p'#233'riph'#233'riques'
ParentShowHint = False ParentShowHint = False
ReadOnly = True ReadOnly = True
ShowHint = True ShowHint = True
@@ -6302,7 +6409,7 @@ object FormConfig: TFormConfig
end end
object GroupBoxBR: TGroupBox object GroupBoxBR: TGroupBox
Left = 312 Left = 312
Top = 176 Top = 128
Width = 260 Width = 260
Height = 121 Height = 121
Caption = 'Bouton rotatif' Caption = 'Bouton rotatif'
@@ -6378,13 +6485,13 @@ object FormConfig: TFormConfig
end end
object GroupBoxBt: TGroupBox object GroupBoxBt: TGroupBox
Left = 312 Left = 312
Top = 320 Top = 224
Width = 260 Width = 260
Height = 121 Height = 145
Caption = 'Bouton' Caption = 'Bouton'
TabOrder = 2 TabOrder = 2
object LabeledEditF: TLabeledEdit object LabeledEditF: TLabeledEdit
Left = 185 Left = 193
Top = 52 Top = 52
Width = 40 Width = 40
Height = 21 Height = 21
@@ -6401,7 +6508,7 @@ object FormConfig: TFormConfig
OnChange = LabeledEditFChange OnChange = LabeledEditFChange
end end
object LabeledEditFn: TLabeledEdit object LabeledEditFn: TLabeledEdit
Left = 201 Left = 217
Top = 76 Top = 76
Width = 16 Width = 16
Height = 21 Height = 21
@@ -6418,7 +6525,7 @@ object FormConfig: TFormConfig
OnChange = LabeledEditFnChange OnChange = LabeledEditFnChange
end end
object LabeledEditCT: TLabeledEdit object LabeledEditCT: TLabeledEdit
Left = 185 Left = 193
Top = 20 Top = 20
Width = 40 Width = 40
Height = 21 Height = 21
@@ -6434,6 +6541,23 @@ object FormConfig: TFormConfig
TabOrder = 2 TabOrder = 2
OnChange = LabeledEditCTChange OnChange = LabeledEditCTChange
end end
object LabeledEditT: TLabeledEdit
Left = 193
Top = 108
Width = 40
Height = 21
Hint = 'Temporisation de retomb'#233'e de la fonction F.'
EditLabel.Width = 173
EditLabel.Height = 13
EditLabel.Caption = 'Temporisation de retomb'#233'e (x100ms)'
EditLabel.Layout = tlBottom
LabelPosition = lpLeft
LabelSpacing = 10
ParentShowHint = False
ShowHint = True
TabOrder = 3
OnChange = LabeledEditTChange
end
end end
object GroupBoxBloc: TGroupBox object GroupBoxBloc: TGroupBox
Left = 312 Left = 312
@@ -6455,7 +6579,7 @@ object FormConfig: TFormConfig
Width = 153 Width = 153
Height = 21 Height = 21
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
TabOrder = 0 TabOrder = 0
OnChange = ComboBoxUSBTrChange OnChange = ComboBoxUSBTrChange
end end
@@ -6589,6 +6713,10 @@ object FormConfig: TFormConfig
Hint = 'Copie tout le contenu en tant que texte dans le presse-papier' Hint = 'Copie tout le contenu en tant que texte dans le presse-papier'
OnClick = outcopierentatquetexte1Click OnClick = outcopierentatquetexte1Click
end end
object MenuListesCopier2: TMenuItem
Caption = 'Coller'
OnClick = MenuListesCopier2Click
end
end end
object ColorDialogFond: TColorDialog object ColorDialogFond: TColorDialog
OnShow = ColorDialogFondShow OnShow = ColorDialogFondShow
@@ -6635,7 +6763,7 @@ object FormConfig: TFormConfig
Left = 664 Left = 664
Top = 72 Top = 72
Bitmap = { Bitmap = {
494C010109000E00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 494C01010A000E00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000004000000001002000000000000040 0000000000003600000028000000400000004000000001002000000000000040
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
@@ -6791,17 +6919,17 @@ object FormConfig: TFormConfig
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000FF000000
FF000000FF000000FF000000FF0000000000000000000000FF000000FF000000
FF000000FF000000FF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000FF000000
0000000000000000000000000000000000000000000000000000000000000000 FF000000FF000000FF000000FF0000000000000000000000FF000000FF000000
0000000000000000000000000000000000000000000000000000000000000000 FF000000FF000000FF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
@@ -7155,11 +7283,11 @@ object FormConfig: TFormConfig
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FFFF000000000000742E000000000000 00000000000000000000000000000000FFFFFFFF00000000742EFFFF00000000
75EE000000000000546A00000000000025E4000000000000742E000000000000 75EEFFFF00000000546AC1830000000025E4C18300000000742EFFFF00000000
FFFF000000000000FFFF00000000000000000000000000000000000000000000 FFFFFFFF00000000FFFFB6DB0000000000000000000000000000B6DB00000000
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000B6DB000000000000FFFF000000000000FFFF00000000
000000000000000000000000000000000000FFFF000000000000FB4700000000 0000FFFF000000000000FFFF000000000000FFFF000000000000FB4700000000
0000F56F000000000000F56F000000000000F54F000000000000FB6F00000000 0000F56F000000000000F56F000000000000F54F000000000000FB6F00000000
0000FFFF00000000000000000000000000000000000000000000000000000000 0000FFFF00000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
+900 -171
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -271,7 +271,7 @@ begin
//YclicCell[indexTCO]:=YclicC; //YclicCell[indexTCO]:=YclicC;
xc:=xClicC;yc:=yClicC; xc:=xClicC;yc:=yClicC;
origine_canton(xc,yc); origine_canton(indexTCO,xc,yc);
idCanton:=index_canton(indexTCO,xC,yC); idCanton:=index_canton(indexTCO,xC,yC);
@@ -671,7 +671,7 @@ begin
begin begin
FormConfCellTCO.LabelNumC.caption:='Elément de canton'; FormConfCellTCO.LabelNumC.caption:='Elément de canton';
x:=xClicC;y:=yClicC; x:=xClicC;y:=yClicC;
origine_canton(x,y); origine_canton(indexTCO,x,y);
i:=tco[indexTCO,x,y].NumCanton; i:=tco[indexTCO,x,y].NumCanton;
if i>0 then FormConfCellTCO.EditCanton.text:=intToSTR(i); if i>0 then FormConfCellTCO.EditCanton.text:=intToSTR(i);
end; end;
+2 -2
View File
@@ -384,9 +384,9 @@ object FormConfigTCO: TFormConfigTCO
Caption = '(10 maximum)' Caption = '(10 maximum)'
end end
object Label17: TLabel object Label17: TLabel
Left = 146 Left = 144
Top = 202 Top = 202
Width = 49 Width = 51
Height = 26 Height = 26
Alignment = taRightJustify Alignment = taRightJustify
Caption = 'Epaisseur des voies' Caption = 'Epaisseur des voies'
+8 -6
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
@@ -41,7 +41,7 @@ object FormDebug: TFormDebug
673) 673)
object LabelTitreDebug: TLabel object LabelTitreDebug: TLabel
Left = 475 Left = 475
Top = 8 Top = 4
Width = 131 Width = 131
Height = 18 Height = 18
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -55,7 +55,7 @@ object FormDebug: TFormDebug
end end
object Label1: TLabel object Label1: TLabel
Left = 627 Left = 627
Top = 10 Top = 6
Width = 108 Width = 108
Height = 13 Height = 13
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -431,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
@@ -712,7 +714,7 @@ object FormDebug: TFormDebug
end end
object EditNivDebug: TEdit object EditNivDebug: TEdit
Left = 751 Left = 751
Top = 8 Top = 4
Width = 49 Width = 49
Height = 21 Height = 21
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
+2 -2
View File
@@ -214,7 +214,7 @@ begin
visible:=false; visible:=false;
RichDebug.clear; RichDebug.clear;
s:=DateToStr(date)+' '+TimeToStr(Time)+' '; s:=DateToStr(date)+' '+TimeToStr(Time)+' ';
// l'ascenseur de la fenetre dans D12 ------------ // l'ascenseur de la fenetre dans D13 ------------
// ne fonctionne que si le style est windows !!! (bug du VCL) // ne fonctionne que si le style est windows !!! (bug du VCL)
// obligé d'utiliser une scrollBox // obligé d'utiliser une scrollBox
@@ -731,7 +731,7 @@ begin
NivDebug:=3; NivDebug:=3;
erreur:=Signal_Precedent(Adr); erreur:=Signal_Precedent(Adr);
NivDebug:=AncDebug; NivDebug:=AncDebug;
AfficheDebug('signal précédent='+intToSTR(erreur),clyellow); AfficheDebug('Signal précédent='+intToSTR(erreur),clyellow);
end; end;
end. end.
+4 -4
View File
@@ -290,7 +290,7 @@ var
DRect: TRect; DRect: TRect;
couleur : tColor; couleur : tColor;
Grid: TStringGrid; Grid: TStringGrid;
d12 : boolean; d13 : boolean;
begin begin
Grid:=Sender as TStringGrid; Grid:=Sender as TStringGrid;
@@ -338,15 +338,15 @@ begin
end; } end; }
d12:=false; d13:=false;
{$IF CompilerVersion >= 28.0} {$IF CompilerVersion >= 28.0}
d12:=true; d13:=true;
{$IFEND} {$IFEND}
//Affiche(intToSTR(arow)+' '+intToSTR(aCol),clYellow); //Affiche(intToSTR(arow)+' '+intToSTR(aCol),clYellow);
// couleur de fond // couleur de fond
if Arow=0 then if Arow=0 then
begin begin
if d12 then couleur:=grid.canvas.Pixels[35,6] else couleur:=$E0E0E0; if d13 then couleur:=grid.canvas.Pixels[35,6] else couleur:=$E0E0E0;
with grid.canvas do with grid.canvas do
begin begin
Brush.Color := couleur; Brush.Color := couleur;
+2 -2
View File
@@ -1,6 +1,6 @@
unit UnitInfo; unit UnitInfo;
// afiche une info dans le TCO // affiche une info dans le TCO
interface interface
@@ -40,7 +40,7 @@ end;
procedure TFormInfo.FormActivate(Sender: TObject); procedure TFormInfo.FormActivate(Sender: TObject);
begin begin
TickInfo:=5; TickInfo:=5; // temps de fermeture de la fenetre pour le timer
end; end;
procedure TFormInfo.FormCreate(Sender: TObject); procedure TFormInfo.FormCreate(Sender: TObject);
+11 -10
View File
@@ -4,7 +4,7 @@ object FormMemZone: TFormMemZone
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Activer / d'#233'sactiver des m'#233'moires de zone' Caption = 'Activer / d'#233'sactiver des m'#233'moires de zone'
ClientHeight = 173 ClientHeight = 173
ClientWidth = 370 ClientWidth = 405
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@@ -19,15 +19,16 @@ object FormMemZone: TFormMemZone
TextHeight = 13 TextHeight = 13
object Label1: TLabel object Label1: TLabel
Left = 24 Left = 24
Top = 8 Top = 0
Width = 329 Width = 329
Height = 33 Height = 39
Caption = Caption =
'Les m'#233'moires de zone sont constitu'#233'es de deux d'#233'tecteurs contigu' + 'Les m'#233'moires de zone sont constitu'#233'es de deux d'#233'tecteurs contigu' +
's' 's. Si les deux d'#233'tecteurs sont s'#233'par'#233's par un ou des aiguillage(' +
's), il doit '#234'tre correctement positionn'#233
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -11
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
@@ -40,28 +41,28 @@ object FormMemZone: TFormMemZone
Height = 13 Height = 13
end end
object Shape1: TShape object Shape1: TShape
Left = 216 Left = 240
Top = 88 Top = 88
Width = 137 Width = 137
Height = 9 Height = 9
Brush.Color = clBlue Brush.Color = clBlue
end end
object Shape2: TShape object Shape2: TShape
Left = 232 Left = 256
Top = 83 Top = 83
Width = 25 Width = 25
Height = 20 Height = 20
Brush.Color = clRed Brush.Color = clRed
end end
object Shape3: TShape object Shape3: TShape
Left = 312 Left = 336
Top = 83 Top = 83
Width = 25 Width = 25
Height = 20 Height = 20
Brush.Color = clRed Brush.Color = clRed
end end
object Label2: TLabel object Label2: TLabel
Left = 225 Left = 249
Top = 56 Top = 56
Width = 35 Width = 35
Height = 19 Height = 19
@@ -74,7 +75,7 @@ object FormMemZone: TFormMemZone
ParentFont = False ParentFont = False
end end
object Label3: TLabel object Label3: TLabel
Left = 304 Left = 328
Top = 56 Top = 56
Width = 35 Width = 35
Height = 19 Height = 19
+7 -7
View File
@@ -78,7 +78,6 @@ end;
function valide_det : boolean; function valide_det : boolean;
var erreur : integer; var erreur : integer;
elsuiv : tEquipement;
begin begin
result:=false; result:=false;
val(FormMemZone.labeledEditDet1.text,det1Z,erreur); val(FormMemZone.labeledEditDet1.text,det1Z,erreur);
@@ -93,15 +92,16 @@ begin
end; end;
val(FormMemZone.labeledEditDet2.text,det2Z,erreur); val(FormMemZone.labeledEditDet2.text,det2Z,erreur);
det_contigu(det1Z,det2Z,suivant,ElSuiv); Det_Adj(det1Z); // renvoie les adresses des détecteurs adjacents au détecteur "det1Zrésultat dans adj1 et adj2
if (adj1=det2Z) or (adj2=det2Z) then
if suivant=0 then
begin begin
FormMemZone.LabelInfo.Caption:='Les détecteurs '+intToSTR(det1Z)+' / '+intToSTR(det2Z)+' ne sont pas contigus'; result:=true;
FormMemZone.LabelInfo.caption:='';
exit; exit;
end; end;
FormMemZone.LabelInfo.caption:='';
result:=true; FormMemZone.LabelInfo.Caption:='Les détecteurs '+intToSTR(det1Z)+' / '+intToSTR(det2Z)+' ne sont pas contigus';
result:=false;
end; end;
procedure TFormMemZone.ButtonActClick(Sender: TObject); procedure TFormMemZone.ButtonActClick(Sender: TObject);
+7 -4
View File
@@ -16,10 +16,13 @@ object FormMesure: TFormMesure
TextHeight = 13 TextHeight = 13
object Label1: TLabel object Label1: TLabel
Left = 56 Left = 56
Top = 16 Top = 0
Width = 272 Width = 289
Height = 13 Height = 29
Caption = 'S'#233'lection d'#39'un train plac'#233' sur le TCO pour son '#233'talonnage' Caption =
'S'#233'lection d'#39'un train plac'#233' sur le TCO pour son '#233'talonnage. Le pa' +
'rcours doit '#234'tre boucl'#233'.'
WordWrap = True
end end
object LabelEtat: TLabel object LabelEtat: TLabel
Left = 24 Left = 24
+1 -1
View File
@@ -1,6 +1,6 @@
unit UnitMesure; unit UnitMesure;
// mesure de la vitesse des trains // mesure de la vitesse des trains pour l'étalonnage
interface interface
+60 -26
View File
@@ -1,6 +1,6 @@
object FormModifAction: TFormModifAction object FormModifAction: TFormModifAction
Left = 395 Left = 355
Top = 166 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 = TabSheet1
MultiLine = True MultiLine = True
TabOrder = 1 TabOrder = 1
object TabSheetDecl: TTabSheet object TabSheetDecl: TTabSheet
@@ -255,9 +255,9 @@ object FormModifAction: TFormModifAction
object Label6: TLabel object Label6: TLabel
Left = 258 Left = 258
Top = 8 Top = 8
Width = 118 Width = 124
Height = 13 Height = 13
Caption = 'Condition '#224' observer' Caption = 'Conditions '#224' observer'
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
@@ -265,6 +265,32 @@ object FormModifAction: TFormModifAction
Font.Style = [fsBold] Font.Style = [fsBold]
ParentFont = False ParentFont = False
end end
object SpeedButtonSupCond: TSpeedButton
Left = 338
Top = 255
Width = 23
Height = 22
Hint = 'Supprime une condition de la liste'
Glyph.Data = {
F6000000424DF600000000000000760000002800000010000000100000000100
04000000000080000000C40E0000C40E00001000000000000000000000000000
8000008000000080800080000000800080008080000080808000C0C0C0000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFF9FFFFFFF9
9FFFFF999FFFFF9999FFF99999FFF999999F9999999F9999999FF99999999999
99FFFF99999999999FFFFFF999999999FFFFFFFF9999999FFFFFFFF999999999
FFFFFF99999999999FFFF9999999999999FF9999999F9999999F999999FFF999
999FF9999FFFFF9999FFFF99FFFFFFF99FFFFFFFFFFFFFFFFFFF}
ParentShowHint = False
ShowHint = True
OnClick = SpeedButtonSupCondClick
end
object Label7: TLabel
Left = 240
Top = 258
Width = 93
Height = 13
Caption = 'Supprimer condition'
end
object ListBoxCondTot: TListBox object ListBoxCondTot: TListBox
Left = 0 Left = 0
Top = 60 Top = 60
@@ -279,12 +305,13 @@ object FormModifAction: TFormModifAction
Top = 28 Top = 28
Width = 201 Width = 201
Height = 201 Height = 201
Hint = 'Condition de r'#233'alisation du d'#233'clencheur' Hint = 'Conditions (chainage en ET) de r'#233'alisation du d'#233'clencheur'
ItemHeight = 13 ItemHeight = 13
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 1 TabOrder = 1
OnDrawItem = ListBoxConditionsDrawItem OnDrawItem = ListBoxConditionsDrawItem
OnKeyDown = ListBoxConditionsKeyDown
OnMouseDown = ListBoxConditionsMouseDown OnMouseDown = ListBoxConditionsMouseDown
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
@@ -449,6 +476,18 @@ object FormModifAction: TFormModifAction
TabOrder = 3 TabOrder = 3
OnClick = ButtonAppCondClick OnClick = ButtonAppCondClick
end end
object ButtonAjCond: TButton
Left = 128
Top = 276
Width = 75
Height = 25
Hint = 'Ajouter la condition s'#233'lectionn'#233'e dans la liste des conditions'
Caption = 'Ajouter >>>'
ParentShowHint = False
ShowHint = True
TabOrder = 4
OnClick = ButtonAjCondClick
end
end end
object TabSheetOp: TTabSheet object TabSheetOp: TTabSheet
Caption = 'Op'#233'rations' Caption = 'Op'#233'rations'
@@ -517,7 +556,7 @@ object FormModifAction: TFormModifAction
Top = 32 Top = 32
Width = 217 Width = 217
Height = 21 Height = 21
ItemHeight = 13 ItemHeight = 0
TabOrder = 0 TabOrder = 0
OnChange = ComboBoxFamilleChange OnChange = ComboBoxFamilleChange
end end
@@ -544,6 +583,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 +761,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 = 13 ItemHeight = 0
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 4 TabOrder = 4
@@ -837,29 +877,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
+268 -46
View File
@@ -74,19 +74,19 @@ 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;
ButtonAjCond: TButton;
SpeedButtonSupCond: TSpeedButton;
Label7: TLabel;
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 +142,13 @@ 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);
procedure ButtonAjCondClick(Sender: TObject);
procedure SpeedButtonSupCondClick(Sender: TObject);
procedure ListBoxConditionsKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -154,7 +161,7 @@ var
ClicDeclenche,ClicAction,ClicCond,DeclencheurAffiche,OperationAffiche : integer; ClicDeclenche,ClicAction,ClicCond,DeclencheurAffiche,OperationAffiche : integer;
function Info_action(i : integer) : string; function Info_action(i : integer) : string;
procedure affecte_operation(i : integer;t: TListBox); function affecte_operation(i : integer) : string;
implementation implementation
@@ -219,21 +226,25 @@ begin
end; end;
// ajoute à la listbox t une ligne avec son icone opérations[] // ajoute à la listbox t une ligne avec son icone opérations[]
// i numéro d'opération // i numéro d'opération dans le ytableau operations
procedure affecte_operation(i : integer;t : tListBox); function affecte_operation(i : integer) : string;
var s : string; var s : string;
io : integer;
begin begin
s:=operations[i].nom; //if ligneClicAct>=0 then io:=Tablo_Action[ligneclicAct+1].tabloOp[i].numoperation else io:=0;
if ligneclicAct>0 then if not(Tablo_Action[ligneclicact+1].tabloOp[i].valide) then s:=s+sd; s:='';
if i<ActionBoutonTCO then t.Items.Add(Format('%d%s', [i-1, s])); // valeur d'index de l'icone dans la ImagelistIcones if i<ActionBoutonTCO then s:=(Format('%d%s', [i-1, s])); // valeur d'index de l'icone dans la ImagelistIcones
if i=ActionBoutonTCO then t.Items.Add(Format('%d%s', [IconeBouton, s])); // valeur d'index de l'icone dans la ImagelistIcones if i=ActionBoutonTCO then s:=(Format('%d%s', [IconeBouton, s])); // valeur d'index de l'icone dans la ImagelistIcones
if i=ActionAffecteMemoire then t.Items.Add(Format('%d%s', [IconeActionAffecteMemoire, s])); // valeur d'index de l'icone dans la ImagelistIcones if i=ActionAffecteMemoire then s:=(Format('%d%s', [IconeActionAffecteMemoire, s])); // valeur d'index de l'icone dans la ImagelistIcones
if i=ActionIncMemoire then t.Items.Add(Format('%d%s', [IconeActionIncMemoire, s])); // valeur d'index de l'icone dans la ImagelistIcones if i=ActionIncMemoire then s:=(Format('%d%s', [IconeActionIncMemoire, s])); // valeur d'index de l'icone dans la ImagelistIcones
if i=ActionDecMemoire then t.Items.Add(Format('%d%s', [IconeActionDecMemoire, s])); // valeur d'index de l'icone dans la ImagelistIcones if i=ActionDecMemoire then s:=(Format('%d%s', [IconeActionDecMemoire, s])); // valeur d'index de l'icone dans la ImagelistIcones
s:=s+operations[i].nom;
result:=s;
end; end;
procedure TFormModifAction.FormCreate(Sender: TObject); procedure TFormModifAction.FormCreate(Sender: TObject);
var i,icone : integer; var i,icone : integer;
s : string;
begin begin
ListBoxOper.Style:=lbOwnerDrawVariable; // pour afficher des icones ListBoxOper.Style:=lbOwnerDrawVariable; // pour afficher des icones
ListBoxDeclench.Style:=lbOwnerDrawVariable; ListBoxDeclench.Style:=lbOwnerDrawVariable;
@@ -262,7 +273,8 @@ begin
for i:=1 to NbreOperations do for i:=1 to NbreOperations do
begin begin
affecte_operation(i,formModifAction.ListBoxOper); s:=affecte_operation(i);
formModifAction.ListBoxOper.Items.add(s);
ListBoxOper.itemHeight:=16; // 16 mini taille des éléments pour l'icone ListBoxOper.itemHeight:=16; // 16 mini taille des éléments pour l'icone
end; end;
@@ -281,7 +293,7 @@ begin
CondMemoireEgal : icone:=IconeCondMemoireEgal; CondMemoireEgal : icone:=IconeCondMemoireEgal;
CondMemoireInf : icone:=IconeCondMemoireInf; CondMemoireInf : icone:=IconeCondMemoireInf;
CondMemoireSup : icone:=IconeCondMemoireSup; CondMemoireSup : icone:=IconeCondMemoireSup;
CondDetAct : Icone:=IconeDet;
end; end;
ListBoxCondTot.Items.Add(Format('%d%s', [icone, Conditions[i].nom])); // valeur d'index de l'icone dans la ImagelistIcones ListBoxCondTot.Items.Add(Format('%d%s', [icone, Conditions[i].nom])); // valeur d'index de l'icone dans la ImagelistIcones
ListBoxCondTot.itemHeight:=16; // 16 taille des éléments pour l'icone ListBoxCondTot.itemHeight:=16; // 16 taille des éléments pour l'icone
@@ -376,8 +388,9 @@ begin
begin begin
if (operations[i].famille=famille) or (famille=0) then if (operations[i].famille=famille) or (famille=0) then
begin begin
s:=operations[i].nom; //s:=operations[i].nom;
affecte_operation(i,formModifAction.ListBoxOper); s:=affecte_operation(i);
formModifAction.ListBoxOper.items.Add(s);
end; end;
end; end;
end; end;
@@ -398,7 +411,7 @@ begin
s:=s+'accessoire '+intToSTR(Tablo_Action[i].adresse); s:=s+'accessoire '+intToSTR(Tablo_Action[i].adresse);
DeclDetAct : DeclDetAct :
begin begin
s:=s+'détecteur/Actionneur '+intToSTR(Tablo_Action[i].adresse); s:=s+'détecteur/Actionneur '+intToSTR(Tablo_Action[i].adresse)+' à '+intToSTR(Tablo_Action[i].etat);
s:=s+' par le train "'+Tablo_Action[i].trainDecl+'"'; s:=s+' par le train "'+Tablo_Action[i].trainDecl+'"';
end; end;
DeclZoneDet : DeclZoneDet :
@@ -445,7 +458,7 @@ begin
condMemoireEgal : s:=s+'mémoire '+intToSTR(tablo_action[i].tabloCond[op].adresse)+' à '+intToSTR(tablo_action[i].tabloCond[op].etat); condMemoireEgal : s:=s+'mémoire '+intToSTR(tablo_action[i].tabloCond[op].adresse)+' à '+intToSTR(tablo_action[i].tabloCond[op].etat);
condMemoireInf : s:=s+'mémoire '+intToSTR(tablo_action[i].tabloCond[op].adresse)+' < '+intToSTR(tablo_action[i].tabloCond[op].etat); condMemoireInf : s:=s+'mémoire '+intToSTR(tablo_action[i].tabloCond[op].adresse)+' < '+intToSTR(tablo_action[i].tabloCond[op].etat);
condMemoireSup : s:=s+'mémoire '+intToSTR(tablo_action[i].tabloCond[op].adresse)+' > '+intToSTR(tablo_action[i].tabloCond[op].etat); condMemoireSup : s:=s+'mémoire '+intToSTR(tablo_action[i].tabloCond[op].adresse)+' > '+intToSTR(tablo_action[i].tabloCond[op].etat);
condDetAct : s:=s+'det/act '+intToSTR(tablo_action[i].tabloCond[op].adresse)+' à '+intToSTR(tablo_action[i].tabloCond[op].etat)+' train:'+tablo_action[i].tabloCond[op].train;
end; end;
s:=s+#13; s:=s+#13;
end; end;
@@ -671,7 +684,7 @@ end;
// affiche les champs en fonction de l'index du tablo actionneur et de l'index de l'action // affiche les champs en fonction de l'index du tablo actionneur et de l'index de l'action
procedure Aff_champs(index,IndexCond,IndexAction : integer); procedure Aff_champs(index,IndexCond,IndexAction : integer);
var i,decl,act,cond,icone : integer; var i,decl,act,cond,icone,adr : integer;
s : string; s : string;
begin begin
if (index<1) then exit; if (index<1) then exit;
@@ -718,7 +731,7 @@ begin
if not(Tablo_Action[index].tabloOp[i].valide) then s:=s+' [dévalidé]'; if not(Tablo_Action[index].tabloOp[i].valide) then s:=s+' [dévalidé]';
if act<1 then icone:=0 else icone:=act-1; if act<1 then icone:=0 else icone:=act-1;
// listbox de la formmodifAction // listboxOperations de la formmodifAction
if act<=ActionTempo then items.Add(Format('%d%s', [icone, s])); // valeur d'index de l'icone dans la ImagelistIcones if act<=ActionTempo then items.Add(Format('%d%s', [icone, s])); // valeur d'index de l'icone dans la ImagelistIcones
if act=ActionBoutonTCO then items.Add(Format('%d%s', [iconeBouton, s])); if act=ActionBoutonTCO then items.Add(Format('%d%s', [iconeBouton, s]));
if act=ActionAffecteMemoire then items.Add(Format('%d%s', [iconeActionAffecteMemoire, s])); if act=ActionAffecteMemoire then items.Add(Format('%d%s', [iconeActionAffecteMemoire, s]));
@@ -728,6 +741,9 @@ begin
// listboxOperations de la formConfig // listboxOperations de la formConfig
if act<=ActionTempo then formConfig.ListBoxOperations.Items.add(Format('%d%s', [act-1, s])); if act<=ActionTempo then formConfig.ListBoxOperations.Items.add(Format('%d%s', [act-1, s]));
if act=ActionBoutonTCO then formConfig.ListBoxOperations.items.Add(Format('%d%s', [IconeBouton, s])); if act=ActionBoutonTCO then formConfig.ListBoxOperations.items.Add(Format('%d%s', [IconeBouton, s]));
if act=ActionAffecteMemoire then formConfig.ListBoxOperations.items.Add(Format('%d%s', [iconeActionAffecteMemoire, s]));
if act=ActionIncMemoire then formConfig.ListBoxOperations.items.Add(Format('%d%s', [iconeActionIncMemoire, s]));
if act=ActionDecMemoire then formConfig.ListBoxOperations.items.Add(Format('%d%s', [iconeActionDecMemoire, s]));
itemHeight:=16; itemHeight:=16;
end; end;
@@ -742,6 +758,9 @@ begin
for i:=1 to Tablo_Action[index].NbCond do for i:=1 to Tablo_Action[index].NbCond do
begin begin
cond:=Tablo_Action[index].tabloCond[i].numcondition; cond:=Tablo_Action[index].tabloCond[i].numcondition;
if (cond<0) or (cond>CondDetAct) then Affiche('Erreur structure conditions',clred)
else
begin
s:=conditions[cond].nom; s:=conditions[cond].nom;
case cond of case cond of
CondVrai : icone:=iconeVrai; CondVrai : icone:=iconeVrai;
@@ -755,10 +774,11 @@ begin
condMemoireEgal: icone:=IconeCondMemoireEgal; condMemoireEgal: icone:=IconeCondMemoireEgal;
condMemoireSup: icone:=IconeCondMemoireSup; condMemoireSup: icone:=IconeCondMemoireSup;
condMemoireInf: icone:=IconeCondMemoireinf; condMemoireInf: icone:=IconeCondMemoireinf;
condDetAct: icone:=IconeDet;
end; end;
items.Add(Format('%d%s', [icone, s])); // valeur d'index de l'icone dans la ImagelistIcones items.Add(Format('%d%s', [icone, s])); // valeur d'index de l'icone dans la ImagelistIcones
end;
itemHeight:=16; itemHeight:=16;
end; end;
if indexCond<>0 then itemIndex:=indexCond-1; if indexCond<>0 then itemIndex:=indexCond-1;
@@ -801,6 +821,7 @@ begin
EditTrainDecl.Hint:='Chaîne ASCII'; EditTrainDecl.Hint:='Chaîne ASCII';
LabelTrain.visible:=true; LabelTrain.visible:=true;
labelTrain.Width:=105;
LabelTrain.Caption:='Commande du périphérique'; LabelTrain.Caption:='Commande du périphérique';
RichEditInf.Lines.Add('Déclenchement par chaîne ASCII depuis un périphérique COM/USB - Socket'); RichEditInf.Lines.Add('Déclenchement par chaîne ASCII depuis un périphérique COM/USB - Socket');
@@ -913,6 +934,8 @@ begin
EditTrainDecl.Visible:=true; EditTrainDecl.Visible:=true;
EdittrainDecl.Hint:='Train déclencheur unique'; EdittrainDecl.Hint:='Train déclencheur unique';
EditTrainDecl.Text:=Tablo_Action[index].trainDecl; EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
labelTrain.Width:=105;
labelTrain.caption:='Train déclencheur';
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse); EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
RichEditInf.Lines.Add('Déclenchement par démarrage d''un train'); RichEditInf.Lines.Add('Déclenchement par démarrage d''un train');
ImageIcone.Picture:=nil; ImageIcone.Picture:=nil;
@@ -924,8 +947,10 @@ begin
begin begin
LabelTrain.visible:=true; LabelTrain.visible:=true;
EditTrainDecl.Visible:=true; EditTrainDecl.Visible:=true;
labelTrain.caption:='Train déclencheur';
EdittrainDecl.Hint:='Train déclencheur unique'; EdittrainDecl.Hint:='Train déclencheur unique';
EditTrainDecl.Text:=Tablo_Action[index].trainDecl; EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
labelTrain.Width:=105;
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse); EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
RichEditInf.Lines.Add('Déclenchement par arrêt d''un train'); RichEditInf.Lines.Add('Déclenchement par arrêt d''un train');
ImageIcone.Picture:=nil; ImageIcone.Picture:=nil;
@@ -969,8 +994,8 @@ begin
DeclClavier : DeclClavier :
begin begin
LabelAdresse.Visible:=true; // numéro de fonction LabelAdresse.Visible:=true; // numéro de fonction
LabelAdresse.caption:='Code de touche'; LabelAdresse.caption:='Code ASCII de la touche';
EditAdr.Hint:='Code de touche'; EditAdr.Hint:='Code ASCII de la touche';
ButtonFonction.Visible:=false; ButtonFonction.Visible:=false;
EditAdr.Text:=IntToSTR(tablo_action[index].adresse); EditAdr.Text:=IntToSTR(tablo_action[index].adresse);
EditAdr.Visible:=true; EditAdr.Visible:=true;
@@ -1002,6 +1027,12 @@ begin
champ1.Visible:=true; champ1.Visible:=true;
champ2.Visible:=true; champ2.Visible:=true;
ChampTrain.Visible:=true; ChampTrain.Visible:=true;
SpinEditHeure1.visible:=false;
SpinEditHeure2.visible:=false;
SpinEditMn1.visible:=false;
SpinEditMn2.visible:=false;
LabelHeureDebut.Visible:=false;
LabelHeureFin.Visible:=false;
end; end;
CondPosAcc : CondPosAcc :
begin begin
@@ -1019,6 +1050,12 @@ begin
SpinEditEtat2.visible:=true; SpinEditEtat2.visible:=true;
SpinEditEtat2.MinValue:=0; SpinEditEtat2.MinValue:=0;
SpinEditEtat2.MaxValue:=2; SpinEditEtat2.MaxValue:=2;
SpinEditHeure1.visible:=false;
SpinEditHeure2.visible:=false;
SpinEditMn1.visible:=false;
SpinEditMn2.visible:=false;
LabelHeureDebut.Visible:=false;
LabelHeureFin.Visible:=false;
end; end;
condHorl : condHorl :
begin begin
@@ -1041,6 +1078,12 @@ begin
champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train; champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
champ1.Visible:=true; champ1.Visible:=true;
champTrain.Visible:=true; champTrain.Visible:=true;
SpinEditHeure1.visible:=false;
SpinEditHeure2.visible:=false;
SpinEditMn1.visible:=false;
SpinEditMn2.visible:=false;
LabelHeureDebut.Visible:=false;
LabelHeureFin.Visible:=false;
end; end;
condFonction : condFonction :
begin begin
@@ -1050,7 +1093,14 @@ begin
champ1.Visible:=true; champ1.Visible:=true;
ButtonVoirFonc.Visible:=true; ButtonVoirFonc.Visible:=true;
Label2InfoFonction.Visible:=true; Label2InfoFonction.Visible:=true;
Label2InfoFonction.Caption:=NomFonction[Tablo_Action[index].tabloCond[indexCond].adresse]; SpinEditHeure1.visible:=false;
SpinEditHeure2.visible:=false;
SpinEditMn1.visible:=false;
SpinEditMn2.visible:=false;
LabelHeureDebut.Visible:=false;
LabelHeureFin.Visible:=false;
Adr:=Tablo_Action[index].tabloCond[indexCond].adresse;
if Adr<100 then Label2InfoFonction.Caption:=NomFonction[adr] else Label2InfoFonction.Caption:='';
end; end;
condBouton : condBouton :
begin begin
@@ -1058,6 +1108,12 @@ begin
champ1.editLabel.Caption:='Numéro de bouton TCO'; champ1.editLabel.Caption:='Numéro de bouton TCO';
champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train; champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
champ1.Visible:=true; champ1.Visible:=true;
SpinEditHeure1.visible:=false;
SpinEditHeure2.visible:=false;
SpinEditMn1.visible:=false;
SpinEditMn2.visible:=false;
LabelHeureDebut.Visible:=false;
LabelHeureFin.Visible:=false;
end; end;
condMemoireEgal,CondMemoireInf,CondMemoireSup : condMemoireEgal,CondMemoireInf,CondMemoireSup :
begin begin
@@ -1067,8 +1123,33 @@ begin
champ2.Text:=intToSTR(Tablo_Action[index].tabloCond[indexCond].etat); champ2.Text:=intToSTR(Tablo_Action[index].tabloCond[indexCond].etat);
Champ2.EditLabel.Caption:='Valeur'; Champ2.EditLabel.Caption:='Valeur';
Champ2.Visible:=true; Champ2.Visible:=true;
SpinEditHeure1.visible:=false;
SpinEditHeure2.visible:=false;
SpinEditMn1.visible:=false;
SpinEditMn2.visible:=false;
LabelHeureDebut.Visible:=false;
LabelHeureFin.Visible:=false;
end;
condDetAct :
begin
champ1.Text:=intToSTR(Tablo_Action[index].tabloCond[indexCond].adresse);
champ1.editLabel.Caption:='Adresse';
champ1.Visible:=true;
champ2.Visible:=false;
SpinEditHeure1.visible:=false;
SpinEditHeure2.visible:=false;
SpinEditMn1.visible:=false;
SpinEditMn2.visible:=false;
LabelHeureDebut.Visible:=false;
LabelHeureFin.Visible:=false;
ChampTrain.Visible:=true;
ChampTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
SpinEditEtat2.Value:=Tablo_Action[index].tabloCond[indexCond].etat;
SpinEditEtat2.visible:=true;
SpinEditEtat2.hint:='Etat du détecteur/actionneur'+#13+
'0=non activé'+#13+
'1=activé';
end; end;
end; end;
end; end;
end; end;
@@ -1083,16 +1164,17 @@ procedure TFormModifAction.FormActivate(Sender: TObject);
var i : integer; var i : integer;
s : string; s : string;
begin begin
ComboBoxActions.Clear; ComboBoxActions.Clear;
for i:=1 to maxTablo_act do for i:=1 to maxTablo_act do
begin begin
s:=encode_actions(i); s:=encode_actions(i);
if s<>'' then ComboBoxActions.Items.Add(s); if s<>'' then ComboBoxActions.Items.Add(s);
end; end;
//ligneclicACt:=0; //ligneclicACt:=0;
ComboBoxActions.ItemIndex:=ligneclicAct; ComboBoxActions.ItemIndex:=ligneclicAct;
LabelDecl.Caption:='Déclencheur de l''action n°'+intToSTR(ComboBoxactions.ItemIndex+1); LabelDecl.Caption:='Déclencheur de l''action n°'+intToSTR(ComboBoxactions.ItemIndex+1);
Aff_champs(ligneclicAct+1,ClicCond+1,ClicAction+1); Aff_champs(ligneclicAct+1,ClicCond+1,ClicAction+1);
if OperationAffiche<>0 then if OperationAffiche<>0 then
@@ -1155,6 +1237,46 @@ begin
ListBoxOperations.ItemIndex:=clicAction; ListBoxOperations.ItemIndex:=clicAction;
end; end;
procedure supprime_condition;
var i,indexSrc,idBD,NbCond,NumCond,NumOp : integer;
s : string;
begin
indexSrc:=formModifaction.listboxConditions.ItemIndex;
if (indexSrc<0) or (formModifaction.listboxConditions.Count=1) then exit;
idBD:=ligneClicAct+1;
NbCond:=Tablo_Action[idBD].NbCond;
if NbCond<1 then exit;
NumCond:=Tablo_Action[idBD].TabloCond[indexSrc+1].numcondition;
// NumOp:=Tablo_Action[idBD].tabloOp[I [indexSrc+1].numcondition;
s:='Voulez vous supprimer la condition '+#13+conditions[NumCond].Nom+' ?';
if Application.MessageBox(pchar(s),pchar('confirm'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit;
// supprimer
FormModifAction.listboxConditions.Items.Delete(indexSrc);
for i:=IndexSrc+1 to NbCond-1 do
begin
Tablo_Action[idBD].TabloCond[i]:=Tablo_Action[idBD].TabloCond[i+1];
end;
dec(NbCond);
Tablo_Action[idBD].NbCond:=NbCond;
Setlength(Tablo_Action[idBD].tabloCond,NbCond+1);
Aff_champs(idBD,IndexSrc,1); //???
exit;
// réencoder la ligne
s:=encode_actions(idBD);
// maj combobox
FormModifAction.ComboBoxActions.Items[idBD-1]:=s;
FormModifAction.ComboBoxActions.ItemIndex:=idbd-1;
end;
procedure supprime_operation; procedure supprime_operation;
var i,indexSrc,idBD,NbOp,NumOp : integer; var i,indexSrc,idBD,NbOp,NumOp : integer;
s : string; s : string;
@@ -1197,12 +1319,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;
@@ -1216,8 +1338,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
@@ -1226,20 +1348,25 @@ begin
for i:=1 to Tablo_Action[idBD].NbOperations do for i:=1 to Tablo_Action[idBD].NbOperations do
begin begin
no:=Tablo_Action[idBD].tabloOp[i].numoperation; no:=Tablo_Action[idBD].tabloOp[i].numoperation;
//items.Add(Format('%d%s', [no-1, operations[no].nom])); // valeur d'index de l'icone dans la ImagelistIcones s:=affecte_operation(no);
affecte_operation(no,ListBoxOperations); 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;
@@ -1254,8 +1381,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
@@ -1264,7 +1391,8 @@ begin
for i:=1 to Tablo_Action[idBD].NbOperations do for i:=1 to Tablo_Action[idBD].NbOperations do
begin begin
no:=Tablo_Action[idBD].tabloOp[i].numoperation; no:=Tablo_Action[idBD].tabloOp[i].numoperation;
affecte_operation(no,ListBoxOperations); s:=affecte_operation(no);
FormModifAction.ListBoxOperations.Items.Add(s);
itemHeight:=16; itemHeight:=16;
end; end;
@@ -1273,6 +1401,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
@@ -1536,7 +1669,7 @@ begin
if not(Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].valide) then s:=s+sd; if not(Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].valide) then s:=s+sd;
listBoxOperations.Items[clicaction]:=s; listBoxOperations.Items[clicaction]:=s;
formconfig.ListBoxOperations.items[clicaction]:=s; //encode_actions(ligneclicAct+1); if formconfig.ListBoxOperations.Count>=clicaction then formconfig.ListBoxOperations.items[clicaction]:=s; //encode_actions(ligneclicAct+1);
maj_combocactions(ligneclicAct); maj_combocactions(ligneclicAct);
end; end;
@@ -1615,12 +1748,14 @@ begin
CondPosAcc : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].accessoire:=i; CondPosAcc : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].accessoire:=i;
CondTrainSig : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i; CondTrainSig : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i;
CondFonction : begin CondFonction : begin
if i>100 then i:=1;
Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i; Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i;
Label2InfoFonction.caption:=NomFonction[i]; Label2InfoFonction.caption:=NomFonction[i];
end; end;
CondBouton : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i; CondBouton : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i;
CondMemoireEgal,CondMemoireInf,CondMemoireSup CondMemoireEgal,CondMemoireInf,CondMemoireSup
: Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i; : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i;
CondDetAct : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i;
end; end;
maj_combocactions(ligneclicAct); maj_combocactions(ligneclicAct);
end; end;
@@ -1719,6 +1854,7 @@ begin
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition; cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
case cond of case cond of
CondVitTrain,CondTrainSig : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].train:=ChampTrain.Text; CondVitTrain,CondTrainSig : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].train:=ChampTrain.Text;
CondDetAct : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].train:=ChampTrain.Text;
end; end;
maj_combocactions(ligneclicAct); maj_combocactions(ligneclicAct);
@@ -1738,6 +1874,7 @@ begin
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition; cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
case cond of case cond of
CondPosAcc : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].etat:=i; CondPosAcc : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].etat:=i;
CondDetAct : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].etat:=i;
end; end;
maj_combocactions(ligneclicAct); maj_combocactions(ligneclicAct);
end; end;
@@ -1776,7 +1913,7 @@ begin
end; end;
procedure TFormModifAction.ListBoxOperationsKeyDown(Sender: TObject; procedure TFormModifAction.ListBoxOperationsKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState); var Key: Word; Shift: TShiftState);
var nb : integer; var nb : integer;
begin begin
nb:=Tablo_Action[ligneclicAct+1].NbOperations; nb:=Tablo_Action[ligneclicAct+1].NbOperations;
@@ -1848,4 +1985,89 @@ 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;
procedure TFormModifAction.ButtonAjCondClick(Sender: TObject);
var indexSrc,idBD,NbOp,NbCond,i : integer;
s : string;
begin
indexSrc:=listboxCondTot.ItemIndex;
if indexSrc<0 then exit;
s:=ListBoxCondTot.Items[IndexSrc];
i:=index_condition(s);
if i=0 then exit;
idBD:=ligneClicAct+1;
NbOp:=Tablo_Action[idBD].NbOperations;
NbCond:=Tablo_Action[idBD].NbCond;
inc(NbCond);
Tablo_Action[idBD].NbCond:=NbCond;
Setlength(Tablo_Action[idBD].TabloCond,NbCond+1);
// le nouveau numéro de condition c'est l'index de la listboxCond
Tablo_Action[idBD].tabloCond[NbCond].numcondition:=i;
Aff_champs(idbd,nbCond,Nbop);
clicCond:=NbCond-1;
ListBoxOperations.ItemIndex:=clicCond;
end;
procedure TFormModifAction.SpeedButtonSupCondClick(Sender: TObject);
begin
supprime_condition;
end;
procedure TFormModifAction.ListBoxConditionsKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
var nb : integer;
begin
nb:=Tablo_Action[ligneclicAct+1].NbCond;
if (nb<1) or clicliste then exit;
if key=VK_delete then supprime_Condition;
if ord(Key)=VK_UP then
begin
begin
if clicCond>0 then
begin
dec(clicCond);
Aff_champs(ligneclicAct+1,ClicCond+1,ClicAction+1);
end;
end;
end;
if ord(Key)=VK_DOWN then
begin
begin
if clicCond<nb-1 then
begin
inc(clicCond);
Aff_champs(ligneclicAct+1,ClicCond+1,ClicAction+1);
end;
end;
end;
if (Shift = [ssCtrl]) and (key = ord('A')) then
begin
ListBoxConditions.SelectAll;
end;
clicListe:=false;
end;
end. end.
+1 -1
View File
@@ -49,7 +49,7 @@ begin
NewRule.Applicationname:=fichier; NewRule.Applicationname:=fichier;
NewRule.Protocol:=NET_FW_IP_PROTOCOL_TCP; NewRule.Protocol:=NET_FW_IP_PROTOCOL_TCP;
NewRule.LocalPorts :=''; // sans spécif=tous ports NewRule.LocalPorts:=''; // sans spécif=tous ports
//NewRule.LocalPorts := '9999'; // '80,443,4520-4533' //NewRule.LocalPorts := '9999'; // '80,443,4520-4533'
NewRule.Direction:=net_fw_rule_dir_in; NewRule.Direction:=net_fw_rule_dir_in;
NewRule.Enabled:=True; NewRule.Enabled:=True;
+37 -23
View File
@@ -129,10 +129,10 @@ 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 // pour le décodeur LEB :
offset, // offset en mode linéaire offset, // offset en mode linéaire
sortie, // numéro de sortie en mode linéaire sortie, // numéro de sortie en mode linéaire
code // code de pilotage en mode binaire code // code de pilotage en mode binaire
@@ -150,29 +150,27 @@ 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; EtatSignalPilote:=Signaux[0].EtatSignal;
EtatFeuPilote:=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 2 : dessine_signal2(Vcanvas,0,0,1,1,EtatSignalPilote,1,i);
2 : dessine_signal2(Vcanvas,0,0,1,1,EtatFeupilote,1,i); 3 : dessine_signal3(Vcanvas,0,0,1,1,EtatSignalPilote,1,i);
3 : dessine_signal3(Vcanvas,0,0,1,1,EtatFeupilote,1,i); 4 : dessine_signal4(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
4 : dessine_signal4(VCanvas,0,0,1,1,EtatFeupilote,1,i); 5 : dessine_signal5(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
5 : dessine_signal5(VCanvas,0,0,1,1,EtatFeupilote,1,i); 7 : dessine_signal7(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
7 : dessine_signal7(VCanvas,0,0,1,1,EtatFeupilote,1,i); 9 : dessine_signal9(VCanvas,0,0,1,1,EtatSignalPilote,1,i);
9 : dessine_signal9(VCanvas,0,0,1,1,EtatFeupilote,1,i); 20 : dessine_signal20(VCanvas,0,0,1,1,EtatSignalPilote,1,Signaux[i].adresse);
20 : dessine_signal20(VCanvas,0,0,1,1,EtatFeupilote,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;
@@ -223,7 +221,12 @@ procedure TFormPilote.RadioVertClick(Sender: TObject);
begin begin
Raz_combine; Raz_combine;
Signaux[0].AncienEtat:=Signaux[0].EtatSignal; Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
if nation=1 then Maj_Etat_Signal(0,vert) else Maj_Etat_Signal(0,vertB) ; if nation=1 then
begin
if Signaux[index_Signal(AdrPilote)].checkFV then Maj_Etat_Signal(0,blanc)
else Maj_Etat_Signal(0,vert);
end
else Maj_Etat_Signal(0,vertB) ;
dessine_signal_pilote; dessine_signal_pilote;
end; end;
@@ -256,7 +259,12 @@ procedure TFormPilote.RadioRougeClick(Sender: TObject);
begin begin
Raz_combine; Raz_combine;
Signaux[0].AncienEtat:=Signaux[0].EtatSignal; Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
Maj_Etat_Signal(0,semaphore); if nation=1 then
begin
if Signaux[index_Signal(AdrPilote)].checkFV then Maj_Etat_Signal(0,violet)
else Maj_Etat_Signal(0,semaphore);
end
else Maj_Etat_Signal(0,vertB) ;
dessine_signal_pilote; dessine_signal_pilote;
end; end;
@@ -426,7 +434,8 @@ if ord(Key) = VK_RETURN then
end; end;
procedure TFormPilote.FormActivate(Sender: TObject); procedure TFormPilote.FormActivate(Sender: TObject);
var n,i,d : integer; var n,i,d,l,h : integer;
b : tBitmap;
begin begin
if fermeSC then exit; if fermeSC then exit;
// mise à jour du champ décodeur // mise à jour du champ décodeur
@@ -497,12 +506,16 @@ begin
Picture.Bitmap.TransparentMode:=tmAuto; Picture.Bitmap.TransparentMode:=tmAuto;
Picture.Bitmap.TransparentColor:=clblue; Picture.Bitmap.TransparentColor:=clblue;
Transparent:=true; Transparent:=true;
Picture.BitMap:=Signaux[i].Img.Picture.Bitmap; picture.Bitmap.canvas.Brush.Color:=clBtnFace;
//left:=groupBox1.width+50; picture.Bitmap.Canvas.Rectangle(0,0,width,height);
b:=Select_dessin_Signal(n,l,h);
Picture.BitMap:=b;
end; end;
LabelTitrePilote.Caption:='Pilotage du signal '+intToSTR(AdrPilote); LabelTitrePilote.Caption:='Pilotage du signal '+intToSTR(AdrPilote);
Signaux[0].EtatSignal:=Signaux[i].EtatSignal; Signaux[0].EtatSignal:=Signaux[i].EtatSignal;
dessine_signal_pilote;
if isDirectionnel(i) then if isDirectionnel(i) then
begin begin
@@ -578,6 +591,7 @@ end;
// initialisation de l'unité // initialisation de l'unité
begin begin
// tableau de pilotage du décodeur LEB
// les offsets sont incrémentés tous les 2, on alterne les sorties entre droit et dévié ; // les offsets sont incrémentés tous les 2, on alterne les sorties entre droit et dévié ;
// offset et sortie sont pour le mode linéaire ; code est pour le mode binaire // offset et sortie sont pour le mode linéaire ; code est pour le mode binaire
// cible 1 vert rouge // cible 1 vert rouge
+432 -96
View File
@@ -1,11 +1,11 @@
object FormPrinc: TFormPrinc object FormPrinc: TFormPrinc
Left = 148 Left = 104
Top = 246 Top = 192
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
BorderStyle = bsNone BorderStyle = bsNone
Caption = 'Signaux complexes' Caption = 'Signaux complexes'
ClientHeight = 520 ClientHeight = 513
ClientWidth = 976 ClientWidth = 1019
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@@ -16,15 +16,14 @@ object FormPrinc: TFormPrinc
Menu = MainMenu1 Menu = MainMenu1
OldCreateOrder = False OldCreateOrder = False
Position = poDefault Position = poDefault
Scaled = False
Visible = True Visible = True
OnClose = FormClose OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
OnKeyDown = FormKeyDown OnKeyDown = FormKeyDown
OnResize = FormResize OnResize = FormResize
DesignSize = ( DesignSize = (
976 1019
520) 513)
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
object LabelTitre: TLabel object LabelTitre: TLabel
@@ -41,8 +40,8 @@ object FormPrinc: TFormPrinc
ParentFont = False ParentFont = False
end end
object Image9feux: TImage object Image9feux: TImage
Left = 1072 Left = 848
Top = 32 Top = 16
Width = 57 Width = 57
Height = 105 Height = 105
Picture.Data = { Picture.Data = {
@@ -231,8 +230,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image7feux: TImage object Image7feux: TImage
Left = 440 Left = 72
Top = 8 Top = 32
Width = 57 Width = 57
Height = 105 Height = 105
Picture.Data = { Picture.Data = {
@@ -399,7 +398,7 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image5feux: TImage object Image5feux: TImage
Left = 696 Left = 416
Top = 0 Top = 0
Width = 41 Width = 41
Height = 89 Height = 89
@@ -499,8 +498,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image4feux: TImage object Image4feux: TImage
Left = 664 Left = 384
Top = 8 Top = 0
Width = 41 Width = 41
Height = 97 Height = 97
Picture.Data = { Picture.Data = {
@@ -591,7 +590,7 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image3feux: TImage object Image3feux: TImage
Left = 200 Left = 256
Top = 8 Top = 8
Width = 33 Width = 33
Height = 57 Height = 57
@@ -672,10 +671,10 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image2feux: TImage object Image2feux: TImage
Left = 1072 Left = 288
Top = 144 Top = 16
Width = 33 Width = 25
Height = 57 Height = 41
Picture.Data = { Picture.Data = {
07544269746D617026080000424D260800000000000036040000280000001A00 07544269746D617026080000424D260800000000000036040000280000001A00
0000240000000100080000000000F0030000C40E0000C40E0000000100000001 0000240000000100080000000000F0030000C40E0000C40E0000000100000001
@@ -746,8 +745,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image2Dir: TImage object Image2Dir: TImage
Left = 624 Left = 296
Top = 8 Top = 0
Width = 41 Width = 41
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -821,8 +820,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image3Dir: TImage object Image3Dir: TImage
Left = 808 Left = 104
Top = 32 Top = 24
Width = 49 Width = 49
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -899,8 +898,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image4Dir: TImage object Image4Dir: TImage
Left = 744 Left = 24
Top = 32 Top = 24
Width = 57 Width = 57
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -987,8 +986,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image5Dir: TImage object Image5Dir: TImage
Left = 856 Left = 160
Top = 32 Top = 24
Width = 65 Width = 65
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -1085,8 +1084,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Image6Dir: TImage object Image6Dir: TImage
Left = 920 Left = 744
Top = 32 Top = 8
Width = 81 Width = 81
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -1193,8 +1192,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object ImageSignal20: TImage object ImageSignal20: TImage
Left = 1048 Left = 984
Top = 424 Top = 64
Width = 57 Width = 57
Height = 105 Height = 105
Picture.Data = { Picture.Data = {
@@ -1432,7 +1431,7 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object LabelClock: TLabel object LabelClock: TLabel
Left = 884 Left = 927
Top = 0 Top = 0
Width = 85 Width = 85
Height = 22 Height = 22
@@ -5041,8 +5040,8 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object ImageTachro: TImage object ImageTachro: TImage
Left = 976 Left = 904
Top = 112 Top = 24
Width = 106 Width = 106
Height = 37 Height = 37
Picture.Data = { Picture.Data = {
@@ -5422,17 +5421,19 @@ object FormPrinc: TFormPrinc
Visible = False Visible = False
end end
object Label1: TLabel object Label1: TLabel
Left = 856 Left = 717
Top = 4 Top = 4
Width = 89 Width = 89
Height = 13 Height = 13
Anchors = [akTop, akRight]
Caption = 'Nombre de trains : ' Caption = 'Nombre de trains : '
end end
object LabelNbTrains: TLabel object LabelNbTrains: TLabel
Left = 960 Left = 813
Top = 2 Top = 2
Width = 9 Width = 9
Height = 19 Height = 19
Anchors = [akTop, akRight]
Caption = '0' Caption = '0'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clBlack Font.Color = clBlack
@@ -5441,10 +5442,356 @@ object FormPrinc: TFormPrinc
Font.Style = [fsBold] Font.Style = [fsBold]
ParentFont = False ParentFont = False
end end
object Image3feux2x: TImage
Left = 552
Top = 0
Width = 52
Height = 88
Picture.Data = {
07544269746D617016160000424D161600000000000036040000280000003400
0000580000000100080000000000E0110000C40E0000C40E0000000100000001
000000000000000080000080000000808000800000008000800080800000C0C0
C000C0DCC000F0CAA6000020400000206000002080000020A0000020C0000020
E00000400000004020000040400000406000004080000040A0000040C0000040
E00000600000006020000060400000606000006080000060A0000060C0000060
E00000800000008020000080400000806000008080000080A0000080C0000080
E00000A0000000A0200000A0400000A0600000A0800000A0A00000A0C00000A0
E00000C0000000C0200000C0400000C0600000C0800000C0A00000C0C00000C0
E00000E0000000E0200000E0400000E0600000E0800000E0A00000E0C00000E0
E00040000000400020004000400040006000400080004000A0004000C0004000
E00040200000402020004020400040206000402080004020A0004020C0004020
E00040400000404020004040400040406000404080004040A0004040C0004040
E00040600000406020004060400040606000406080004060A0004060C0004060
E00040800000408020004080400040806000408080004080A0004080C0004080
E00040A0000040A0200040A0400040A0600040A0800040A0A00040A0C00040A0
E00040C0000040C0200040C0400040C0600040C0800040C0A00040C0C00040C0
E00040E0000040E0200040E0400040E0600040E0800040E0A00040E0C00040E0
E00080000000800020008000400080006000800080008000A0008000C0008000
E00080200000802020008020400080206000802080008020A0008020C0008020
E00080400000804020008040400080406000804080008040A0008040C0008040
E00080600000806020008060400080606000806080008060A0008060C0008060
E00080800000808020008080400080806000808080008080A0008080C0008080
E00080A0000080A0200080A0400080A0600080A0800080A0A00080A0C00080A0
E00080C0000080C0200080C0400080C0600080C0800080C0A00080C0C00080C0
E00080E0000080E0200080E0400080E0600080E0800080E0A00080E0C00080E0
E000C0000000C0002000C0004000C0006000C0008000C000A000C000C000C000
E000C0200000C0202000C0204000C0206000C0208000C020A000C020C000C020
E000C0400000C0402000C0404000C0406000C0408000C040A000C040C000C040
E000C0600000C0602000C0604000C0606000C0608000C060A000C060C000C060
E000C0800000C0802000C0804000C0806000C0808000C080A000C080C000C080
E000C0A00000C0A02000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0
E000C0C00000C0C02000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0
A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF
FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000000000000000000000
00000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFC00000000000000000000000000000000FCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC0000000000000000
00000000000000000000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFC0000000000000000000000000000000000000000
00000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00000000
000000000000FFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00000000000000000000FFFFFFFFFFFF
FFFFFFFFFFFF00000000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFC0000000000000000FFFFFFFF000000000000000000000000FFFFFFFF0000
000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC0000000000000000FFFF
FFFF000000000000000000000000FFFFFFFF0000000000000000FCFCFCFCFCFC
FCFCFCFCFCFCFCFC000000000000FFFFFFFF0000000000000000000000000000
000000000000FFFFFFFF000000000000FCFCFCFCFCFCFCFCFCFCFCFC00000000
0000FFFFFFFF0000000000000000000000000000000000000000FFFFFFFF0000
00000000FCFCFCFCFCFCFCFCFCFC000000000000FFFF00000000000000000000
000000000000000000000000000000000000FFFF000000000000FCFCFCFCFCFC
FCFC000000000000FFFF00000000000000000000000000000000000000000000
000000000000FFFF000000000000FCFCFCFCFCFC000000000000FFFF00000000
00000000000000000000000000000000000000000000000000000000FFFF0000
00000000FCFCFCFC000000000000FFFF00000000000000000000000000000000
00000000000000000000000000000000FFFF000000000000FCFCFCFC00000000
FFFF000000000000000000000000000052525252525252520000000000000000
000000000000FFFF00000000FCFCFCFC00000000FFFF00000000000000000000
0000000052525252525252520000000000000000000000000000FFFF00000000
FCFC000000000000FFFF00000000000000000000000052525252525252525252
5252000000000000000000000000FFFF000000000000000000000000FFFF0000
0000000000000000000052525252525252525252525200000000000000000000
0000FFFF00000000000000000000FFFF00000000000000000000000052525252
525252525252525252525252000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000052525252525252525252525252525252
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000052525252525252525252525252525252000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000005252525252525252
5252525252525252000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000005252525252525252525252525252525200000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
52525252525252525252525252525252000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000525252525252525252525252
52525252000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000525252525252525252525252525252520000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000000005252
525252525252525252520000000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000000005252525252525252525252520000
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000000000000525252525252525200000000000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000000000000052525252
5252525200000000000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
00000000000000000000000000000000000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000000000000000000000000000
00000000000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000000000000000000000000000000000000000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000000000000
000000000000000000000000000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000000000000000000000000000000000000
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000000000000525252525252525200000000000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000000000000052525252
5252525200000000000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000000000525252525252525252525252000000000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
00005252525252525252525252520000000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000525252525252525252525252
52525252000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000525252525252525252525252525252520000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000052525252
525252525252525252525252000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000052525252525252525252525252525252
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000052525252525252525252525252525252000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000005252525252525252
5252525252525252000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000005252525252525252525252525252525200000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
52525252525252525252525252525252000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000000052525252525252525252
52520000000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000000052525252525252525252525200000000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000000000000
525252525252525200000000000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000000000000525252525252525200000000
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000000000000000000000000000000000000000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000000000000000000000
0000000000000000000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
00000000000000000000000000000000000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000000000000000000000000000
00000000000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000000000000000000000000000000000000000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000000000000
525252525252525200000000000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000000000000525252525252525200000000
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000000005252525252525252525252520000000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000000000525252525252
5252525252520000000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000005252525252525252525252525252525200000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
52525252525252525252525252525252000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000525252525252525252525252
52525252000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000525252525252525252525252525252520000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000052525252
525252525252525252525252000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000052525252525252525252525252525252
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000052525252525252525252525252525252000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000005252525252525252
5252525252525252000000000000000000000000FFFF00000000000000000000
FFFF000000000000000000000000525252525252525252525252000000000000
000000000000FFFF000000000000000000000000FFFF00000000000000000000
0000525252525252525252525252000000000000000000000000FFFF00000000
0000FCFC00000000FFFF00000000000000000000000000005252525252525252
0000000000000000000000000000FFFF00000000FCFCFCFC00000000FFFF0000
0000000000000000000000005252525252525252000000000000000000000000
0000FFFF00000000FCFCFCFC000000000000F6F6000000000000000000000000
0000000000000000000000000000000000000000FFFF000000000000FCFCFCFC
000000000000F6F6000000000000000000000000000000000000000000000000
0000000000000000FFFF000000000000FCFCFCFCFCFC000000000000FFFF0000
0000000000000000000000000000000000000000000000000000FFFF00000000
0000FCFCFCFCFCFCFCFC000000000000FFFF0000000000000000000000000000
0000000000000000000000000000FFFF000000000000FCFCFCFCFCFCFCFCFCFC
000000000000FFFFFFFF0000000000000000000000000000000000000000FFFF
FFFF000000000000FCFCFCFCFCFCFCFCFCFCFCFC000000000000FFFFFFFF0000
000000000000000000000000000000000000FFFFFFFF000000000000FCFCFCFC
FCFCFCFCFCFCFCFCFCFC0000000000000000FFFFFFFF00000000000000000000
0000FFFFFFFF0000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC0000
000000000000FFFFFFFF000000000000000000000000FFFFFFFF000000000000
0000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00000000000000000000FFFF
FFFFFFFFFFFFFFFFFFFF00000000000000000000FCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFC00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF0000
0000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
000000000000000000000000000000000000000000000000FCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000000000000000000000
000000000000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFC00000000000000000000000000000000FCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
00000000000000000000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFC}
Visible = False
end
object Image2feux2x: TImage
Left = 608
Top = 0
Width = 52
Height = 72
Picture.Data = {
07544269746D6170D6120000424DD61200000000000036040000280000003400
0000480000000100080000000000A00E0000C40E0000C40E0000000100000001
000000000000000080000080000000808000800000008000800080800000C0C0
C000C0DCC000F0CAA6000020400000206000002080000020A0000020C0000020
E00000400000004020000040400000406000004080000040A0000040C0000040
E00000600000006020000060400000606000006080000060A0000060C0000060
E00000800000008020000080400000806000008080000080A0000080C0000080
E00000A0000000A0200000A0400000A0600000A0800000A0A00000A0C00000A0
E00000C0000000C0200000C0400000C0600000C0800000C0A00000C0C00000C0
E00000E0000000E0200000E0400000E0600000E0800000E0A00000E0C00000E0
E00040000000400020004000400040006000400080004000A0004000C0004000
E00040200000402020004020400040206000402080004020A0004020C0004020
E00040400000404020004040400040406000404080004040A0004040C0004040
E00040600000406020004060400040606000406080004060A0004060C0004060
E00040800000408020004080400040806000408080004080A0004080C0004080
E00040A0000040A0200040A0400040A0600040A0800040A0A00040A0C00040A0
E00040C0000040C0200040C0400040C0600040C0800040C0A00040C0C00040C0
E00040E0000040E0200040E0400040E0600040E0800040E0A00040E0C00040E0
E00080000000800020008000400080006000800080008000A0008000C0008000
E00080200000802020008020400080206000802080008020A0008020C0008020
E00080400000804020008040400080406000804080008040A0008040C0008040
E00080600000806020008060400080606000806080008060A0008060C0008060
E00080800000808020008080400080806000808080008080A0008080C0008080
E00080A0000080A0200080A0400080A0600080A0800080A0A00080A0C00080A0
E00080C0000080C0200080C0400080C0600080C0800080C0A00080C0C00080C0
E00080E0000080E0200080E0400080E0600080E0800080E0A00080E0C00080E0
E000C0000000C0002000C0004000C0006000C0008000C000A000C000C000C000
E000C0200000C0202000C0204000C0206000C0208000C020A000C020C000C020
E000C0400000C0402000C0404000C0406000C0408000C040A000C040C000C040
E000C0600000C0602000C0604000C0606000C0608000C060A000C060C000C060
E000C0800000C0802000C0804000C0806000C0808000C080A000C080C000C080
E000C0A00000C0A02000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0
E000C0C00000C0C02000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0
A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF
FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000000000000000000000
00000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFC00000000000000000000000000000000FCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC0000000000000000
00000000000000000000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFC0000000000000000000000000000000000000000
00000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00000000
000000000000FFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00000000000000000000FFFFFFFFFFFF
FFFFFFFFFFFF00000000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFC0000000000000000FFFFFFFF000000000000000000000000FFFFFFFF0000
000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC0000000000000000FFFF
FFFF000000000000000000000000FFFFFFFF0000000000000000FCFCFCFCFCFC
FCFCFCFCFCFCFCFC000000000000FFFFFFFF0000000000000000000000000000
000000000000FFFFFFFF000000000000FCFCFCFCFCFCFCFCFCFCFCFC00000000
0000FFFFFFFF0000000000000000000000000000000000000000FFFFFFFF0000
00000000FCFCFCFCFCFCFCFCFCFC000000000000FFFF00000000000000000000
000000000000000000000000000000000000FFFF000000000000FCFCFCFCFCFC
FCFC000000000000FFFF00000000000000000000000000000000000000000000
000000000000FFFF000000000000FCFCFCFCFCFC000000000000FFFF00000000
00000000000000000000000000000000000000000000000000000000FFFF0000
00000000FCFCFCFC000000000000FFFF00000000000000000000000000000000
00000000000000000000000000000000FFFF000000000000FCFCFCFC00000000
FFFF000000000000000000000000000052525252525252520000000000000000
000000000000FFFF00000000FCFCFCFC00000000FFFF00000000000000000000
0000000052525252525252520000000000000000000000000000FFFF00000000
FCFC000000000000FFFF00000000000000000000000052525252525252525252
5252000000000000000000000000FFFF000000000000000000000000FFFF0000
0000000000000000000052525252525252525252525200000000000000000000
0000FFFF00000000000000000000FFFF00000000000000000000000052525252
525252525252525252525252000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000052525252525252525252525252525252
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000052525252525252525252525252525252000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000005252525252525252
5252525252525252000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000005252525252525252525252525252525200000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
52525252525252525252525252525252000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000525252525252525252525252
52525252000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000525252525252525252525252525252520000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000000005252
525252525252525252520000000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000000005252525252525252525252520000
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000000000000525252525252525200000000000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000000000000052525252
5252525200000000000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
00000000000000000000000000000000000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000000000000000000000000000
00000000000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000000000000000000000000000000000000000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000000000000
000000000000000000000000000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000000000000000000000000000000000000
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000000000000000000000000000000000000000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000000000000000000000
0000000000000000000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
00000000000000000000000000000000000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000000000000000000000000000
00000000000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000000000000000000000000000000000000000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000000000000
525252525252525200000000000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000000000000525252525252525200000000
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000000005252525252525252525252520000000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000000000525252525252
5252525252520000000000000000000000000000FFFF0000000000000000FFFF
0000000000000000000000005252525252525252525252525252525200000000
0000000000000000FFFF0000000000000000FFFF000000000000000000000000
52525252525252525252525252525252000000000000000000000000FFFF0000
000000000000FFFF000000000000000000000000525252525252525252525252
52525252000000000000000000000000FFFF0000000000000000FFFF00000000
0000000000000000525252525252525252525252525252520000000000000000
00000000FFFF0000000000000000FFFF00000000000000000000000052525252
525252525252525252525252000000000000000000000000FFFF000000000000
0000FFFF00000000000000000000000052525252525252525252525252525252
000000000000000000000000FFFF0000000000000000FFFF0000000000000000
0000000052525252525252525252525252525252000000000000000000000000
FFFF0000000000000000FFFF0000000000000000000000005252525252525252
5252525252525252000000000000000000000000FFFF00000000000000000000
FFFF000000000000000000000000525252525252525252525252000000000000
000000000000FFFF000000000000000000000000FFFF00000000000000000000
0000525252525252525252525252000000000000000000000000FFFF00000000
0000FCFC00000000FFFF00000000000000000000000000005252525252525252
0000000000000000000000000000FFFF00000000FCFCFCFC00000000FFFF0000
0000000000000000000000005252525252525252000000000000000000000000
0000FFFF00000000FCFCFCFC000000000000FFFF000000000000000000000000
0000000000000000000000000000000000000000FFFF000000000000FCFCFCFC
000000000000FFFF000000000000000000000000000000000000000000000000
0000000000000000FFFF000000000000FCFCFCFCFCFC000000000000FFFF0000
0000000000000000000000000000000000000000000000000000FFFF00000000
0000FCFCFCFCFCFCFCFC000000000000FFFF0000000000000000000000000000
0000000000000000000000000000FFFF000000000000FCFCFCFCFCFCFCFCFCFC
000000000000FFFFFFFF0000000000000000000000000000000000000000FFFF
FFFF000000000000FCFCFCFCFCFCFCFCFCFCFCFC000000000000FFFFFFFF0000
000000000000000000000000000000000000FFFFFFFF000000000000FCFCFCFC
FCFCFCFCFCFCFCFCFCFC0000000000000000FFFFFFFF00000000000000000000
0000FFFFFFFF0000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC0000
000000000000FFFFFFFF000000000000000000000000FFFFFFFF000000000000
0000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00000000000000000000FFFF
FFFFFFFFFFFFF6F6FFFF00000000000000000000FCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFC00000000000000000000FFFFFFFFFFFFFFFFF6F6FFFF0000
0000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
000000000000000000000000000000000000000000000000FCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000000000000000000000
000000000000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFC00000000000000000000000000000000FCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
00000000000000000000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFC}
Visible = False
end
object StatusBar1: TStatusBar object StatusBar1: TStatusBar
Left = 0 Left = 0
Top = 498 Top = 491
Width = 976 Width = 1019
Height = 22 Height = 22
Panels = < Panels = <
item item
@@ -5778,7 +6125,7 @@ object FormPrinc: TFormPrinc
OnClick = SBMarcheArretLocoClick OnClick = SBMarcheArretLocoClick
end end
object BoutonRaf: TButton object BoutonRaf: TButton
Left = 8 Left = 4
Top = 8 Top = 8
Width = 89 Width = 89
Height = 33 Height = 33
@@ -5792,7 +6139,7 @@ object FormPrinc: TFormPrinc
OnClick = BoutonRafClick OnClick = BoutonRafClick
end end
object ButtonArretSimu: TButton object ButtonArretSimu: TButton
Left = 192 Left = 190
Top = 88 Top = 88
Width = 89 Width = 89
Height = 33 Height = 33
@@ -5803,7 +6150,7 @@ object FormPrinc: TFormPrinc
OnClick = ButtonArretSimuClick OnClick = ButtonArretSimuClick
end end
object ButtonAffTCO: TButton object ButtonAffTCO: TButton
Left = 104 Left = 100
Top = 48 Top = 48
Width = 81 Width = 81
Height = 33 Height = 33
@@ -5812,7 +6159,7 @@ object FormPrinc: TFormPrinc
OnClick = ButtonAffTCOClick OnClick = ButtonAffTCOClick
end end
object ButtonLanceCDM: TButton object ButtonLanceCDM: TButton
Left = 192 Left = 190
Top = 8 Top = 8
Width = 89 Width = 89
Height = 33 Height = 33
@@ -5824,7 +6171,7 @@ object FormPrinc: TFormPrinc
OnClick = ButtonLanceCDMClick OnClick = ButtonLanceCDMClick
end end
object ButtonLocCV: TButton object ButtonLocCV: TButton
Left = 104 Left = 100
Top = 88 Top = 88
Width = 81 Width = 81
Height = 33 Height = 33
@@ -5836,7 +6183,7 @@ object FormPrinc: TFormPrinc
OnClick = ButtonLocCVClick OnClick = ButtonLocCVClick
end end
object BoutonRazTrains: TButton object BoutonRazTrains: TButton
Left = 192 Left = 190
Top = 48 Top = 48
Width = 89 Width = 89
Height = 33 Height = 33
@@ -5851,7 +6198,7 @@ object FormPrinc: TFormPrinc
OnClick = BoutonRazTrainsClick OnClick = BoutonRazTrainsClick
end end
object ButtonAffAnalyseCDM: TButton object ButtonAffAnalyseCDM: TButton
Left = 8 Left = 4
Top = 48 Top = 48
Width = 89 Width = 89
Height = 33 Height = 33
@@ -5864,7 +6211,7 @@ object FormPrinc: TFormPrinc
OnClick = ButtonAffAnalyseCDMClick OnClick = ButtonAffAnalyseCDMClick
end end
object ButtonCDM: TButton object ButtonCDM: TButton
Left = 104 Left = 100
Top = 8 Top = 8
Width = 81 Width = 81
Height = 33 Height = 33
@@ -5883,7 +6230,7 @@ object FormPrinc: TFormPrinc
Text = '<1>' Text = '<1>'
end end
object ButtonEnv: TButton object ButtonEnv: TButton
Left = 9 Left = 4
Top = 88 Top = 88
Width = 88 Width = 88
Height = 33 Height = 33
@@ -5895,8 +6242,8 @@ object FormPrinc: TFormPrinc
end end
end end
object GroupBoxCV: TGroupBox object GroupBoxCV: TGroupBox
Left = 657 Left = 577
Top = 72 Top = 144
Width = 265 Width = 265
Height = 81 Height = 81
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -5963,7 +6310,7 @@ object FormPrinc: TFormPrinc
Top = 200 Top = 200
Width = 393 Width = 393
Height = 265 Height = 265
ActivePage = TabSheetComp ActivePage = TabSheetTrains
Anchors = [] Anchors = []
TabOrder = 5 TabOrder = 5
OnChange = PageControlChange OnChange = PageControlChange
@@ -5986,6 +6333,24 @@ object FormPrinc: TFormPrinc
ParentColor = False ParentColor = False
TabOrder = 0 TabOrder = 0
end end
object TrackBarSig: TTrackBar
Left = 352
Top = 0
Width = 37
Height = 217
Hint = 'Zoom signaux'
Anchors = [akTop, akRight, akBottom]
Orientation = trVertical
ParentShowHint = False
Frequency = 20
Position = 10
ShowHint = True
TabOrder = 1
ThumbLength = 15
TickMarks = tmTopLeft
TickStyle = tsManual
OnChange = TrackBarSigChange
end
end end
object TabSheetTrains: TTabSheet object TabSheetTrains: TTabSheet
Caption = 'Trains' Caption = 'Trains'
@@ -6059,7 +6424,7 @@ object FormPrinc: TFormPrinc
Top = 8 Top = 8
end end
object MainMenu1: TMainMenu object MainMenu1: TMainMenu
Left = 536 Left = 464
object Afficher1: TMenuItem object Afficher1: TMenuItem
Caption = 'Afficher' Caption = 'Afficher'
object Affichagenormal1: TMenuItem object Affichagenormal1: TMenuItem
@@ -6459,26 +6824,17 @@ 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 = 616
Top = 16 Top = 32
end end
object SaveDialog: TSaveDialog object SaveDialog: TSaveDialog
Left = 744 Left = 464
Top = 32
end end
object PopupMenuFenRich: TPopupMenu object PopupMenuFenRich: TPopupMenu
Left = 192 Left = 528
Top = 8 Top = 32
object outslectionner1: TMenuItem object outslectionner1: TMenuItem
Caption = 'Tout s'#233'lectionner' Caption = 'Tout s'#233'lectionner'
OnClick = Toutslectionner1Click OnClick = Toutslectionner1Click
@@ -6497,7 +6853,8 @@ object FormPrinc: TFormPrinc
end end
object PopupMenuSignal: TPopupMenu object PopupMenuSignal: TPopupMenu
OnPopup = PopupMenuSignalPopup OnPopup = PopupMenuSignalPopup
Left = 784 Left = 496
Top = 32
object Proprits1: TMenuItem object Proprits1: TMenuItem
Caption = 'Propri'#233't'#233's du signal' Caption = 'Propri'#233't'#233's du signal'
OnClick = Proprits1Click OnClick = Proprits1Click
@@ -6507,36 +6864,9 @@ 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 = 816 Left = 528
object Propritsdutrain1: TMenuItem object Propritsdutrain1: TMenuItem
Caption = 'Propri'#233't'#233's du train' Caption = 'Propri'#233't'#233's du train'
OnClick = Propritsdutrain1Click OnClick = Propritsdutrain1Click
@@ -6551,7 +6881,7 @@ object FormPrinc: TFormPrinc
end end
object PopupMenuCompteurs: TPopupMenu object PopupMenuCompteurs: TPopupMenu
OnPopup = PopupMenuCompteursPopup OnPopup = PopupMenuCompteursPopup
Left = 848 Left = 496
object Propritsdescompteurs1: TMenuItem object Propritsdescompteurs1: TMenuItem
Caption = 'Propri'#233't'#233's des compteurs' Caption = 'Propri'#233't'#233's des compteurs'
OnClick = Propritsdescompteurs1Click OnClick = Propritsdescompteurs1Click
@@ -6561,4 +6891,10 @@ object FormPrinc: TFormPrinc
OnClick = Dtacherlecompteur1Click OnClick = Dtacherlecompteur1Click
end end
end end
object Timer2: TTimer
Interval = 50
OnTimer = Timer2Timer
Left = 688
Top = 16
end
end end
+1268 -927
View File
File diff suppressed because it is too large. Load diff
+59 -10
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;
@@ -419,7 +468,7 @@ begin
coulText:=clOrange; coulText:=clOrange;
StyleText:=1; // gras StyleText:=1; // gras
FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(integer(StyleText))); // FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(integer(StyleText))); //
//FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(CoulText)); //ne pas utiliser à cause des styles D12 - permet d'afficher un texte en couleurs avec l'evt onDrawItem //FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(CoulText)); //ne pas utiliser à cause des styles D13 - permet d'afficher un texte en couleurs avec l'evt onDrawItem
end end
end end
else else
@@ -428,7 +477,7 @@ begin
coulText:=clYellow; coulText:=clYellow;
StyleText:=0; // normal StyleText:=0; // normal
FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(integer(StyleText))); FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(integer(StyleText)));
//FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(CoulText)); // ne pas utiliser à cause des styles D12 - permet d'afficher un texte en couleurs avec l'evt onDrawItem //FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(CoulText)); // ne pas utiliser à cause des styles D13 - permet d'afficher un texte en couleurs avec l'evt onDrawItem
end; end;
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;
+15 -1
View File
@@ -53,7 +53,7 @@ object FormRouteTrain: TFormRouteTrain
Top = 8 Top = 8
Width = 585 Width = 585
Height = 177 Height = 177
ActivePage = TabSheetRA ActivePage = TabSheetRM
TabOrder = 1 TabOrder = 1
object TabSheetRA: TTabSheet object TabSheetRA: TTabSheet
Caption = 'Route affect'#233'e' Caption = 'Route affect'#233'e'
@@ -210,6 +210,7 @@ object FormRouteTrain: TFormRouteTrain
Font.Style = [] Font.Style = []
ItemHeight = 13 ItemHeight = 13
ParentFont = False ParentFont = False
PopupMenu = PopupMenuRoutes
TabOrder = 1 TabOrder = 1
OnKeyDown = ListBoxRMKeyDown OnKeyDown = ListBoxRMKeyDown
OnMouseDown = ListBoxRMMouseDown OnMouseDown = ListBoxRMMouseDown
@@ -277,4 +278,17 @@ object FormRouteTrain: TFormRouteTrain
TabOrder = 2 TabOrder = 2
OnClick = ButtonQuitteClick OnClick = ButtonQuitteClick
end end
object PopupMenuRoutes: TPopupMenu
OnPopup = PopupMenuRoutesPopup
Left = 764
Top = 144
object Copierroute1: TMenuItem
Caption = 'Copier route'
OnClick = Copierroute1Click
end
object Collerroute1: TMenuItem
Caption = 'Coller route'
OnClick = Collerroute1Click
end
end
end end
+99 -7
View File
@@ -9,7 +9,8 @@ uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, Dialogs, StdCtrls, ExtCtrls, ComCtrls,
unitprinc,UnitConfig,unitTCO,UnitHorloge,unitFicheHoraire,UnitDebug,UnitRoute,selection_train; unitprinc,UnitConfig,unitTCO,UnitHorloge,unitFicheHoraire,UnitDebug,UnitRoute,selection_train,
Menus;
type type
@@ -39,6 +40,9 @@ type
CheckBoxSens: TCheckBox; CheckBoxSens: TCheckBox;
CheckBoxSIRA: TCheckBox; CheckBoxSIRA: TCheckBox;
LabelID: TLabel; LabelID: TLabel;
PopupMenuRoutes: TPopupMenu;
Copierroute1: TMenuItem;
Collerroute1: TMenuItem;
procedure FormActivate(Sender: TObject); procedure FormActivate(Sender: TObject);
procedure ButtonQuitteClick(Sender: TObject); procedure ButtonQuitteClick(Sender: TObject);
procedure ComboBoxTrainsChange(Sender: TObject); procedure ComboBoxTrainsChange(Sender: TObject);
@@ -63,6 +67,9 @@ type
Shift: TShiftState); Shift: TShiftState);
procedure CheckBoxSensClick(Sender: TObject); procedure CheckBoxSensClick(Sender: TObject);
procedure CheckBoxSIRAClick(Sender: TObject); procedure CheckBoxSIRAClick(Sender: TObject);
procedure Copierroute1Click(Sender: TObject);
procedure Collerroute1Click(Sender: TObject);
procedure PopupMenuRoutesPopup(Sender: TObject);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -73,6 +80,10 @@ type
var var
FormRouteTrain: TFormRouteTrain; FormRouteTrain: TFormRouteTrain;
IrPref : integer; IrPref : integer;
routeCopie : record
IdTrain : integer;
IdRoute : integer;
end;
function aig_canton(idTrain,detect : integer) : integer; function aig_canton(idTrain,detect : integer) : integer;
function demarre_index_train(indexTrain : integer) : boolean; function demarre_index_train(indexTrain : integer) : boolean;
@@ -86,7 +97,6 @@ implementation
// renvoie l'adresse du signal du train sur détecteur // renvoie l'adresse du signal du train sur détecteur
function Adresse_signal_det_train(detect,IndexTrain : integer) : integer; function Adresse_signal_det_train(detect,IndexTrain : integer) : integer;
var voie1,voie2,indexSig1,IndexSig2,AdrSig1,AdrSig2,IndexSig,AdrSig : integer; var voie1,voie2,indexSig1,IndexSig2,AdrSig1,AdrSig2,IndexSig,AdrSig : integer;
s : string;
begin begin
if detect=0 then if detect=0 then
begin begin
@@ -149,9 +159,8 @@ end;
// démarre un train si le signal n'est pas au rouge // démarre un train si le signal n'est pas au rouge
// appelé par gestion des horaires dans le timer ou bouton rouler 1 train ou rouler tous les trains // appelé par gestion des horaires dans le timer ou bouton rouler 1 train ou rouler tous les trains
function demarre_index_train(indexTrain : integer) : boolean; function demarre_index_train(indexTrain : integer) : boolean;
var i,n,det1,el2,vitesse,AdrTrain,idcanton,voie1,voie2,indexSig1,indexSig2,AdrSig1,AdrSig2,AdrSig, var i,vitesse,AdrTrain,idcanton,
detect,indexSig,etsign : integer; detect,indexSig,etsign : integer;
tel2 : tequipement;
trouve : boolean; trouve : boolean;
Train,s : string; Train,s : string;
@@ -281,6 +290,7 @@ begin
if idtrain<1 then exit; if idtrain<1 then exit;
formRouteTrain.comboBoxTrains.Clear; formRouteTrain.comboBoxTrains.Clear;
formRouteTrain.ListBoxRM.Clear; formRouteTrain.ListBoxRM.Clear;
for i:=1 to NTrains do for i:=1 to NTrains do
begin begin
s:=trains[i].nom_train; s:=trains[i].nom_train;
@@ -298,9 +308,11 @@ begin
formRouteTrain.comboBoxTrains.ItemIndex:=indexTrainFR-1; formRouteTrain.comboBoxTrains.ItemIndex:=indexTrainFR-1;
Maj_icone_train(FormRouteTrain.ImageTrainR,idTrain,clWhite); Maj_icone_train(FormRouteTrain.ImageTrainR,idTrain,clWhite);
with formRouteTrain do with formRouteTrain do
begin begin
TabSheetRM.Enabled:=false; // ahhhh TabSheetRM.Enabled:=false;
EditNomRoute.Text:='';
ListBoxRA.Clear; ListBoxRA.Clear;
if trains[idtrain].route[0].adresse<>0 then // route affectée au train if trains[idtrain].route[0].adresse<>0 then // route affectée au train
@@ -341,10 +353,13 @@ begin
if Canvas.TextWidth(s)+30>PixelLength then PixelLength:=Canvas.TextWidth(s)+30; if Canvas.TextWidth(s)+30>PixelLength then PixelLength:=Canvas.TextWidth(s)+30;
ListBoxRM.Items.Add(s); ListBoxRM.Items.Add(s);
end; end;
EditNomRoute.Text:=trains[idTrain].NomRouteCour; EditNomRoute.Text:=trains[idTrain].NomRoute[j];
SendMessage(ListBoxRM.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0); // crée la HorzScroll baz SendMessage(ListBoxRM.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0); // crée la HorzScroll baz
end end
else LabelRM.Caption:='Pas de route mémorisée au train '+trains[idtrain].nom_train; else
begin
LabelRM.Caption:='Pas de route mémorisée au train '+trains[idtrain].nom_train;
end;
if (trains[idTrain].route[0].adresse=0) and (trains[idTrain].routePref[1][0].adresse=0) then if (trains[idTrain].route[0].adresse=0) and (trains[idTrain].routePref[1][0].adresse=0) then
begin begin
@@ -785,6 +800,8 @@ begin
ComboBoxTrains.ItemIndex:=0; ComboBoxTrains.ItemIndex:=0;
IndexTrainFR:=1; IndexTrainFR:=1;
maj_infos(indexTrainFR); maj_infos(indexTrainFR);
routecopie.IdTrain:=0;
routecopie.IdRoute:=0;
end; end;
// choisir cette route mémorisée // choisir cette route mémorisée
@@ -931,6 +948,7 @@ end;
procedure TFormRouteTrain.ListBoxRMMouseDown(Sender: TObject; procedure TFormRouteTrain.ListBoxRMMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin begin
//Affiche('ListBoxRMMouseDown',clred);
NumRoute:=1; NumRoute:=1;
IrPref:=ListBoxRM.ItemIndex+1; IrPref:=ListBoxRM.ItemIndex+1;
if irPref<1 then exit; if irPref<1 then exit;
@@ -949,6 +967,7 @@ end;
procedure TFormRouteTrain.ListBoxRAMouseDown(Sender: TObject; procedure TFormRouteTrain.ListBoxRAMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin begin
//Affiche('ListBoxRAMouseDown',clred);
// si le train de la route est en roulage, ne pas afficher la route car // si le train de la route est en roulage, ne pas afficher la route car
// sinon les index des trains passent à 0 dans les cantons par la fonction zone_tco // sinon les index des trains passent à 0 dans les cantons par la fonction zone_tco
if trains[indexTrainFR].roulage=0 then affiche_route_tco; if trains[indexTrainFR].roulage=0 then affiche_route_tco;
@@ -1029,5 +1048,78 @@ begin
trains[indexTrainFR].route[0].talon:=checkBoxSens.checked; trains[indexTrainFR].route[0].talon:=checkBoxSens.checked;
end; end;
procedure TFormRouteTrain.Copierroute1Click(Sender: TObject);
var i : integer;
begin
i:=ListBoxRM.ItemIndex;
if i<0 then exit;
RouteCopie.IdTrain:=ComboBoxTrains.ItemIndex+1;
RouteCopie.IdRoute:=i+1;
//Affiche('IdTrain='+intToSTR(ROuteCopie.IdTrain)+' IdRoute='+intToSTR(ROuteCopie.IdROute),clYellow);
end;
procedure TFormRouteTrain.Collerroute1Click(Sender: TObject);
var i,n,id,IdTrainDest,nDest : integer;
ok : boolean;
s : string;
begin
IdTrainDest:=ComboBoxTrains.ItemIndex+1;
nDest:=Trains[IdTrainDest].routePref[0,0].adresse;
if nDest>30 then exit;
// vérifier si une des routes du train de destination a la même id que la route qu'on veut coller
ok:=true;
n:=Trains[RouteCopie.IdTrain].routePref[0,0].adresse; // nombre de routes du train copié (route source)
id:=Trains[RouteCopie.IdTrain].routePref[RouteCopie.IdRoute,0].pos; // ID de la route du train copié
IdTrainDest:=ComboBoxTrains.ItemIndex+1;
i:=1;
while (i<=n) and ok do
begin
ok:=Trains[IdTrainDest].routePref[i,0].pos<>Id; // Id de la route i du train de destination
inc(i);
end;
if ok then CollerRoute1.Enabled:=true
else
begin
LabelRoute.caption:='La route '+intToSTR(i-1)+' est identique à la route copiée';
exit;
end;
inc(nDest);
// copier la route
Trains[IdTrainDest].routePref[0,0].adresse:=ndest;
Trains[IdTrainDest].routePref[nDest]:=Trains[RouteCopie.IdTrain].RoutePref[RouteCopie.IdRoute];
// et le nom de la route
s:=Trains[RouteCopie.IdTrain].NomRoute[RouteCopie.IdRoute];
Trains[IdTrainDest].NomRoute[nDest]:=s;
EditNomRoute.Text:=s;
maj_infos(IdTrainDest);
end;
procedure TFormRouteTrain.PopupMenuRoutesPopup(Sender: TObject);
begin
if RouteCopie.IdTrain=0 then
begin
CopierRoute1.Enabled:=false;
CollerRoute1.Enabled:=false;
end;
// valider menu copier
if (ListBoxRM.ItemIndex>=0) then
begin
CopierRoute1.Enabled:=true;
end;
// valider menu coller
if (RouteCopie.IdTrain<>0) then
begin
CollerRoute1.Enabled:=true;
end;
end;
end. end.
+9 -2
View File
@@ -1,6 +1,6 @@
object FormTCO: TFormTCO object FormTCO: TFormTCO
Left = 186 Left = 173
Top = 112 Top = 188
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
+270 -97
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;
@@ -457,6 +460,7 @@ const
maxUndo=30; maxUndo=30;
ZoomMax=(8191 div MaxCellX)-1; // pour ne pas dépasser un canvas de 8191 pixel maxi ZoomMax=(8191 div MaxCellX)-1; // pour ne pas dépasser un canvas de 8191 pixel maxi
ZoomMin=15; ZoomMin=15;
NomFichier_ch='Nom_fichier';
ClFond_ch='CoulFond'; ClFond_ch='CoulFond';
clVoies_ch='CoulVoies'; clVoies_ch='CoulVoies';
clAllume_ch='CoulAllume'; clAllume_ch='CoulAllume';
@@ -666,8 +670,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);
@@ -715,7 +719,10 @@ procedure Affiche_temps_arret(IdTrain,tps : integer);
procedure titre_fenetre(indexTCO : integer); 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(idt : integer;var x,y : integer);
procedure Supprimer_TCO(TcoS : integer);
procedure toggle_bandeau(indexTCO : integer);
function sens_train_canton(AdrTrain,Idcanton : integer) : integer;
implementation implementation
@@ -731,7 +738,7 @@ begin
if c<>0 then if c<>0 then
begin begin
//Affiche('Suppression canton '+intToSTR(c),clorange); //Affiche('Suppression canton '+intToSTR(c),clorange);
for i:=c to ncantons-1 do // supprime le canton c de la liste for i:=c to ncantons-1 do // supprime le canton c de la liste des cantons
canton[i]:=canton[i+1]; canton[i]:=canton[i+1];
dec(ncantons); dec(ncantons);
end; end;
@@ -823,6 +830,8 @@ begin
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;
@@ -834,8 +843,10 @@ begin
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;
// 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)) ;
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;
@@ -1512,14 +1523,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;
@@ -1529,14 +1540,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;
@@ -1641,22 +1652,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);
@@ -1689,22 +1700,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);
@@ -1735,22 +1746,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);
@@ -1782,22 +1793,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);
@@ -1949,6 +1960,15 @@ begin
repeat repeat
s:=lit_ligne; s:=lit_ligne;
sa:=uppercase(NomFichier_ch)+'=';
i:=pos(sa,s);
if i<>0 then
begin
inc(nv);
delete(s,i,length(sa)); // nom stocké
s:='';
end;
sa:=uppercase(ClFond_ch)+'='; sa:=uppercase(ClFond_ch)+'=';
i:=pos(sa,s); i:=pos(sa,s);
if i<>0 then if i<>0 then
@@ -2484,7 +2504,7 @@ begin
closefile(fichier); closefile(fichier);
renseigne_tous_cantons; renseigne_tous_cantons;
trier_cantons; trier_cantons;
//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);
@@ -2519,6 +2539,7 @@ begin
AssignFile(fichier,nomfichierTCO[i]); AssignFile(fichier,nomfichierTCO[i]);
rewrite(fichier); rewrite(fichier);
Writeln(fichier,'/ Définitions TCO version '+versionSC+sousversion); Writeln(fichier,'/ Définitions TCO version '+versionSC+sousversion);
writeln(fichier,NomFichier_ch+'=',NomFichierTCO[i]);
writeln(fichier,ZoomInit_ch+'=',ZoomInit[i]); writeln(fichier,ZoomInit_ch+'=',ZoomInit[i]);
writeln(fichier,XYInit_ch+'=',XInit[i],',',Yinit[i]); writeln(fichier,XYInit_ch+'=',XInit[i],',',Yinit[i]);
Writeln(fichier,clFond_ch+'='+IntToHex(clfond[i],6)); Writeln(fichier,clFond_ch+'='+IntToHex(clfond[i],6));
@@ -6375,8 +6396,13 @@ begin
position1:=aiguillage[index1].position; position1:=aiguillage[index1].position;
sHG:=TCO[indexTCO,x,y].suivHG;tHG:=TCO[indexTCO,x,y].typHG; sHG:=TCO[indexTCO,x,y].suivHG;tHG:=TCO[indexTCO,x,y].typHG;
sBD:=TCO[indexTCO,x,y].suivBD;tBD:=TCO[indexTCO,x,y].typBD; sBD:=TCO[indexTCO,x,y].suivBD;tBD:=TCO[indexTCO,x,y].typBD;
canvas.pen.color:=clfond[indexTCO];
canvas.pen.Width:=epaisseur div 2; with canvas do
begin
pen.color:=fond;
Brush.Color:=fond;
pen.Width:=epaisseur div 2;
end;
if etatTJD=4 then if etatTJD=4 then
begin begin
adr2:=aiguillage[index1].DDevie; // homologue adr2:=aiguillage[index1].DDevie; // homologue
@@ -6481,6 +6507,8 @@ var pont,yp,x1,y1,x2,y2,x3,y3,x4,y4,x0,y0,xc,yc,xf,yf,trajet,ep,position1,positi
end; end;
end; end;
// si dessin=1 dessine en épaisseur de voie
// si dessin=2 dessine en épaisseur de trajet
procedure TJDbas(dessin :integer); // morceau courbe bas procedure TJDbas(dessin :integer); // morceau courbe bas
begin begin
x1:=x0-LargeurCell[indexTCO]-(LargeurCell[indexTCO] div 3);y1:=yc; x1:=x0-LargeurCell[indexTCO]-(LargeurCell[indexTCO] div 3);y1:=yc;
@@ -6547,6 +6575,7 @@ begin
Brush.Color:=clvoies[indexTCO]; Brush.Color:=clvoies[indexTCO];
pen.color:=clvoies[indexTCO]; pen.color:=clvoies[indexTCO];
pen.width:=epaisseur; pen.width:=epaisseur;
diagonale; diagonale;
@@ -6651,14 +6680,19 @@ begin
position1:=aiguillage[index1].position; position1:=aiguillage[index1].position;
sHG:=TCO[indexTCO,x,y].suivHG;tHG:=TCO[indexTCO,x,y].typHG; sHG:=TCO[indexTCO,x,y].suivHG;tHG:=TCO[indexTCO,x,y].typHG;
sBD:=TCO[indexTCO,x,y].suivBD;tBD:=TCO[indexTCO,x,y].typBD; sBD:=TCO[indexTCO,x,y].suivBD;tBD:=TCO[indexTCO,x,y].typBD;
canvas.pen.color:=clfond[indexTCO]; //canvas.pen.color:=clfond[indexTCO];
canvas.pen.Width:=epaisseur div 2; with canvas do
begin
pen.color:=fond;
Brush.Color:=fond;
pen.Width:=epaisseur div 2;
end;
if etatTJD=4 then if etatTJD=4 then
begin begin
adr2:=aiguillage[index1].DDevie; // homologue adr2:=aiguillage[index1].DDevie; // homologue
Index2:=Index_aig(adr2); Index2:=Index_aig(adr2);
position2:=aiguillage[index2].position; position2:=aiguillage[index2].position;
// canvas.pen.color:=clBlack;
if (position1=const_devie) and (position2=const_devie) then if (position1=const_devie) and (position2=const_devie) then
begin begin
with canvas do begin with canvas do begin
@@ -6939,8 +6973,15 @@ begin
position1:=aiguillage[index1].position; position1:=aiguillage[index1].position;
sHG:=TCO[indexTCO,x,y].suivHG;tHG:=TCO[indexTCO,x,y].typHG; sHG:=TCO[indexTCO,x,y].suivHG;tHG:=TCO[indexTCO,x,y].typHG;
sBD:=TCO[indexTCO,x,y].suivBD;tBD:=TCO[indexTCO,x,y].typBD; sBD:=TCO[indexTCO,x,y].suivBD;tBD:=TCO[indexTCO,x,y].typBD;
canvas.pen.color:=clfond[indexTCO];; //canvas.pen.color:=clfond[indexTCO];;
canvas.pen.Width:=epaisseur div 2; //canvas.
with canvas do
begin
pen.color:=fond;
Brush.Color:=fond;
pen.Width:=epaisseur div 2;
end;
if etatTJD=4 then if etatTJD=4 then
begin begin
adr2:=aiguillage[index1].DDevie; // homologue adr2:=aiguillage[index1].DDevie; // homologue
@@ -7512,8 +7553,14 @@ begin
position1:=aiguillage[index1].position; position1:=aiguillage[index1].position;
sHG:=TCO[indexTCO,x,y].suivHG;tHG:=TCO[indexTCO,x,y].typHG; sHG:=TCO[indexTCO,x,y].suivHG;tHG:=TCO[indexTCO,x,y].typHG;
sBD:=TCO[indexTCO,x,y].suivBD;tBD:=TCO[indexTCO,x,y].typBD; sBD:=TCO[indexTCO,x,y].suivBD;tBD:=TCO[indexTCO,x,y].typBD;
canvas.pen.color:=clfond[indexTCO]; //canvas.pen.color:=clfond[indexTCO];
canvas.pen.Width:=epaisseur div 2; //canvas.pen.Width:=epaisseur div 2;
with canvas do
begin
pen.color:=fond;
Brush.Color:=fond;
pen.Width:=epaisseur div 2;
end;
if etatTJD=4 then if etatTJD=4 then
begin begin
adr2:=aiguillage[index1].DDevie; // homologue adr2:=aiguillage[index1].DDevie; // homologue
@@ -10240,6 +10287,7 @@ begin
if s<>'' then if s<>'' then
begin begin
font.Size:=round(RedFonte*((Larg*10) div 30)+1); //((LargCell*5) div 29); font.Size:=round(RedFonte*((Larg*10) div 30)+1); //((LargCell*5) div 29);
Brush.Color:=coul; Brush.Color:=coul;
dy:=TextWidth(s) div 2; dy:=TextWidth(s) div 2;
dx:=TextHeight(s) div 2; dx:=TextHeight(s) div 2;
@@ -10298,11 +10346,12 @@ begin
s:=canton[i].NomTrain; s:=canton[i].NomTrain;
l:=TextWidth(s); l:=TextWidth(s);
Brush.Color:=coul; Brush.Color:=coul;
if l<dy-yt then //if l<dy-yt then
if yt+l<yf then
{$IF CompilerVersion >= 28.0} {$IF CompilerVersion >= 28.0}
begin begin
font.orientation:=900; font.orientation:=-900;
Textout(xi,yi,s); Textout(xt,yt,s);
end; end;
{$ELSE} {$ELSE}
AffTexteIncliBordeTexture(PCanvasTCO[indexTCO],xt,yt, AffTexteIncliBordeTexture(PCanvasTCO[indexTCO],xt,yt,
@@ -10416,6 +10465,7 @@ end;
procedure dessin_canton(indexTCO : integer;Canvas : Tcanvas;x,y,mode : integer); overload; procedure dessin_canton(indexTCO : integer;Canvas : Tcanvas;x,y,mode : integer); overload;
begin begin
if PcanvasTCO[indexTCO]=nil then exit; if PcanvasTCO[indexTCO]=nil then exit;
origine_canton(indexTCO,x,y); // revenir au point d'origine du canton
if isCantonV(indexTCO,x,y) then if isCantonV(indexTCO,x,y) then
begin begin
dessin_cantonV(indexTCO,Canvas,x,y,mode); dessin_cantonV(indexTCO,Canvas,x,y,mode);
@@ -11163,8 +11213,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;
@@ -11325,10 +11375,11 @@ begin
end; end;
end; end;
procedure origine_canton(var x,y : integer); // renvoie les coordonnées X Y d'origine du canton de la cellule x,y du TCO idt du canton
procedure origine_canton(idt : integer;var x,y : integer);
var Bimage : integer; var Bimage : integer;
begin begin
Bimage:=tco[indexTCOCourant,x,y].BImage; Bimage:=tco[idt,x,y].BImage;
if isCantonH(Bimage) then if isCantonH(Bimage) then
begin begin
x:=x-(Bimage-Id_cantonH); // revenir à la coordonnée X du début du canton x:=x-(Bimage-Id_cantonH); // revenir à la coordonnée X du début du canton
@@ -11383,7 +11434,6 @@ begin
// dessin du train sur le canton // dessin du train sur le canton
if (Bimage=Id_CantonH) or (Bimage=Id_CantonV) then dessin_canton(indexTCO,PCanvasTCO[indexTCO],x,y,0); if (Bimage=Id_CantonH) or (Bimage=Id_CantonV) then dessin_canton(indexTCO,PCanvasTCO[indexTCO],x,y,0);
if LargCell>24 then if LargCell>24 then
begin begin
with PCanvasTCO[indexTCO] do with PCanvasTCO[indexTCO] do
@@ -11431,16 +11481,44 @@ begin
//Brush.Style:=Bsclear; //Brush.Style:=Bsclear;
xt:=0;yt:=0; xt:=0;yt:=0;
if Bimage=2 then begin xt:=LargeurCell[indexTCO] div 2;yt:=1;end; if Bimage=2 then begin xt:=round(14*frxGlob[indexTCO]);yt:=1;end;
if Bimage=3 then begin xt:=3;yt:=hauteurCell[indexTCO]-round(18*fryGlob[indexTCO]);end; if Bimage=3 then begin xt:=round(14*frxGlob[indexTCO]);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:=round(14*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:=round(14*frxGlob[indexTCO]);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*frxGlob[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
if Bimage=21 then begin xt:=-round(5*frxGlob[indexTCO]);yt:=0;end; begin
if Bimage=22 then begin xt:=(LargeurCell[indexTCO] div 2);yt:=-2;end; if (repr=3) then // texte bas
begin
xt:=round(25*frxGlob[indexTCO]);yt:=round(37*fryGlob[indexTCO]);
end
else
begin
xt:=3;yt:=1;
end;
end;
if Bimage=21 then
begin
if (repr=3) then // texte bas
begin
xt:=round(24*frxGlob[indexTCO]);yt:=round(36*fryGlob[indexTCO]);
end else
begin
xt:=-round(5*frxGlob[indexTCO]);yt:=0;
end;
end;
if Bimage=22 then
begin
if (repr=3) then
begin
xt:=-5;yt:=round(38*fryGlob[indexTCO]) // texte bas
end else
begin
xt:=(LargeurCell[indexTCO] div 2);yt:=-2; // texte haut
end;
end;
if Bimage=23 then begin xt:=round(33*frxGlob[indexTCO]);yt:=round(35*fryGlob[indexTCO]);end; if Bimage=23 then begin xt:=round(33*frxGlob[indexTCO]);yt:=round(35*fryGlob[indexTCO]);end;
if Bimage=24 then begin xt:=LargeurCell[indexTCO]-round(20*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO]-round(15*fryGlob[indexTCO]);end; if Bimage=24 then begin xt:=LargeurCell[indexTCO]-round(20*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO]-round(15*fryGlob[indexTCO]);end;
if Bimage=25 then begin xt:=round(34*frxGlob[indexTCO]);yt:=round(8*fryGlob[indexTCO]);end; if Bimage=25 then begin xt:=round(34*frxGlob[indexTCO]);yt:=round(8*fryGlob[indexTCO]);end;
@@ -11688,13 +11766,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;
@@ -11967,6 +12045,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
@@ -12067,7 +12146,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;
@@ -12157,7 +12236,7 @@ procedure Erreur_TCO(indexTCO,x,y : integer);
var s : string; var s : string;
i,adresse : integer; i,adresse : integer;
begin begin
s:='Erreur 92 TCO - Cellule '+intToSTR(x)+','+intToSTR(y)+' '; s:='Erreur 92 TCO '+intToSTR(indexTCO)+' - Cellule '+intToSTR(x)+','+intToSTR(y)+' ';
adresse:=tco[indextco,x,y].Adresse; adresse:=tco[indextco,x,y].Adresse;
i:=index_aig(adresse); i:=index_aig(adresse);
if i=0 then s:=s+'aiguillage '+intToSTR(adresse)+' inconnu'; if i=0 then s:=s+'aiguillage '+intToSTR(adresse)+' inconnu';
@@ -12231,13 +12310,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); DernierDet : integer;
var i,sx,sy,x,y,ax,ay,Bimage,adresse,IdCanton,IdTrain,AncTrain, TypePrec: tEquipement;
DernierDet,sens : integer;
cant : boolean; cant : boolean;
begin begin
// et affichage de la route // et affichage de la route
@@ -12273,7 +12352,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;
@@ -12289,6 +12383,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
@@ -12308,8 +12403,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;
@@ -12412,10 +12507,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;
@@ -12814,7 +12908,7 @@ var i,ir,adresse,But,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iter
Index_TjdHom:=index_aig(TjdHom); // Index de la TJD homologue Index_TjdHom:=index_aig(TjdHom); // Index de la TJD homologue
position2:=aiguillage[Index_TjdHom].position; // position de la TJD homologue position2:=aiguillage[Index_TjdHom].position; // position de la TJD homologue
tjd4(adresse,position,TjdHom,position2,c1,c2); // retourne c1 et C2 tjd4(position,position2,c1,c2); // retourne c1 et C2
if (ancienY<y) and (ancienX>x) then // on vient du NE if (ancienY<y) and (ancienX>x) then // on vient du NE
begin begin
if c1=c2 then // si on traverse la TJD if c1=c2 then // si on traverse la TJD
@@ -13018,7 +13112,7 @@ var i,ir,adresse,But,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iter
TjdHom:=aiguillage[index].Ddevie; TjdHom:=aiguillage[index].Ddevie;
Index_TjdHom:=index_aig(TjdHom); Index_TjdHom:=index_aig(TjdHom);
position2:=aiguillage[Index_TjdHom].position; position2:=aiguillage[Index_TjdHom].position;
tjd4(adresse,position,TjdHom,position2,c1,c2); // retourne c1 et C2 tjd4(position,position2,c1,c2); // retourne c1 et C2
if (ancienY<y) and (ancienX<x) then // on vient du NO if (ancienY<y) and (ancienX<x) then // on vient du NO
begin begin
if c1=c2 then // si on traverse la TJD if c1=c2 then // si on traverse la TJD
@@ -13224,7 +13318,7 @@ var i,ir,adresse,But,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iter
TjdHom:=aiguillage[index].Ddevie; TjdHom:=aiguillage[index].Ddevie;
Index_TjdHom:=index_aig(TjdHom); Index_TjdHom:=index_aig(TjdHom);
position2:=aiguillage[Index_TjdHom].position; position2:=aiguillage[Index_TjdHom].position;
tjd4(adresse,position,TjdHom,position2,c1,c2); // retourne c1 et C2 tjd4(position,position2,c1,c2); // retourne c1 et C2
if (ancienY<y) and (ancienX>x) then // on vient du NE if (ancienY<y) and (ancienX>x) then // on vient du NE
begin begin
if c1=c2 then // si on traverse la TJD if c1=c2 then // si on traverse la TJD
@@ -13452,7 +13546,7 @@ var i,ir,adresse,But,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iter
TjdHom:=aiguillage[index].Ddevie; TjdHom:=aiguillage[index].Ddevie;
Index_TjdHom:=index_aig(TjdHom); Index_TjdHom:=index_aig(TjdHom);
position2:=aiguillage[Index_TjdHom].position; position2:=aiguillage[Index_TjdHom].position;
tjd4(adresse,position,TjdHom,position2,c1,c2); // retourne c1 et C2 tjd4(position,position2,c1,c2); // retourne c1 et C2
if (ancienY<y) and (ancienX<x) then // on vient du NO if (ancienY<y) and (ancienX<x) then // on vient du NO
begin begin
if c1=c2 then // si on traverse la TJD if c1=c2 then // si on traverse la TJD
@@ -13814,6 +13908,7 @@ begin
Direction:=det2; Direction:=det2;
end; end;
i:=0; // itérations
repeat // boucle de test de direction repeat // boucle de test de direction
sortir:=false; sortir:=false;
if mode<=10 then if mode<=10 then
@@ -13844,7 +13939,7 @@ begin
xn:=x;yn:=y; xn:=x;yn:=y;
ir:=1; // index de la route du tco ir:=1; // index de la route du tco
i:=0; // itérations
if debugTCO then afficheDebug('Direction '+intToSTR(direction),clOrange); if debugTCO then afficheDebug('Direction '+intToSTR(direction),clOrange);
// initialiser les points d'où l'on vient // initialiser les points d'où l'on vient
@@ -13956,7 +14051,7 @@ begin
if (i>NbCellulesTCO[indexTCO]) then AfficheDebug('Erreur 1000 TCO'+intToSTR(indexTCO)+' : dépassement d''itérations - Route de '+IntToSTR(det1)+' à '+IntToSTR(det2),clred); if (i>NbCellulesTCO[indexTCO]) then AfficheDebug('Erreur 1000 TCO'+intToSTR(indexTCO)+' : dépassement d''itérations - Route de '+IntToSTR(det1)+' à '+IntToSTR(det2),clred);
inc(direction) inc(direction)
until ((direction=5) and (mode<=10)) or ((direction=9) and (mode>=11)) or memtrouve ; until ((direction=5) and (mode<=10)) or ((direction=9) and (mode>=11)) or memtrouve or (i>NbCellulesTCO[indexTCO]) ;
if memTrouve then if memTrouve then
begin begin
@@ -13978,7 +14073,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;
@@ -13987,17 +14082,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;
@@ -14563,7 +14656,7 @@ begin
if isCantonH(tco[indexTCO,colonne,y].BImage) then if isCantonH(tco[indexTCO,colonne,y].BImage) then
begin begin
yc:=y;xc:=colonne; yc:=y;xc:=colonne;
origine_canton(xc,yc); origine_canton(indexTCO,xc,yc);
n:=tco[indexTCO,xc,yc].NumCanton; n:=tco[indexTCO,xc,yc].NumCanton;
if n<>0 then if n<>0 then
begin begin
@@ -14661,7 +14754,7 @@ begin
if isCantonV(tco[indexTCO,x,ligne].BImage) then if isCantonV(tco[indexTCO,x,ligne].BImage) then
begin begin
xc:=x;yc:=ligne; xc:=x;yc:=ligne;
origine_canton(xc,yc); origine_canton(indexTCO,xc,yc);
n:=tco[indexTCO,xc,yc].NumCanton; n:=tco[indexTCO,xc,yc].NumCanton;
if n<>0 then if n<>0 then
begin begin
@@ -14792,7 +14885,7 @@ begin
begin begin
//Affiche('xy='+IntToSTR(x)+','+intToSTR(y)+' Bimage='+intToSTR(Bimage),clYellow); //Affiche('xy='+IntToSTR(x)+','+intToSTR(y)+' Bimage='+intToSTR(Bimage),clYellow);
Xcanton:=x;Ycanton:=y; Xcanton:=x;Ycanton:=y;
origine_canton(Xcanton,Ycanton); origine_canton(indexTCO,Xcanton,Ycanton);
if xcanton=0 then // cas d'un canton supprimé if xcanton=0 then // cas d'un canton supprimé
begin begin
// reconstituer le canton // reconstituer le canton
@@ -15451,7 +15544,7 @@ end;
procedure end_Drag(icone,x,y : integer;Sender, Target: TObject); procedure end_Drag(icone,x,y : integer;Sender, Target: TObject);
var s : string; var s : string;
indexTCO,i,xclic,Yclic,bim,nc,maxi,libre : integer; indexTCO,i,xclic,Yclic,bim : integer;
begin begin
if not(Target is TImage) then exit; if not(Target is TImage) then exit;
s:=(Target as TImage).Name; s:=(Target as TImage).Name;
@@ -17440,7 +17533,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
@@ -17865,7 +17958,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);
@@ -17977,17 +18070,16 @@ begin
AdrPilote:=adresse; AdrPilote:=adresse;
i:=Index_Signal(adresse); i:=Index_Signal(adresse);
if i=0 then begin doubleclic:=false;exit;end; if i=0 then begin doubleclic:=false;exit;end;
Signaux[0].EtatSignal:=Signaux[i].EtatSignal;
with formPilote do with formPilote do
begin begin
show;
ImagePilote.Parent:=FormPilote; ImagePilote.Parent:=FormPilote;
ImagePilote.Picture.Bitmap.TransparentMode:=tmAuto; ImagePilote.Picture.Bitmap.TransparentMode:=tmAuto;
ImagePilote.Picture.Bitmap.TransparentColor:=clblue; ImagePilote.Picture.Bitmap.TransparentColor:=clblue;
ImagePilote.Transparent:=true; ImagePilote.Transparent:=true;
ImagePilote.Picture.BitMap:=Signaux[i].Img.Picture.Bitmap;
LabelTitrePilote.Caption:='Pilotage du signal '+intToSTR(Adresse); LabelTitrePilote.Caption:='Pilotage du signal '+intToSTR(Adresse);
Signaux[0].EtatSignal:=Signaux[i].EtatSignal;
LabelNbFeux.Visible:=False; LabelNbFeux.Visible:=False;
EditNbreFeux.Visible:=false; EditNbreFeux.Visible:=false;
@@ -18011,6 +18103,7 @@ begin
GroupBox1.Visible:=true; GroupBox1.Visible:=true;
if (Signaux[i].aspect<20) then GroupBox2.Visible:=true else GroupBox2.Visible:=false; if (Signaux[i].aspect<20) then GroupBox2.Visible:=true else GroupBox2.Visible:=false;
end; end;
show;
end; end;
end; end;
//clicsouris:=false; //clicsouris:=false;
@@ -18255,7 +18348,7 @@ begin
begin begin
FontDialog1.Font.Name:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].Fonte; FontDialog1.Font.Name:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].Fonte;
FontDialog1.Font.Color:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].CoulFonte; FontDialog1.Font.Color:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].CoulFonte;
FontDialog1.Font.Size:=round(RedFonte*tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].taillefonte); FontDialog1.Font.Size:=round(tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].taillefonte);
fs:=[]; fs:=[];
s:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].FontStyle; s:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].FontStyle;
@@ -18606,7 +18699,7 @@ begin
if isCantonV(tco[indexTCO,x,ligne_supprime].BImage) then if isCantonV(tco[indexTCO,x,ligne_supprime].BImage) then
begin begin
xc:=x;yc:=ligne_Supprime; xc:=x;yc:=ligne_Supprime;
origine_canton(xc,yc); origine_canton(indexTCO,xc,yc);
n:=tco[indexTCO,xc,yc].NumCanton; n:=tco[indexTCO,xc,yc].NumCanton;
if n<>0 then if n<>0 then
begin begin
@@ -18727,7 +18820,7 @@ begin
if isCantonH(tco[indexTCO,colonne_supprime,y].BImage) then if isCantonH(tco[indexTCO,colonne_supprime,y].BImage) then
begin begin
yc:=y;xc:=colonne_Supprime; yc:=y;xc:=colonne_Supprime;
origine_canton(xc,yc); origine_canton(indexTCO,xc,yc);
n:=tco[indexTCO,xc,yc].NumCanton; n:=tco[indexTCO,xc,yc].NumCanton;
if n<>0 then if n<>0 then
begin begin
@@ -19017,6 +19110,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);
@@ -19283,11 +19378,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;
@@ -19302,6 +19395,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;
@@ -19596,7 +19694,7 @@ begin
y:=YClicCell[indexTCOCourant]; y:=YClicCell[indexTCOCourant];
if isCanton(TCO[indexTcoCourant,x,y].BImage) then if isCanton(TCO[indexTcoCourant,x,y].BImage) then
begin begin
origine_canton(x,y); origine_canton(indexTCOcourant,x,y);
if (x<>0) and (y<>0) then if (x<>0) and (y<>0) then
begin begin
idc:=Index_Canton_numero(tco[indexTCOcourant,x,y].NumCanton); //index canton idc:=Index_Canton_numero(tco[indexTCOcourant,x,y].NumCanton); //index canton
@@ -19608,10 +19706,6 @@ begin
end; end;
procedure TFormTCO.Optiondesroutes1Click(Sender: TObject); procedure TFormTCO.Optiondesroutes1Click(Sender: TObject);
var GMode,l2,h2 : integer;
XFormScale,XFormRot,XFormOld,XFormXLat,xform : TXForm;
angle,Zoom : single;
recta : trect;
begin begin
formRoute.Show; formRoute.Show;
{ angle:=5; { angle:=5;
@@ -19738,6 +19832,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 du TCO avant de supprimer le TCO
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.
+5 -4
View File
@@ -15,7 +15,7 @@
// The Original Code is Vcl.Styles.Ext.pas. // The Original Code is Vcl.Styles.Ext.pas.
// //
// The Initial Developer of the Original Code is Rodrigo Ruz V. // The Initial Developer of the Original Code is Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2023 Rodrigo Ruz V. // Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2025 Rodrigo Ruz V.
// All Rights Reserved. // All Rights Reserved.
// //
// ************************************************************************************************** // **************************************************************************************************
@@ -97,11 +97,12 @@ type
end; end;
{$REGION 'Documentation'} {$REGION 'Documentation'}
/// <summary>Helper class for the TStyleManager /// <summary>
/// Helper class for the TStyleManager
/// Vcl.Themes.TStyleManagerHelper in RAD Studio 11 prevents activate this class helper.
/// </summary> /// </summary>
{$ENDREGION} {$ENDREGION}
TStyleManagerHelper = class Helper for TStyleManager
TStyleManagerHelper = Class Helper for TStyleManager
strict private strict private
class function GetStyleSourceInfo(const StyleName: string): TSourceInfo; static; class function GetStyleSourceInfo(const StyleName: string): TSourceInfo; static;
class function GetStyles: TList<TCustomStyleServices>; class function GetStyles: TList<TCustomStyleServices>;
+1 -1
View File
@@ -15,7 +15,7 @@
// The Original Code is Vcl.Styles.Utils.Graphics.pas. // The Original Code is Vcl.Styles.Utils.Graphics.pas.
// //
// The Initial Developer of the Original Code is Rodrigo Ruz V. // The Initial Developer of the Original Code is Rodrigo Ruz V.
// Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2023 Rodrigo Ruz V. // Portions created by Rodrigo Ruz V. are Copyright (C) 2012-2025 Rodrigo Ruz V.
// All Rights Reserved. // All Rights Reserved.
// //
// ************************************************************************************************** // **************************************************************************************************
+1 -1
View File
@@ -14,7 +14,7 @@
// //
// The Original Code is Vcl.Styles.Utils.Misc.pas. // The Original Code is Vcl.Styles.Utils.Misc.pas.
// //
// Portions created by Rodrigo Ruz V. are Copyright (C) 2013-2023 Rodrigo Ruz V. // Portions created by Rodrigo Ruz V. are Copyright (C) 2013-2025 Rodrigo Ruz V.
// All Rights Reserved. // All Rights Reserved.
// //
// ************************************************************************************************** // **************************************************************************************************
-1902
View File
File diff suppressed because it is too large. Load diff
+11 -4
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;
@@ -589,6 +590,7 @@ begin
if IdCantonSelect=0 then IdCantonSelect:=AncienIdCantonSelect; if IdCantonSelect=0 then IdCantonSelect:=AncienIdCantonSelect;
if affevt then Affiche('FormSelTrain.StringGridTrainsSelectCell col='+intToSTR(ACol)+' lig='+intToSTR(ARow),clYellow); if affevt then Affiche('FormSelTrain.StringGridTrainsSelectCell col='+intToSTR(ACol)+' lig='+intToSTR(ARow),clYellow);
if (Arow>nTrains) or (IdCantonSelect<1) then exit; if (Arow>nTrains) or (IdCantonSelect<1) then exit;
faire:=false; faire:=false;
//------------change la sélection du train //------------change la sélection du train
if (Arow>=1) and (ACol<=5) then if (Arow>=1) and (ACol<=5) then
@@ -606,7 +608,9 @@ begin
idAutrecanton:=index_canton_numero(autreCanton); idAutrecanton:=index_canton_numero(autreCanton);
if (IdAutrecanton<>0) and (IdAutreCanton<>IdCantonSelect) then if (IdAutrecanton<>0) and (IdAutreCanton<>IdCantonSelect) then
begin begin
LabelInfo.caption:='Le train '+intToSTR(IndexTrainClic)+' '+trains[IndexTrainClic].nom_train+' est affecté au canton '+intToSTR(AutreCanton); s:='Le train '+intToSTR(IndexTrainClic)+' '+trains[IndexTrainClic].nom_train+' est affecté au canton '+intToSTR(AutreCanton);
LabelInfo.caption:=s;
StringGridTrains.hint:='Affectation impossible,'+#13+s;
exit; exit;
end; end;
@@ -621,6 +625,7 @@ begin
supprime_route_train(indextrainclic); supprime_route_train(indextrainclic);
StringGridTrains.cells[7,ARow]:=''; StringGridTrains.cells[7,ARow]:='';
end; end;
if faire then if faire then
@@ -656,7 +661,9 @@ begin
if (canton[IdCantonSelect].sensCirc<>0) then sensLoco:=canton[IdCantonSelect].sensCirc ; if (canton[IdCantonSelect].sensCirc<>0) then sensLoco:=canton[IdCantonSelect].sensCirc ;
affecte_Train_canton(trains[indexTrainClic].adresse,IdCantonSelect,sensLoco); // le train affecté contient la route du train razé affecte_Train_canton(trains[indexTrainClic].adresse,IdCantonSelect,sensLoco); // le train affecté contient la route du train razé
LabelInfo.caption:='Affectation du train '+intToSTR(IndexTrainClic)+' '+trains[indexTrainClic].nom_train+' au canton '+intToSTR(canton[idcantonSelect].numero); s:='Affectation du train '+intToSTR(IndexTrainClic)+' '+trains[indexTrainClic].nom_train+' au canton '+intToSTR(canton[idcantonSelect].numero);
LabelInfo.caption:=s;
StringGridTrains.hint:=s;
maj_signaux(false); maj_signaux(false);
end; end;
end; end;
+19 -5
View File
@@ -26,7 +26,7 @@ var
f : textFile; f : textFile;
Const Const
VersionSC = '10.7'; // sert à la comparaison de la version publiée VersionSC = '10.9'; // 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;
@@ -82,7 +82,7 @@ var
begin begin
Result:=False; Result:=False;
t:=0; t:=0;
// l'utilisation de TfileStream.Create inplique que le répertoire de destination soit libre de droits // l'utilisation de TfileStream.Create implique que le répertoire de destination soit libre de droits
Try Fs:=TFileStream.Create(s,fmCreate); Try Fs:=TFileStream.Create(s,fmCreate);
//hSession := InternetOpen('MyApp', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0); //hSession := InternetOpen('MyApp', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
if DebugVV then Affiche('TFileStream.Create ok',clLime); if DebugVV then Affiche('TFileStream.Create ok',clLime);
@@ -353,7 +353,7 @@ begin
// URL de l'API github des dernières releases // URL de l'API github des dernières releases
Url:='https://api.github.com/repos/f1iwq2/signaux_complexes_gl/releases/latest'; Url:='https://api.github.com/repos/f1iwq2/signaux_complexes_gl/releases/latest';
// l'utilisation de TfileStream.Create inplique que le répertoire de destination soit libre de droits, // l'utilisation de TfileStream.Create implique que le répertoire de destination soit libre de droits,
// ce qui ne marche pas pour c:\program files (x64)\signaux_complexes. // ce qui ne marche pas pour c:\program files (x64)\signaux_complexes.
// Le fichier page.txt est donc mis dans C:\Users\moi\AppData\Roaming\signaux_complexes qui lui a tous les droits // Le fichier page.txt est donc mis dans C:\Users\moi\AppData\Roaming\signaux_complexes qui lui a tous les droits
// fabrication du nom de fichier destinataire et son chemin // fabrication du nom de fichier destinataire et son chemin
@@ -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);
if i<>0 then
begin
repeat repeat
dec(i); dec(i);
locZip:=s3[i]='/'; locZip:=s3[i]='/';
until (i=1) or LocZip; until (i=1) or LocZip;
nomfichier:=copy(s3,i+1,length(s3)-i); 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
@@ -545,7 +559,7 @@ begin
formprinc.FenRich.SelStart:=length(formprinc.FenRich.Text); formprinc.FenRich.SelStart:=length(formprinc.FenRich.Text);
formprinc.FenRich.SelAttributes.Style:=[fsUnderline]; formprinc.FenRich.SelAttributes.Style:=[fsUnderline];
Affiche('https://github.com/f1iwq2/Signaux_complexes_GL/releases',clAqua); Affiche('https://github.com/f1iwq2/Signaux_complexes_GL/releases',clAqua);
Affiche('ne comprend aucune version diffusée.',clOrange); Affiche('ne comprend actuellement aucune version diffusée.',clOrange);
end; end;
end end
else else
+39
View File
@@ -341,6 +341,45 @@ version 10.6 : Modification pour l'affichage de la barre de zoom du TCO pour les
version 10.7 : Affichage du compteur de train depuis le menu contextuel des cantons du tco. version 10.7 : Affichage du compteur de train depuis le menu contextuel des cantons du tco.
En roulage ou RUN CDM, suppression d'un train non suivi de la liste des trains en roulage. En roulage ou RUN CDM, suppression d'un train non suivi de la liste des trains en roulage.
Correction désaffectation trains sur cantons. Correction désaffectation trains sur cantons.
version 10.71 : Ajout dans les variables des fonctions les mémoires de zone.
Correction bug activation mémoires de zone dans le menu du TCO.
Correction bug affichage des opérations dans les actions.
version 10.72 : Correction bug dans les fonctions.
version 10.73 : Correction bug téléchargement trains depuis CDM.
version 10.74 : Traitement du cas TJD abordée par aiguillage en pointe.
Ajout paramètre de temporisation de commande des signaux.
version 10.75 : Amélioration de l'importation des trains depuis CDM rail.
Correction suppression des signaux.
version 10.76 : Ajout du copier/coller des routes de trains.
Correction du bug de la 10.74 sur le pilotage des signaux.
version 10.77 : Amélioration diverses.
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.
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.
version 10.81 : Prise en compte des nouveaux champs d'exportation de CDM pour l'importation du réseau.
version 10.82 : Ajout d'une barre de zoom pour la fenetre des signaux.
Ajout commande fonctions F trains pour la télécommande par serveur
Corrections diverses
version 10.9 : Possibilité de déclarer des feux verts/rouge pour les signaux à deux feux.
Création d'un bouton de propagation du changement d'adresse d'un signal
Création d'un bouton de propagation du changement d'adresse d'un détecteur
Création d'une condition "détecteur/actionneur" dans les actions
version 10.91 Possibilité d'ajouter plusieurs conditions dans les actions
Une action ne peuvent être lancée que si la même action précédente est terminée