V9.3
This commit is contained in:
BIN
Binary file not shown.
@@ -14,8 +14,8 @@
|
|||||||
-$N+
|
-$N+
|
||||||
-$O-
|
-$O-
|
||||||
-$P-
|
-$P-
|
||||||
-$Q+
|
-$Q-
|
||||||
-$R+
|
-$R-
|
||||||
-$S-
|
-$S-
|
||||||
-$T-
|
-$T-
|
||||||
-$U-
|
-$U-
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ M=0
|
|||||||
N=1
|
N=1
|
||||||
O=0
|
O=0
|
||||||
P=0
|
P=0
|
||||||
Q=1
|
Q=0
|
||||||
R=1
|
R=0
|
||||||
S=0
|
S=0
|
||||||
T=0
|
T=0
|
||||||
U=0
|
U=0
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ uses
|
|||||||
selection_train in 'selection_train.pas' {FormSelTrain},
|
selection_train in 'selection_train.pas' {FormSelTrain},
|
||||||
UnitRoute in 'UnitRoute.pas' {FormRoute},
|
UnitRoute in 'UnitRoute.pas' {FormRoute},
|
||||||
UnitRouteTrains in 'UnitRouteTrains.pas' {FormRouteTrain},
|
UnitRouteTrains in 'UnitRouteTrains.pas' {FormRouteTrain},
|
||||||
UnitInfo in 'UnitInfo.pas' {FormInfo};
|
UnitInfo in 'UnitInfo.pas' {FormInfo},
|
||||||
|
UnitIntro in 'UnitIntro.pas' {FormIntro};
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
@@ -54,6 +55,7 @@ begin
|
|||||||
Application.CreateForm(TFormRoute, FormRoute);
|
Application.CreateForm(TFormRoute, FormRoute);
|
||||||
Application.CreateForm(TFormRouteTrain, FormRouteTrain);
|
Application.CreateForm(TFormRouteTrain, FormRouteTrain);
|
||||||
Application.CreateForm(TFormInfo, FormInfo);
|
Application.CreateForm(TFormInfo, FormInfo);
|
||||||
|
Application.CreateForm(TFormIntro, FormIntro);
|
||||||
fin_preliminaire;
|
fin_preliminaire;
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
|
|||||||
+72
-67
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
Start Length Name Class
|
Start Length Name Class
|
||||||
0001:00000000 001F241CH .text CODE
|
0001:00000000 001FAE24H .text CODE
|
||||||
0002:00000000 00002F18H .data DATA
|
0002:00000000 00002F38H .data DATA
|
||||||
0002:00002F18 06A55901H .bss BSS
|
0002:00002F38 0F197EE5H .bss BSS
|
||||||
|
|
||||||
|
|
||||||
Detailed map of segments
|
Detailed map of segments
|
||||||
@@ -78,38 +78,40 @@ Detailed map of segments
|
|||||||
0001:0009AFA4 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9
|
0001:0009AFA4 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9
|
||||||
0001:0009AFE4 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9
|
0001:0009AFE4 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9
|
||||||
0001:0009B01C 00000038 C=CODE S=.text G=(none) M=DateUtils ACBP=A9
|
0001:0009B01C 00000038 C=CODE S=.text G=(none) M=DateUtils ACBP=A9
|
||||||
0001:0009B054 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9
|
0001:0009B054 00000038 C=CODE S=.text G=(none) M=PsAPI ACBP=A9
|
||||||
0001:0009B940 000005A0 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9
|
0001:0009B08C 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9
|
||||||
0001:0009BEE0 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9
|
0001:0009B978 00000598 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9
|
||||||
0001:0009C8F8 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9
|
0001:0009BF10 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9
|
||||||
0001:0009EA00 000092A4 C=CODE S=.text G=(none) M=Grids ACBP=A9
|
0001:0009C928 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9
|
||||||
0001:000A7CA4 00001BFC C=CODE S=.text G=(none) M=Spin ACBP=A9
|
0001:0009EA30 000092A4 C=CODE S=.text G=(none) M=Grids ACBP=A9
|
||||||
0001:000A98A0 00003762 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9
|
0001:000A7CD4 00001BFC C=CODE S=.text G=(none) M=Spin ACBP=A9
|
||||||
0001:000AD004 0000057C C=CODE S=.text G=(none) M=Importation ACBP=A9
|
0001:000A98D0 00003762 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9
|
||||||
0001:000AD580 000196A8 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
|
0001:000AD034 0000057C C=CODE S=.text G=(none) M=Importation ACBP=A9
|
||||||
0001:000C6C28 00002E3F C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
|
0001:000AD5B0 000196A8 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
|
||||||
0001:000C9A68 00000D84 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
|
0001:000C6C58 00002E8B C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
|
||||||
0001:000CA7EC 000011F4 C=CODE S=.text G=(none) M=UnitFicheHoraire ACBP=A9
|
0001:000C9AE4 00000EB0 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
|
||||||
0001:000CB9E0 00000038 C=CODE S=.text G=(none) M=ShellConsts ACBP=A9
|
0001:000CA994 00001070 C=CODE S=.text G=(none) M=UnitFicheHoraire ACBP=A9
|
||||||
0001:000CBA18 000004E0 C=CODE S=.text G=(none) M=ShellCtrls ACBP=A9
|
0001:000CBA04 00000038 C=CODE S=.text G=(none) M=ShellConsts ACBP=A9
|
||||||
0001:000CBEF8 00001A20 C=CODE S=.text G=(none) M=UnitRoute ACBP=A9
|
0001:000CBA3C 000004E0 C=CODE S=.text G=(none) M=ShellCtrls ACBP=A9
|
||||||
0001:000CD918 00002A44 C=CODE S=.text G=(none) M=UnitRouteTrains ACBP=A9
|
0001:000CBF1C 00002D94 C=CODE S=.text G=(none) M=UnitRoute ACBP=A9
|
||||||
0001:000D035C 00000298 C=CODE S=.text G=(none) M=UnitInfo ACBP=A9
|
0001:000CECB0 00002C68 C=CODE S=.text G=(none) M=UnitRouteTrains ACBP=A9
|
||||||
0001:000D05F4 00003300 C=CODE S=.text G=(none) M=selection_train ACBP=A9
|
0001:000D1918 0000028C C=CODE S=.text G=(none) M=UnitInfo ACBP=A9
|
||||||
0001:000D38F4 000067FC C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
|
0001:000D1BA4 00003438 C=CODE S=.text G=(none) M=selection_train ACBP=A9
|
||||||
0001:000DA0F0 00001908 C=CODE S=.text G=(none) M=UnitClock ACBP=A9
|
0001:000D4FDC 00006808 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
|
||||||
0001:000DB9F8 000580FC C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
|
0001:000DB7E4 00001634 C=CODE S=.text G=(none) M=UnitClock ACBP=A9
|
||||||
0001:00133AF4 000039DC C=CODE S=.text G=(none) M=UnitSR ACBP=A9
|
0001:000DCE18 00000274 C=CODE S=.text G=(none) M=UnitIntro ACBP=A9
|
||||||
0001:001374D0 00002BF8 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
|
0001:000DD08C 00059C48 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
|
||||||
0001:0013A0C8 0000899C C=CODE S=.text G=(none) M=UnitModifAction ACBP=A9
|
0001:00136CD4 000039DC C=CODE S=.text G=(none) M=UnitSR ACBP=A9
|
||||||
0001:00142A64 00000F64 C=CODE S=.text G=(none) M=UnitHorloge ACBP=A9
|
0001:0013A6B0 00002BF8 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
|
||||||
0001:001439C8 000025FB C=CODE S=.text G=(none) M=verif_version ACBP=A9
|
0001:0013D2A8 00008C48 C=CODE S=.text G=(none) M=UnitModifAction ACBP=A9
|
||||||
0001:00145FC4 00001190 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
|
0001:00145EF0 00000F84 C=CODE S=.text G=(none) M=UnitHorloge ACBP=A9
|
||||||
0001:00147154 00000F10 C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
|
0001:00146E74 0000261B C=CODE S=.text G=(none) M=verif_version ACBP=A9
|
||||||
0001:00148064 00059854 C=CODE S=.text G=(none) M=Unitprinc ACBP=A9
|
0001:00149490 00001190 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
|
||||||
0001:001A18B8 0004D544 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
|
0001:0014A620 00000F48 C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
|
||||||
0001:001EEDFC 0000305C C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
|
0001:0014B568 0005D258 C=CODE S=.text G=(none) M=Unitprinc ACBP=A9
|
||||||
0001:001F1E58 000005C4 C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9
|
0001:001A87C0 0004F190 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
|
||||||
|
0001:001F7950 00002EE8 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
|
||||||
|
0001:001FA838 000005EC C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9
|
||||||
0002:00000000 000000CC C=DATA S=.data G=DGROUP M=System ACBP=A9
|
0002:00000000 000000CC C=DATA S=.data G=DGROUP M=System ACBP=A9
|
||||||
0002:000000CC 00000020 C=DATA S=.data G=DGROUP M=SysInit ACBP=A9
|
0002:000000CC 00000020 C=DATA S=.data G=DGROUP M=SysInit ACBP=A9
|
||||||
0002:000000EC 00000254 C=DATA S=.data G=DGROUP M=SysUtils ACBP=A9
|
0002:000000EC 00000254 C=DATA S=.data G=DGROUP M=SysUtils ACBP=A9
|
||||||
@@ -214,37 +216,39 @@ Detailed map of segments
|
|||||||
0002:00003E48 00000004 C=BSS S=.bss G=DGROUP M=MMSystem ACBP=A9
|
0002:00003E48 00000004 C=BSS S=.bss G=DGROUP M=MMSystem ACBP=A9
|
||||||
0002:00003E4C 00000004 C=BSS S=.bss G=DGROUP M=Nb30 ACBP=A9
|
0002:00003E4C 00000004 C=BSS S=.bss G=DGROUP M=Nb30 ACBP=A9
|
||||||
0002:00003E50 00000004 C=BSS S=.bss G=DGROUP M=DateUtils ACBP=A9
|
0002:00003E50 00000004 C=BSS S=.bss G=DGROUP M=DateUtils ACBP=A9
|
||||||
0002:00003E54 00000004 C=BSS S=.bss G=DGROUP M=OleServer ACBP=A9
|
0002:00003E54 00000004 C=BSS S=.bss G=DGROUP M=PsAPI ACBP=A9
|
||||||
0002:00003E58 00000004 C=BSS S=.bss G=DGROUP M=MSCommLib_TLB ACBP=A9
|
0002:00003E58 00000004 C=BSS S=.bss G=DGROUP M=OleServer ACBP=A9
|
||||||
0002:00003E5C 00000004 C=BSS S=.bss G=DGROUP M=MaskUtils ACBP=A9
|
0002:00003E5C 00000004 C=BSS S=.bss G=DGROUP M=MSCommLib_TLB ACBP=A9
|
||||||
0002:00003E60 00000004 C=BSS S=.bss G=DGROUP M=Mask ACBP=A9
|
0002:00003E60 00000004 C=BSS S=.bss G=DGROUP M=MaskUtils ACBP=A9
|
||||||
0002:00003E64 00000004 C=BSS S=.bss G=DGROUP M=Grids ACBP=A9
|
0002:00003E64 00000004 C=BSS S=.bss G=DGROUP M=Mask ACBP=A9
|
||||||
0002:00003E68 00000004 C=BSS S=.bss G=DGROUP M=Spin ACBP=A9
|
0002:00003E68 00000004 C=BSS S=.bss G=DGROUP M=Grids ACBP=A9
|
||||||
0002:00003E6C 00002494 C=BSS S=.bss G=DGROUP M=UnitPilote ACBP=A9
|
0002:00003E6C 00000004 C=BSS S=.bss G=DGROUP M=Spin ACBP=A9
|
||||||
0002:00006300 00000010 C=BSS S=.bss G=DGROUP M=Importation ACBP=A9
|
0002:00003E70 00002494 C=BSS S=.bss G=DGROUP M=UnitPilote ACBP=A9
|
||||||
0002:00006310 000148B0 C=BSS S=.bss G=DGROUP M=UnitAnalyseSegCDM ACBP=A9
|
0002:00006304 00000010 C=BSS S=.bss G=DGROUP M=Importation ACBP=A9
|
||||||
0002:0001ABC0 00000014 C=BSS S=.bss G=DGROUP M=UnitConfigTCO ACBP=A9
|
0002:00006314 000148B0 C=BSS S=.bss G=DGROUP M=UnitAnalyseSegCDM ACBP=A9
|
||||||
0002:0001ABD4 00000014 C=BSS S=.bss G=DGROUP M=Unit_Pilote_aig ACBP=A9
|
0002:0001ABC4 00000014 C=BSS S=.bss G=DGROUP M=UnitConfigTCO ACBP=A9
|
||||||
0002:0001ABE8 0000190C C=BSS S=.bss G=DGROUP M=UnitFicheHoraire ACBP=A9
|
0002:0001ABD8 00000014 C=BSS S=.bss G=DGROUP M=Unit_Pilote_aig ACBP=A9
|
||||||
0002:0001C4F4 00000004 C=BSS S=.bss G=DGROUP M=ShellConsts ACBP=A9
|
0002:0001ABEC 0000190C C=BSS S=.bss G=DGROUP M=UnitFicheHoraire ACBP=A9
|
||||||
0002:0001C4F8 0000001C C=BSS S=.bss G=DGROUP M=ShellCtrls ACBP=A9
|
0002:0001C4F8 00000004 C=BSS S=.bss G=DGROUP M=ShellConsts ACBP=A9
|
||||||
0002:0001C514 00000CA4 C=BSS S=.bss G=DGROUP M=UnitRoute ACBP=A9
|
0002:0001C4FC 0000001C C=BSS S=.bss G=DGROUP M=ShellCtrls ACBP=A9
|
||||||
0002:0001D1B8 00000008 C=BSS S=.bss G=DGROUP M=UnitRouteTrains ACBP=A9
|
0002:0001C518 00000DF4 C=BSS S=.bss G=DGROUP M=UnitRoute ACBP=A9
|
||||||
0002:0001D1C0 0000000C C=BSS S=.bss G=DGROUP M=UnitInfo ACBP=A9
|
0002:0001D30C 00000008 C=BSS S=.bss G=DGROUP M=UnitRouteTrains ACBP=A9
|
||||||
0002:0001D1CC 00000CB0 C=BSS S=.bss G=DGROUP M=selection_train ACBP=A9
|
0002:0001D314 0000000C C=BSS S=.bss G=DGROUP M=UnitInfo ACBP=A9
|
||||||
0002:0001DE7C 00000020 C=BSS S=.bss G=DGROUP M=UnitConfigCellTCO ACBP=A9
|
0002:0001D320 00000CB4 C=BSS S=.bss G=DGROUP M=selection_train ACBP=A9
|
||||||
0002:0001DE9C 00000034 C=BSS S=.bss G=DGROUP M=UnitClock ACBP=A9
|
0002:0001DFD4 00000020 C=BSS S=.bss G=DGROUP M=UnitConfigCellTCO ACBP=A9
|
||||||
0002:0001DED0 004CD3C0 C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9
|
0002:0001DFF4 00000034 C=BSS S=.bss G=DGROUP M=UnitClock ACBP=A9
|
||||||
0002:004EB290 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9
|
0002:0001E028 0000000C C=BSS S=.bss G=DGROUP M=UnitIntro ACBP=A9
|
||||||
0002:004EB2A0 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9
|
0002:0001E034 004CD3BC C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9
|
||||||
0002:004EB2B4 00000018 C=BSS S=.bss G=DGROUP M=UnitModifAction ACBP=A9
|
0002:004EB3F0 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9
|
||||||
0002:004EB2CC 00000038 C=BSS S=.bss G=DGROUP M=UnitHorloge ACBP=A9
|
0002:004EB400 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9
|
||||||
0002:004EB304 000001EC C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9
|
0002:004EB414 00000018 C=BSS S=.bss G=DGROUP M=UnitModifAction ACBP=A9
|
||||||
0002:004EB4F0 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9
|
0002:004EB42C 00000038 C=BSS S=.bss G=DGROUP M=UnitHorloge ACBP=A9
|
||||||
0002:004EB4F4 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9
|
0002:004EB464 000001EC C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9
|
||||||
0002:004EB500 0656CE08 C=BSS S=.bss G=DGROUP M=Unitprinc ACBP=A9
|
0002:004EB650 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9
|
||||||
0002:06A58308 000005CC C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
|
0002:004EB654 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9
|
||||||
0002:06A588D4 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9
|
0002:004EB660 0ECAF278 C=BSS S=.bss G=DGROUP M=Unitprinc ACBP=A9
|
||||||
|
0002:0F19A8D8 000005E0 C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
|
||||||
|
0002:0F19AEB8 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9
|
||||||
|
|
||||||
Bound resource files
|
Bound resource files
|
||||||
|
|
||||||
@@ -264,6 +268,7 @@ UnitInfo.dfm
|
|||||||
selection_train.dfm
|
selection_train.dfm
|
||||||
UnitConfigCellTCO.dfm
|
UnitConfigCellTCO.dfm
|
||||||
UnitClock.dfm
|
UnitClock.dfm
|
||||||
|
UnitIntro.dfm
|
||||||
UnitTCO.dfm
|
UnitTCO.dfm
|
||||||
UnitSR.dfm
|
UnitSR.dfm
|
||||||
UnitCDF.dfm
|
UnitCDF.dfm
|
||||||
@@ -278,4 +283,4 @@ Signaux_complexes_GL.res
|
|||||||
Signaux_complexes_GL.drf
|
Signaux_complexes_GL.drf
|
||||||
|
|
||||||
|
|
||||||
Program entry point at 0001:001F21C0
|
Program entry point at 0001:001FABB0
|
||||||
|
|||||||
+64
-22
@@ -682,7 +682,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 8
|
Top = 8
|
||||||
Width = 633
|
Width = 633
|
||||||
Height = 505
|
Height = 505
|
||||||
ActivePage = TabAvance
|
ActivePage = TabSheetActionneurs
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clBlack
|
Font.Color = clBlack
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
@@ -1198,11 +1198,11 @@ object FormConfig: TFormConfig
|
|||||||
object Label5: TLabel
|
object Label5: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 75
|
Top = 75
|
||||||
Width = 152
|
Width = 151
|
||||||
Height = 26
|
Height = 26
|
||||||
Caption =
|
Caption =
|
||||||
'3. Temporisation d'#39'attente de la r'#233'ponse de l'#39'interface (x 100 m' +
|
'3. Temporisation d'#39'attente de la r'#233'ponse de l'#39'interface (x 50 ms' +
|
||||||
's)'
|
')'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object EditcomUSB: TEdit
|
object EditcomUSB: TEdit
|
||||||
@@ -1297,19 +1297,20 @@ object FormConfig: TFormConfig
|
|||||||
Left = 312
|
Left = 312
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 297
|
Width = 297
|
||||||
Height = 49
|
Height = 65
|
||||||
BevelInner = bvLowered
|
BevelInner = bvLowered
|
||||||
BevelKind = bkFlat
|
BevelKind = bkFlat
|
||||||
Lines.Strings = (
|
Lines.Strings = (
|
||||||
'1. Port COM de l'#39'adresse USB de l'#39'interface XpressNet. '
|
'1. Port COM de l'#39'adresse USB de l'#39'interface XpressNet. '
|
||||||
'COM de 1 '#224' 255 - Si COMX : Signaux complexes d'#233'tecte le '
|
'COM de 1 '#224' 255 - Si COMX : Signaux complexes d'#233'tecte le '
|
||||||
'port automatiquement (mais le d'#233'marrage est plus long)')
|
'port automatiquement (mais le d'#233'marrage est plus long)'
|
||||||
|
'COMX , vitesse, parit'#233' , Nbre_bits , Bits_stop, protocole')
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object Memo2: TMemo
|
object Memo2: TMemo
|
||||||
Left = 312
|
Left = 312
|
||||||
Top = 64
|
Top = 80
|
||||||
Width = 297
|
Width = 297
|
||||||
Height = 81
|
Height = 81
|
||||||
BevelInner = bvLowered
|
BevelInner = bvLowered
|
||||||
@@ -1325,7 +1326,7 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object Memo3: TMemo
|
object Memo3: TMemo
|
||||||
Left = 312
|
Left = 312
|
||||||
Top = 152
|
Top = 168
|
||||||
Width = 297
|
Width = 297
|
||||||
Height = 89
|
Height = 89
|
||||||
BevelInner = bvLowered
|
BevelInner = bvLowered
|
||||||
@@ -1409,7 +1410,7 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object GroupBox22: TGroupBox
|
object GroupBox22: TGroupBox
|
||||||
Left = 312
|
Left = 312
|
||||||
Top = 248
|
Top = 264
|
||||||
Width = 297
|
Width = 297
|
||||||
Height = 65
|
Height = 65
|
||||||
Caption = 'Protocole de connexion '#224' la centrale ou '#224' l'#39'interface'
|
Caption = 'Protocole de connexion '#224' la centrale ou '#224' l'#39'interface'
|
||||||
@@ -1835,9 +1836,10 @@ object FormConfig: TFormConfig
|
|||||||
Top = 20
|
Top = 20
|
||||||
Width = 33
|
Width = 33
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Color = clLime
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
Visible = False
|
Visible = False
|
||||||
OnChange = EditAigTripleChange
|
OnKeyPress = EditAigTripleKeyPress
|
||||||
end
|
end
|
||||||
object GroupBox21: TGroupBox
|
object GroupBox21: TGroupBox
|
||||||
Left = 8
|
Left = 8
|
||||||
@@ -2350,6 +2352,9 @@ object FormConfig: TFormConfig
|
|||||||
Top = 120
|
Top = 120
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Hint = 'D'#233'tecteur 1 (obligatoire) associ'#233' au signal'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
OnChange = EditDet1Change
|
OnChange = EditDet1Change
|
||||||
end
|
end
|
||||||
@@ -2358,6 +2363,9 @@ object FormConfig: TFormConfig
|
|||||||
Top = 120
|
Top = 120
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Hint =
|
||||||
|
'El'#233'ment imm'#233'diatement suivant apr'#232's le d'#233'tecteur 1 (aiguillage o' +
|
||||||
|
'u d'#233'tecteur) - Obligatoire'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
@@ -2368,6 +2376,9 @@ object FormConfig: TFormConfig
|
|||||||
Top = 144
|
Top = 144
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Hint = 'D'#233'tecteur 2 (optionnel) associ'#233' au signal'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
OnChange = EditDet2Change
|
OnChange = EditDet2Change
|
||||||
end
|
end
|
||||||
@@ -2376,6 +2387,9 @@ object FormConfig: TFormConfig
|
|||||||
Top = 144
|
Top = 144
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Hint =
|
||||||
|
'El'#233'ment imm'#233'diatement suivant apr'#232's le d'#233'tecteur 2 (aiguillage o' +
|
||||||
|
'u signal) - Optionnel'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
@@ -2386,6 +2400,9 @@ object FormConfig: TFormConfig
|
|||||||
Top = 168
|
Top = 168
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Hint = 'D'#233'tecteur 3 (optionnel) associ'#233' au signal'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
OnChange = EditDet3Change
|
OnChange = EditDet3Change
|
||||||
end
|
end
|
||||||
@@ -2394,6 +2411,9 @@ object FormConfig: TFormConfig
|
|||||||
Top = 168
|
Top = 168
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Hint =
|
||||||
|
'El'#233'ment imm'#233'diatement suivant apr'#232's le d'#233'tecteur 3 (aiguillage o' +
|
||||||
|
'u d'#233'tecteur) - Optionnel'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
@@ -2404,6 +2424,9 @@ object FormConfig: TFormConfig
|
|||||||
Top = 192
|
Top = 192
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Hint = 'D'#233'tecteur 4 (optionnel) associ'#233' au signal'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
OnChange = EditDet4Change
|
OnChange = EditDet4Change
|
||||||
end
|
end
|
||||||
@@ -2412,6 +2435,9 @@ object FormConfig: TFormConfig
|
|||||||
Top = 192
|
Top = 192
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Hint =
|
||||||
|
'El'#233'ment imm'#233'diatement suivant apr'#232's le d'#233'tecteur 4 (aiguillage o' +
|
||||||
|
'u d'#233'tecteur) - Optionnel'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
@@ -3598,6 +3624,12 @@ object FormConfig: TFormConfig
|
|||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
|
object ImageTrain: TImage
|
||||||
|
Left = 16
|
||||||
|
Top = 400
|
||||||
|
Width = 257
|
||||||
|
Height = 49
|
||||||
|
end
|
||||||
object GroupBox24: TGroupBox
|
object GroupBox24: TGroupBox
|
||||||
Left = 296
|
Left = 296
|
||||||
Top = 16
|
Top = 16
|
||||||
@@ -3642,20 +3674,14 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object Label16: TLabel
|
object Label16: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 352
|
Top = 400
|
||||||
Width = 27
|
Width = 27
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Ic'#244'ne'
|
Caption = 'Ic'#244'ne'
|
||||||
end
|
end
|
||||||
object ImageTrain: TImage
|
|
||||||
Left = 16
|
|
||||||
Top = 376
|
|
||||||
Width = 257
|
|
||||||
Height = 49
|
|
||||||
end
|
|
||||||
object SpeedButtonOuvre: TSpeedButton
|
object SpeedButtonOuvre: TSpeedButton
|
||||||
Left = 120
|
Left = 120
|
||||||
Top = 344
|
Top = 392
|
||||||
Width = 23
|
Width = 23
|
||||||
Height = 22
|
Height = 22
|
||||||
Hint = 'Charger ic'#244'ne'
|
Hint = 'Charger ic'#244'ne'
|
||||||
@@ -3665,7 +3691,7 @@ object FormConfig: TFormConfig
|
|||||||
OnClick = SpeedButtonOuvreClick
|
OnClick = SpeedButtonOuvreClick
|
||||||
end
|
end
|
||||||
object Label45: TLabel
|
object Label45: TLabel
|
||||||
Left = 26
|
Left = 10
|
||||||
Top = 232
|
Top = 232
|
||||||
Width = 111
|
Width = 111
|
||||||
Height = 39
|
Height = 39
|
||||||
@@ -3675,6 +3701,13 @@ object FormConfig: TFormConfig
|
|||||||
'nt)'
|
'nt)'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
|
object Label46: TLabel
|
||||||
|
Left = 24
|
||||||
|
Top = 328
|
||||||
|
Width = 34
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Routes'
|
||||||
|
end
|
||||||
object EditNomTrain: TEdit
|
object EditNomTrain: TEdit
|
||||||
Left = 136
|
Left = 136
|
||||||
Top = 24
|
Top = 24
|
||||||
@@ -3732,7 +3765,7 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object EditIcone: TEdit
|
object EditIcone: TEdit
|
||||||
Left = 168
|
Left = 168
|
||||||
Top = 344
|
Top = 392
|
||||||
Width = 121
|
Width = 121
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
@@ -3766,9 +3799,9 @@ object FormConfig: TFormConfig
|
|||||||
OnClick = CheckBoxSensClick
|
OnClick = CheckBoxSensClick
|
||||||
end
|
end
|
||||||
object StringGridArr: TStringGrid
|
object StringGridArr: TStringGrid
|
||||||
Left = 144
|
Left = 136
|
||||||
Top = 192
|
Top = 192
|
||||||
Width = 169
|
Width = 177
|
||||||
Height = 113
|
Height = 113
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
OnSelectCell = StringGridArrSelectCell
|
OnSelectCell = StringGridArrSelectCell
|
||||||
@@ -3780,6 +3813,15 @@ object FormConfig: TFormConfig
|
|||||||
24
|
24
|
||||||
24)
|
24)
|
||||||
end
|
end
|
||||||
|
object MemoRoutes: TMemo
|
||||||
|
Left = 120
|
||||||
|
Top = 312
|
||||||
|
Width = 185
|
||||||
|
Height = 57
|
||||||
|
ReadOnly = True
|
||||||
|
ScrollBars = ssBoth
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object ButtonNT: TButton
|
object ButtonNT: TButton
|
||||||
Left = 8
|
Left = 8
|
||||||
|
|||||||
+448
-161
File diff suppressed because it is too large
Load Diff
@@ -1355,6 +1355,7 @@ var idc,x,y: integer;
|
|||||||
h : boolean;
|
h : boolean;
|
||||||
begin
|
begin
|
||||||
Idc:=index_canton(indexTCOcourant,xclicC,yclicC);
|
Idc:=index_canton(indexTCOcourant,xclicC,yclicC);
|
||||||
|
if Idc<1 then exit;
|
||||||
x:=canton[Idc].x;
|
x:=canton[Idc].x;
|
||||||
y:=canton[Idc].y;
|
y:=canton[Idc].y;
|
||||||
H:=IsCantonH(IndexTCOCourant,x,y);
|
H:=IsCantonH(IndexTCOCourant,x,y);
|
||||||
|
|||||||
+18
-6
@@ -113,7 +113,7 @@ object FormConfigTCO: TFormConfigTCO
|
|||||||
end
|
end
|
||||||
object Label10: TLabel
|
object Label10: TLabel
|
||||||
Left = 56
|
Left = 56
|
||||||
Top = 256
|
Top = 224
|
||||||
Width = 258
|
Width = 258
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Cliquez sur l'#39'ic'#244'ne pour changer la couleur de l'#39#233'l'#233'ment'
|
Caption = 'Cliquez sur l'#39'ic'#244'ne pour changer la couleur de l'#39#233'l'#233'ment'
|
||||||
@@ -170,11 +170,11 @@ object FormConfigTCO: TFormConfigTCO
|
|||||||
OnClick = ImagePiedFeuClick
|
OnClick = ImagePiedFeuClick
|
||||||
end
|
end
|
||||||
object CheckCouleur: TCheckBox
|
object CheckCouleur: TCheckBox
|
||||||
Left = 64
|
Left = 48
|
||||||
Top = 224
|
Top = 248
|
||||||
Width = 281
|
Width = 281
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Couleur du canton activ'#233' par la couleur du train'
|
Caption = 'Couleur du canton activ'#233'e par la couleur du train'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnClick = CheckCouleurClick
|
OnClick = CheckCouleurClick
|
||||||
end
|
end
|
||||||
@@ -241,7 +241,7 @@ object FormConfigTCO: TFormConfigTCO
|
|||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object RadioButtonCourbes: TRadioButton
|
object RadioButtonCourbes: TRadioButton
|
||||||
Left = 392
|
Left = 320
|
||||||
Top = 328
|
Top = 328
|
||||||
Width = 113
|
Width = 113
|
||||||
Height = 17
|
Height = 17
|
||||||
@@ -445,7 +445,7 @@ object FormConfigTCO: TFormConfigTCO
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object RadioButtonLignes: TRadioButton
|
object RadioButtonLignes: TRadioButton
|
||||||
Left = 392
|
Left = 320
|
||||||
Top = 312
|
Top = 312
|
||||||
Width = 113
|
Width = 113
|
||||||
Height = 17
|
Height = 17
|
||||||
@@ -459,6 +459,18 @@ object FormConfigTCO: TFormConfigTCO
|
|||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
OnClick = RadioButtonLignesClick
|
OnClick = RadioButtonLignesClick
|
||||||
end
|
end
|
||||||
|
object CheckNB: TCheckBox
|
||||||
|
Left = 488
|
||||||
|
Top = 312
|
||||||
|
Width = 137
|
||||||
|
Height = 17
|
||||||
|
Hint = 'Affichage du TCO en noir et blanc pour impression'
|
||||||
|
Caption = 'Mode noir et blanc'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 9
|
||||||
|
OnClick = CheckNBClick
|
||||||
|
end
|
||||||
object ColorDialog1: TColorDialog
|
object ColorDialog1: TColorDialog
|
||||||
OnShow = ColorDialog1Show
|
OnShow = ColorDialog1Show
|
||||||
Left = 272
|
Left = 272
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ type
|
|||||||
Label17: TLabel;
|
Label17: TLabel;
|
||||||
Label18: TLabel;
|
Label18: TLabel;
|
||||||
RadioButtonLignes: TRadioButton;
|
RadioButtonLignes: TRadioButton;
|
||||||
|
CheckNB: TCheckBox;
|
||||||
procedure ButtonDessineClick(Sender: TObject);
|
procedure ButtonDessineClick(Sender: TObject);
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
procedure ImageAigClick(Sender: TObject);
|
procedure ImageAigClick(Sender: TObject);
|
||||||
@@ -81,6 +82,7 @@ type
|
|||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure TrackBarEpaisseurChange(Sender: TObject);
|
procedure TrackBarEpaisseurChange(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure CheckNBClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
public
|
public
|
||||||
@@ -614,5 +616,10 @@ begin
|
|||||||
else action:=tCloseAction(caNone); // si la config est nok, on ferme pas la fenetre
|
else action:=tCloseAction(caNone); // si la config est nok, on ferme pas la fenetre
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfigTCO.CheckNBClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
NB:=CheckNB.checked;
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
end.
|
end.
|
||||||
|
|||||||
+2
-1
@@ -300,12 +300,13 @@ begin
|
|||||||
if (erreur<>0) or (i<0) or (i>23) then
|
if (erreur<>0) or (i<0) or (i>23) then
|
||||||
begin
|
begin
|
||||||
LabelErreur.Caption:='Erreur heure';
|
LabelErreur.Caption:='Erreur heure';
|
||||||
|
SpinEditHInit.value:=0;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
SpinEditHInit.Value:=i;
|
||||||
LabelErreur.Caption:='';
|
LabelErreur.Caption:='';
|
||||||
HeureInit:=i;
|
HeureInit:=i;
|
||||||
config_modifie:=true;
|
config_modifie:=true;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormHorloge.ButtonLanceClick(Sender: TObject);
|
procedure TFormHorloge.ButtonLanceClick(Sender: TObject);
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
object FormIntro: TFormIntro
|
||||||
|
Left = 300
|
||||||
|
Top = 150
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'Introduction de donn'#233'es'
|
||||||
|
ClientHeight = 95
|
||||||
|
ClientWidth = 186
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object LabeledEditDetAig: TLabeledEdit
|
||||||
|
Left = 40
|
||||||
|
Top = 24
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
EditLabel.Width = 47
|
||||||
|
EditLabel.Height = 13
|
||||||
|
EditLabel.Caption = 'D'#233'tecteur'
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object ButtonTrouver: TButton
|
||||||
|
Left = 56
|
||||||
|
Top = 56
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Trouver'
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = ButtonTrouverClick
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
unit UnitIntro;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls;
|
||||||
|
|
||||||
|
type
|
||||||
|
TFormIntro = class(TForm)
|
||||||
|
LabeledEditDetAig: TLabeledEdit;
|
||||||
|
ButtonTrouver: TButton;
|
||||||
|
procedure ButtonTrouverClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Déclarations privées }
|
||||||
|
public
|
||||||
|
{ Déclarations publiques }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
FormIntro: TFormIntro;
|
||||||
|
Achercher : integer;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TFormIntro.ButtonTrouverClick(Sender: TObject);
|
||||||
|
var i,erreur : integer;
|
||||||
|
begin
|
||||||
|
val(LabeledEditDetAig.text,i,erreur);
|
||||||
|
Achercher:=i;
|
||||||
|
close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
+1
-1
@@ -61,7 +61,7 @@ object FormModifAction: TFormModifAction
|
|||||||
Top = 64
|
Top = 64
|
||||||
Width = 729
|
Width = 729
|
||||||
Height = 337
|
Height = 337
|
||||||
ActivePage = TabSheetOp
|
ActivePage = TabSheet1
|
||||||
MultiLine = True
|
MultiLine = True
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object TabSheetDecl: TTabSheet
|
object TabSheetDecl: TTabSheet
|
||||||
|
|||||||
+56
-14
@@ -1172,7 +1172,12 @@ begin
|
|||||||
if (decl<>declAccessoire) and (decl<>DeclDetAct) and (decl<>DeclZoneDet) then exit;
|
if (decl<>declAccessoire) and (decl<>DeclDetAct) and (decl<>DeclZoneDet) then exit;
|
||||||
|
|
||||||
val(SpinEditEtat.Text,i,erreur);
|
val(SpinEditEtat.Text,i,erreur);
|
||||||
if (i<0) or (i>2) or (erreur<>0) then exit;
|
if (i<0) or (i>2) or (erreur<>0) then
|
||||||
|
begin
|
||||||
|
SpinEditEtat.value:=0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
SpinEditEtat.value:=i;
|
||||||
Tablo_Action[index].etat:=i;
|
Tablo_Action[index].etat:=i;
|
||||||
|
|
||||||
maj_combocactions(ligneclicAct);
|
maj_combocactions(ligneclicAct);
|
||||||
@@ -1573,10 +1578,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormModifAction.SpinEditHeure1Change(Sender: TObject);
|
procedure TFormModifAction.SpinEditHeure1Change(Sender: TObject);
|
||||||
var cond,i : integer;
|
var cond,i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if (ligneclicAct<0) or clicliste then exit;
|
if (ligneclicAct<0) or clicliste then exit;
|
||||||
i:=SpinEditHeure1.Value;
|
val(SpinEditHeure1.Text,i,erreur);
|
||||||
|
if erreur<>0 then
|
||||||
|
begin
|
||||||
|
SpinEditHeure1.Value:=0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
SpinEditHeure1.Value:=i;
|
||||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||||
case cond of
|
case cond of
|
||||||
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].HeureMin:=i;
|
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].HeureMin:=i;
|
||||||
@@ -1584,12 +1595,17 @@ begin
|
|||||||
maj_combocactions(ligneclicAct);
|
maj_combocactions(ligneclicAct);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFormModifAction.SpinEditMn1Change(Sender: TObject);
|
procedure TFormModifAction.SpinEditMn1Change(Sender: TObject);
|
||||||
var cond,i : integer;
|
var cond,i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if (ligneclicAct<0) or clicliste then exit;
|
if (ligneclicAct<0) or clicliste then exit;
|
||||||
i:=SpinEditMn1.Value;
|
val(SpinEditMn1.Text,i,erreur);
|
||||||
|
if erreur<>0 then
|
||||||
|
begin
|
||||||
|
SpinEditMn1.Value:=0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
SpinEditMn1.Value:=i;
|
||||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||||
case cond of
|
case cond of
|
||||||
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].MinuteMin:=i;
|
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].MinuteMin:=i;
|
||||||
@@ -1598,10 +1614,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormModifAction.SpinEditHeure2Change(Sender: TObject);
|
procedure TFormModifAction.SpinEditHeure2Change(Sender: TObject);
|
||||||
var cond,i : integer;
|
var cond,i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if (ligneclicAct<0) or clicliste then exit;
|
if (ligneclicAct<0) or clicliste then exit;
|
||||||
i:=SpinEditHeure2.Value;
|
val(SpinEditHeure2.Text,i,erreur);
|
||||||
|
if erreur<>0 then
|
||||||
|
begin
|
||||||
|
SpinEditHeure2.Value:=0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
SpinEditHeure2.Value:=i;
|
||||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||||
case cond of
|
case cond of
|
||||||
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].HeureMax:=i;
|
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].HeureMax:=i;
|
||||||
@@ -1610,10 +1632,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormModifAction.SpinEditMn2Change(Sender: TObject);
|
procedure TFormModifAction.SpinEditMn2Change(Sender: TObject);
|
||||||
var cond,i : integer;
|
var cond,i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if (ligneclicAct<0) or clicliste then exit;
|
if (ligneclicAct<0) or clicliste then exit;
|
||||||
i:=SpinEditMn2.Value;
|
val(SpinEditMn2.Text,i,erreur);
|
||||||
|
if erreur<>0 then
|
||||||
|
begin
|
||||||
|
SpinEditMn2.Value:=0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
SpinEditMn2.Value:=i;
|
||||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||||
case cond of
|
case cond of
|
||||||
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].MinuteMax:=i;
|
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].MinuteMax:=i;
|
||||||
@@ -1635,10 +1663,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormModifAction.SpinEditEtat2Change(Sender: TObject);
|
procedure TFormModifAction.SpinEditEtat2Change(Sender: TObject);
|
||||||
var cond,i : integer;
|
var cond,i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if (ligneclicAct<0) or clicliste then exit;
|
if (ligneclicAct<0) or clicliste then exit;
|
||||||
i:=SpinEditEtat2.Value;
|
val(SpinEditEtat2.Text,i,erreur);
|
||||||
|
if erreur<>0 then
|
||||||
|
begin
|
||||||
|
SpinEditEtat2.Value:=0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
SpinEditEtat2.Value:=i;
|
||||||
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;
|
||||||
@@ -1659,10 +1693,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormModifAction.SpinEditEtatopChange(Sender: TObject);
|
procedure TFormModifAction.SpinEditEtatopChange(Sender: TObject);
|
||||||
var i,op : integer;
|
var i,o,erreur,op : integer;
|
||||||
begin
|
begin
|
||||||
if (ligneclicAct<0) or clicliste then exit;
|
if (ligneclicAct<0) or clicliste then exit;
|
||||||
i:=SpinEditEtatop.Value;
|
val(SpinEditEtatop.text,i,erreur);
|
||||||
|
if erreur<>0 then
|
||||||
|
begin
|
||||||
|
SpinEditEtatOp.Value:=0;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
SpinEditEtatop.Value:=i;
|
||||||
op:=Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
op:=Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||||
case op of
|
case op of
|
||||||
ActionAccessoire : Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].etat:=i;
|
ActionAccessoire : Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].etat:=i;
|
||||||
@@ -1724,4 +1764,6 @@ begin
|
|||||||
Aff_champs(ligneclicAct+1,1,1);
|
Aff_champs(ligneclicAct+1,1,1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
+9
-8
@@ -1,8 +1,8 @@
|
|||||||
object FormPrinc: TFormPrinc
|
object FormPrinc: TFormPrinc
|
||||||
Left = 75
|
Left = 132
|
||||||
Top = 270
|
Top = 172
|
||||||
Width = 1148
|
Width = 1148
|
||||||
Height = 624
|
Height = 625
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Anchors = [akLeft, akTop, akRight]
|
||||||
Caption = 'SIgnaux complexes'
|
Caption = 'SIgnaux complexes'
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
@@ -20,8 +20,8 @@ object FormPrinc: TFormPrinc
|
|||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
1140
|
1132
|
||||||
573)
|
566)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object LabelTitre: TLabel
|
object LabelTitre: TLabel
|
||||||
@@ -1445,8 +1445,8 @@ object FormPrinc: TFormPrinc
|
|||||||
end
|
end
|
||||||
object StatusBar1: TStatusBar
|
object StatusBar1: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 551
|
Top = 544
|
||||||
Width = 1140
|
Width = 1132
|
||||||
Height = 22
|
Height = 22
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
@@ -2043,6 +2043,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Height = 25
|
Height = 25
|
||||||
Caption = 'Route'
|
Caption = 'Route'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnClick = Button3Click
|
||||||
end
|
end
|
||||||
object Timer1: TTimer
|
object Timer1: TTimer
|
||||||
Interval = 100
|
Interval = 100
|
||||||
@@ -2417,7 +2418,7 @@ object FormPrinc: TFormPrinc
|
|||||||
object Roulage1: TMenuItem
|
object Roulage1: TMenuItem
|
||||||
Caption = 'Roulage'
|
Caption = 'Roulage'
|
||||||
object Routes1: TMenuItem
|
object Routes1: TMenuItem
|
||||||
Caption = 'Fen'#234'tre des routes'
|
Caption = 'Fen'#234'tre des routes par trains'
|
||||||
OnClick = Routes1Click
|
OnClick = Routes1Click
|
||||||
end
|
end
|
||||||
object Afficheroutespartrain1: TMenuItem
|
object Afficheroutespartrain1: TMenuItem
|
||||||
|
|||||||
+1628
-517
File diff suppressed because it is too large
Load Diff
+127
-23
@@ -3,7 +3,7 @@ object FormRoute: TFormRoute
|
|||||||
Top = 182
|
Top = 182
|
||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Route'
|
Caption = 'Route'
|
||||||
ClientHeight = 257
|
ClientHeight = 298
|
||||||
ClientWidth = 634
|
ClientWidth = 634
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
@@ -15,11 +15,14 @@ object FormRoute: TFormRoute
|
|||||||
OnActivate = FormActivate
|
OnActivate = FormActivate
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
DesignSize = (
|
||||||
|
634
|
||||||
|
298)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object LabelInfo: TLabel
|
object LabelInfo: TLabel
|
||||||
Left = 16
|
Left = 8
|
||||||
Top = 16
|
Top = 8
|
||||||
Width = 324
|
Width = 324
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption =
|
Caption =
|
||||||
@@ -28,9 +31,10 @@ object FormRoute: TFormRoute
|
|||||||
end
|
end
|
||||||
object LabelNombre: TLabel
|
object LabelNombre: TLabel
|
||||||
Left = 19
|
Left = 19
|
||||||
Top = 192
|
Top = 234
|
||||||
Width = 29
|
Width = 29
|
||||||
Height = 13
|
Height = 13
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Route'
|
Caption = 'Route'
|
||||||
end
|
end
|
||||||
object ImageTrainR: TImage
|
object ImageTrainR: TImage
|
||||||
@@ -43,10 +47,11 @@ object FormRoute: TFormRoute
|
|||||||
end
|
end
|
||||||
object ListBoxRoutes: TListBox
|
object ListBoxRoutes: TListBox
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 80
|
Top = 116
|
||||||
Width = 609
|
Width = 609
|
||||||
Height = 105
|
Height = 114
|
||||||
Hint = 'S'#233'lectionne une route pour l'#39'affecter au train courant'
|
Hint = 'S'#233'lectionne une route pour l'#39'affecter au train courant'
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
Color = clBlack
|
Color = clBlack
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clYellow
|
Font.Color = clYellow
|
||||||
@@ -58,15 +63,17 @@ object FormRoute: TFormRoute
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnDrawItem = ListBoxRoutesDrawItem
|
||||||
OnKeyDown = ListBoxRoutesKeyDown
|
OnKeyDown = ListBoxRoutesKeyDown
|
||||||
OnMouseDown = ListBoxRoutesMouseDown
|
OnMouseDown = ListBoxRoutesMouseDown
|
||||||
end
|
end
|
||||||
object ButtonEfface: TButton
|
object ButtonEfface: TButton
|
||||||
Left = 424
|
Left = 424
|
||||||
Top = 216
|
Top = 258
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 33
|
Height = 33
|
||||||
Hint = 'Efface la route du tco'
|
Hint = 'Efface la route du tco'
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Efface route du TCO'
|
Caption = 'Efface route du TCO'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
@@ -76,19 +83,21 @@ object FormRoute: TFormRoute
|
|||||||
end
|
end
|
||||||
object ButtonQuitte: TButton
|
object ButtonQuitte: TButton
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 216
|
Top = 259
|
||||||
Width = 89
|
Width = 89
|
||||||
Height = 33
|
Height = 32
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Quitter'
|
Caption = 'Quitter'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
OnClick = ButtonQuitteClick
|
OnClick = ButtonQuitteClick
|
||||||
end
|
end
|
||||||
object ButtonDetail: TButton
|
object ButtonDetail: TButton
|
||||||
Left = 320
|
Left = 320
|
||||||
Top = 216
|
Top = 258
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 33
|
Height = 33
|
||||||
Hint = 'D'#233'tail route'
|
Hint = 'D'#233'tail route'
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'D'#233'tail route'
|
Caption = 'D'#233'tail route'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
@@ -97,37 +106,132 @@ object FormRoute: TFormRoute
|
|||||||
end
|
end
|
||||||
object ButtonRAZ: TButton
|
object ButtonRAZ: TButton
|
||||||
Left = 528
|
Left = 528
|
||||||
Top = 216
|
Top = 258
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 33
|
Height = 33
|
||||||
Hint = 'Annule toutes les routes pour ce train'
|
Hint = 'Annule toutes les routes pour ce train'
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'D'#233'valider routes'
|
Caption = 'D'#233'valider routes'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
OnClick = ButtonRAZClick
|
OnClick = ButtonRAZClick
|
||||||
end
|
end
|
||||||
object ComboBoxTrains: TComboBox
|
|
||||||
Left = 16
|
|
||||||
Top = 48
|
|
||||||
Width = 601
|
|
||||||
Height = 21
|
|
||||||
Style = csDropDownList
|
|
||||||
ItemHeight = 13
|
|
||||||
TabOrder = 5
|
|
||||||
Visible = False
|
|
||||||
end
|
|
||||||
object ButtonFenPil: TButton
|
object ButtonFenPil: TButton
|
||||||
Left = 232
|
Left = 232
|
||||||
Top = 216
|
Top = 258
|
||||||
Width = 83
|
Width = 83
|
||||||
Height = 33
|
Height = 33
|
||||||
Hint = 'Ouvre la fen'#234'tre de pilotage des trains'
|
Hint = 'Ouvre la fen'#234'tre de pilotage des trains'
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Fen'#234'tre de pilotage'
|
Caption = 'Fen'#234'tre de pilotage'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
|
TabOrder = 5
|
||||||
|
WordWrap = True
|
||||||
|
OnClick = ButtonFenPilClick
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 128
|
||||||
|
Top = 258
|
||||||
|
Width = 75
|
||||||
|
Height = 33
|
||||||
|
Hint =
|
||||||
|
'Affiche la route sous forme d'#39'une progression du train sur cette' +
|
||||||
|
' route'
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
Caption = 'Parcours route'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
OnClick = ButtonFenPilClick
|
OnClick = ButtonParcours
|
||||||
|
end
|
||||||
|
object ButtonRaf: TButton
|
||||||
|
Left = 384
|
||||||
|
Top = 78
|
||||||
|
Width = 89
|
||||||
|
Height = 25
|
||||||
|
Hint =
|
||||||
|
'R'#233'affiche la liste des routes en fonction des filtres, d'#39'apr'#232's l' +
|
||||||
|
'a liste des routes trouv'#233'es'
|
||||||
|
Caption = 'Rafra'#238'chir la liste'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 7
|
||||||
|
OnClick = ButtonRafClick
|
||||||
|
end
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 16
|
||||||
|
Top = 32
|
||||||
|
Width = 321
|
||||||
|
Height = 65
|
||||||
|
Caption = 'Filtrage des routes'
|
||||||
|
TabOrder = 8
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 24
|
||||||
|
Width = 189
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Obligation de passer par le(s) canton(s) :'
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 40
|
||||||
|
Width = 194
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Interdiction de passer par le(s) canton(s) :'
|
||||||
|
end
|
||||||
|
object EditObligeCanton: TEdit
|
||||||
|
Left = 216
|
||||||
|
Top = 20
|
||||||
|
Width = 81
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Num'#233'ro de cantons s'#233'par'#233's par des virgules (10 maxi)'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = EditObligeCantonChange
|
||||||
|
end
|
||||||
|
object EditInterditCanton: TEdit
|
||||||
|
Left = 216
|
||||||
|
Top = 38
|
||||||
|
Width = 81
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Num'#233'ro de cantons s'#233'par'#233's par des virgules (10 maxi)'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = EditInterditCantonChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ButtonTrouver: TButton
|
||||||
|
Left = 496
|
||||||
|
Top = 78
|
||||||
|
Width = 97
|
||||||
|
Height = 25
|
||||||
|
Hint = 'Recalcule les routes en fonction des filtres'
|
||||||
|
Caption = 'Trouver les routes'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 9
|
||||||
|
OnClick = ButtonTrouverClick
|
||||||
|
end
|
||||||
|
object CheckBoxRoutesLongues: TCheckBox
|
||||||
|
Left = 384
|
||||||
|
Top = 54
|
||||||
|
Width = 209
|
||||||
|
Height = 17
|
||||||
|
Caption = 'Afficher les routes longues (en orange)'
|
||||||
|
TabOrder = 10
|
||||||
|
OnClick = CheckBoxRoutesLonguesClick
|
||||||
|
end
|
||||||
|
object CheckBoxDebugRoutes: TCheckBox
|
||||||
|
Left = 552
|
||||||
|
Top = 232
|
||||||
|
Width = 65
|
||||||
|
Height = 17
|
||||||
|
Caption = 'Debug'
|
||||||
|
TabOrder = 11
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+359
-53
@@ -18,8 +18,17 @@ type
|
|||||||
ButtonDetail: TButton;
|
ButtonDetail: TButton;
|
||||||
ButtonRAZ: TButton;
|
ButtonRAZ: TButton;
|
||||||
ImageTrainR: TImage;
|
ImageTrainR: TImage;
|
||||||
ComboBoxTrains: TComboBox;
|
|
||||||
ButtonFenPil: TButton;
|
ButtonFenPil: TButton;
|
||||||
|
Button1: TButton;
|
||||||
|
ButtonRaf: TButton;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
EditObligeCanton: TEdit;
|
||||||
|
EditInterditCanton: TEdit;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
ButtonTrouver: TButton;
|
||||||
|
CheckBoxRoutesLongues: TCheckBox;
|
||||||
|
CheckBoxDebugRoutes: TCheckBox;
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
procedure ListBoxRoutesMouseDown(Sender: TObject; Button: TMouseButton;
|
procedure ListBoxRoutesMouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
@@ -32,6 +41,14 @@ type
|
|||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure ButtonFenPilClick(Sender: TObject);
|
procedure ButtonFenPilClick(Sender: TObject);
|
||||||
|
procedure ButtonParcours(Sender: TObject);
|
||||||
|
procedure ButtonRafClick(Sender: TObject);
|
||||||
|
procedure EditObligeCantonChange(Sender: TObject);
|
||||||
|
procedure EditInterditCantonChange(Sender: TObject);
|
||||||
|
procedure ButtonTrouverClick(Sender: TObject);
|
||||||
|
procedure ListBoxRoutesDrawItem(Control: TWinControl; Index: Integer;
|
||||||
|
Rect: TRect; State: TOwnerDrawState);
|
||||||
|
procedure CheckBoxRoutesLonguesClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
public
|
public
|
||||||
@@ -41,7 +58,12 @@ type
|
|||||||
var
|
var
|
||||||
FormRoute: TFormRoute;
|
FormRoute: TFormRoute;
|
||||||
parcoursDet : TUneroute;
|
parcoursDet : TUneroute;
|
||||||
AncLigneRoute,LigneRoute,IdTrainCourant : integer;
|
CoulText : Tcolor;
|
||||||
|
AncLigneRoute,NumRoute,AncRoute,IndexLigneRoute,IdTrainCourant,Nprop,NpropTot : integer;
|
||||||
|
list_det_obl,list_det_int : array[1..20] of record
|
||||||
|
adresse : integer;
|
||||||
|
n :integer;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure raz_route_fenetre;
|
procedure raz_route_fenetre;
|
||||||
procedure raz_toutes_routes;
|
procedure raz_toutes_routes;
|
||||||
@@ -57,7 +79,7 @@ uses UnitDebug,unitTCO,UnitConfig, UnitRouteTrains;
|
|||||||
|
|
||||||
// efface la route parcoursDet[]
|
// efface la route parcoursDet[]
|
||||||
procedure efface_route_tco;
|
procedure efface_route_tco;
|
||||||
var n,det1,det2,i,indexAig : integer;
|
var n,det1,nti,x,y,det2,i,indexAig : integer;
|
||||||
t : tequipement;
|
t : tequipement;
|
||||||
begin
|
begin
|
||||||
n:=parcoursdet[0].adresse;
|
n:=parcoursdet[0].adresse;
|
||||||
@@ -88,6 +110,21 @@ begin
|
|||||||
aiguillage[indexAig].Position:=aiguillage[indexAig].AncPos; // restitue position
|
aiguillage[indexAig].Position:=aiguillage[indexAig].AncPos; // restitue position
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// rafraichir la position des aiguillages dans les TCO
|
||||||
|
for nti:=1 to NbreTCO do
|
||||||
|
begin
|
||||||
|
for y:=1 to NbreCellY[nti] do
|
||||||
|
for x:=1 to NbreCellX[nti] do
|
||||||
|
begin
|
||||||
|
if isAigTCO(tco[nti,x,y].BImage) then
|
||||||
|
begin
|
||||||
|
affiche_cellule(nti,x,y);
|
||||||
|
// entoure_cell_grille(indexTCO,x,y);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
FormTCO[nti].Repaint;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// efface la fenetre et la route du tco
|
// efface la fenetre et la route du tco
|
||||||
@@ -96,11 +133,12 @@ begin
|
|||||||
efface_route_tco;
|
efface_route_tco;
|
||||||
|
|
||||||
formRoute.ListBoxRoutes.Clear;
|
formRoute.ListBoxRoutes.Clear;
|
||||||
ligneroute:=-1;
|
Indexligneroute:=-1;
|
||||||
|
NumRoute:=-1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Affiche sans effacer l'ancienne, la route du TCO du tableau ParcoursDet[]
|
// Affiche sans effacer l'ancienne, la route du TCO du tableau ParcoursDet[]
|
||||||
// détruit l'index du train dans le canton !!!!
|
// détruit l'index du train dans le canton !!!!
|
||||||
function Affiche_route_TCO : boolean ;
|
function Affiche_route_TCO : boolean ;
|
||||||
var i,n,det1,det2,indexAig : integer;
|
var i,n,det1,det2,indexAig : integer;
|
||||||
t :tequipement;
|
t :tequipement;
|
||||||
@@ -117,12 +155,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
indexaig:=index_aig(ParcoursDet[i].adresse);
|
indexaig:=index_aig(ParcoursDet[i].adresse);
|
||||||
aiguillage[indexAig].AncPos:=aiguillage[IndexAig].position; // sauvegarder position
|
aiguillage[indexAig].AncPos:=aiguillage[IndexAig].position; // sauvegarder position
|
||||||
|
//Affiche('Aig='+intToSTR(ParcoursDet[i].adresse)+' pos='+intToSTR(aiguillage[IndexAig].position),clYellow);
|
||||||
aiguillage[indexAig].position:=ParcoursDet[i].pos; // forcer la position de l'aiguillage sue le parcours
|
aiguillage[indexAig].position:=ParcoursDet[i].pos; // forcer la position de l'aiguillage sue le parcours
|
||||||
end; // car on utilise TRUE dans la fonction zone_tco
|
end; // car on utilise TRUE dans la fonction zone_tco
|
||||||
if t=det then
|
if t=det then
|
||||||
begin
|
begin
|
||||||
det2:=ParcoursDet[i].adresse;
|
det2:=ParcoursDet[i].adresse;
|
||||||
ok:=zone_tco(1,det1,det2,1,0,1,true) and ok;
|
ok:=zone_tco(1,det1,det2,1,0,1,true) and ok; //çà efface laloco du canton
|
||||||
det1:=det2;
|
det1:=det2;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -146,44 +185,45 @@ var n,id : integer;
|
|||||||
ok : boolean;
|
ok : boolean;
|
||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
AncLigneRoute:=LigneRoute;
|
AncLigneRoute:=IndexLigneRoute;
|
||||||
|
|
||||||
if LigneRoute<0 then exit;
|
if IndexLigneRoute<0 then exit;
|
||||||
id:=LigneRoute+1;
|
id:=IndexLigneRoute;
|
||||||
formRoute.ButtonDetail.caption:='Détail route '+intToSTR(id);
|
formRoute.ButtonDetail.caption:='Détail route '+intToSTR(id+1);
|
||||||
formRoute.ButtonEfface.caption:='Efface route '+intToSTR(id)+' du TCO';
|
formRoute.ButtonEfface.caption:='Efface route '+intToSTR(id+1)+' du TCO';
|
||||||
|
|
||||||
efface_route_tco;
|
efface_route_tco;
|
||||||
|
|
||||||
// fabriquer le tableau parcoursDet[] depuis tabloRoute[]
|
// fabriquer le tableau parcoursDet[] depuis tabloRoute[]
|
||||||
parcoursDet:=tabloRoute[id];
|
parcoursDet:=tabloRoute[NumRoute];
|
||||||
n:=ParcoursDet[0].adresse;
|
n:=ParcoursDet[0].adresse;
|
||||||
|
|
||||||
// Affiche les routes
|
// Affiche les routes
|
||||||
ok:=Affiche_route_tco;
|
ok:=Affiche_route_tco;
|
||||||
|
|
||||||
s:='Route '+intToSTR(id)+'/'+intToSTR(NbreRoutes)+' : '+intToSTR(n)+' éléments';
|
s:=intToSTR(Nprop)+' propositions - Route '+intToSTR(NumRoute)+'/'+intToSTR(NbreRoutes)+' : '+intToSTR(n)+' éléments';
|
||||||
//if not(ok) then s:=s+' - Route pas affichable car des éléments ne sont pas au TCO';
|
//if not(ok) then s:=s+' - Route pas affichable car des éléments ne sont pas au TCO';
|
||||||
formRoute.LabelNombre.Caption:=s;
|
formRoute.LabelNombre.Caption:=s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// r: numéro de route
|
||||||
procedure clic_route(r : integer);
|
procedure clic_route(r : integer);
|
||||||
var idTrain : integer;
|
var idTrain : integer;
|
||||||
begin
|
begin
|
||||||
LigneRoute:=r;
|
// IndexLigneRoute:=r;
|
||||||
// copier la route au train
|
// copier la route au train
|
||||||
if (idcantonroute<1) or (ligneroute<0) then exit;
|
if (idcantonroute<1) or (Indexligneroute<0) then exit;
|
||||||
idTrain:=Index_Train_adresse(canton[idCantonRoute].AdrTrainRoute);
|
idTrain:=Index_Train_adresse(canton[idCantonRoute].AdrTrainRoute);
|
||||||
//IdTrain:=canton[idcantonRoute].indexTrain;
|
//IdTrain:=canton[idcantonRoute].indexTrain;
|
||||||
if idtrain<1 then
|
if (idtrain<0) or (idTrain>Max_Trains) then
|
||||||
begin
|
begin
|
||||||
// le train a été déplacé
|
// le train a été déplacé
|
||||||
affiche('Anomalie 50',clred);
|
affiche('Anomalie 50',clred);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
if r<1 then exit;
|
||||||
trains[idTrain].route:=tabloroute[LigneRoute+1];
|
trains[idTrain].route:=tabloroute[r];
|
||||||
|
|
||||||
formRoute.ButtonFenPil.enabled:=trains[IdTrain].route[0].adresse<>0;
|
formRoute.ButtonFenPil.enabled:=trains[IdTrain].route[0].adresse<>0;
|
||||||
|
|
||||||
@@ -191,13 +231,96 @@ begin
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// transforme la liste de chaine des cantons obligatoires en détecteurs
|
||||||
|
procedure detObl_to_liste;
|
||||||
|
var i,n,j,erreur :integer;
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
// transformer la liste des cantons obligatoires en détecteurs
|
||||||
|
for i:=1 to 20 do begin list_det_obl[i].adresse:=0;list_det_obl[i].n:=0;end;
|
||||||
|
|
||||||
|
i:=1;
|
||||||
|
s:=formRoute.EditObligeCanton.text;
|
||||||
|
while (length(s)>0) and (i<20) do
|
||||||
|
begin
|
||||||
|
val(s,n,erreur); // n= numéro de canton
|
||||||
|
delete(s,1,erreur);
|
||||||
|
while not(s='') and not(s[1] in ['0'..'9']) do
|
||||||
|
begin
|
||||||
|
delete(s,1,1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if erreur=0 then s:='';
|
||||||
|
j:=index_canton_numero(n);
|
||||||
|
if j<>0 then
|
||||||
|
begin
|
||||||
|
if canton[j].typ1=det then
|
||||||
|
begin
|
||||||
|
list_det_obl[i].adresse:=canton[j].el1;
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
if canton[j].typ2=det then
|
||||||
|
begin
|
||||||
|
list_det_obl[i].adresse:=canton[j].el2;
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// transforme la liste de chaine des cantons interdits en détecteurs
|
||||||
|
procedure detInt_to_liste;
|
||||||
|
var i,n,j,erreur :integer;
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
for i:=1 to 20 do begin list_det_int[i].adresse:=0;list_det_int[i].n:=0;end;
|
||||||
|
|
||||||
|
// transformer la liste des cantons interdits en détecteurs
|
||||||
|
i:=1;
|
||||||
|
s:=formRoute.EditInterditCanton.text;
|
||||||
|
while (length(s)>0) and (i<20) do
|
||||||
|
begin
|
||||||
|
val(s,n,erreur); // n= numéro de canton
|
||||||
|
delete(s,1,erreur);
|
||||||
|
while not(s='') and not(s[1] in ['0'..'9']) do
|
||||||
|
begin
|
||||||
|
delete(s,1,1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if erreur=0 then s:='';
|
||||||
|
j:=index_canton_numero(n);
|
||||||
|
if j<>0 then
|
||||||
|
begin
|
||||||
|
if canton[j].typ1=det then
|
||||||
|
begin
|
||||||
|
list_det_int[i].adresse:=canton[j].el1;
|
||||||
|
//Affiche('détecteur interdit '+intToSTR(canton[j].el1),clOrange);
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
if canton[j].typ2=det then
|
||||||
|
begin
|
||||||
|
list_det_int[i].adresse:=canton[j].el2;
|
||||||
|
//Affiche('détecteur interdit '+intToSTR(canton[j].el2),clOrange);
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
// affiche les routes du train courant
|
// affiche les routes du train courant
|
||||||
procedure maj_fenetre;
|
procedure maj_fenetre;
|
||||||
var l,pluslongue,n,j,pixelLength : integer;
|
var iI,iO,c,l,pluslongue,n,i,j,k,pixelLength,erreur,np : integer;
|
||||||
s,chaineLongue : string;
|
s,chaineLongue : string;
|
||||||
|
trouveObl,trouveint,aflongue : boolean;
|
||||||
|
list_cantons_obl : array[1..10] of integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (cantonorg=0) or (cantonDest=0) then FormRoute.caption:='Pas de canton depart/arrivée' else
|
if (idcantonroute<1) or (cantonorg=0) or (cantonDest=0) then
|
||||||
|
begin
|
||||||
|
FormRoute.caption:='Pas de canton depart/arrivée';
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
Nprop:=0; NpropTot:=0;
|
||||||
formRoute.caption:='Liste des routes trouvées du train '+canton[idcantonRoute].NomTrain+' pour aller de '+intToSTR(DetDepart)+' (canton '+intToSTR(cantonOrg)+
|
formRoute.caption:='Liste des routes trouvées du train '+canton[idcantonRoute].NomTrain+' pour aller de '+intToSTR(DetDepart)+' (canton '+intToSTR(cantonOrg)+
|
||||||
') à '+intToSTR(DetaTrouve)+' (canton '+intToSTR(cantonDest)+')';
|
') à '+intToSTR(DetaTrouve)+' (canton '+intToSTR(cantonDest)+')';
|
||||||
plusLongue:=0;
|
plusLongue:=0;
|
||||||
@@ -208,41 +331,92 @@ begin
|
|||||||
if idcantonRoute<>0 then formRoute.ListBoxRoutes.Hint:='Sélectionne une route pour l''affecter au train '+canton[idcantonRoute].NomTrain;
|
if idcantonRoute<>0 then formRoute.ListBoxRoutes.Hint:='Sélectionne une route pour l''affecter au train '+canton[idcantonRoute].NomTrain;
|
||||||
formRoute.listBoxRoutes.Clear;
|
formRoute.listBoxRoutes.Clear;
|
||||||
|
|
||||||
// trouver le canton dest d'après le canton origine cliqué
|
IdCantonClic:=Idcantonroute;
|
||||||
if IdCantonClic=0 then exit;
|
IdTrainCourant:=canton[idcantonRoute].indexTrain;
|
||||||
idCantonRoute:=index_canton_numero(canton[idCantonClic].NumcantonOrg);
|
if idTrainCourant>9000 then
|
||||||
|
|
||||||
if idcantonroute<>0 then
|
|
||||||
begin
|
begin
|
||||||
IdTrainCourant:=canton[idcantonRoute].indexTrain;
|
Affiche('Anomalie 626 ',clred);
|
||||||
if idTrainCourant>9000 then
|
messageBeep(Mb_iconError);
|
||||||
begin
|
exit;
|
||||||
Affiche('Anomalie 626 ',clred);
|
end;
|
||||||
messageBeep(Mb_iconError);
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else idtraincourant:=0;
|
|
||||||
|
|
||||||
if NbreRoutes>0 then FormRoute.labelInfo.Caption:='Cliquer sur une route pour la visualiser sur le TCO et l''affecter au train';
|
if NbreRoutes>0 then FormRoute.labelInfo.Caption:='Cliquer sur une route pour la visualiser sur le TCO et l''affecter au train';
|
||||||
|
|
||||||
|
Screen.Cursor:=crSQLWait;
|
||||||
|
|
||||||
|
// regarder chaque route pour les détecteurs obligatoires / interdits et l'afficher
|
||||||
|
aflongue:=FormRoute.checkBoxRoutesLongues.checked;
|
||||||
|
np:=tabloroute[1,0].adresse;
|
||||||
for j:=1 to NbreRoutes do
|
for j:=1 to NbreRoutes do
|
||||||
begin
|
begin
|
||||||
|
// compter le nombre de détecteur obligatoires et interdits
|
||||||
|
iO:=1;
|
||||||
|
for k:=1 to 20 do begin list_det_obl[k].n:=0;list_det_int[k].n:=0;end;
|
||||||
n:=tabloroute[j,0].adresse;
|
n:=tabloroute[j,0].adresse;
|
||||||
s:=intToSTR(j)+'. ';
|
// obligatoires
|
||||||
s:=s+route_to_string(tabloroute[j]);
|
while (iO<=20) and (list_det_obl[iO].adresse<>0) do
|
||||||
l:=Length(s);
|
|
||||||
if l>pluslongue then
|
|
||||||
begin
|
begin
|
||||||
chainelongue:=s;
|
for k:=1 to n do
|
||||||
pluslongue:=l;
|
begin
|
||||||
|
if (tabloroute[j,k].typ=det) and (list_det_obl[iO].adresse=tabloroute[j,k].adresse) then inc(list_Det_obl[iO].n);
|
||||||
|
end;
|
||||||
|
inc(iO);
|
||||||
|
end;
|
||||||
|
// interdits
|
||||||
|
iI:=1;
|
||||||
|
while (iI<=20) and (list_det_int[iI].adresse<>0) do
|
||||||
|
begin
|
||||||
|
for k:=1 to n do
|
||||||
|
begin
|
||||||
|
if (tabloroute[j,k].typ=det) and (list_det_int[iI].adresse=tabloroute[j,k].adresse) then inc(list_Det_int[iI].n);
|
||||||
|
end;
|
||||||
|
inc(iI);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FormRoute.listBoxRoutes.Items.Add(s);
|
trouveObl:=true;
|
||||||
|
trouveInt:=false;
|
||||||
|
// trouver si cette route j contient tous détecteurs obligatoires
|
||||||
|
// ou des détecteurs interdits
|
||||||
|
for k:=1 to iI-1 do
|
||||||
|
begin
|
||||||
|
trouveInt:=TrouveInt or (list_det_int[k].n>0);
|
||||||
|
end;
|
||||||
|
// obligatoires
|
||||||
|
for k:=1 to iO-1 do
|
||||||
|
begin
|
||||||
|
trouveObl:=TrouveObl and (list_det_obl[k].n>0);
|
||||||
|
end;
|
||||||
|
if trouveObl and not trouveint then
|
||||||
|
begin
|
||||||
|
s:=intToSTR(j)+'. ';
|
||||||
|
s:=s+route_restreinte_to_string(tabloroute[j]);
|
||||||
|
l:=Length(s);
|
||||||
|
if l>pluslongue then
|
||||||
|
begin
|
||||||
|
chainelongue:=s;
|
||||||
|
pluslongue:=l;
|
||||||
|
end;
|
||||||
|
inc(NpropTot);
|
||||||
|
if round(n/np)>2 then
|
||||||
|
begin
|
||||||
|
if afLongue then
|
||||||
|
begin
|
||||||
|
coulText:=clOrange;
|
||||||
|
FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(CoulText)); // permet d'afficher un texte en couleurs avec l'evt onDrawItem
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
inc(Nprop);
|
||||||
|
coulText:=clYellow;
|
||||||
|
FormRoute.ListBoxRoutes.Items.AddObject(s,pointer(CoulText)); // permet d'afficher un texte en couleurs avec l'evt onDrawItem
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
Screen.Cursor:=crDefault;
|
||||||
|
|
||||||
PixelLength:=FormRoute.ListboxRoutes.Canvas.TextWidth(chaineLongue)+30;
|
PixelLength:=FormRoute.ListboxRoutes.Canvas.TextWidth(chaineLongue)+30;
|
||||||
// positionne une scrollbar dans la listbox - pour l'enlever, envoyer 0 dans pixelLength
|
// positionne une scrollbar dans la listbox - pour l'enlever, envoyer 0 dans pixelLength
|
||||||
SendMessage(FormRoute.ListBoxRoutes.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0);
|
SendMessage(FormRoute.ListBoxRoutes.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0);
|
||||||
|
|
||||||
// icone train
|
// icone train
|
||||||
@@ -251,18 +425,28 @@ begin
|
|||||||
formRoute.ButtonFenPil.enabled:=trains[IdTrainCourant].route[0].adresse<>0;
|
formRoute.ButtonFenPil.enabled:=trains[IdTrainCourant].route[0].adresse<>0;
|
||||||
|
|
||||||
if NbreRoutes=1 then clic_route(0);
|
if NbreRoutes=1 then clic_route(0);
|
||||||
|
|
||||||
|
s:=intToSTR(Nprop)+' propositions - Route '+intToSTR(NumRoute)+'/'+intToSTR(NbreRoutes)+' : '+intToSTR(n)+' éléments';
|
||||||
|
FormRoute.LabelNombre.caption:=s;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormRoute.FormActivate(Sender: TObject);
|
procedure TFormRoute.FormActivate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
maj_fenetre;
|
maj_fenetre;
|
||||||
|
coulText:=clYellow;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormRoute.ListBoxRoutesMouseDown(Sender: TObject;
|
procedure TFormRoute.ListBoxRoutesMouseDown(Sender: TObject;
|
||||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
var s : string;
|
||||||
|
erreur : integer;
|
||||||
begin
|
begin
|
||||||
LigneRoute:=listBoxRoutes.Itemindex;
|
IndexLigneRoute:=listBoxRoutes.Itemindex;
|
||||||
clic_route(ligneRoute);
|
if IndexLigneRoute<0 then exit;
|
||||||
|
s:=ListBoxRoutes.items[IndexLigneRoute];
|
||||||
|
val(s,NumRoute,erreur);
|
||||||
|
clic_route(NumRoute);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormRoute.ButtonEffaceClick(Sender: TObject);
|
procedure TFormRoute.ButtonEffaceClick(Sender: TObject);
|
||||||
@@ -281,7 +465,8 @@ var i,j,n,p : integer;
|
|||||||
s : string;
|
s : string;
|
||||||
typ : tequipement;
|
typ : tequipement;
|
||||||
begin
|
begin
|
||||||
if ligneroute<0 then exit;
|
if (Indexligneroute<0) or (NumRoute<1) then exit;
|
||||||
|
|
||||||
with formprinc do
|
with formprinc do
|
||||||
begin
|
begin
|
||||||
windowState:=wsNormal; //Maximized;
|
windowState:=wsNormal; //Maximized;
|
||||||
@@ -289,12 +474,12 @@ begin
|
|||||||
BringToFront;
|
BringToFront;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
j:=ligneroute+1;
|
j:=Indexligneroute+1;
|
||||||
n:=tabloroute[j,0].adresse;
|
n:=tabloroute[j,0].adresse;
|
||||||
Affiche('Route '+intToSTR(j)+' ---------------n='+intToSTR(n),clwhite);
|
Affiche('Route '+intToSTR(j)+' ---------------n='+intToSTR(n),clwhite);
|
||||||
for i:=1 to n do
|
for i:=1 to n do
|
||||||
begin
|
begin
|
||||||
s:=intToSTR(tabloroute[j,i].adresse)+' '+BTypeToChaine(tabloroute[j,i].typ)+' ';
|
s:=intToSTR(i)+' : '+intToSTR(tabloroute[j,i].adresse)+' '+BTypeToChaine(tabloroute[j,i].typ)+' ';
|
||||||
p:=tabloRoute[j,i].pos;
|
p:=tabloRoute[j,i].pos;
|
||||||
typ:=tabloRoute[j,i].typ;
|
typ:=tabloRoute[j,i].typ;
|
||||||
if (typ=aig) or (typ=tjd) or (typ=tjs) or (typ=triple) then
|
if (typ=aig) or (typ=tjd) or (typ=tjs) or (typ=triple) then
|
||||||
@@ -367,17 +552,23 @@ end;
|
|||||||
|
|
||||||
procedure TFormRoute.ListBoxRoutesKeyDown(Sender: TObject; var Key: Word;
|
procedure TFormRoute.ListBoxRoutesKeyDown(Sender: TObject; var Key: Word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
|
var s : string;
|
||||||
|
erreur : integer;
|
||||||
begin
|
begin
|
||||||
if (ord(Key)=VK_UP) and (ligneroute>0) then
|
if indexLigneRoute<0 then exit;
|
||||||
|
if (ord(Key)=VK_UP) and (Indexligneroute>0) then
|
||||||
begin
|
begin
|
||||||
dec(ligneRoute);
|
dec(IndexligneRoute);
|
||||||
efface_affiche_route;
|
|
||||||
end;
|
end;
|
||||||
if (ord(Key)=VK_DOWN) and (ligneroute+1<NbreRoutes) then
|
if (ord(Key)=VK_DOWN) and (Indexligneroute+1<ListBoxRoutes.Count) then
|
||||||
begin
|
begin
|
||||||
inc(ligneRoute);
|
inc(IndexligneRoute);
|
||||||
efface_affiche_route;
|
|
||||||
end;
|
end;
|
||||||
|
//Affiche('9985 '+intToSTR(indexLigneROute)+'/'+intToSTR(Nprop),clWhite);
|
||||||
|
s:=ListBoxRoutes.items[IndexLigneRoute];
|
||||||
|
|
||||||
|
val(s,NumRoute,erreur);
|
||||||
|
efface_affiche_route;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -385,7 +576,12 @@ procedure TFormRoute.FormCreate(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
ButtonFenPil.hint:='Ouvre la fenêtre de pilotage des trains'+#13+'ce qui permet de lancer leur roulage';
|
ButtonFenPil.hint:='Ouvre la fenêtre de pilotage des trains'+#13+'ce qui permet de lancer leur roulage';
|
||||||
ButtonDetail.hint:='Affiche le détail de la route en fenêtre principale';
|
ButtonDetail.hint:='Affiche le détail de la route en fenêtre principale';
|
||||||
|
EditObligeCanton.Text:='aucun';
|
||||||
|
EditInterditCanton.Text:='aucun';
|
||||||
|
EditObligeCanton.Hint:='Numéro de cantons séparés par des virgules (10 maxi)'+#13+'Laisser vide pour aucune obligation';
|
||||||
|
EditInterditCanton.Hint:='Numéro de cantons séparés par des virgules (10 maxi)'+#13+'Laisser vide pour aucune interdiction';
|
||||||
|
|
||||||
|
ListBoxRoutes.Style:=lbOwnerDrawFixed; // pour déclencher l'evt on drawitem
|
||||||
// fenêtre toujours devant
|
// fenêtre toujours devant
|
||||||
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);
|
||||||
end;
|
end;
|
||||||
@@ -413,9 +609,119 @@ end;
|
|||||||
|
|
||||||
procedure TFormRoute.ButtonFenPilClick(Sender: TObject);
|
procedure TFormRoute.ButtonFenPilClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
if idcantonRoute<1 then exit;
|
||||||
indexTrainFR:=canton[idcantonRoute].indexTrain;
|
indexTrainFR:=canton[idcantonRoute].indexTrain;
|
||||||
FormRouteTrain.show;
|
FormRouteTrain.show;
|
||||||
close;
|
close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormRoute.ButtonParcours(Sender: TObject);
|
||||||
|
var i,j,n,p,det1,det2 : integer;
|
||||||
|
s : string;
|
||||||
|
typ : tequipement;
|
||||||
|
begin
|
||||||
|
if (Indexligneroute<0) or (NumRoute<1) then exit;
|
||||||
|
efface_route_tco;
|
||||||
|
hide;
|
||||||
|
j:=NumRoute;
|
||||||
|
n:=tabloroute[j,0].adresse;
|
||||||
|
i:=1;
|
||||||
|
det2:=0;
|
||||||
|
toucheTCO:=#0;
|
||||||
|
repeat
|
||||||
|
s:=intToSTR(tabloroute[j,i].adresse)+' '+BTypeToChaine(tabloroute[j,i].typ)+' ';
|
||||||
|
p:=tabloRoute[j,i].pos;
|
||||||
|
typ:=tabloRoute[j,i].typ;
|
||||||
|
|
||||||
|
if typ=det then
|
||||||
|
begin // attention on ne gère que le TCO1
|
||||||
|
Zone_TCO(1,det1,det2,1,0,0,false); // faire true et positionner les aiguillages
|
||||||
|
det1:=det2;
|
||||||
|
det2:=tabloroute[j,i].adresse;
|
||||||
|
Zone_TCO(1,det1,det2,1,0,1,false);
|
||||||
|
FormTCO[1].Caption:=intToSTR(i)+'/'+intToSTR(n)+' '+intToSTR(det1)+' '+intToSTR(det2)+ ' Arrêt par touche Echap';
|
||||||
|
//Affiche(intToSTR(det1)+' '+intToSTR(det2),clyellow);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Application.ProcessMessages;
|
||||||
|
Sleep(500);
|
||||||
|
|
||||||
|
inc(i);
|
||||||
|
until (i>n) or (toucheTCO=#27);
|
||||||
|
titre_fenetre(1);
|
||||||
|
Show;
|
||||||
|
//Affiche('Fini',clred);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormRoute.ButtonRafClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
maj_fenetre;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormRoute.EditObligeCantonChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
detObl_to_liste;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormRoute.EditInterditCantonChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
detInt_to_liste;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormRoute.ButtonTrouverClick(Sender: TObject);
|
||||||
|
var sens,sensCanton,indexTCO,IdCantonOrg : integer;
|
||||||
|
begin
|
||||||
|
if cantonOrg=0 then exit;
|
||||||
|
|
||||||
|
IdCantonOrg:=index_canton_numero(cantonOrg);
|
||||||
|
//IdCantonDest:=index_canton_numero(cantonDest);
|
||||||
|
sensCanton:=canton[IdCantonOrg].sensLoco;
|
||||||
|
case sensCanton of // sens de la loco dans le canton
|
||||||
|
sensGauche : begin sens:=SensTCO_O;end;
|
||||||
|
sensDroit : begin sens:=SensTCO_E;end;
|
||||||
|
SensHaut : begin sens:=SensTCO_N;end;
|
||||||
|
SensBas : begin sens:=SensTCO_S;end;
|
||||||
|
end;
|
||||||
|
IndexTCO:=canton[IdcantonOrg].Ntco;
|
||||||
|
prepare_route(IndexTCO,CantonOrg,DetaTrouve,sens);
|
||||||
|
maj_fenetre;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormRoute.ListBoxRoutesDrawItem(Control: TWinControl;
|
||||||
|
Index: Integer; Rect: TRect; State: TOwnerDrawState);
|
||||||
|
var
|
||||||
|
myColor: TColor;
|
||||||
|
myBrush: TBrush;
|
||||||
|
myPen : Tpen;
|
||||||
|
begin
|
||||||
|
myBrush := TBrush.Create;
|
||||||
|
with (Control as TListBox).Canvas do // draw on control canvas, not on the form
|
||||||
|
begin
|
||||||
|
{ if Index = 3 then
|
||||||
|
myColor := clRed
|
||||||
|
else
|
||||||
|
myColor := clBlack;
|
||||||
|
}
|
||||||
|
//myBrush.Style := bsSolid;
|
||||||
|
//myBrush.Color := myColor;
|
||||||
|
|
||||||
|
//Windows.FillRect(handle, Rect, myBrush.Handle);
|
||||||
|
//Pen.color:=clWhite;//CoulText;
|
||||||
|
//myBrush.color:=clBlue;
|
||||||
|
//Brush.Style := bsClear;
|
||||||
|
// display the text
|
||||||
|
// TextOut(Rect.Left, Rect.Top, (Control as TListBox).Items[Index]);
|
||||||
|
//MyBrush.Free;
|
||||||
|
FillRect(Rect);
|
||||||
|
Font.Color := TColor(ListBoxRoutes.Items.Objects[Index]);
|
||||||
|
TextOut(Rect.Left + 2, Rect.Top, ListBoxRoutes.Items[Index]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormRoute.CheckBoxRoutesLonguesClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Maj_fenetre;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
+17
-5
@@ -43,8 +43,8 @@ object FormRouteTrain: TFormRouteTrain
|
|||||||
end
|
end
|
||||||
object ButtonQuitte: TButton
|
object ButtonQuitte: TButton
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 118
|
Top = 120
|
||||||
Width = 89
|
Width = 81
|
||||||
Height = 33
|
Height = 33
|
||||||
Caption = 'Quitter'
|
Caption = 'Quitter'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@@ -93,9 +93,9 @@ object FormRouteTrain: TFormRouteTrain
|
|||||||
OnClick = ButtonSupprimeClick
|
OnClick = ButtonSupprimeClick
|
||||||
end
|
end
|
||||||
object ButtonRouler1Tr: TButton
|
object ButtonRouler1Tr: TButton
|
||||||
Left = 256
|
Left = 280
|
||||||
Top = 120
|
Top = 120
|
||||||
Width = 107
|
Width = 83
|
||||||
Height = 33
|
Height = 33
|
||||||
Hint = 'Roule le train s'#233'lectionn'#233' s'#39'il dispose d'#39'une route'
|
Hint = 'Roule le train s'#233'lectionn'#233' s'#39'il dispose d'#39'une route'
|
||||||
Caption = 'Rouler le train'
|
Caption = 'Rouler le train'
|
||||||
@@ -106,7 +106,7 @@ object FormRouteTrain: TFormRouteTrain
|
|||||||
OnClick = ButtonRouler1TrClick
|
OnClick = ButtonRouler1TrClick
|
||||||
end
|
end
|
||||||
object ButtonRoulerTsTrains: TButton
|
object ButtonRoulerTsTrains: TButton
|
||||||
Left = 168
|
Left = 192
|
||||||
Top = 120
|
Top = 120
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 33
|
Height = 33
|
||||||
@@ -118,4 +118,16 @@ object FormRouteTrain: TFormRouteTrain
|
|||||||
WordWrap = True
|
WordWrap = True
|
||||||
OnClick = ButtonRoulerTsTrainsClick
|
OnClick = ButtonRoulerTsTrainsClick
|
||||||
end
|
end
|
||||||
|
object ButtonSauveRoute: TButton
|
||||||
|
Left = 104
|
||||||
|
Top = 120
|
||||||
|
Width = 81
|
||||||
|
Height = 33
|
||||||
|
Hint = 'Sauve la route et l'#39'affecte '#224' ce train'
|
||||||
|
Caption = 'Sauve route'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 7
|
||||||
|
OnClick = ButtonSauveRouteClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+318
-50
@@ -20,6 +20,7 @@ type
|
|||||||
ButtonSupprime: TButton;
|
ButtonSupprime: TButton;
|
||||||
ButtonRouler1Tr: TButton;
|
ButtonRouler1Tr: TButton;
|
||||||
ButtonRoulerTsTrains: TButton;
|
ButtonRoulerTsTrains: TButton;
|
||||||
|
ButtonSauveRoute: TButton;
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
procedure ButtonQuitteClick(Sender: TObject);
|
procedure ButtonQuitteClick(Sender: TObject);
|
||||||
procedure ComboBoxTrainsChange(Sender: TObject);
|
procedure ComboBoxTrainsChange(Sender: TObject);
|
||||||
@@ -30,6 +31,7 @@ type
|
|||||||
procedure ButtonSupprimeClick(Sender: TObject);
|
procedure ButtonSupprimeClick(Sender: TObject);
|
||||||
procedure ButtonRouler1TrClick(Sender: TObject);
|
procedure ButtonRouler1TrClick(Sender: TObject);
|
||||||
procedure ButtonRoulerTsTrainsClick(Sender: TObject);
|
procedure ButtonRoulerTsTrainsClick(Sender: TObject);
|
||||||
|
procedure ButtonSauveRouteClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
public
|
public
|
||||||
@@ -78,7 +80,10 @@ begin
|
|||||||
if trouve then
|
if trouve then
|
||||||
begin
|
begin
|
||||||
trains[indexTrain].dernierdet:=detect;
|
trains[indexTrain].dernierdet:=detect;
|
||||||
if not(diffusion) then Affiche('Le détecteur du train '+train+' est le '+intToSTR(detect),clWhite);
|
if debugRoulage then
|
||||||
|
begin
|
||||||
|
Affiche('Le détecteur du train '+train+' est le '+intToSTR(detect),clWhite);
|
||||||
|
end;
|
||||||
|
|
||||||
index_signal_det(detect,voie1,indexSig1,voie2,indexSig2);
|
index_signal_det(detect,voie1,indexSig1,voie2,indexSig2);
|
||||||
AdrSig1:=0;AdrSig2:=0;
|
AdrSig1:=0;AdrSig2:=0;
|
||||||
@@ -163,6 +168,8 @@ begin
|
|||||||
|
|
||||||
if not(roulage) then exit;
|
if not(roulage) then exit;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
s:='Lancement du train '+train;
|
s:='Lancement du train '+train;
|
||||||
if detect<>0 then s:=s+' depuis détecteur '+intToSTR(Detect);
|
if detect<>0 then s:=s+' depuis détecteur '+intToSTR(Detect);
|
||||||
Affiche(s,clYellow);
|
Affiche(s,clYellow);
|
||||||
@@ -195,7 +202,7 @@ begin
|
|||||||
with formRouteTrain do
|
with formRouteTrain do
|
||||||
begin
|
begin
|
||||||
RicheditRoute.Clear;
|
RicheditRoute.Clear;
|
||||||
RichEditRoute.Lines.Add(route_to_string(trains[idTrain].route));
|
RichEditRoute.Lines.Add(route_restreinte_to_string(trains[idTrain].route));
|
||||||
if trains[idtrain].route[0].adresse<>0 then
|
if trains[idtrain].route[0].adresse<>0 then
|
||||||
begin
|
begin
|
||||||
labelroute.caption:='Route affectée au train '+trains[idtrain].nom_train;
|
labelroute.caption:='Route affectée au train '+trains[idtrain].nom_train;
|
||||||
@@ -264,6 +271,7 @@ begin
|
|||||||
|
|
||||||
supprime_route_train(indexTrainFR);
|
supprime_route_train(indexTrainFR);
|
||||||
maj_infos(indexTrainFR);
|
maj_infos(indexTrainFR);
|
||||||
|
close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Réserve les éléments s'ils ne sont pas déja réservés et positionne les aiguillages
|
// Réserve les éléments s'ils ne sont pas déja réservés et positionne les aiguillages
|
||||||
@@ -271,12 +279,12 @@ end;
|
|||||||
// en entrée : index du train ; detect=détecteur à partir duquel faire la réservation et le positionnement des aiguillages
|
// en entrée : index du train ; detect=détecteur à partir duquel faire la réservation et le positionnement des aiguillages
|
||||||
// en sortie : si erreur : -1 ou adresse du train qui a réservé le canton
|
// en sortie : si erreur : -1 ou adresse du train qui a réservé le canton
|
||||||
// phase 0 : si le détecteur detect est en fin de route, alors on active l'arret du train
|
// phase 0 : si le détecteur detect est en fin de route, alors on active l'arret du train
|
||||||
// phase 1 : tester si éléments réservés par train tiers jusqu'au signal suivant. Si oui, sortir.
|
// phase 1 : tester si éléments réservés par train tiers jusqu'aux cantons suivants. Si oui, sortir.
|
||||||
// phase 2 : positionner les aiguillages
|
// phase 2 : positionner les aiguillages
|
||||||
// phase 3 : réserver les aiguillages
|
// phase 3 : réserver les aiguillages
|
||||||
function aig_canton(idTrain,detect : integer) : integer;
|
function aig_canton(idTrain,detect : integer) : integer;
|
||||||
var AdrSig,n,i,ic,j,ideb,iFin,AdrTrain,etat,pointeur,voie1,voie2,indexSig1,indexSig2,
|
var AdrSig,n,i,ic,j,ideb,iFin,AdrTrain,etat,pointeur,voie1,voie2,indexSig1,indexSig2,AncPr,
|
||||||
Trainexistant,adr,pos,index,Ncanton,icanton,NumCanton,pr,det_arret,it,PointRoute,ElPrec,
|
Trainexistant,adr,pos,index,Ncanton,icanton,NumCanton,det_arret,it,PointRoute,ElPrec,
|
||||||
adr2 : integer;
|
adr2 : integer;
|
||||||
typ,tprec: tequipement;
|
typ,tprec: tequipement;
|
||||||
trainTiers,SigBonSens,trouve : boolean;
|
trainTiers,SigBonSens,trouve : boolean;
|
||||||
@@ -284,7 +292,7 @@ var AdrSig,n,i,ic,j,ideb,iFin,AdrTrain,etat,pointeur,voie1,voie2,indexSig1,index
|
|||||||
begin
|
begin
|
||||||
//traceliste:=true;
|
//traceliste:=true;
|
||||||
if ProcPrinc then AfficheDebug('Aig_canton '+intToSTR(idTrain)+' '+intToSTR(detect),clWhite);
|
if ProcPrinc then AfficheDebug('Aig_canton '+intToSTR(idTrain)+' '+intToSTR(detect),clWhite);
|
||||||
if not(diffusion) then Affiche('Aig_canton '+intToSTR(idTrain)+' '+intToSTR(detect),clWhite);
|
if debugRoulage then Affiche('Aig_canton '+intToSTR(idTrain)+' '+intToSTR(detect),clWhite);
|
||||||
result:=0;
|
result:=0;
|
||||||
|
|
||||||
If traceliste then
|
If traceliste then
|
||||||
@@ -303,7 +311,7 @@ begin
|
|||||||
i:=pointeur-1;
|
i:=pointeur-1;
|
||||||
if i=0 then i:=1; // on commence à 1
|
if i=0 then i:=1; // on commence à 1
|
||||||
|
|
||||||
if traceListe then
|
if DebugRoulage then
|
||||||
begin
|
begin
|
||||||
Affiche('AC train @'+intToSTR(AdrTrain)+'Detecteur='+intToSTR(detect)+' Pointeur'+intToSTR(pointeur)+' ->'+intToSTR(trains[idTrain].route[i].adresse),clOrange);
|
Affiche('AC train @'+intToSTR(AdrTrain)+'Detecteur='+intToSTR(detect)+' Pointeur'+intToSTR(pointeur)+' ->'+intToSTR(trains[idTrain].route[i].adresse),clOrange);
|
||||||
if i>=n then
|
if i>=n then
|
||||||
@@ -314,17 +322,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
j:=1;
|
j:=1;
|
||||||
pr:=trains[idTrain].PointRout;
|
AncPr:=trains[idTrain].PointRout;
|
||||||
repeat
|
repeat
|
||||||
if (trains[idTrain].route[j].adresse=detect) and (trains[idTrain].route[j].typ=det) and (j>pr) then
|
|
||||||
|
trouve:=(trains[idTrain].route[j].adresse=detect) and (trains[idTrain].route[j].typ=det) and (j>=AncPr);
|
||||||
|
if trouve then
|
||||||
begin
|
begin
|
||||||
trains[idTrain].PointRout:=j;
|
trains[idTrain].PointRout:=j;
|
||||||
PointRoute:=j;
|
PointRoute:=j;
|
||||||
//Affiche('Le pointeur de route est '+intToSTR(j)+' au détecteur '+intToSTR(detect),clred);
|
if DebugRoulage then Affiche('Le pointeur de route est '+intToSTR(j)+'/'+intToSTR(n)+' au détecteur '+intToSTR(detect),clWhite);
|
||||||
end;
|
end;
|
||||||
inc(j);
|
inc(j);
|
||||||
until j>n;
|
until trouve or (j>n);
|
||||||
|
|
||||||
|
|
||||||
// arrêt sur détecteur demandé
|
// arrêt sur détecteur demandé
|
||||||
trouve:=false;
|
trouve:=false;
|
||||||
@@ -344,36 +353,42 @@ begin
|
|||||||
adr2:=aiguillage[j].DDroit; // homologue
|
adr2:=aiguillage[j].DDroit; // homologue
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if not(diffusion) and (Det_arret<>0) then Affiche('Détecteur demande arrêt rencontré ('+intToSTR(det_arret)+')',clYellow);
|
if debugRoulage and (Det_arret<>0) then Affiche('Détecteur demande arrêt rencontré ('+intToSTR(det_arret)+')',clYellow);
|
||||||
// detecteur courant=arret
|
// detecteur courant=arret
|
||||||
if (det_arret=detect) and (detecteur[detect].etat) and (trains[idTrain].route[PointRoute-1].adresse=ElPrec) and (trains[idTrain].route[PointRoute-1].typ=tPrec) then
|
if (det_arret=detect) and (detecteur[detect].etat) and
|
||||||
|
(trains[idTrain].route[PointRoute-1].adresse=ElPrec) and (trains[idTrain].route[PointRoute-1].typ=tPrec) and
|
||||||
|
(pointroute<n) then
|
||||||
begin
|
begin
|
||||||
Affiche('Demande arrêt train '+trains[idTrain].nom_train+' '+intToSTR(trains[idTrain].DetecteurArret[it].temps)+'s sur détecteur '+inttoStr(detect)+' prec='+intToSTR(trains[idTrain].route[PointRoute-1].adresse),ClOrange);
|
Affiche('Demande arrêt train '+trains[idTrain].nom_train+' '+intToSTR(trains[idTrain].DetecteurArret[it].temps)+'s sur détecteur '+inttoStr(detect)+' prec='+intToSTR(trains[idTrain].route[PointRoute-1].adresse),ClOrange);
|
||||||
trains[idTrain].TempoArret:=50;
|
//trains[idTrain].TempoArret:=2;
|
||||||
trains[idTrain].TempoArretTemp:=trains[idTrain].DetecteurArret[it].temps*10;
|
trains[idTrain].TempoArretTemp:=trains[idTrain].DetecteurArret[it].temps*10;
|
||||||
|
trains[idTrain].arret_det:=true;
|
||||||
|
trains[idTrain].phase_arret:=0;
|
||||||
trouve:=true;
|
trouve:=true;
|
||||||
end;
|
end;
|
||||||
inc(it);
|
inc(it);
|
||||||
until (it>NbDetArret) or trouve;
|
until (it>NbDetArret) or trouve;
|
||||||
|
|
||||||
if (detect=trains[idTrain].route[n].adresse) and (trains[idTrain].route[n].typ=det) then
|
if pointRoute>=n then
|
||||||
begin
|
begin
|
||||||
// route traitée , arrêter le train
|
// route traitée , arrêter le train
|
||||||
trains[idTrain].TempoArretCour:=0;
|
if debugRoulage then Affiche('AC - Route terminée *****',clred);
|
||||||
trains[idTrain].TempoArret:=50;
|
trains[idTrain].arret_det:=true;
|
||||||
|
Trains[idTrain].phase_arret:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
traintiers:=false;
|
traintiers:=false;
|
||||||
icanton:=0;
|
icanton:=0;
|
||||||
ncanton:=0;
|
ncanton:=0;
|
||||||
TrainExistant:=0;
|
TrainExistant:=0;
|
||||||
ideb:=i;
|
ideb:=trains[idTrain].PointRout;
|
||||||
AdrSig:=0;
|
AdrSig:=0;
|
||||||
SigBonSens:=false;
|
SigBonSens:=false;
|
||||||
|
//TraceListe:=true;
|
||||||
if traceliste then Affiche('Aiguillages',clOrange);
|
if traceliste then Affiche('Aiguillages',clOrange);
|
||||||
with trains[idtrain] do
|
with trains[idtrain] do
|
||||||
begin
|
begin
|
||||||
// boucle de vérification de réservation des aiguillages par un train tiers, jusqu'à rencontrer n cantons
|
// boucle de vérification de réservation des aiguillages par un train même lui même, jusqu'à rencontrer n cantons
|
||||||
repeat
|
repeat
|
||||||
typ:=route[i].typ;
|
typ:=route[i].typ;
|
||||||
adr:=route[i].adresse;
|
adr:=route[i].adresse;
|
||||||
@@ -383,7 +398,244 @@ begin
|
|||||||
if TraceListe then Affiche(intToSTR(adr)+' ',clOrange);
|
if TraceListe then Affiche(intToSTR(adr)+' ',clOrange);
|
||||||
// vérifier si l'aiguillage est libre
|
// vérifier si l'aiguillage est libre
|
||||||
TrainExistant:=Aiguillage[index_aig(adr)].AdrTrain;
|
TrainExistant:=Aiguillage[index_aig(adr)].AdrTrain;
|
||||||
if (trainexistant<>AdrTrain) and (TrainExistant<>0) then
|
//if (trainexistant<>AdrTrain) and (TrainExistant<>0) then
|
||||||
|
if (TrainExistant<>0) then
|
||||||
|
begin
|
||||||
|
result:=TrainExistant;
|
||||||
|
trains[idtrain].roulage:=1;
|
||||||
|
trainTiers:=true;
|
||||||
|
if traceListe then Affiche('AC-Aiguillage '+intToSTR(adr)+' réservé par autre train : @='+intToSTR(result),clyellow);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if (typ=det) then
|
||||||
|
begin
|
||||||
|
TrainExistant:=detecteur[adr].AdrTrainRes;
|
||||||
|
if (TrainExistant<>AdrTrain) and (trainExistant<>0) then
|
||||||
|
begin
|
||||||
|
result:=TrainExistant;
|
||||||
|
trains[idtrain].roulage:=1; // le roulage est arrêté
|
||||||
|
traintiers:=true;
|
||||||
|
if traceListe then Affiche('AC-Détecteur '+intToSTR(adr)+' réservé par autre train : @='+intToSTR(result),clyellow);
|
||||||
|
//exit;
|
||||||
|
end;
|
||||||
|
// si détecteur comporte signal
|
||||||
|
index_signal_det(adr,voie1,indexSig1,voie2,indexSig2);
|
||||||
|
if indexSig1<>0 then
|
||||||
|
begin
|
||||||
|
AdrSig:=0;
|
||||||
|
// si le signal est dans le bon sens
|
||||||
|
if (i+1<=n) then // si on arrive pas en bout de route
|
||||||
|
begin
|
||||||
|
if (signaux[indexSig1].Adr_el_suiv1=route[i+1].adresse) then
|
||||||
|
begin
|
||||||
|
AdrSig:=signaux[indexSig1].adresse;
|
||||||
|
if TraceListe then Affiche('AC-Trouvé signal '+intToSTR(AdrSig)+' dans bon sens',clYellow);
|
||||||
|
inc(nCanton);
|
||||||
|
icanton:=i;
|
||||||
|
SigBonSens:=true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if TraceListe then Affiche('AC-Trouvé signal '+intToSTR(signaux[indexSig1].adresse)+' dans mauvais sens',clYellow);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if indexSig2<>0 then
|
||||||
|
begin
|
||||||
|
if (signaux[indexSig2].Adr_el_suiv1=route[i+1].adresse) then
|
||||||
|
begin
|
||||||
|
AdrSig:=signaux[indexSig2].adresse;
|
||||||
|
if TraceListe then Affiche('AC-Trouvé signal '+intToSTR(AdrSig)+' dans bon sens',clYellow);
|
||||||
|
inc(nCanton);
|
||||||
|
icanton:=i;
|
||||||
|
SigBonSens:=true;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if TraceListe then Affiche('AC-Trouvé signal '+intToSTR(signaux[indexSig2].adresse)+' dans mauvais sens',clYellow);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
inc(i);
|
||||||
|
until (i>n) or (SigBonSens and (nCanton=nCantonsRes+1)) or (trainTiers);
|
||||||
|
|
||||||
|
if traceliste then affiche('Phase 2-3',clWhite);
|
||||||
|
// phases 2 et 3
|
||||||
|
trains[idtrain].roulage:=2; // roulage effectif
|
||||||
|
result:=AdrTrain;
|
||||||
|
if not(traintiers) then iFin:=i-1 else iFin:=icanton;
|
||||||
|
AdrTrain:=trains[idTrain].adresse;
|
||||||
|
|
||||||
|
// balayage du (des) cantons libres -------------------------------------------------------------
|
||||||
|
if traceListe or debugRoulage then Affiche('Balayage de '+intToSTR(ideb)+' à '+intToSTR(ifin)+' pour positionner et réserver aiguillages',clYellow);
|
||||||
|
for i:=iDeb to iFin do
|
||||||
|
begin
|
||||||
|
route[i].traite:=true;
|
||||||
|
typ:=route[i].typ;
|
||||||
|
adr:=route[i].adresse;
|
||||||
|
if (typ=aig) or (typ=triple) or (typ=tjs) or (typ=tjd) or (typ=crois) then
|
||||||
|
begin
|
||||||
|
pos:=route[i].pos;
|
||||||
|
index:=index_aig(adr);
|
||||||
|
|
||||||
|
if ((typ=aig) or (typ=triple) or (typ=tjs) or (typ=tjd)) then
|
||||||
|
begin
|
||||||
|
if aiguillage[index].AdrTrain=0 then
|
||||||
|
begin
|
||||||
|
pilote_acc(adr,pos,AdrTrain); // pilote l'aig si il est reservé par le train ou non réservé
|
||||||
|
s:='AC-Pilote aiguillage '+intToSTR(adr)+'='+intToSTR(pos);
|
||||||
|
case pos of
|
||||||
|
const_devie : s:=s+' (dévié)';
|
||||||
|
const_droit : s:=s+' (droit)';
|
||||||
|
else
|
||||||
|
s:=s+' non positionné';
|
||||||
|
end;
|
||||||
|
if debugRoulage then Affiche(s,clWhite);
|
||||||
|
if portCommOuvert or parSocketLenz or CDM_connecte then sleep(Tempo_Aig);
|
||||||
|
// réservation
|
||||||
|
Affiche('Réservation Aig '+intToSTR(adr),clCyan);
|
||||||
|
aiguillage[index].adrTrain:=AdrTrain;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if typ=det then
|
||||||
|
begin
|
||||||
|
detecteur[adr].AdrTrainRes:=adrTrain;
|
||||||
|
end;
|
||||||
|
Texte_aig_fond(adr);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
maj_signaux(false);
|
||||||
|
//TraceListe:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// Réserve les éléments s'ils ne sont pas déja réservés et positionne les aiguillages
|
||||||
|
// jusqu'au signal suivant (soit 1 canton)
|
||||||
|
// en entrée : index du train ; detect=détecteur à partir duquel faire la réservation et le positionnement des aiguillages
|
||||||
|
// en sortie : si erreur : -1 ou adresse du train qui a réservé le canton
|
||||||
|
// phase 0 : si le détecteur detect est en fin de route, alors on active l'arret du train
|
||||||
|
// phase 1 : tester si éléments réservés par train tiers jusqu'aux cantons suivants. Si oui, sortir.
|
||||||
|
// phase 2 : positionner les aiguillages
|
||||||
|
// phase 3 : réserver les aiguillages
|
||||||
|
function aig_cantonX(idTrain,detect : integer) : integer;
|
||||||
|
var AdrSig,n,i,ic,j,ideb,iFin,AdrTrain,etat,pointeur,voie1,voie2,indexSig1,indexSig2,AncPr,
|
||||||
|
Trainexistant,adr,pos,index,Ncanton,icanton,NumCanton,det_arret,it,PointRoute,ElPrec,
|
||||||
|
adr2 : integer;
|
||||||
|
typ,tprec: tequipement;
|
||||||
|
trainTiers,SigBonSens,trouve : boolean;
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
//traceliste:=true;
|
||||||
|
if ProcPrinc then AfficheDebug('Aig_canton '+intToSTR(idTrain)+' '+intToSTR(detect),clWhite);
|
||||||
|
if debugRoulage then Affiche('Aig_canton '+intToSTR(idTrain)+' '+intToSTR(detect),clWhite);
|
||||||
|
result:=0;
|
||||||
|
|
||||||
|
If traceliste then
|
||||||
|
begin
|
||||||
|
if detecteur[detect].Etat then etat:=1 else etat:=0;
|
||||||
|
affiche('Aig_canton Train id='+intToSTR(idtrain)+' '+intToSTR(detect)+' à '+intToSTR(etat)+'---------------Phase 1',clWhite);
|
||||||
|
end;
|
||||||
|
AdrTrain:=trains[idTrain].adresse;
|
||||||
|
|
||||||
|
pointeur:=0;
|
||||||
|
n:=trains[idTrain].route[0].adresse;
|
||||||
|
repeat
|
||||||
|
inc(pointeur);
|
||||||
|
until (trains[idTrain].route[pointeur].traite=false) or (pointeur+1>=n);
|
||||||
|
|
||||||
|
i:=pointeur-1;
|
||||||
|
if i=0 then i:=1; // on commence à 1
|
||||||
|
|
||||||
|
if DebugRoulage then
|
||||||
|
begin
|
||||||
|
Affiche('AC train @'+intToSTR(AdrTrain)+'Detecteur='+intToSTR(detect)+' Pointeur'+intToSTR(pointeur)+' ->'+intToSTR(trains[idTrain].route[i].adresse),clOrange);
|
||||||
|
if i>=n then
|
||||||
|
begin
|
||||||
|
affiche('La route a été complètement traitée (réservation)',clOrange);
|
||||||
|
result:=0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// mettre le pointeur de route j sur le détecteur "detect", après le pointeur 'AncPr'
|
||||||
|
j:=1;
|
||||||
|
AncPr:=trains[idTrain].PointRout;
|
||||||
|
repeat
|
||||||
|
trouve:=(trains[idTrain].route[j].adresse=detect) and (trains[idTrain].route[j].typ=det) and (j>=AncPr);
|
||||||
|
if trouve then
|
||||||
|
begin
|
||||||
|
trains[idTrain].PointRout:=j; //<<<<<<<<< le pointeur est stocké
|
||||||
|
PointRoute:=j;
|
||||||
|
if DebugRoulage then Affiche('Le pointeur de route est '+intToSTR(j)+'/'+intToSTR(n)+' au détecteur '+intToSTR(detect),clWhite);
|
||||||
|
end;
|
||||||
|
inc(j);
|
||||||
|
until trouve or (j>n);
|
||||||
|
|
||||||
|
// arrêt temporisé sur détecteur demandé
|
||||||
|
trouve:=false;
|
||||||
|
it:=1; // boucle de détecteurs dans les trains
|
||||||
|
if roulage and (trains[idTrain].roulage>0) and (pointRoute>1) then
|
||||||
|
repeat
|
||||||
|
det_arret:=trains[idTrain].DetecteurArret[it].detecteur;
|
||||||
|
elPrec:=trains[idTrain].DetecteurArret[it].prec;
|
||||||
|
Tprec:=trains[idTrain].DetecteurArret[it].tprec;
|
||||||
|
adr2:=0;
|
||||||
|
// si le précédent est une TJD 4 états il faut tester les 2 adresses
|
||||||
|
if Tprec=aig then
|
||||||
|
begin
|
||||||
|
j:=index_aig(elprec);
|
||||||
|
if (aiguillage[j].modele=tjd) and (aiguillage[j].EtatTJD=4) then
|
||||||
|
begin
|
||||||
|
adr2:=aiguillage[j].DDroit; // homologue
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if debugRoulage and (Det_arret<>0) then Affiche('Détecteur demande arrêt rencontré ('+intToSTR(det_arret)+')',clYellow);
|
||||||
|
// detecteur courant=arret
|
||||||
|
if (det_arret=detect) and (detecteur[detect].etat) and
|
||||||
|
(trains[idTrain].route[PointRoute-1].adresse=ElPrec) and (trains[idTrain].route[PointRoute-1].typ=tPrec) and
|
||||||
|
(pointroute<n) then
|
||||||
|
begin
|
||||||
|
Affiche('Demande arrêt train '+trains[idTrain].nom_train+' '+intToSTR(trains[idTrain].DetecteurArret[it].temps)+'s sur détecteur '+inttoStr(detect)+' prec='+intToSTR(trains[idTrain].route[PointRoute-1].adresse),ClOrange);
|
||||||
|
//trains[idTrain].TempoArret:=2;
|
||||||
|
trains[idTrain].TempoArretTemp:=trains[idTrain].DetecteurArret[it].temps*10; // récupérer le temps d'arrêt sur le détecteur
|
||||||
|
trains[idTrain].arret_det:=true;
|
||||||
|
trains[idTrain].phase_arret:=0;
|
||||||
|
trouve:=true;
|
||||||
|
end;
|
||||||
|
inc(it);
|
||||||
|
until (it>NbDetArret) or trouve;
|
||||||
|
|
||||||
|
if pointRoute>=n then
|
||||||
|
begin
|
||||||
|
// route traitée , arrêter le train
|
||||||
|
if debugRoulage then Affiche('AC - Route terminée *****',clred);
|
||||||
|
trains[idTrain].arret_det:=true;
|
||||||
|
Trains[idTrain].phase_arret:=0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
traintiers:=false;
|
||||||
|
icanton:=0;
|
||||||
|
ncanton:=0;
|
||||||
|
TrainExistant:=0;
|
||||||
|
ideb:=trains[idTrain].PointRout; // i; //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||||
|
AdrSig:=0;
|
||||||
|
SigBonSens:=false;
|
||||||
|
//TraceListe:=true;
|
||||||
|
if traceliste then Affiche('Aiguillages',clOrange);
|
||||||
|
with trains[idtrain] do
|
||||||
|
begin
|
||||||
|
// boucle de vérification de réservation des aiguillages par un train même lui même, jusqu'à rencontrer n cantons
|
||||||
|
repeat
|
||||||
|
typ:=route[i].typ;
|
||||||
|
adr:=route[i].adresse;
|
||||||
|
typ:=route[i].typ;
|
||||||
|
if (typ=Aig) or (typ=tjd) or (typ=tjs) or (typ=crois) or (typ=triple) then
|
||||||
|
begin
|
||||||
|
if TraceListe then Affiche(intToSTR(adr)+' ',clOrange);
|
||||||
|
// vérifier si l'aiguillage est libre
|
||||||
|
TrainExistant:=Aiguillage[index_aig(adr)].AdrTrain;
|
||||||
|
//if (trainexistant<>AdrTrain) and (TrainExistant<>0) then
|
||||||
|
if (TrainExistant<>0) then
|
||||||
begin
|
begin
|
||||||
result:=TrainExistant;
|
result:=TrainExistant;
|
||||||
trains[idtrain].roulage:=1;
|
trains[idtrain].roulage:=1;
|
||||||
@@ -448,7 +700,7 @@ begin
|
|||||||
// phases 2 et 3
|
// phases 2 et 3
|
||||||
trains[idtrain].roulage:=2; // roulage effectif
|
trains[idtrain].roulage:=2; // roulage effectif
|
||||||
result:=AdrTrain;
|
result:=AdrTrain;
|
||||||
if not(traintiers) then iFin:=i-1 else iFin:=icanton;
|
if not(traintiers) then iFin:=i-1 else iFin:=icanton; //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||||
AdrTrain:=trains[idTrain].adresse;
|
AdrTrain:=trains[idTrain].adresse;
|
||||||
|
|
||||||
// balayage du (des) cantons libres
|
// balayage du (des) cantons libres
|
||||||
@@ -463,31 +715,38 @@ begin
|
|||||||
pos:=route[i].pos;
|
pos:=route[i].pos;
|
||||||
index:=index_aig(adr);
|
index:=index_aig(adr);
|
||||||
|
|
||||||
if (typ=aig) or (typ=triple) or (typ=tjs) or (typ=tjd) then
|
if ((typ=aig) or (typ=triple) or (typ=tjs) or (typ=tjd)) then
|
||||||
begin
|
begin
|
||||||
pilote_acc(adr,pos,AdrTrain); // pilote l'aig si il est reservé par le train ou non réservé
|
if aiguillage[index].AdrTrain=0 then
|
||||||
|
begin
|
||||||
s:='AC-Pilote aiguillage '+intToSTR(adr)+'='+intToSTR(pos);
|
pilote_acc(adr,pos,AdrTrain); // pilote l'aig si il est reservé par le train ou non réservé
|
||||||
case pos of
|
s:='AC-Pilote aiguillage '+intToSTR(adr)+'='+intToSTR(pos);
|
||||||
const_devie : s:=s+' (dévié)';
|
case pos of
|
||||||
const_droit : s:=s+' (droit)';
|
const_devie : s:=s+' (dévié)';
|
||||||
else
|
const_droit : s:=s+' (droit)';
|
||||||
s:=s+' non positionné';
|
else
|
||||||
|
s:=s+' non positionné';
|
||||||
|
end;
|
||||||
|
if debugRoulage then Affiche(s,clWhite);
|
||||||
|
if portCommOuvert or parSocketLenz or CDM_connecte then sleep(Tempo_Aig);
|
||||||
|
// réservation
|
||||||
|
Affiche('Réservation Aig '+intToSTR(adr),clCyan);
|
||||||
|
aiguillage[index].adrTrain:=AdrTrain;
|
||||||
end;
|
end;
|
||||||
if not(diffusion) then
|
|
||||||
Affiche(s,clWhite);
|
|
||||||
if portCommOuvert or parSocketLenz or CDM_connecte then sleep(Tempo_Aig);
|
|
||||||
end;
|
end;
|
||||||
// réservation
|
|
||||||
aiguillage[index].adrTrain:=AdrTrain;
|
|
||||||
end;
|
end;
|
||||||
if typ=det then detecteur[adr].AdrTrainRes:=adrTrain;
|
if typ=det then
|
||||||
|
begin
|
||||||
|
detecteur[adr].AdrTrainRes:=adrTrain;
|
||||||
|
end;
|
||||||
Texte_aig_fond(adr);
|
Texte_aig_fond(adr);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
maj_signaux(false);
|
maj_signaux(false);
|
||||||
|
//TraceListe:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// bouton rouler 1 train
|
// bouton rouler 1 train
|
||||||
procedure TFormRouteTrain.ButtonRouler1TrClick(Sender: TObject);
|
procedure TFormRouteTrain.ButtonRouler1TrClick(Sender: TObject);
|
||||||
var demarre : boolean;
|
var demarre : boolean;
|
||||||
@@ -501,10 +760,11 @@ begin
|
|||||||
// si le train est doté d'une route
|
// si le train est doté d'une route
|
||||||
if trains[indexTrainFR].route[0].adresse>0 then
|
if trains[indexTrainFR].route[0].adresse>0 then
|
||||||
begin
|
begin
|
||||||
aig_canton(indexTrainFR,trains[indexTrainFR].route[1].adresse); // positionne aiguillage et fait les réservations
|
|
||||||
demarre:=demarre_index_train(indexTrainFR); // met la mémoire de roulage du train à 1
|
demarre:=demarre_index_train(indexTrainFR); // met la mémoire de roulage du train à 1
|
||||||
|
aig_canton(indexTrainFR,trains[indexTrainFR].route[1].adresse); // positionne aiguillage et fait les réservations
|
||||||
|
if debugRoulage then Affiche_routes_brut;
|
||||||
end;
|
end;
|
||||||
close;
|
close; // efface la route du TCO
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// bouton rouler tous les trains
|
// bouton rouler tous les trains
|
||||||
@@ -519,23 +779,31 @@ begin
|
|||||||
maj_signaux(true);
|
maj_signaux(true);
|
||||||
|
|
||||||
// positionner les aiguillages de la 1ère route
|
// positionner les aiguillages de la 1ère route
|
||||||
idtrain:=1;
|
|
||||||
repeat
|
|
||||||
//si le train est doté d'une route
|
|
||||||
if trains[idTrain].route[0].adresse>0 then
|
|
||||||
begin
|
|
||||||
aig_canton(idTrain,trains[idTrain].route[1].adresse);
|
|
||||||
end;
|
|
||||||
inc(idtrain);
|
|
||||||
until (idtrain>ntrains);
|
|
||||||
|
|
||||||
for idtrain:=1 to ntrains do
|
for idtrain:=1 to ntrains do
|
||||||
begin
|
begin
|
||||||
//si le train est doté d'une route
|
//si le train est doté d'une route
|
||||||
if trains[idTrain].route[0].adresse>0 then demarre:=demarre_index_train(idtrain); // met la mémoire de roulage du train à 1
|
if trains[idTrain].route[0].adresse>0 then
|
||||||
|
begin
|
||||||
|
if debugRoulage then Affiche_routes_brut;
|
||||||
|
demarre:=demarre_index_train(idtrain); // met la mémoire de roulage du train à 1
|
||||||
|
aig_canton(idTrain,trains[idTrain].route[1].adresse);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
close;
|
close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormRouteTrain.ButtonSauveRouteClick(Sender: TObject);
|
||||||
|
var n : integer;
|
||||||
|
begin
|
||||||
|
if (indexTrainFR<1) then exit;
|
||||||
|
n:=trains[indexTrainFr].route[0].adresse;
|
||||||
|
if n=0 then exit;
|
||||||
|
|
||||||
|
Trains[indexTrainFr].routePref:=Trains[IndexTrainFr].route;
|
||||||
|
Sauve_config;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
+88
-73
@@ -38,7 +38,7 @@ procedure ouvre_simulation(nomfichier : string);
|
|||||||
var s: string;
|
var s: string;
|
||||||
fte : text;
|
fte : text;
|
||||||
i,k,erreur : integer;
|
i,k,erreur : integer;
|
||||||
sortie : boolean;
|
AvecTick,sortie : boolean;
|
||||||
begin
|
begin
|
||||||
assignFile(fte,nomfichier);
|
assignFile(fte,nomfichier);
|
||||||
{$I+}
|
{$I+}
|
||||||
@@ -48,96 +48,111 @@ begin
|
|||||||
Affiche('Fichier '+nomFichier+' incorrect',clred);
|
Affiche('Fichier '+nomFichier+' incorrect',clred);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
avecTick:=false;
|
||||||
index_simule:=1;
|
index_simule:=1;
|
||||||
sortie:=false;
|
sortie:=false;
|
||||||
|
k:=0;
|
||||||
while not(eof(fte)) and not(sortie) do
|
while not(eof(fte)) and not(sortie) do
|
||||||
begin
|
begin
|
||||||
readln(fte,s);
|
readln(fte,s);
|
||||||
s:=Uppercase(s);
|
if length(s)>0 then
|
||||||
i:=pos('TICK=',s);
|
if s[1]<>'/' then
|
||||||
if i<>0 then
|
|
||||||
begin
|
begin
|
||||||
Delete(s,1,i+4);
|
s:=Uppercase(s);
|
||||||
val(s,k,erreur);
|
i:=pos('TICK=',s);
|
||||||
//if intervalle<>0 then k:=Index_Simule*Intervalle+tick+30 else // démarre dans 3s
|
if ((i<>0) and avecTick) or (not avecTick) then
|
||||||
// k:=Index_Simule+tick+30 ;
|
|
||||||
Tablo_simule[index_simule].tick:=k;
|
|
||||||
|
|
||||||
// détecteur? Det=528=1 Train=BB16024
|
|
||||||
i:=pos('DET',s);
|
|
||||||
if i<>0 then
|
|
||||||
begin
|
begin
|
||||||
Delete(s,1,i+2);
|
if avecTick then
|
||||||
if s[1]='=' then delete(s,1,1);
|
begin
|
||||||
if s[1]=' ' then delete(s,1,1);
|
Delete(s,1,i+4);
|
||||||
val(s,k,erreur);
|
val(s,k,erreur);
|
||||||
Tablo_simule[index_simule].adresse:=k;
|
//if intervalle<>0 then k:=Index_Simule*Intervalle+tick+30 else // démarre dans 3s
|
||||||
Tablo_simule[index_simule].modele:=det;
|
//k:=Index_Simule+tick+30 ;
|
||||||
i:=pos('=',s);
|
end
|
||||||
|
else inc(k);
|
||||||
|
Tablo_simule[index_simule].tick:=k;
|
||||||
|
|
||||||
|
// détecteur? Det=528=1 Train=BB16024
|
||||||
|
i:=pos('DET',s);
|
||||||
if i<>0 then
|
if i<>0 then
|
||||||
begin
|
begin
|
||||||
Delete(s,1,i);
|
Delete(s,1,i+2);
|
||||||
|
if s[1]='=' then delete(s,1,1);
|
||||||
|
if s[1]=' ' then delete(s,1,1);
|
||||||
val(s,k,erreur);
|
val(s,k,erreur);
|
||||||
Tablo_simule[index_simule].etat:=k;
|
if k<>0 then
|
||||||
|
begin
|
||||||
|
Tablo_simule[index_simule].adresse:=k;
|
||||||
|
Tablo_simule[index_simule].modele:=det;
|
||||||
|
delete(s,1,erreur);
|
||||||
|
val(s,k,erreur);
|
||||||
|
Tablo_simule[index_simule].etat:=k;
|
||||||
|
|
||||||
|
i:=pos('=',s);
|
||||||
|
if i<>0 then
|
||||||
|
begin
|
||||||
|
delete(s,1,i);
|
||||||
|
Tablo_simule[index_simule].train:=s;
|
||||||
|
end;
|
||||||
|
inc(index_simule);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
i:=pos('=',s);
|
// actionneur? Act=803/0=1 Train=CC406526
|
||||||
if i<>0 then delete(s,1,i);
|
i:=pos('ACT',s);
|
||||||
Tablo_simule[index_simule].train:=s;
|
|
||||||
|
|
||||||
inc(index_simule);
|
|
||||||
end;
|
|
||||||
|
|
||||||
// actionneur? Act=803/0=1 Train=CC406526
|
|
||||||
i:=pos('ACT',s);
|
|
||||||
if i<>0 then
|
|
||||||
begin
|
|
||||||
Delete(s,1,i+2);
|
|
||||||
if s[1]='=' then delete(s,1,1);
|
|
||||||
if s[1]=' ' then delete(s,1,1);
|
|
||||||
val(s,k,erreur);
|
|
||||||
Tablo_simule[index_simule].adresse:=k;
|
|
||||||
|
|
||||||
i:=pos('/',s);
|
|
||||||
if i<>0 then delete(s,1,i);
|
|
||||||
val(s,k,erreur);
|
|
||||||
|
|
||||||
i:=pos('=',s);
|
|
||||||
if i<>0 then delete(s,1,i);
|
|
||||||
val(s,k,erreur);
|
|
||||||
|
|
||||||
Tablo_simule[index_simule].modele:=act;
|
|
||||||
Tablo_simule[index_simule].etat:=k;
|
|
||||||
|
|
||||||
i:=pos('=',s);
|
|
||||||
if i<>0 then delete(s,1,i);
|
|
||||||
Tablo_simule[index_simule].train:=s;
|
|
||||||
inc(index_simule);
|
|
||||||
end;
|
|
||||||
|
|
||||||
// aiguillage?
|
|
||||||
i:=pos('AIG',s);
|
|
||||||
if i<>0 then
|
|
||||||
begin
|
|
||||||
Delete(s,1,i+2);
|
|
||||||
if s[1]='=' then delete(s,1,1);
|
|
||||||
if s[1]=' ' then delete(s,1,1);
|
|
||||||
val(s,k,erreur);
|
|
||||||
Tablo_simule[index_simule].adresse:=k;
|
|
||||||
Tablo_simule[index_simule].modele:=aig;
|
|
||||||
i:=pos('=',s);
|
|
||||||
if i<>0 then
|
if i<>0 then
|
||||||
begin
|
begin
|
||||||
Delete(s,1,i);
|
Delete(s,1,i+2);
|
||||||
|
if s[1]='=' then delete(s,1,1);
|
||||||
|
if s[1]=' ' then delete(s,1,1);
|
||||||
val(s,k,erreur);
|
val(s,k,erreur);
|
||||||
if (k=1) or (k=2) then Tablo_simule[index_simule].etat:=k
|
Tablo_simule[index_simule].adresse:=k;
|
||||||
else Affiche('Erreur 622 : Position aiguillage '+intToSTR(Tablo_simule[index_simule].adresse)+' inconnue dans le fichier de simulation',clred);
|
|
||||||
|
i:=pos('/',s);
|
||||||
|
if i<>0 then delete(s,1,i);
|
||||||
|
val(s,k,erreur);
|
||||||
|
|
||||||
|
i:=pos('=',s);
|
||||||
|
if i<>0 then delete(s,1,i);
|
||||||
|
val(s,k,erreur);
|
||||||
|
|
||||||
|
Tablo_simule[index_simule].modele:=act;
|
||||||
|
Tablo_simule[index_simule].etat:=k;
|
||||||
|
|
||||||
|
i:=pos('=',s);
|
||||||
|
if i<>0 then delete(s,1,i);
|
||||||
|
Tablo_simule[index_simule].train:=s;
|
||||||
inc(index_simule);
|
inc(index_simule);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// aiguillage?
|
||||||
|
i:=pos('AIG',s);
|
||||||
|
if i<>0 then
|
||||||
|
begin
|
||||||
|
delete(s,1,i+2);
|
||||||
|
i:=pos(' ',s);
|
||||||
|
if i=0 then i:=pos('=',s);
|
||||||
|
delete(s,1,i);
|
||||||
|
val(s,k,erreur);
|
||||||
|
if k<>0 then
|
||||||
|
begin
|
||||||
|
Tablo_simule[index_simule].adresse:=k;
|
||||||
|
Tablo_simule[index_simule].modele:=aig;
|
||||||
|
i:=pos('=',s);
|
||||||
|
if i<>0 then
|
||||||
|
begin
|
||||||
|
Delete(s,1,i);
|
||||||
|
val(s,k,erreur);
|
||||||
|
if (k=1) or (k=2) then Tablo_simule[index_simule].etat:=k
|
||||||
|
else Affiche('Erreur 622 : Position aiguillage '+intToSTR(Tablo_simule[index_simule].adresse)+' inconnue dans le fichier de simulation',clred);
|
||||||
|
inc(index_simule);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
sortie:=eof(fte) or (index_simule>Max_Simule) or (pos('STOP',s)<>0);
|
||||||
end;
|
end;
|
||||||
Application.ProcessMessages;
|
end;
|
||||||
sortie:=eof(fte) or (index_simule>Max_Simule) or (pos('STOP',s)<>0);
|
|
||||||
end ;
|
|
||||||
|
|
||||||
if index_simule>Max_Simule then Affiche('Tableau maximal atteint',clred);
|
if index_simule>Max_Simule then Affiche('Tableau maximal atteint',clred);
|
||||||
Affiche('Intervalle='+intToSTR(intervalle),clyellow);
|
Affiche('Intervalle='+intToSTR(intervalle),clyellow);
|
||||||
|
|||||||
+13
-5
@@ -1,6 +1,6 @@
|
|||||||
object FormTCO: TFormTCO
|
object FormTCO: TFormTCO
|
||||||
Left = 229
|
Left = 332
|
||||||
Top = 65
|
Top = 73
|
||||||
Width = 1013
|
Width = 1013
|
||||||
Height = 607
|
Height = 607
|
||||||
VertScrollBar.Visible = False
|
VertScrollBar.Visible = False
|
||||||
@@ -24,8 +24,8 @@ object FormTCO: TFormTCO
|
|||||||
OnKeyPress = FormKeyPress
|
OnKeyPress = FormKeyPress
|
||||||
OnMouseWheel = FormMouseWheel
|
OnMouseWheel = FormMouseWheel
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
997
|
1005
|
||||||
549)
|
556)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object LabelZoom: TLabel
|
object LabelZoom: TLabel
|
||||||
@@ -1537,6 +1537,10 @@ object FormTCO: TFormTCO
|
|||||||
object N8: TMenuItem
|
object N8: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
|
object rouverunlment1: TMenuItem
|
||||||
|
Caption = 'Trouver un '#233'l'#233'ment'
|
||||||
|
OnClick = rouverunlment1Click
|
||||||
|
end
|
||||||
object DessinerleTCO1: TMenuItem
|
object DessinerleTCO1: TMenuItem
|
||||||
Caption = 'Dessiner le TCO'
|
Caption = 'Dessiner le TCO'
|
||||||
Hint = 'Dessine le TCO '#224' la souris'
|
Hint = 'Dessine le TCO '#224' la souris'
|
||||||
@@ -1575,8 +1579,12 @@ object FormTCO: TFormTCO
|
|||||||
end
|
end
|
||||||
object Routes: TMenuItem
|
object Routes: TMenuItem
|
||||||
Caption = 'Routes'
|
Caption = 'Routes'
|
||||||
|
object Optiondesroutes1: TMenuItem
|
||||||
|
Caption = 'Option des routes'
|
||||||
|
OnClick = Optiondesroutes1Click
|
||||||
|
end
|
||||||
object AffRoutes: TMenuItem
|
object AffRoutes: TMenuItem
|
||||||
Caption = 'Fen'#234'tre des routes'
|
Caption = 'Fen'#234'tre des routes par trains'
|
||||||
OnClick = AffRoutesClick
|
OnClick = AffRoutesClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+1060
-346
File diff suppressed because it is too large
Load Diff
+48
-29
@@ -31,7 +31,7 @@ type
|
|||||||
var
|
var
|
||||||
FormAig: TFormAig;
|
FormAig: TFormAig;
|
||||||
aiguille,aiguille2 : integer;
|
aiguille,aiguille2 : integer;
|
||||||
tjdC,aigC : boolean;
|
tjdC,aigC,aigT : boolean;
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
@@ -72,11 +72,19 @@ var i : integer;
|
|||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
i:=Index_aig(Aiguille);
|
i:=Index_aig(Aiguille);
|
||||||
|
|
||||||
|
aigC:=(aiguillage[i].modele=aig);
|
||||||
|
tjdC:=(aiguillage[i].modele=tjd) or (aiguillage[i].modele=tjs);
|
||||||
|
AigT:=aiguillage[i].modele=triple;
|
||||||
|
|
||||||
|
if tjdC then s:='Pilotage de la TJD/S '+intToSTR(aiguille);
|
||||||
|
if aigC then s:='Pilotage de l''aiguillage '+intToSTR(aiguille);
|
||||||
|
if aigT then s:='Pilotage de l''aiguillage triple '+intToSTR(aiguille);
|
||||||
|
|
||||||
|
Label1.Caption:=s;
|
||||||
|
|
||||||
if aiguillage[i].AdrTrain<>0 then
|
if aiguillage[i].AdrTrain<>0 then
|
||||||
begin
|
begin
|
||||||
tjdC:=(aiguillage[i].modele=tjd) or (aiguillage[i].modele=tjs);
|
|
||||||
if tjdC then s:='Pilotage de la TJD/S '+intToSTR(aiguille) else s:='Pilotage de l''aiguillage '+intToSTR(aiguille);
|
|
||||||
Label1.Caption:=s;
|
|
||||||
if tjdC then s:='La TJD/S '+intToSTR(aiguille)+' est réservée ' else s:='L''aiguillage '+intToSTR(aiguille)+' est réservé ';
|
if tjdC then s:='La TJD/S '+intToSTR(aiguille)+' est réservée ' else s:='L''aiguillage '+intToSTR(aiguille)+' est réservé ';
|
||||||
labelAdr1.caption:=s+'par le train '+intToSTR(aiguillage[i].AdrTrain);
|
labelAdr1.caption:=s+'par le train '+intToSTR(aiguillage[i].AdrTrain);
|
||||||
labelAdr1.Visible:=true;
|
labelAdr1.Visible:=true;
|
||||||
@@ -85,44 +93,55 @@ begin
|
|||||||
buttonDev2.Visible:=false;
|
buttonDev2.Visible:=false;
|
||||||
buttonDroit2.Visible:=false;
|
buttonDroit2.Visible:=false;
|
||||||
LabelAdr2.Visible:=false;
|
LabelAdr2.Visible:=false;
|
||||||
if diffusion then exit;
|
if diffusion then exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
aigC:=(aiguillage[i].modele=aig);
|
|
||||||
tjdC:=(aiguillage[i].modele=tjd) or (aiguillage[i].modele=tjs);
|
|
||||||
if aigC then
|
if aigC then
|
||||||
begin
|
begin
|
||||||
s:='Pilotage de l''aiguillage '+intToSTR(aiguille);
|
|
||||||
commande_simple;
|
commande_simple;
|
||||||
end;
|
end;
|
||||||
if tjdC then
|
|
||||||
|
if (tjdC and (aiguillage[i].EtatTJD=4)) then
|
||||||
begin
|
begin
|
||||||
s:='Pilotage de la TJD '+intToSTR(aiguille);
|
LabelAdr1.Caption:='Adresse1: '+intToSTR(aiguille);
|
||||||
|
aiguille2:=aiguillage[i].DDevie;
|
||||||
|
LabelAdr2.Caption:='Adresse2: '+intToSTR(aiguille2);
|
||||||
|
s:=s+'/'+intToSTR(aiguille2);
|
||||||
|
LabelAdr2.Visible:=true;
|
||||||
|
LabelAdr1.Visible:=true;
|
||||||
|
ButtonDev2.Visible:=true;
|
||||||
|
ButtonOk.Visible:=true;
|
||||||
|
ButtonDroit2.Visible:=true;
|
||||||
|
ButtonDev.Left:=8;
|
||||||
|
ButtonDroit.Left:=88;
|
||||||
|
|
||||||
if aiguillage[i].EtatTJD=4 then
|
buttonDroit.Visible:=true;
|
||||||
begin
|
buttonDev.Visible:=true;
|
||||||
LabelAdr1.Caption:='Adresse1: '+intToSTR(aiguille);
|
|
||||||
aiguille2:=aiguillage[i].DDevie;
|
|
||||||
LabelAdr2.Caption:='Adresse2: '+intToSTR(aiguille2);
|
|
||||||
s:=s+'/'+intToSTR(aiguille2);
|
|
||||||
LabelAdr2.Visible:=true;
|
|
||||||
LabelAdr1.Visible:=true;
|
|
||||||
ButtonDev2.Visible:=true;
|
|
||||||
ButtonOk.Visible:=true;
|
|
||||||
ButtonDroit2.Visible:=true;
|
|
||||||
ButtonDev.Left:=8;
|
|
||||||
ButtonDroit.Left:=88;
|
|
||||||
|
|
||||||
buttonDroit.Visible:=true;
|
|
||||||
buttonDev.Visible:=true;
|
|
||||||
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
if aiguillage[i].EtatTJD=2 then
|
|
||||||
|
if TjdC and (aiguillage[i].EtatTJD=2) then
|
||||||
begin
|
begin
|
||||||
commande_simple;
|
commande_simple;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if AigT then
|
||||||
|
begin
|
||||||
|
LabelAdr1.Caption:='Adresse1: '+intToSTR(aiguille);
|
||||||
|
aiguille2:=aiguillage[i].Adrtriple;
|
||||||
|
LabelAdr2.Caption:='Adresse2: '+intToSTR(aiguille2);
|
||||||
|
s:=s+'/'+intToSTR(aiguille2);
|
||||||
|
LabelAdr2.Visible:=true;
|
||||||
|
LabelAdr1.Visible:=true;
|
||||||
|
ButtonDev2.Visible:=true;
|
||||||
|
ButtonOk.Visible:=true;
|
||||||
|
ButtonDroit2.Visible:=true;
|
||||||
|
ButtonDev.Left:=8;
|
||||||
|
ButtonDroit.Left:=88;
|
||||||
|
|
||||||
|
buttonDroit.Visible:=true;
|
||||||
|
buttonDev.Visible:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
Label1.Caption:=s;
|
Label1.Caption:=s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
+52
-30
@@ -1,11 +1,9 @@
|
|||||||
object FormSelTrain: TFormSelTrain
|
object FormSelTrain: TFormSelTrain
|
||||||
Left = 198
|
Left = 358
|
||||||
Top = 117
|
Top = 131
|
||||||
BorderIcons = [biSystemMenu]
|
Width = 860
|
||||||
BorderStyle = bsDialog
|
Height = 370
|
||||||
Caption = 'S'#233'lection train'
|
Caption = 'S'#233'lection train'
|
||||||
ClientHeight = 311
|
|
||||||
ClientWidth = 800
|
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@@ -16,15 +14,16 @@ object FormSelTrain: TFormSelTrain
|
|||||||
OnActivate = FormActivate
|
OnActivate = FormActivate
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
800
|
844
|
||||||
311)
|
331)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object LabelInfo: TLabel
|
object LabelInfo: TLabel
|
||||||
Left = 104
|
Left = 125
|
||||||
Top = 288
|
Top = 306
|
||||||
Width = 44
|
Width = 44
|
||||||
Height = 13
|
Height = 13
|
||||||
|
Anchors = [akBottom]
|
||||||
Caption = 'LabelInfo'
|
Caption = 'LabelInfo'
|
||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
@@ -329,11 +328,11 @@ object FormSelTrain: TFormSelTrain
|
|||||||
Height = 13
|
Height = 13
|
||||||
end
|
end
|
||||||
object ButtonOK: TButton
|
object ButtonOK: TButton
|
||||||
Left = 41
|
Left = 29
|
||||||
Top = 280
|
Top = 300
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 24
|
Height = 24
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akBottom]
|
||||||
Caption = 'Ok'
|
Caption = 'Ok'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnClick = ButtonOKClick
|
OnClick = ButtonOKClick
|
||||||
@@ -347,29 +346,52 @@ object FormSelTrain: TFormSelTrain
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnChange = ComboBoxCantonChange
|
OnChange = ComboBoxCantonChange
|
||||||
end
|
end
|
||||||
object StringGridTrains: TStringGrid
|
|
||||||
Left = 8
|
|
||||||
Top = 64
|
|
||||||
Width = 785
|
|
||||||
Height = 209
|
|
||||||
ColCount = 6
|
|
||||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goAlwaysShowEditor]
|
|
||||||
ScrollBars = ssVertical
|
|
||||||
TabOrder = 2
|
|
||||||
OnDrawCell = StringGridTrainsDrawCell
|
|
||||||
OnKeyDown = StringGridTrainsKeyDown
|
|
||||||
OnSelectCell = StringGridTrainsSelectCell
|
|
||||||
end
|
|
||||||
object ButtonSauve: TButton
|
object ButtonSauve: TButton
|
||||||
Left = 624
|
Left = 695
|
||||||
Top = 280
|
Top = 300
|
||||||
Width = 129
|
Width = 82
|
||||||
Height = 25
|
Height = 25
|
||||||
Hint = 'Sauvegarde le placement des trains dans les cantons'
|
Hint = 'Sauvegarde le placement des trains dans les cantons'
|
||||||
|
Anchors = [akBottom]
|
||||||
Caption = 'Sauvegarder'
|
Caption = 'Sauvegarder'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 3
|
TabOrder = 2
|
||||||
OnClick = ButtonSauveClick
|
OnClick = ButtonSauveClick
|
||||||
end
|
end
|
||||||
|
object ScrollBoxST: TScrollBox
|
||||||
|
Left = 11
|
||||||
|
Top = 49
|
||||||
|
Width = 821
|
||||||
|
Height = 240
|
||||||
|
HorzScrollBar.Smooth = True
|
||||||
|
HorzScrollBar.Tracking = True
|
||||||
|
VertScrollBar.Increment = 21
|
||||||
|
VertScrollBar.Tracking = True
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
TabOrder = 3
|
||||||
|
object StringGridTrains: TStringGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 793
|
||||||
|
Height = 233
|
||||||
|
ColCount = 8
|
||||||
|
FixedCols = 0
|
||||||
|
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goEditing, goAlwaysShowEditor]
|
||||||
|
ScrollBars = ssNone
|
||||||
|
TabOrder = 0
|
||||||
|
OnDrawCell = StringGridTrainsDrawCell
|
||||||
|
OnKeyDown = StringGridTrainsKeyDown
|
||||||
|
OnSelectCell = StringGridTrainsSelectCell
|
||||||
|
ColWidths = (
|
||||||
|
43
|
||||||
|
214
|
||||||
|
172
|
||||||
|
57
|
||||||
|
105
|
||||||
|
108
|
||||||
|
32
|
||||||
|
29)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+43
-19
@@ -17,8 +17,9 @@ type
|
|||||||
Imagegauche: TImage;
|
Imagegauche: TImage;
|
||||||
ImageDroite: TImage;
|
ImageDroite: TImage;
|
||||||
LabelCanton: TLabel;
|
LabelCanton: TLabel;
|
||||||
StringGridTrains: TStringGrid;
|
|
||||||
ButtonSauve: TButton;
|
ButtonSauve: TButton;
|
||||||
|
ScrollBoxST: TScrollBox;
|
||||||
|
StringGridTrains: TStringGrid;
|
||||||
procedure ButtonOKClick(Sender: TObject);
|
procedure ButtonOKClick(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure StringGridTrainsDrawCell(Sender: TObject; ACol,
|
procedure StringGridTrainsDrawCell(Sender: TObject; ACol,
|
||||||
@@ -32,17 +33,20 @@ type
|
|||||||
procedure ButtonSauveClick(Sender: TObject);
|
procedure ButtonSauveClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
public
|
public
|
||||||
{ Déclarations publiques }
|
{ Déclarations publiques }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
const
|
||||||
|
HauteurLigneSGT=30;
|
||||||
|
|
||||||
var
|
var
|
||||||
FormSelTrain: TFormSelTrain;
|
FormSelTrain: TFormSelTrain;
|
||||||
x,y,El,largC,hautC,indexTrainClic : Integer;
|
x,y,El,largC,hautC,indexTrainClic,LargeurSGT : Integer;
|
||||||
routeSav : TuneRoute;
|
routeSav : TuneRoute;
|
||||||
|
|
||||||
procedure actualise_seltrains;
|
procedure actualise_seltrains;
|
||||||
procedure affecte_Train_canton(AdrTrain,idcanton : integer);
|
procedure affecte_Train_canton(AdrTrain,idcanton,sens : integer);
|
||||||
procedure raz_trains_Idcanton(idc : integer);
|
procedure raz_trains_Idcanton(idc : integer);
|
||||||
procedure raz_cantons_train(AdrTrain : integer);
|
procedure raz_cantons_train(AdrTrain : integer);
|
||||||
procedure trouve_det_canton(idcanton : integer;var el1,el2 : integer);
|
procedure trouve_det_canton(idcanton : integer;var el1,el2 : integer);
|
||||||
@@ -89,7 +93,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// le détecteur considéré est le e2c
|
// le détecteur considéré est le e2c
|
||||||
if (e2c=adresse) and (t1=det) then
|
if (e2c=adresse) and (t2=det) then
|
||||||
begin
|
begin
|
||||||
case sens of
|
case sens of
|
||||||
sensGauche,sensHaut :
|
sensGauche,sensHaut :
|
||||||
@@ -233,7 +237,7 @@ end;
|
|||||||
// si adrTrain=9999 , train inconnu
|
// si adrTrain=9999 , train inconnu
|
||||||
// si adrTrain=0 ; efface
|
// si adrTrain=0 ; efface
|
||||||
// et les pointeurs de trains de l'idTrain sont razés
|
// et les pointeurs de trains de l'idTrain sont razés
|
||||||
procedure affecte_Train_canton(AdrTrain,idcanton : integer);
|
procedure affecte_Train_canton(AdrTrain,idcanton,sens : integer);
|
||||||
var idTrain,t,el1,el2 : integer;
|
var idTrain,t,el1,el2 : integer;
|
||||||
t1,t2 : tequipement;
|
t1,t2 : tequipement;
|
||||||
begin
|
begin
|
||||||
@@ -247,6 +251,8 @@ begin
|
|||||||
raz_cantons_train(AdrTrain); // efface tous les cantons contenant le train Adrtrain
|
raz_cantons_train(AdrTrain); // efface tous les cantons contenant le train Adrtrain
|
||||||
|
|
||||||
trains[idTrain].canton:=canton[idcanton].numero;
|
trains[idTrain].canton:=canton[idcanton].numero;
|
||||||
|
trains[idTrain].sens:=sens;
|
||||||
|
canton[IdCanton].SensLoco:=sens;
|
||||||
canton[Idcanton].indexTrain:=idTrain;
|
canton[Idcanton].indexTrain:=idTrain;
|
||||||
canton[Idcanton].NomTrain:=trains[idTrain].nom_train;
|
canton[Idcanton].NomTrain:=trains[idTrain].nom_train;
|
||||||
canton[IdCanton].adresseTrain:=AdrTrain;
|
canton[IdCanton].adresseTrain:=AdrTrain;
|
||||||
@@ -404,17 +410,29 @@ end;
|
|||||||
procedure TFormSelTrain.FormCreate(Sender: TObject);
|
procedure TFormSelTrain.FormCreate(Sender: TObject);
|
||||||
var i : integer;
|
var i : integer;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
with ImageHaut do begin Width:=60;Height:=60;visible:=false; end;
|
with ImageHaut do begin Width:=60;Height:=60;visible:=false; end;
|
||||||
with ImageBas do begin Width:=60;Height:=60;visible:=false; end;
|
with ImageBas do begin Width:=60;Height:=60;visible:=false; end;
|
||||||
with ImageDroite do begin Width:=60;Height:=60;visible:=false; end;
|
with ImageDroite do begin Width:=60;Height:=60;visible:=false; end;
|
||||||
with ImageGauche do begin Width:=60;Height:=60;visible:=false; end;
|
with ImageGauche do begin Width:=60;Height:=60;visible:=false; end;
|
||||||
|
|
||||||
|
with ScrollBoxST do
|
||||||
|
begin
|
||||||
|
Anchors:=[akTop,AkLeft,akRight,AkBottom];
|
||||||
|
VertScrollBar.Smooth:=false; // ne pas mettre true sinon çà plante quand on clique sur la ScrollBar
|
||||||
|
VertScrollBar.tracking:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
hautC:=25;
|
hautC:=25;
|
||||||
largC:=130;
|
largC:=130;
|
||||||
LabelInfo.caption:='';
|
LabelInfo.caption:='';
|
||||||
with StringGridTrains do
|
with StringGridTrains do
|
||||||
begin
|
begin
|
||||||
|
Anchors:=[];
|
||||||
|
Anchors:=[AkTop,AkLeft,akright];
|
||||||
|
|
||||||
|
Height:=nTrains*HauteurLigneSGT;
|
||||||
|
Top:=0;
|
||||||
|
Left:=0;
|
||||||
//Options:=StringGridTrains.Options+[goEditing];
|
//Options:=StringGridTrains.Options+[goEditing];
|
||||||
Hint:='Sélection d''un train';
|
Hint:='Sélection d''un train';
|
||||||
ShowHint:=true;
|
ShowHint:=true;
|
||||||
@@ -429,8 +447,11 @@ begin
|
|||||||
ColWidths[5]:=120;
|
ColWidths[5]:=120;
|
||||||
ColWidths[6]:=30;
|
ColWidths[6]:=30;
|
||||||
ColWidths[7]:=35;
|
ColWidths[7]:=35;
|
||||||
|
LargeurSGT:=0;
|
||||||
|
for i:=0 to 7 do LargeurSGT:=LargeurSGT+ColWidths[i];
|
||||||
|
width:=LargeurSGT+30;
|
||||||
|
|
||||||
Cells[0,0]:='N° / @';
|
Cells[0,0]:='Train'+#13+'N° / @';
|
||||||
Cells[1,0]:='Icône';
|
Cells[1,0]:='Icône';
|
||||||
Cells[2,0]:='Nom du train';
|
Cells[2,0]:='Nom du train';
|
||||||
Cells[3,0]:='Affectation'+#13+'au canton';
|
Cells[3,0]:='Affectation'+#13+'au canton';
|
||||||
@@ -439,7 +460,8 @@ begin
|
|||||||
Cells[6,0]:='Sens';
|
Cells[6,0]:='Sens';
|
||||||
Cells[7,0]:='Route';
|
Cells[7,0]:='Route';
|
||||||
|
|
||||||
RowHeights[0]:=30;
|
for i:=0 to RowCount-1 do
|
||||||
|
RowHeights[i]:=HauteurLigneSGT;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i:=1 to ntrains do
|
for i:=1 to ntrains do
|
||||||
@@ -463,7 +485,7 @@ var indextrain,l,h,hautdest,largdest : integer;
|
|||||||
coul: Tcolor;
|
coul: Tcolor;
|
||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
// Affiche('DrawCell '+intToSTR(Acol)+'x'+intToSTR(Arow),clred);
|
//Affiche('DrawCell '+intToSTR(Acol)+'x'+intToSTR(Arow),clred);
|
||||||
|
|
||||||
// titres sur 2 lignes
|
// titres sur 2 lignes
|
||||||
if Arow=0 then
|
if Arow=0 then
|
||||||
@@ -471,12 +493,12 @@ begin
|
|||||||
begin
|
begin
|
||||||
if Pos(#13,Cells[ACol,ARow])>0 then
|
if Pos(#13,Cells[ACol,ARow])>0 then
|
||||||
begin
|
begin
|
||||||
Coul:=canvas.Pixels[5,5]; // trouver la couleur de la première ligne de la stringgrid, car elle change en fonction des styles
|
Coul:=canvas.Pixels[3,1]; // trouver la couleur de la première ligne de la stringgrid, car elle change en fonction des styles
|
||||||
Canvas.Brush.Color:=coul;
|
Canvas.Brush.Color:=coul;
|
||||||
Canvas.FillRect(Rect); // Efface la cellule qu'on va réécrire en mode WORDBREAK
|
Canvas.FillRect(Rect); // Efface la cellule qu'on va réécrire en mode WORDBREAK
|
||||||
|
// rectangle du texte
|
||||||
Inc(Rect.Left, 2);
|
Inc(Rect.Left,2);
|
||||||
Inc(Rect.Top, 2);
|
Inc(Rect.Top,2);
|
||||||
DrawText(Canvas.Handle,PChar(Cells[ACol, ARow]),-1,Rect,DT_NOPREFIX or DT_WORDBREAK);
|
DrawText(Canvas.Handle,PChar(Cells[ACol, ARow]),-1,Rect,DT_NOPREFIX or DT_WORDBREAK);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -564,7 +586,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// cliqué sur cellule pour changer la sélection du train ou voir la route ou la flèche
|
// cliqué ou roulé la molette souris sur cellule pour changer la sélection du train ou voir la route ou la flèche
|
||||||
procedure TFormSelTrain.StringGridTrainsSelectCell(Sender: TObject; ACol,
|
procedure TFormSelTrain.StringGridTrainsSelectCell(Sender: TObject; ACol,
|
||||||
ARow: Integer; var CanSelect: Boolean);
|
ARow: Integer; var CanSelect: Boolean);
|
||||||
var f,AutreTrain,AutreCanton,idAutrecanton,i,ancienSens,AdrTrain,IdTrain,sensloco : integer;
|
var f,AutreTrain,AutreCanton,idAutrecanton,i,ancienSens,AdrTrain,IdTrain,sensloco : integer;
|
||||||
@@ -641,8 +663,8 @@ begin
|
|||||||
|
|
||||||
if (canton[IdCantonSelect].sensCirc<>0) then sensLoco:=canton[IdCantonSelect].sensCirc ;
|
if (canton[IdCantonSelect].sensCirc<>0) then sensLoco:=canton[IdCantonSelect].sensCirc ;
|
||||||
|
|
||||||
canton[IdCantonSelect].SensLoco:=sensLoco;
|
//canton[IdCantonSelect].SensLoco:=sensLoco;
|
||||||
affecte_Train_canton(trains[indexTrainClic].adresse,IdCantonSelect); // 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é
|
||||||
|
|
||||||
maj_signaux(true);
|
maj_signaux(true);
|
||||||
end;
|
end;
|
||||||
@@ -691,8 +713,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
renseigne_canton(IdAutreCanton);
|
renseigne_canton(IdAutreCanton);
|
||||||
canton[IdAutreCanton].SensLoco:=f;
|
affecte_Train_canton(AdrTrain,idAutreCanton,f);
|
||||||
affecte_Train_canton(AdrTrain,idAutreCanton);
|
|
||||||
//Affiche('Et 3',clYellow);
|
//Affiche('Et 3',clYellow);
|
||||||
maj_signaux(true);
|
maj_signaux(true);
|
||||||
end;
|
end;
|
||||||
@@ -785,6 +806,7 @@ begin
|
|||||||
// trouver si le train est dans la grille
|
// trouver si le train est dans la grille
|
||||||
with StringGridTrains do
|
with StringGridTrains do
|
||||||
begin
|
begin
|
||||||
|
Height:=nTrains*HauteurLigneSGT+HauteurLigneSGT; // actualiser la taille de la stringGrig en fonction du nombre de trains
|
||||||
i:=1;n:=RowCount;
|
i:=1;n:=RowCount;
|
||||||
repeat
|
repeat
|
||||||
trouve:=cells[2,i]=nomTrain;
|
trouve:=cells[2,i]=nomTrain;
|
||||||
@@ -816,5 +838,7 @@ begin
|
|||||||
Sauve_config;
|
Sauve_config;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
+14
-13
@@ -25,15 +25,16 @@ var
|
|||||||
chemin_Dest,chemin_src,date_creation,nombre_tel : string;
|
chemin_Dest,chemin_src,date_creation,nombre_tel : string;
|
||||||
f : text;
|
f : text;
|
||||||
|
|
||||||
Const VersionSC ='9.1'; // sert à la comparaison de la version publiée
|
Const
|
||||||
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
|
VersionSC ='9.3'; // sert à la comparaison de la version publiée
|
||||||
// pour unzip
|
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
|
||||||
SHCONTCH_NOPROGRESSBOX = 4;
|
// pour unzip
|
||||||
SHCONTCH_AUTORENAME = 8;
|
SHCONTCH_NOPROGRESSBOX=4;
|
||||||
SHCONTCH_RESPONDYESTOALL = 16;
|
SHCONTCH_AUTORENAME=8;
|
||||||
SHCONTF_INCLUDEHIDDEN = 128;
|
SHCONTCH_RESPONDYESTOALL=16;
|
||||||
SHCONTF_FOLDERS = 32;
|
SHCONTF_INCLUDEHIDDEN=128;
|
||||||
SHCONTF_NONFOLDERS = 64;
|
SHCONTF_FOLDERS=32;
|
||||||
|
SHCONTF_NONFOLDERS=64;
|
||||||
|
|
||||||
function GetCurrentProcessEnvVar(const VariableName: string): string;
|
function GetCurrentProcessEnvVar(const VariableName: string): string;
|
||||||
function verifie_version : real;
|
function verifie_version : real;
|
||||||
@@ -92,10 +93,10 @@ begin
|
|||||||
i:=getLastError;
|
i:=getLastError;
|
||||||
if i<>0 then
|
if i<>0 then
|
||||||
case i of
|
case i of
|
||||||
12007 : Affiche('Erreur de résolution DNS',clred);
|
12007 : Affiche('Réseau: Erreur de résolution DNS',clred);
|
||||||
12037 : Affiche('Erreur validité de certificat - Mettre windows à jour ou version windows obsolète',clred);
|
12037 : Affiche('Réseau: Erreur validité de certificat - Mettre windows à jour ou version windows obsolète',clred);
|
||||||
12157 : Affiche('Erreur canal sécurisé SSL 2.0 - Mettre windows à jour ou version windows obsolète',clred);
|
12157 : Affiche('Réseau: Erreur canal sécurisé SSL 2.0 - Mettre windows à jour ou version windows obsolète',clred);
|
||||||
else affiche('Erreur '+intToSTR(i),clred);
|
else affiche('Erreur réseau '+intToSTR(i),clred);
|
||||||
end;
|
end;
|
||||||
if Assigned(hService) then
|
if Assigned(hService) then
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -267,5 +267,10 @@ version 9.2 : Utilisation de l'unit
|
|||||||
Arrets temporisés sur les détecteurs en mode autonome/roulage pour les routes de canton à canton.
|
Arrets temporisés sur les détecteurs en mode autonome/roulage pour les routes de canton à canton.
|
||||||
Correction connexion à la GENLI.
|
Correction connexion à la GENLI.
|
||||||
Version x64 D12 disponible.
|
Version x64 D12 disponible.
|
||||||
|
version 9.3 : Amélioration de la proposition des routes en mode autonome.
|
||||||
|
Renforcement de la vérification des TJD.
|
||||||
|
Amélioration des aiguillages triples, et de leur représentation dans le TCO.
|
||||||
|
Gestion des erreurs de vérification d'étendue.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user