V9.0
V9.0
This commit is contained in:
1 parent
f2cbfc2936
commit
d2909cc5eb
43 files changed
+9783
-3658
No files matched your search
Binary file not shown.
BIN
Binary file not shown.
@@ -14,8 +14,8 @@
|
||||
-$N+
|
||||
-$O-
|
||||
-$P-
|
||||
-$Q-
|
||||
-$R-
|
||||
-$Q+
|
||||
-$R+
|
||||
-$S-
|
||||
-$T-
|
||||
-$U-
|
||||
|
||||
@@ -17,8 +17,8 @@ M=0
|
||||
N=1
|
||||
O=0
|
||||
P=0
|
||||
Q=0
|
||||
R=0
|
||||
Q=1
|
||||
R=1
|
||||
S=0
|
||||
T=0
|
||||
U=0
|
||||
@@ -130,5 +130,3 @@ OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=8.1.0.0
|
||||
Comments=
|
||||
[Excluded Packages]
|
||||
c:\program files (x86)\borland\delphi7\Projects\Bpl\DsgnCPort8.bpl=ComPort Library
|
||||
@@ -14,7 +14,6 @@ uses
|
||||
Unit_Pilote_aig in 'Unit_Pilote_aig.pas' {FormAig},
|
||||
UnitConfigCellTCO in 'UnitConfigCellTCO.pas' {FormConfCellTCO},
|
||||
UnitCDF in 'UnitCDF.pas' {FormCDF},
|
||||
Unitplace in 'Unitplace.pas' {FormRoulage},
|
||||
UnitPareFeu in 'UnitPareFeu.pas',
|
||||
UnitAnalyseSegCDM in 'UnitAnalyseSegCDM.pas' {FormAnalyseCDM},
|
||||
Importation in 'Importation.pas' {FormImportation},
|
||||
@@ -23,7 +22,10 @@ uses
|
||||
UnitFicheHoraire in 'UnitFicheHoraire.pas' {FormFicheHoraire},
|
||||
UnitClock in 'UnitClock.pas' {FormClock},
|
||||
UnitModifAction in 'UnitModifAction.pas' {FormModifAction},
|
||||
selection_train in 'selection_train.pas' {FormSelTrain};
|
||||
selection_train in 'selection_train.pas' {FormSelTrain},
|
||||
UnitRoute in 'UnitRoute.pas' {FormRoute},
|
||||
UnitRouteTrains in 'UnitRouteTrains.pas' {FormRouteTrain},
|
||||
UnitInfo in 'UnitInfo.pas' {FormInfo};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
@@ -41,7 +43,6 @@ begin
|
||||
Application.CreateForm(TFormAig, FormAig);
|
||||
Application.CreateForm(TFormConfCellTCO, FormConfCellTCO);
|
||||
Application.CreateForm(TFormCDF, FormCDF);
|
||||
Application.CreateForm(TFormRoulage, FormRoulage);
|
||||
Application.CreateForm(TFormAnalyseCDM, FormAnalyseCDM);
|
||||
Application.CreateForm(TFormImportation, FormImportation);
|
||||
Application.CreateForm(TFormFicheHoraire, FormFicheHoraire);
|
||||
@@ -50,6 +51,9 @@ begin
|
||||
Application.CreateForm(TFormHorloge, FormHorloge);
|
||||
Application.CreateForm(TFormModifAction, FormModifAction);
|
||||
Application.CreateForm(TFormSelTrain, FormSelTrain);
|
||||
Application.CreateForm(TFormRoute, FormRoute);
|
||||
Application.CreateForm(TFormRouteTrain, FormRouteTrain);
|
||||
Application.CreateForm(TFormInfo, FormInfo);
|
||||
fin_preliminaire;
|
||||
Application.Run;
|
||||
end.
|
||||
Binary file not shown.
+133
-122
@@ -1,8 +1,8 @@
|
||||
|
||||
Start Length Name Class
|
||||
0001:00000000 001D1334H .text CODE
|
||||
0002:00000000 00002D60H .data DATA
|
||||
0002:00002D60 04660941H .bss BSS
|
||||
0001:00000000 001E689CH .text CODE
|
||||
0002:00000000 00002E04H .data DATA
|
||||
0002:00002E04 06950F41H .bss BSS
|
||||
|
||||
|
||||
Detailed map of segments
|
||||
@@ -15,97 +15,101 @@ Detailed map of segments
|
||||
0001:000070E8 00000338 C=CODE S=.text G=(none) M=SysConst ACBP=A9
|
||||
0001:00007420 00006F90 C=CODE S=.text G=(none) M=SysUtils ACBP=A9
|
||||
0001:0000E3B0 0000081B C=CODE S=.text G=(none) M=VarUtils ACBP=A9
|
||||
0001:0000EBCC 0000804E C=CODE S=.text G=(none) M=Variants ACBP=A9
|
||||
0001:00016C1C 000001A0 C=CODE S=.text G=(none) M=RTLConsts ACBP=A9
|
||||
0001:00016DBC 0000083C C=CODE S=.text G=(none) M=TypInfo ACBP=A9
|
||||
0001:000175F8 00000358 C=CODE S=.text G=(none) M=ActiveX ACBP=A9
|
||||
0001:00017950 0000A7FE C=CODE S=.text G=(none) M=Classes ACBP=A9
|
||||
0001:00022150 00000378 C=CODE S=.text G=(none) M=Consts ACBP=A9
|
||||
0001:000224C8 00009DC7 C=CODE S=.text G=(none) M=Graphics ACBP=A9
|
||||
0001:0002C290 00000124 C=CODE S=.text G=(none) M=Math ACBP=A9
|
||||
0001:0002C3B4 000002B8 C=CODE S=.text G=(none) M=Contnrs ACBP=A9
|
||||
0001:0002C66C 00000198 C=CODE S=.text G=(none) M=CommCtrl ACBP=A9
|
||||
0001:0002C804 00000787 C=CODE S=.text G=(none) M=MultiMon ACBP=A9
|
||||
0001:0002CF8C 00000038 C=CODE S=.text G=(none) M=Imm ACBP=A9
|
||||
0001:0002CFC4 00000FF8 C=CODE S=.text G=(none) M=HelpIntfs ACBP=A9
|
||||
0001:0002DFBC 00000058 C=CODE S=.text G=(none) M=WinSpool ACBP=A9
|
||||
0001:0002E014 000010C8 C=CODE S=.text G=(none) M=Printers ACBP=A9
|
||||
0001:0002F0DC 0000031F C=CODE S=.text G=(none) M=FlatSB ACBP=A9
|
||||
0001:0002F3FC 000003F0 C=CODE S=.text G=(none) M=SyncObjs ACBP=A9
|
||||
0001:0002F7EC 000009BB C=CODE S=.text G=(none) M=UxTheme ACBP=A9
|
||||
0001:000301A8 00000038 C=CODE S=.text G=(none) M=RichEdit ACBP=A9
|
||||
0001:000301E0 00000038 C=CODE S=.text G=(none) M=ToolWin ACBP=A9
|
||||
0001:00030218 00000040 C=CODE S=.text G=(none) M=ShellAPI ACBP=A9
|
||||
0001:00030258 00000038 C=CODE S=.text G=(none) M=RegStr ACBP=A9
|
||||
0001:00030290 00000058 C=CODE S=.text G=(none) M=WinInet ACBP=A9
|
||||
0001:000302E8 00000038 C=CODE S=.text G=(none) M=UrlMon ACBP=A9
|
||||
0001:00030320 0000006C C=CODE S=.text G=(none) M=ShlObj ACBP=A9
|
||||
0001:0003038C 00000060 C=CODE S=.text G=(none) M=CommDlg ACBP=A9
|
||||
0001:000303EC 00000038 C=CODE S=.text G=(none) M=Dlgs ACBP=A9
|
||||
0001:00030424 000036D1 C=CODE S=.text G=(none) M=Dialogs ACBP=A9
|
||||
0001:00033AF8 0000602A C=CODE S=.text G=(none) M=ExtCtrls ACBP=A9
|
||||
0001:00039B24 00000090 C=CODE S=.text G=(none) M=ComStrs ACBP=A9
|
||||
0001:00039BB4 000007A0 C=CODE S=.text G=(none) M=Clipbrd ACBP=A9
|
||||
0001:0003A354 00000128 C=CODE S=.text G=(none) M=StrUtils ACBP=A9
|
||||
0001:0003A47C 00003821 C=CODE S=.text G=(none) M=Buttons ACBP=A9
|
||||
0001:0003DCA0 00000038 C=CODE S=.text G=(none) M=ExtDlgs ACBP=A9
|
||||
0001:0003DCD8 00000068 C=CODE S=.text G=(none) M=IniFiles ACBP=A9
|
||||
0001:0003DD40 00000068 C=CODE S=.text G=(none) M=Registry ACBP=A9
|
||||
0001:0003DDA8 0000006C C=CODE S=.text G=(none) M=Mapi ACBP=A9
|
||||
0001:0003DE14 00000058 C=CODE S=.text G=(none) M=ExtActns ACBP=A9
|
||||
0001:0003DE6C 00000038 C=CODE S=.text G=(none) M=ListActns ACBP=A9
|
||||
0001:0003DEA4 00009948 C=CODE S=.text G=(none) M=ComCtrls ACBP=A9
|
||||
0001:000477EC 00000EA0 C=CODE S=.text G=(none) M=Themes ACBP=A9
|
||||
0001:0004868C 0000C698 C=CODE S=.text G=(none) M=StdCtrls ACBP=A9
|
||||
0001:00054D24 00000168 C=CODE S=.text G=(none) M=StdActns ACBP=A9
|
||||
0001:00054E8C 00000D1F C=CODE S=.text G=(none) M=WinHelpViewer ACBP=A9
|
||||
0001:00055BAC 00011403 C=CODE S=.text G=(none) M=Controls ACBP=A9
|
||||
0001:00066FB0 00001292 C=CODE S=.text G=(none) M=ActnList ACBP=A9
|
||||
0001:00068244 00001C04 C=CODE S=.text G=(none) M=ImgList ACBP=A9
|
||||
0001:00069E48 000066E1 C=CODE S=.text G=(none) M=Menus ACBP=A9
|
||||
0001:0007052C 0000CF8C C=CODE S=.text G=(none) M=Forms ACBP=A9
|
||||
0001:0007D4B8 00000050 C=CODE S=.text G=(none) M=JConsts ACBP=A9
|
||||
0001:0007D508 000133EC C=CODE S=.text G=(none) M=jpeg ACBP=A9
|
||||
0001:000908F4 00000060 C=CODE S=.text G=(none) M=ComConst ACBP=A9
|
||||
0001:00090954 00001259 C=CODE S=.text G=(none) M=ComObj ACBP=A9
|
||||
0001:00091BB0 00000038 C=CODE S=.text G=(none) M=StdVCL ACBP=A9
|
||||
0001:00091BE8 00001793 C=CODE S=.text G=(none) M=AxCtrls ACBP=A9
|
||||
0001:0009337C 00000060 C=CODE S=.text G=(none) M=OleConst ACBP=A9
|
||||
0001:000933DC 00003519 C=CODE S=.text G=(none) M=OleCtrls ACBP=A9
|
||||
0001:000968F8 00000314 C=CODE S=.text G=(none) M=TlHelp32 ACBP=A9
|
||||
0001:00096C0C 00000128 C=CODE S=.text G=(none) M=WinSock ACBP=A9
|
||||
0001:00096D34 00003A78 C=CODE S=.text G=(none) M=ScktComp ACBP=A9
|
||||
0001:0009A7AC 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9
|
||||
0001:0009B098 000005A0 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9
|
||||
0001:0009B638 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9
|
||||
0001:0009B678 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9
|
||||
0001:0009B6B0 00000038 C=CODE S=.text G=(none) M=DateUtils ACBP=A9
|
||||
0001:0009B6E8 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9
|
||||
0001:0009C100 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9
|
||||
0001:0009E208 000092A4 C=CODE S=.text G=(none) M=Grids ACBP=A9
|
||||
0001:000A74AC 00001BFC C=CODE S=.text G=(none) M=Spin ACBP=A9
|
||||
0001:000A90A8 000018C4 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9
|
||||
0001:000AA96C 0000057C C=CODE S=.text G=(none) M=Importation ACBP=A9
|
||||
0001:000AAEE8 00019624 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
|
||||
0001:000C450C 00002E3F C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
|
||||
0001:000C734C 00000D78 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
|
||||
0001:000C80C4 0000579C C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
|
||||
0001:000CD860 000011E4 C=CODE S=.text G=(none) M=UnitFicheHoraire ACBP=A9
|
||||
0001:000CEA44 000017D4 C=CODE S=.text G=(none) M=UnitClock ACBP=A9
|
||||
0001:000D0218 00000C50 C=CODE S=.text G=(none) M=Unitplace ACBP=A9
|
||||
0001:000D0E68 000038FC C=CODE S=.text G=(none) M=selection_train ACBP=A9
|
||||
0001:000D4764 0004DEFC C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
|
||||
0001:00122660 00003958 C=CODE S=.text G=(none) M=UnitSR ACBP=A9
|
||||
0001:00125FB8 00002B98 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
|
||||
0001:00128B50 00008714 C=CODE S=.text G=(none) M=UnitModifAction ACBP=A9
|
||||
0001:00131264 00000EE0 C=CODE S=.text G=(none) M=UnitHorloge ACBP=A9
|
||||
0001:00132144 00002503 C=CODE S=.text G=(none) M=verif_version ACBP=A9
|
||||
0001:00134648 000011D0 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
|
||||
0001:00135818 00000F6C C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
|
||||
0001:00136784 0004E920 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9
|
||||
0001:001850A4 00048DA4 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
|
||||
0001:001CDE48 00002F78 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
|
||||
0001:001D0DC0 00000574 C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9
|
||||
0001:0000EBCC 0000806E C=CODE S=.text G=(none) M=Variants ACBP=A9
|
||||
0001:00016C3C 000001A0 C=CODE S=.text G=(none) M=RTLConsts ACBP=A9
|
||||
0001:00016DDC 0000083C C=CODE S=.text G=(none) M=TypInfo ACBP=A9
|
||||
0001:00017618 00000368 C=CODE S=.text G=(none) M=ActiveX ACBP=A9
|
||||
0001:00017980 0000A7FE C=CODE S=.text G=(none) M=Classes ACBP=A9
|
||||
0001:00022180 00000378 C=CODE S=.text G=(none) M=Consts ACBP=A9
|
||||
0001:000224F8 00009DC7 C=CODE S=.text G=(none) M=Graphics ACBP=A9
|
||||
0001:0002C2C0 00000124 C=CODE S=.text G=(none) M=Math ACBP=A9
|
||||
0001:0002C3E4 000002B8 C=CODE S=.text G=(none) M=Contnrs ACBP=A9
|
||||
0001:0002C69C 00000198 C=CODE S=.text G=(none) M=CommCtrl ACBP=A9
|
||||
0001:0002C834 00000787 C=CODE S=.text G=(none) M=MultiMon ACBP=A9
|
||||
0001:0002CFBC 00000038 C=CODE S=.text G=(none) M=Imm ACBP=A9
|
||||
0001:0002CFF4 00000FF8 C=CODE S=.text G=(none) M=HelpIntfs ACBP=A9
|
||||
0001:0002DFEC 00000058 C=CODE S=.text G=(none) M=WinSpool ACBP=A9
|
||||
0001:0002E044 000010C8 C=CODE S=.text G=(none) M=Printers ACBP=A9
|
||||
0001:0002F10C 0000031F C=CODE S=.text G=(none) M=FlatSB ACBP=A9
|
||||
0001:0002F42C 000003F0 C=CODE S=.text G=(none) M=SyncObjs ACBP=A9
|
||||
0001:0002F81C 000009BB C=CODE S=.text G=(none) M=UxTheme ACBP=A9
|
||||
0001:000301D8 00000038 C=CODE S=.text G=(none) M=RichEdit ACBP=A9
|
||||
0001:00030210 00000038 C=CODE S=.text G=(none) M=ToolWin ACBP=A9
|
||||
0001:00030248 00000040 C=CODE S=.text G=(none) M=ShellAPI ACBP=A9
|
||||
0001:00030288 00000038 C=CODE S=.text G=(none) M=RegStr ACBP=A9
|
||||
0001:000302C0 00000058 C=CODE S=.text G=(none) M=WinInet ACBP=A9
|
||||
0001:00030318 00000038 C=CODE S=.text G=(none) M=UrlMon ACBP=A9
|
||||
0001:00030350 000000EC C=CODE S=.text G=(none) M=ShlObj ACBP=A9
|
||||
0001:0003043C 00000060 C=CODE S=.text G=(none) M=CommDlg ACBP=A9
|
||||
0001:0003049C 00000038 C=CODE S=.text G=(none) M=Dlgs ACBP=A9
|
||||
0001:000304D4 000036D1 C=CODE S=.text G=(none) M=Dialogs ACBP=A9
|
||||
0001:00033BA8 0000602A C=CODE S=.text G=(none) M=ExtCtrls ACBP=A9
|
||||
0001:00039BD4 00000090 C=CODE S=.text G=(none) M=ComStrs ACBP=A9
|
||||
0001:00039C64 000007A0 C=CODE S=.text G=(none) M=Clipbrd ACBP=A9
|
||||
0001:0003A404 00000128 C=CODE S=.text G=(none) M=StrUtils ACBP=A9
|
||||
0001:0003A52C 00003821 C=CODE S=.text G=(none) M=Buttons ACBP=A9
|
||||
0001:0003DD50 00000038 C=CODE S=.text G=(none) M=ExtDlgs ACBP=A9
|
||||
0001:0003DD88 00000068 C=CODE S=.text G=(none) M=IniFiles ACBP=A9
|
||||
0001:0003DDF0 00000068 C=CODE S=.text G=(none) M=Registry ACBP=A9
|
||||
0001:0003DE58 0000006C C=CODE S=.text G=(none) M=Mapi ACBP=A9
|
||||
0001:0003DEC4 00000058 C=CODE S=.text G=(none) M=ExtActns ACBP=A9
|
||||
0001:0003DF1C 00000038 C=CODE S=.text G=(none) M=ListActns ACBP=A9
|
||||
0001:0003DF54 00009948 C=CODE S=.text G=(none) M=ComCtrls ACBP=A9
|
||||
0001:0004789C 00000EA0 C=CODE S=.text G=(none) M=Themes ACBP=A9
|
||||
0001:0004873C 0000C698 C=CODE S=.text G=(none) M=StdCtrls ACBP=A9
|
||||
0001:00054DD4 00000168 C=CODE S=.text G=(none) M=StdActns ACBP=A9
|
||||
0001:00054F3C 00000D1F C=CODE S=.text G=(none) M=WinHelpViewer ACBP=A9
|
||||
0001:00055C5C 00011403 C=CODE S=.text G=(none) M=Controls ACBP=A9
|
||||
0001:00067060 00001292 C=CODE S=.text G=(none) M=ActnList ACBP=A9
|
||||
0001:000682F4 00001C04 C=CODE S=.text G=(none) M=ImgList ACBP=A9
|
||||
0001:00069EF8 000066E1 C=CODE S=.text G=(none) M=Menus ACBP=A9
|
||||
0001:000705DC 0000CF8C C=CODE S=.text G=(none) M=Forms ACBP=A9
|
||||
0001:0007D568 00000050 C=CODE S=.text G=(none) M=JConsts ACBP=A9
|
||||
0001:0007D5B8 000133EC C=CODE S=.text G=(none) M=jpeg ACBP=A9
|
||||
0001:000909A4 00000060 C=CODE S=.text G=(none) M=ComConst ACBP=A9
|
||||
0001:00090A04 00001259 C=CODE S=.text G=(none) M=ComObj ACBP=A9
|
||||
0001:00091C60 00000038 C=CODE S=.text G=(none) M=StdVCL ACBP=A9
|
||||
0001:00091C98 00001793 C=CODE S=.text G=(none) M=AxCtrls ACBP=A9
|
||||
0001:0009342C 00000060 C=CODE S=.text G=(none) M=OleConst ACBP=A9
|
||||
0001:0009348C 00003519 C=CODE S=.text G=(none) M=OleCtrls ACBP=A9
|
||||
0001:000969A8 00000314 C=CODE S=.text G=(none) M=TlHelp32 ACBP=A9
|
||||
0001:00096CBC 00000128 C=CODE S=.text G=(none) M=WinSock ACBP=A9
|
||||
0001:00096DE4 00003A78 C=CODE S=.text G=(none) M=ScktComp ACBP=A9
|
||||
0001:0009A85C 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9
|
||||
0001:0009B148 000005A0 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9
|
||||
0001:0009B6E8 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9
|
||||
0001:0009B728 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9
|
||||
0001:0009B760 00000038 C=CODE S=.text G=(none) M=DateUtils ACBP=A9
|
||||
0001:0009B798 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9
|
||||
0001:0009C1B0 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9
|
||||
0001:0009E2B8 000092A4 C=CODE S=.text G=(none) M=Grids ACBP=A9
|
||||
0001:000A755C 00001BFC C=CODE S=.text G=(none) M=Spin ACBP=A9
|
||||
0001:000A9158 00003762 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9
|
||||
0001:000AC8BC 0000057C C=CODE S=.text G=(none) M=Importation ACBP=A9
|
||||
0001:000ACE38 000196A8 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
|
||||
0001:000C64E0 00002E3F C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
|
||||
0001:000C9320 00000D84 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
|
||||
0001:000CA0A4 000011F4 C=CODE S=.text G=(none) M=UnitFicheHoraire ACBP=A9
|
||||
0001:000CB298 00000038 C=CODE S=.text G=(none) M=ShellConsts ACBP=A9
|
||||
0001:000CB2D0 000004E0 C=CODE S=.text G=(none) M=ShellCtrls ACBP=A9
|
||||
0001:000CB7B0 00001A0C C=CODE S=.text G=(none) M=UnitRoute ACBP=A9
|
||||
0001:000CD1BC 00002134 C=CODE S=.text G=(none) M=UnitRouteTrains ACBP=A9
|
||||
0001:000CF2F0 00000298 C=CODE S=.text G=(none) M=UnitInfo ACBP=A9
|
||||
0001:000CF588 00002D68 C=CODE S=.text G=(none) M=selection_train ACBP=A9
|
||||
0001:000D22F0 00006230 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
|
||||
0001:000D8520 00001908 C=CODE S=.text G=(none) M=UnitClock ACBP=A9
|
||||
0001:000D9E28 00051884 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
|
||||
0001:0012B6AC 000039DC C=CODE S=.text G=(none) M=UnitSR ACBP=A9
|
||||
0001:0012F088 00002BF8 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
|
||||
0001:00131C80 000088F8 C=CODE S=.text G=(none) M=UnitModifAction ACBP=A9
|
||||
0001:0013A578 00000F64 C=CODE S=.text G=(none) M=UnitHorloge ACBP=A9
|
||||
0001:0013B4DC 000025FB C=CODE S=.text G=(none) M=verif_version ACBP=A9
|
||||
0001:0013DAD8 00001190 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
|
||||
0001:0013EC68 00000F6C C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
|
||||
0001:0013FBD4 00057434 C=CODE S=.text G=(none) M=Unitprinc ACBP=A9
|
||||
0001:00197008 0004C358 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
|
||||
0001:001E3360 00002F78 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
|
||||
0001:001E62D8 000005C4 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: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
|
||||
@@ -136,8 +140,9 @@ Detailed map of segments
|
||||
0002:00001C34 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9
|
||||
0002:00001C40 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9
|
||||
0002:00001C44 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9
|
||||
0002:00001C4C 000000D8 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9
|
||||
0002:00001D24 0000060D C=DATA S=.data G=DGROUP M=UnitPrinc ACBP=A9
|
||||
0002:00001C4C 00000068 C=DATA S=.data G=DGROUP M=ShellCtrls ACBP=A9
|
||||
0002:00001CB4 000000D8 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9
|
||||
0002:00001D8C 0000060D C=DATA S=.data G=DGROUP M=Unitprinc ACBP=A9
|
||||
0002:00003000 00000664 C=BSS S=.bss G=DGROUP M=System ACBP=A9
|
||||
0002:00003664 00000010 C=BSS S=.bss G=DGROUP M=SysInit ACBP=A9
|
||||
0002:00003674 00000004 C=BSS S=.bss G=DGROUP M=Types ACBP=A9
|
||||
@@ -215,27 +220,31 @@ Detailed map of segments
|
||||
0002:00003E60 00000004 C=BSS S=.bss G=DGROUP M=Mask ACBP=A9
|
||||
0002:00003E64 00000004 C=BSS S=.bss G=DGROUP M=Grids ACBP=A9
|
||||
0002:00003E68 00000004 C=BSS S=.bss G=DGROUP M=Spin ACBP=A9
|
||||
0002:00003E6C 00000010 C=BSS S=.bss G=DGROUP M=UnitPilote ACBP=A9
|
||||
0002:00003E7C 00000010 C=BSS S=.bss G=DGROUP M=Importation ACBP=A9
|
||||
0002:00003E8C 000148B0 C=BSS S=.bss G=DGROUP M=UnitAnalyseSegCDM ACBP=A9
|
||||
0002:0001873C 00000014 C=BSS S=.bss G=DGROUP M=UnitConfigTCO ACBP=A9
|
||||
0002:00018750 00000014 C=BSS S=.bss G=DGROUP M=Unit_Pilote_aig ACBP=A9
|
||||
0002:00018764 00000020 C=BSS S=.bss G=DGROUP M=UnitConfigCellTCO ACBP=A9
|
||||
0002:00018784 0000190C C=BSS S=.bss G=DGROUP M=UnitFicheHoraire ACBP=A9
|
||||
0002:0001A090 00000034 C=BSS S=.bss G=DGROUP M=UnitClock ACBP=A9
|
||||
0002:0001A0C4 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9
|
||||
0002:0001A0CC 00000020 C=BSS S=.bss G=DGROUP M=selection_train ACBP=A9
|
||||
0002:0001A0EC 00489740 C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9
|
||||
0002:004A382C 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9
|
||||
0002:004A383C 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9
|
||||
0002:004A3850 0000001C C=BSS S=.bss G=DGROUP M=UnitModifAction ACBP=A9
|
||||
0002:004A386C 00000038 C=BSS S=.bss G=DGROUP M=UnitHorloge ACBP=A9
|
||||
0002:004A38A4 000001EC C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9
|
||||
0002:004A3A90 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9
|
||||
0002:004A3A94 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9
|
||||
0002:004A3AA0 041BF8E8 C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9
|
||||
0002:04663388 0000058C C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
|
||||
0002:04663914 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9
|
||||
0002:00003E6C 00002494 C=BSS S=.bss G=DGROUP M=UnitPilote ACBP=A9
|
||||
0002:00006300 00000010 C=BSS S=.bss G=DGROUP M=Importation ACBP=A9
|
||||
0002:00006310 000148B0 C=BSS S=.bss G=DGROUP M=UnitAnalyseSegCDM ACBP=A9
|
||||
0002:0001ABC0 00000014 C=BSS S=.bss G=DGROUP M=UnitConfigTCO ACBP=A9
|
||||
0002:0001ABD4 00000014 C=BSS S=.bss G=DGROUP M=Unit_Pilote_aig ACBP=A9
|
||||
0002:0001ABE8 0000190C C=BSS S=.bss G=DGROUP M=UnitFicheHoraire ACBP=A9
|
||||
0002:0001C4F4 00000004 C=BSS S=.bss G=DGROUP M=ShellConsts ACBP=A9
|
||||
0002:0001C4F8 0000001C C=BSS S=.bss G=DGROUP M=ShellCtrls ACBP=A9
|
||||
0002:0001C514 00000CA4 C=BSS S=.bss G=DGROUP M=UnitRoute ACBP=A9
|
||||
0002:0001D1B8 00000008 C=BSS S=.bss G=DGROUP M=UnitRouteTrains ACBP=A9
|
||||
0002:0001D1C0 0000000C C=BSS S=.bss G=DGROUP M=UnitInfo ACBP=A9
|
||||
0002:0001D1CC 00000CB0 C=BSS S=.bss G=DGROUP M=selection_train ACBP=A9
|
||||
0002:0001DE7C 00000020 C=BSS S=.bss G=DGROUP M=UnitConfigCellTCO ACBP=A9
|
||||
0002:0001DE9C 00000034 C=BSS S=.bss G=DGROUP M=UnitClock ACBP=A9
|
||||
0002:0001DED0 0048FB5C C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9
|
||||
0002:004ADA2C 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9
|
||||
0002:004ADA3C 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9
|
||||
0002:004ADA50 0000001C C=BSS S=.bss G=DGROUP M=UnitModifAction ACBP=A9
|
||||
0002:004ADA6C 00000038 C=BSS S=.bss G=DGROUP M=UnitHorloge ACBP=A9
|
||||
0002:004ADAA4 000001EC C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9
|
||||
0002:004ADC90 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9
|
||||
0002:004ADC94 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9
|
||||
0002:004ADCA0 064A5CAC C=BSS S=.bss G=DGROUP M=Unitprinc ACBP=A9
|
||||
0002:0695394C 000005C8 C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
|
||||
0002:06953F14 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9
|
||||
|
||||
Bound resource files
|
||||
|
||||
@@ -248,11 +257,13 @@ Importation.dfm
|
||||
UnitAnalyseSegCDM.dfm
|
||||
UnitConfigTCO.dfm
|
||||
Unit_Pilote_aig.dfm
|
||||
UnitConfigCellTCO.dfm
|
||||
UnitFicheHoraire.dfm
|
||||
UnitClock.dfm
|
||||
Unitplace.dfm
|
||||
UnitRoute.dfm
|
||||
UnitRouteTrains.dfm
|
||||
UnitInfo.dfm
|
||||
selection_train.dfm
|
||||
UnitConfigCellTCO.dfm
|
||||
UnitClock.dfm
|
||||
UnitTCO.dfm
|
||||
UnitSR.dfm
|
||||
UnitCDF.dfm
|
||||
@@ -260,11 +271,11 @@ UnitModifAction.dfm
|
||||
UnitHorloge.dfm
|
||||
verif_version.dfm
|
||||
UnitSimule.dfm
|
||||
UnitPrinc.dfm
|
||||
Unitprinc.dfm
|
||||
UnitConfig.dfm
|
||||
UnitDebug.dfm
|
||||
Signaux_complexes_GL.res
|
||||
Signaux_complexes_GL.drf
|
||||
|
||||
|
||||
Program entry point at 0001:001D1108
|
||||
Program entry point at 0001:001E6640
|
||||
+251
-21
@@ -78,7 +78,7 @@ type
|
||||
{ Déclarations publiques }
|
||||
end;
|
||||
|
||||
// tableau des détecteurs sur un segment
|
||||
// tableau des détecteurs ou actionneurs sur un segment
|
||||
TdetSeg= array[1..10] of record
|
||||
index,periph : integer;
|
||||
end;
|
||||
@@ -180,6 +180,8 @@ procedure Aff_train(adr: integer;train:string;x1,y1,x2,y2 :integer);
|
||||
procedure D_Arc(Canvas: TCanvas; CenterX,CenterY: integer;
|
||||
rayon: Integer; StartDegres, StopDegres: Double);
|
||||
function point_Sur_Segment(x,y,x1,y1,x2,y2 : integer): Boolean;
|
||||
function explore_port_det(seg,port : integer) : integer;
|
||||
function index_segment_act(Adresse : integer;var TabloDetSeg : TdetSeg;var nombre : integer) : boolean;
|
||||
|
||||
implementation
|
||||
|
||||
@@ -2117,8 +2119,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
// le port a il t-il des périphériques portant des détecteurs
|
||||
// le port demandé a t-il déja des périphériques portant des détecteurs
|
||||
NombrePeriph:=segment[idSeg].nperiph;
|
||||
if NombrePeriph<>0 then
|
||||
begin
|
||||
@@ -2128,9 +2129,12 @@ begin
|
||||
begin
|
||||
if segment[idSeg].periph[i].OnDevicePort=Idport then // le port du périphérique correspond au port exploré
|
||||
begin
|
||||
result:=segment[idSeg].periph[i].adresse;
|
||||
c:='Z';
|
||||
exit;
|
||||
if segment[idSeg].periph[i].adresse<>0 then
|
||||
begin
|
||||
result:=segment[idSeg].periph[i].adresse;
|
||||
c:='Z';
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
inc(i);
|
||||
@@ -2153,7 +2157,7 @@ begin
|
||||
// remonter au segment pour voir si c'est un aiguillage
|
||||
typeP:=segment[idSeg].typ;
|
||||
|
||||
if typeP='dbl_slip_switch' then
|
||||
if typeP='dbl_slip_switch' then // tjd
|
||||
begin
|
||||
portlocal:=segment[idSeg].port[idport].local;
|
||||
case portlocal of
|
||||
@@ -2283,6 +2287,190 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
// fonction récursive
|
||||
// explore le port,segment jusqu'à trouver une adresse de détecteur
|
||||
// un détecteur peut être sur un port de l'aiguillage
|
||||
// renvoie l'adresse de l'aiguillage ou du détecteur et dans C le port (P D S ou Z pour un détecteur)
|
||||
function explore_port_det(seg,port : integer) : integer;
|
||||
var i,j,IdSeg,IdPort,NombrePeriph,port1,port2,portSuivant,segSuivant,portLocal,
|
||||
xp,yp,xd,yd,detect,nb_det : integer;
|
||||
typeP,serr : string;
|
||||
sdetect : Tdetect_cdm;
|
||||
trouveDet : boolean;
|
||||
begin
|
||||
if seg=0 then
|
||||
begin
|
||||
explore_port_det:=0;
|
||||
exit; // laisser sinon mauvais transfert de variable dans la pile dans l'itération suivante!!
|
||||
end;
|
||||
if not(trouve_IndexSegPort(seg,port,idSeg,IdPort)) then
|
||||
begin
|
||||
serr:='Erreur 1 pas trouvé le port '+intToSTR(port)+' dans la liste des segments';
|
||||
Affiche(serr,clred);
|
||||
AfficheDebug(serr,clred);
|
||||
explore_port_det:=0;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// le port a t-il des périphériques portant des détecteurs
|
||||
NombrePeriph:=segment[idSeg].nperiph;
|
||||
if NombrePeriph<>0 then
|
||||
begin
|
||||
i:=0;
|
||||
repeat
|
||||
if segment[idSeg].periph[i].typ='detector' then
|
||||
begin
|
||||
if segment[idSeg].periph[i].OnDevicePort=Idport then // le port du périphérique correspond au port exploré
|
||||
begin
|
||||
if segment[idSeg].periph[i].adresse<>0 then
|
||||
begin
|
||||
result:=segment[idSeg].periph[i].adresse;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
inc(i);
|
||||
until (i>NombrePeriph-1) or (trouveDet);
|
||||
end;
|
||||
|
||||
// trouver le segment contigu connecté au port de connexion
|
||||
segSuivant:=segment[idseg].port[idport].ConnecteAuSeg;
|
||||
portSuivant:=segment[idseg].port[idport].ConnecteAuPort;
|
||||
if not(trouve_IndexSegPort(segSuivant,portSuivant,idSeg,IdPort)) then
|
||||
begin
|
||||
serr:='Erreur 2 pas trouvé le port '+intToSTR(port)+' dans la liste des segments';
|
||||
Affiche(serr,clred);
|
||||
AfficheDebug(serr,clred);
|
||||
explore_port_det:=0;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// remonter au segment pour voir si c'est un aiguillage
|
||||
typeP:=segment[idSeg].typ;
|
||||
|
||||
if typeP='dbl_slip_switch' then
|
||||
begin
|
||||
portlocal:=segment[idSeg].port[idport].local;
|
||||
|
||||
// tjd 2 ou 4 états
|
||||
if (portlocal=0) or (portlocal=1) then
|
||||
begin
|
||||
explore_port_det(SegSuivant,segment[idseg].port[2].numero);
|
||||
explore_port_det(SegSuivant,segment[idseg].port[3].numero);
|
||||
end;
|
||||
if (portlocal=2) or (portlocal=3) then
|
||||
begin
|
||||
explore_port_det(SegSuivant,segment[idseg].port[0].numero);
|
||||
explore_port_det(SegSuivant,segment[idseg].port[1].numero);
|
||||
end;
|
||||
exit;
|
||||
end;
|
||||
|
||||
if segment_aig(typeP) then // est-ce un aig
|
||||
//------------- aiguillage
|
||||
begin
|
||||
portlocal:=segment[idSeg].port[idport].local;
|
||||
case portlocal of
|
||||
// port 0 : pris en pointe, explorer les deux autres ports
|
||||
0 : begin
|
||||
explore_port_det(SegSuivant,segment[idseg].port[1].numero); // explore droit
|
||||
explore_port_det(SegSuivant,segment[idseg].port[2].numero); // explore dévié
|
||||
end;
|
||||
1,2 : explore_port_det(SegSuivant,segment[idseg].port[0].numero);
|
||||
end;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// --- croisement
|
||||
if typeP='crossing' then
|
||||
begin
|
||||
portlocal:=segment[idSeg].port[idport].local;
|
||||
case portLocal of
|
||||
0 : explore_port_det(SegSuivant,segment[idseg].port[2].numero);
|
||||
1 : explore_port_det(SegSuivant,segment[idseg].port[3].numero);
|
||||
2 : explore_port_det(SegSuivant,segment[idseg].port[0].numero);
|
||||
3 : explore_port_det(SegSuivant,segment[idseg].port[1].numero);
|
||||
end;
|
||||
exit;
|
||||
end;
|
||||
|
||||
// trouver le détecteur le plus proche.
|
||||
NombrePeriph:=segment[idSeg].nperiph;
|
||||
j:=0;detect:=0;nb_det:=0;
|
||||
if NombrePeriph<>0 then
|
||||
begin
|
||||
raz_detect(sDetect); // on peut rencontrer des détecteurs non appairés: ex ; 514 522 514 522
|
||||
repeat
|
||||
if segment[idSeg].periph[j].typ='detector' then
|
||||
begin
|
||||
detect:=segment[idSeg].periph[j].adresse;
|
||||
if detect<>0 then
|
||||
begin
|
||||
//if NivDebug=3 then Affichedebug('Détecteur '+inttoStr(detect),clyellow);
|
||||
// incrémenter le compteur du détecteur rencontré
|
||||
inc(nb_det);
|
||||
Affiche('trouvé détecteur '+intToSTR(detect),clYellow);
|
||||
sDetect[nb_det].adresse:=detect ;
|
||||
// coordonnées du port
|
||||
xp:=segment[idSeg].Port[idPort].x;
|
||||
yp:=segment[idSeg].Port[idPort].y;
|
||||
// coordonnées du détecteur
|
||||
xd:=segment[idSeg].periph[j].x;
|
||||
yd:=segment[idSeg].periph[j].y;
|
||||
// calculer la distance du détecteur au port
|
||||
sDetect[nb_det].distance:=round( sqrt( sqr(xp-xd)+sqr(yp-yd) ));
|
||||
end;
|
||||
end;
|
||||
inc(j);
|
||||
until (j>NombrePeriph-1) ;
|
||||
// trier les détecteurs du segment dans l'ordre de la distance de la plus
|
||||
// courte à la plus grande au port
|
||||
if nb_det<>0 then
|
||||
begin
|
||||
trier(Sdetect,nb_det);
|
||||
|
||||
// on prend le premier!!
|
||||
explore_port_det:=sDetect[1].adresse;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
// trouver l'autre port du segment idseg
|
||||
// sur 2 ports
|
||||
NombrePeriph:=segment[idSeg].nport;
|
||||
if NombrePeriph=0 then
|
||||
begin
|
||||
explore_port_det:=0;
|
||||
exit;
|
||||
end;
|
||||
port1:=segment[idSeg].port[0].numero;
|
||||
port2:=segment[idSeg].port[1].numero;
|
||||
i:=0;
|
||||
if (port1<>portSuivant) and (segment[idSeg].port[0].connecte) then i:=explore_port_det(SegSuivant,port1);
|
||||
if (port2<>portSuivant) and (segment[idSeg].port[1].connecte) then i:=explore_port_det(SegSuivant,port2);
|
||||
|
||||
explore_port_det:=i;
|
||||
exit;
|
||||
|
||||
typeP:=segment[idSeg].typ;
|
||||
// explorer l'autre port
|
||||
if (typeP='straight') or (typeP='arc') or (typeP='curve') or (typeP='pre_curve') then
|
||||
begin
|
||||
port1:=segment[idSeg].port[0].numero;
|
||||
port2:=segment[idSeg].port[1].numero;
|
||||
if port1<>portSuivant then i:=explore_port_det(SegSuivant,port1);
|
||||
if port2<>portSuivant then i:=explore_port_det(SegSuivant,port2);
|
||||
explore_port_det:=i;
|
||||
exit;
|
||||
end;
|
||||
|
||||
Affiche('Segment '+typeP+' non trouvé',clred);
|
||||
|
||||
explore_Port_det:=0;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// stocke les aiguillages et les croisement dans le tableau Aig_CDM
|
||||
procedure remplit_Aig_cdm;
|
||||
var i,j,NumSegment,IndexSegment,IndexPort,index,index2,g,
|
||||
@@ -2974,17 +3162,6 @@ begin
|
||||
if debugBranche then Affichedebug('Détecteur '+intToSTR(j)+'/'+intToSTR(nb_det)+': non pris en compte : '+intToSTR(detecteur),clOrange);
|
||||
end;
|
||||
|
||||
{ ss:=dernier_champ(sbranche);
|
||||
k:=0;
|
||||
val(ss,k,erreur);
|
||||
if ss<>'' then if not(ss[1] in['0'..'9']) then k:=0;
|
||||
// vérifier si le détecteur est déja en fin de branche et que si on est au 2eme élément du tableau, on ne doit pas rencontrer le meme détecteur
|
||||
if (k<>detecteur) then
|
||||
begin
|
||||
sbranche:=sbranche+','+intToSTR(detecteur);
|
||||
if debugBranche then Affichedebug('Détecteur '+intToSTR(j)+'/'+intToSTR(nb_det)+': pris en compte : '+intToSTR(detecteur),clyellow);
|
||||
end; }
|
||||
|
||||
inc(indexElBranche);
|
||||
end;
|
||||
end;
|
||||
@@ -3243,7 +3420,7 @@ begin
|
||||
until trouve or (i>MaxAiguillage);
|
||||
|
||||
// puis créer les branches depuis les positions déviées ---------------------
|
||||
if debugBranche then AfficheDebug('Etape 3.2 création des branches de dévié d''aiguillage',clwhite);
|
||||
if debugBranche then AfficheDebug('Etape 3.2 création des branches depuis dévié d''aiguillage',clwhite);
|
||||
i:=1;
|
||||
repeat
|
||||
c:=aiguillage[i].AdevieB;
|
||||
@@ -3271,6 +3448,7 @@ begin
|
||||
trouve:=false;
|
||||
until trouve or (i>MaxAiguillage);
|
||||
|
||||
|
||||
if debugBranche then AfficheDebug('Etape 3.3 Liste de détecteurs absents des branches pour constituer les branches manquantes',clwhite);
|
||||
// regarder la liste des détecteurs de CDM qui sont absents des branches--------------------
|
||||
for i:=1 to Ndet_cdm do
|
||||
@@ -3302,6 +3480,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
// recopier le tampon des branches dans le richedit de l'onglet branches de la config
|
||||
with formconfig do
|
||||
begin
|
||||
@@ -4612,9 +4791,60 @@ begin
|
||||
SelectionAffichee:=false;}
|
||||
end;
|
||||
|
||||
// trouve les index du segment qui contiennent le détecteur Adresse
|
||||
|
||||
// trouve les index du segment qui contiennent l'actionneur Adresse
|
||||
// renvoie dans index les index, et dans periph les numéros de périphériques dans lesquels ils se trouvent
|
||||
function index_segment_det(Adresse : integer;var TabloDetSeg : TdetSeg; nombre : integer) : boolean;
|
||||
function index_segment_act(Adresse : integer;var TabloDetSeg : TdetSeg;var nombre : integer) : boolean;
|
||||
var i,n,ip,itablo : integer;
|
||||
begin
|
||||
//trouver les deux segments de l'actionneur
|
||||
if adresse=0 then
|
||||
begin
|
||||
nombre:=0;
|
||||
result:=false;
|
||||
exit;
|
||||
end;
|
||||
for i:=1 to 10 do
|
||||
begin
|
||||
TabloDetSeg[i].index:=-1;
|
||||
TabloDetSeg[i].periph:=-1;
|
||||
end;
|
||||
|
||||
i:=0;
|
||||
itablo:=0;
|
||||
repeat
|
||||
n:=segment[i].nperiph;
|
||||
if n<>0 then
|
||||
begin
|
||||
for ip:=0 to n-1 do
|
||||
begin
|
||||
if segment[i].periph[ip].typ='actuator' then
|
||||
begin
|
||||
if segment[i].periph[ip].adresse=adresse then
|
||||
begin
|
||||
inc(itablo);
|
||||
if itablo>10 then
|
||||
begin
|
||||
AfficheDebug('Erreur 857 : Nbre périphériques>10 Segment '+intToSTR(segment[i].numero),clred);
|
||||
exit;
|
||||
end;
|
||||
TabloDetSeg[itablo].index:=i;
|
||||
TabloDetSeg[itablo].periph:=ip;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
inc(i);
|
||||
until (i>nseg-1);
|
||||
nombre:=itablo;
|
||||
result:=itablo>0;
|
||||
end;
|
||||
|
||||
|
||||
// trouve les index du segment qui contiennent le détecteur Adresse
|
||||
// renvoie l'index du segment dans TabloDetSeg[].index et l'index du périphérique dans TabloDetSeg[].periph
|
||||
// leur nombre dans Nombre
|
||||
function index_segment_det(Adresse : integer;var TabloDetSeg : TdetSeg;var nombre : integer) : boolean;
|
||||
var i,n,ip,itablo : integer;
|
||||
begin
|
||||
//trouver les deux segments du détecteurs
|
||||
|
||||
+1
-1
@@ -221,7 +221,7 @@ object FormCDF: TFormCDF
|
||||
object Label24: TLabel
|
||||
Left = 48
|
||||
Top = 124
|
||||
Width = 121
|
||||
Width = 24
|
||||
Height = 13
|
||||
Caption = '1 '#224' 4'
|
||||
end
|
||||
|
||||
+1
-3
@@ -186,8 +186,6 @@ begin
|
||||
Edit19.Text:=intToSTR(Signaux[index].SR[19].sortie1);
|
||||
|
||||
editNadresses.text:=intToSTR(Signaux[index].NA);
|
||||
|
||||
|
||||
end;
|
||||
|
||||
procedure dessine_signal_CDF;
|
||||
@@ -263,7 +261,7 @@ begin
|
||||
begin
|
||||
val(Edit3.Text,i,erreur);
|
||||
if (i<0) or (i>255) or (erreur<>0) then exit;
|
||||
Signaux[index].SR[2].sortie1:=i;
|
||||
Signaux[index].SR[3].sortie1:=i;
|
||||
Maj_DB;
|
||||
if label3.Caption=etats[3] then Maj_Etat_Signal(0,semaphore_cli);
|
||||
dessine_signal_CDF;
|
||||
|
||||
+41
-9
@@ -7,7 +7,7 @@ unit UnitClock;
|
||||
|
||||
DrawArrow dessine les aiguilles dans ABitmap:
|
||||
- le crée, dessine
|
||||
Abitmap.canvas.copyrect(
|
||||
Abitmap.canvas.copyrect()
|
||||
- copie dans horloge : canvas.draw(0,0,ABitMap)
|
||||
|
||||
}
|
||||
@@ -155,7 +155,7 @@ end;
|
||||
|
||||
function TClock.HourAngle( Hou, Min : word) : real;
|
||||
begin
|
||||
HourAngle:=(Hou MOD 12) * pisur6 + (Min*pisur360);
|
||||
HourAngle:=(Hou mod 12) * pisur6 + (Min*pisur360);
|
||||
end;
|
||||
|
||||
procedure Tclock.TickerCall;
|
||||
@@ -241,7 +241,7 @@ begin
|
||||
dec(Radius,LapStepW+2);
|
||||
end;
|
||||
|
||||
// Dessine le fond (le tour) de l'horloge sur FbitMap
|
||||
// Dessine le fond Fbitmap (le tour) de l'horloge sur FbitMap
|
||||
procedure TClock.DrawClockBkg;
|
||||
|
||||
// Dessine les tirets minute sur FBitMap
|
||||
@@ -360,6 +360,7 @@ end;
|
||||
|
||||
|
||||
procedure TFormClock.FormCreate(Sender: TObject);
|
||||
var off : integer;
|
||||
begin
|
||||
// inits
|
||||
// Affiche('FormClock create',clYellow);
|
||||
@@ -377,17 +378,48 @@ begin
|
||||
clock.ClkFaceColor:=$e0e0e0;
|
||||
clock.ClkArrowColor:=clBlack;
|
||||
|
||||
off:=36;
|
||||
{$IF CompilerVersion >= 28.0}
|
||||
off:=40;
|
||||
{$IFEND}
|
||||
|
||||
ImageList24x24.GetBitmap(0,BitBtnMarHor.Glyph);
|
||||
BitBtnMarHor.Height:=26;
|
||||
BitBtnMarHor.Width:=26;
|
||||
with BitBtnMarHor do
|
||||
begin
|
||||
Height:=26;
|
||||
Width:=26;
|
||||
Top:=formClock.Height-BitBtnMarHor.Height-off;
|
||||
end;
|
||||
|
||||
ImageList24x24.GetBitmap(1,BitBtnArrHorl.Glyph);
|
||||
BitBtnMarHor.Height:=26;
|
||||
BitBtnMarHor.Width:=26;
|
||||
with BitBtnArrHorl do
|
||||
begin
|
||||
Height:=26;
|
||||
Width:=26;
|
||||
Top:=formClock.Height-BitBtnMarHor.Height-off;
|
||||
end;
|
||||
|
||||
ImageList24x24.GetBitmap(2,BitBtnInitHor.Glyph);
|
||||
BitBtnMarHor.Height:=26;
|
||||
BitBtnMarHor.Width:=26;
|
||||
with BitBtnInitHor do
|
||||
begin
|
||||
Height:=26;
|
||||
Width:=26;
|
||||
Top:=formClock.Height-BitBtnMarHor.Height-off;
|
||||
end;
|
||||
|
||||
with ButtonParametres do
|
||||
begin
|
||||
Height:=26;
|
||||
Width:=26;
|
||||
Top:=formClock.Height-BitBtnMarHor.Height-off;
|
||||
end;
|
||||
|
||||
with ButtonGH do
|
||||
begin
|
||||
Height:=26;
|
||||
Width:=26;
|
||||
Top:=formClock.Height-BitBtnMarHor.Height-off;
|
||||
end;
|
||||
|
||||
color:=clock.ClkFaceColor;
|
||||
SecThick:=2; MinThick:=10;
|
||||
|
||||
+215
-73
@@ -1,6 +1,6 @@
|
||||
object FormConfig: TFormConfig
|
||||
Left = 323
|
||||
Top = 128
|
||||
Left = 281
|
||||
Top = 137
|
||||
Hint = 'Modifie la configuration selon les s'#233'lections choisies'
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Configuration g'#233'n'#233'rale'
|
||||
@@ -682,7 +682,7 @@ object FormConfig: TFormConfig
|
||||
Top = 8
|
||||
Width = 633
|
||||
Height = 505
|
||||
ActivePage = TabSheet1
|
||||
ActivePage = TabSheetTrains
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -11
|
||||
@@ -1405,31 +1405,6 @@ object FormConfig: TFormConfig
|
||||
ShowHint = True
|
||||
TabOrder = 4
|
||||
end
|
||||
object CheckRoulage: TCheckBox
|
||||
Left = 16
|
||||
Top = 120
|
||||
Width = 169
|
||||
Height = 17
|
||||
Hint = 'Permet le roulage des trains en mode autonome'
|
||||
Caption = 'Option roulage des trains'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 5
|
||||
end
|
||||
object CheckBoxResa: TCheckBox
|
||||
Left = 16
|
||||
Top = 136
|
||||
Width = 265
|
||||
Height = 17
|
||||
Hint =
|
||||
'Permet de r'#233'server les aiguillages, les TJD/S et les croisements' +
|
||||
' sur le parcours d'#39'un train'
|
||||
Caption = 'Mode r'#233'servation des aiguillages par les trains'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 6
|
||||
OnClick = CheckBoxResaClick
|
||||
end
|
||||
end
|
||||
object GroupBox22: TGroupBox
|
||||
Left = 312
|
||||
@@ -2144,9 +2119,9 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object Memo5: TMemo
|
||||
Left = 464
|
||||
Top = 240
|
||||
Top = 296
|
||||
Width = 153
|
||||
Height = 201
|
||||
Height = 145
|
||||
Lines.Strings = (
|
||||
'Une ligne doit commencer par '
|
||||
'un aiguillage (ou un buttoir) et '
|
||||
@@ -2157,12 +2132,7 @@ object FormConfig: TFormConfig
|
||||
''
|
||||
'Un aiguillage peut se retrouver '
|
||||
#224' plusieurs endroits de cette '
|
||||
'section, mais pas un d'#233'tecteur. '
|
||||
''
|
||||
'Tous les aiguillages d'#233'clar'#233's '
|
||||
'doivent appara'#238'tre au moins '
|
||||
'une fois dans les branches.'
|
||||
'')
|
||||
'section, mais pas un d'#233'tecteur. ')
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
@@ -2315,7 +2285,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object LabelUni: TLabel
|
||||
Left = 8
|
||||
Top = 184
|
||||
Top = 176
|
||||
Width = 72
|
||||
Height = 13
|
||||
Caption = 'Spec Unisemaf'
|
||||
@@ -2447,9 +2417,9 @@ object FormConfig: TFormConfig
|
||||
OnChange = EditSuiv4Change
|
||||
end
|
||||
object CheckVerrouCarre: TCheckBox
|
||||
Left = 120
|
||||
Left = 136
|
||||
Top = 216
|
||||
Width = 145
|
||||
Width = 137
|
||||
Height = 17
|
||||
Hint =
|
||||
'Passe le signal au carr'#233' ci aucun train n'#39'est pr'#233'sent 3 cantons ' +
|
||||
@@ -2483,7 +2453,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object EditSpecUni: TEdit
|
||||
Left = 8
|
||||
Top = 200
|
||||
Top = 192
|
||||
Width = 33
|
||||
Height = 21
|
||||
TabOrder = 14
|
||||
@@ -2491,8 +2461,8 @@ object FormConfig: TFormConfig
|
||||
OnChange = EditSpecUniChange
|
||||
end
|
||||
object Buttonrestaure: TButton
|
||||
Left = 8
|
||||
Top = 224
|
||||
Left = 24
|
||||
Top = 272
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint = 'Restaure la configuration du feu d'#39'avant sa modification'
|
||||
@@ -2503,17 +2473,17 @@ object FormConfig: TFormConfig
|
||||
OnClick = ButtonrestaureClick
|
||||
end
|
||||
object CheckBoxFB: TCheckBox
|
||||
Left = 120
|
||||
Left = 136
|
||||
Top = 264
|
||||
Width = 153
|
||||
Width = 145
|
||||
Height = 17
|
||||
Caption = 'Avec demande feu blanc'
|
||||
TabOrder = 15
|
||||
OnClick = CheckBoxFBClick
|
||||
end
|
||||
object ButtonConfigSR: TButton
|
||||
Left = 8
|
||||
Top = 256
|
||||
Left = 24
|
||||
Top = 296
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = 'Configuration'
|
||||
@@ -2522,9 +2492,9 @@ object FormConfig: TFormConfig
|
||||
OnClick = ButtonConfigSRClick
|
||||
end
|
||||
object CheckFVC: TCheckBox
|
||||
Left = 120
|
||||
Left = 136
|
||||
Top = 232
|
||||
Width = 145
|
||||
Width = 121
|
||||
Height = 17
|
||||
Hint = 'Remplace le feu vert par un feu vert clignotant'
|
||||
Caption = 'Feu vert clignotant'
|
||||
@@ -2534,9 +2504,9 @@ object FormConfig: TFormConfig
|
||||
OnClick = CheckFVCClick
|
||||
end
|
||||
object CheckFRC: TCheckBox
|
||||
Left = 120
|
||||
Left = 136
|
||||
Top = 248
|
||||
Width = 145
|
||||
Width = 129
|
||||
Height = 17
|
||||
Hint = 'Remplace le s'#233'maphore par un feu rouge clignotant'
|
||||
Caption = 'Feu rouge clignotant'
|
||||
@@ -2546,7 +2516,7 @@ object FormConfig: TFormConfig
|
||||
OnClick = CheckFRCClick
|
||||
end
|
||||
object CheckBoxVersContrevoie: TCheckBox
|
||||
Left = 120
|
||||
Left = 136
|
||||
Top = 280
|
||||
Width = 137
|
||||
Height = 17
|
||||
@@ -2558,9 +2528,9 @@ object FormConfig: TFormConfig
|
||||
OnClick = CheckBoxVersContrevoieClick
|
||||
end
|
||||
object CheckBoxContreVoie: TCheckBox
|
||||
Left = 120
|
||||
Left = 136
|
||||
Top = 296
|
||||
Width = 137
|
||||
Width = 129
|
||||
Height = 17
|
||||
Hint = 'Signal clignotant'
|
||||
Caption = 'Signal de contrevoie'
|
||||
@@ -2584,6 +2554,21 @@ object FormConfig: TFormConfig
|
||||
TabOrder = 21
|
||||
OnChange = MemoBlancChange
|
||||
end
|
||||
object RadioGroupLEB: TRadioGroup
|
||||
Left = 8
|
||||
Top = 224
|
||||
Width = 105
|
||||
Height = 41
|
||||
Caption = 'Pilotage'
|
||||
Items.Strings = (
|
||||
'Mode binaire'
|
||||
'Mode lin'#233'aire')
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 22
|
||||
Visible = False
|
||||
OnClick = RadioGroupLEBClick
|
||||
end
|
||||
end
|
||||
object ButtonNouvFeu: TButton
|
||||
Left = 0
|
||||
@@ -2841,7 +2826,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
end
|
||||
end
|
||||
object TabSheet1: TTabSheet
|
||||
object TabSheetActions: TTabSheet
|
||||
Caption = 'Actions'
|
||||
ImageIndex = 6
|
||||
object Label44: TLabel
|
||||
@@ -2863,7 +2848,7 @@ object FormConfig: TFormConfig
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 609
|
||||
Height = 425
|
||||
Height = 433
|
||||
Caption = 'Actions'
|
||||
TabOrder = 0
|
||||
object Label48: TLabel
|
||||
@@ -2976,6 +2961,163 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
end
|
||||
end
|
||||
object TabSheetActionneurs: TTabSheet
|
||||
Caption = 'Actionneurs'
|
||||
ImageIndex = 7
|
||||
object Label30: TLabel
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 143
|
||||
Height = 13
|
||||
Caption = 'Actionneurs de CDM Rail'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label31: TLabel
|
||||
Left = 352
|
||||
Top = 296
|
||||
Width = 229
|
||||
Height = 26
|
||||
Caption = 'Les actionneurs doivent '#234'tre compris entre deux d'#233'tecteurs'
|
||||
WordWrap = True
|
||||
end
|
||||
object ListBoxActionneurs: TListBox
|
||||
Left = 0
|
||||
Top = 56
|
||||
Width = 321
|
||||
Height = 361
|
||||
Color = clBlack
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clAqua
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
ItemHeight = 13
|
||||
MultiSelect = True
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnMouseDown = ListBoxActionneursMouseDown
|
||||
end
|
||||
object ButtonImRCDM: TButton
|
||||
Left = 8
|
||||
Top = 432
|
||||
Width = 81
|
||||
Height = 25
|
||||
Hint =
|
||||
'Importe les actionneurs depuis le fichier d'#39'importation de CDM r' +
|
||||
'ail'
|
||||
Caption = 'Importer'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
WordWrap = True
|
||||
OnClick = ButtonImRCDMClick
|
||||
end
|
||||
object ButtonNouvAct: TButton
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 65
|
||||
Height = 17
|
||||
Caption = 'Nouveau'
|
||||
TabOrder = 2
|
||||
OnClick = ButtonNouvActClick
|
||||
end
|
||||
object ButtonSupAct: TButton
|
||||
Left = 72
|
||||
Top = 32
|
||||
Width = 65
|
||||
Height = 17
|
||||
Caption = 'Supprime'
|
||||
TabOrder = 3
|
||||
OnClick = ButtonSupActClick
|
||||
end
|
||||
object GroupBoxAct: TGroupBox
|
||||
Left = 336
|
||||
Top = 56
|
||||
Width = 273
|
||||
Height = 153
|
||||
Caption = 'Description de l'#39'actionneur '
|
||||
TabOrder = 4
|
||||
object LabeledEditAdrActionneur: TLabeledEdit
|
||||
Left = 190
|
||||
Top = 40
|
||||
Width = 40
|
||||
Height = 21
|
||||
EditLabel.Width = 38
|
||||
EditLabel.Height = 13
|
||||
EditLabel.Caption = 'Adresse'
|
||||
EditLabel.Layout = tlBottom
|
||||
LabelPosition = lpLeft
|
||||
LabelSpacing = 140
|
||||
TabOrder = 0
|
||||
OnChange = LabeledEditAdrActionneurChange
|
||||
end
|
||||
end
|
||||
end
|
||||
object TabSheetDet: TTabSheet
|
||||
Caption = 'D'#233'tecteurs'
|
||||
ImageIndex = 13
|
||||
object Label42: TLabel
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 63
|
||||
Height = 13
|
||||
Caption = 'D'#233'tecteurs'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object ListBoxDet: TListBox
|
||||
Left = 0
|
||||
Top = 56
|
||||
Width = 321
|
||||
Height = 361
|
||||
Color = clBlack
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clAqua
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
ItemHeight = 13
|
||||
MultiSelect = True
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
OnMouseDown = ListBoxDetMouseDown
|
||||
end
|
||||
object Button4: TButton
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 65
|
||||
Height = 17
|
||||
Caption = 'Nouveau'
|
||||
TabOrder = 1
|
||||
OnClick = Button4Click
|
||||
end
|
||||
object Button5: TButton
|
||||
Left = 72
|
||||
Top = 32
|
||||
Width = 65
|
||||
Height = 17
|
||||
Caption = 'Supprime'
|
||||
TabOrder = 2
|
||||
OnClick = Button5Click
|
||||
end
|
||||
object GroupBoxDet: TGroupBox
|
||||
Left = 336
|
||||
Top = 56
|
||||
Width = 265
|
||||
Height = 161
|
||||
Caption = 'Description'
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object TabSheetPN: TTabSheet
|
||||
Caption = 'PN'
|
||||
ImageIndex = 6
|
||||
@@ -2988,7 +3130,7 @@ object FormConfig: TFormConfig
|
||||
TabOrder = 0
|
||||
object GroupBoxPNA: TGroupBox
|
||||
Left = 8
|
||||
Top = 224
|
||||
Top = 240
|
||||
Width = 249
|
||||
Height = 121
|
||||
Caption = 'Actionneurs PN simples'
|
||||
@@ -2996,7 +3138,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object GroupBoxPNZ: TGroupBox
|
||||
Left = 8
|
||||
Top = 352
|
||||
Top = 368
|
||||
Width = 249
|
||||
Height = 65
|
||||
Caption = 'Zones de d'#233'tection'
|
||||
@@ -3004,30 +3146,30 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object GroupBoxPN: TGroupBox
|
||||
Left = 8
|
||||
Top = 24
|
||||
Top = 16
|
||||
Width = 249
|
||||
Height = 193
|
||||
Height = 217
|
||||
Caption = 'Action gestion passage '#224' niveau'
|
||||
ParentShowHint = False
|
||||
ShowHint = False
|
||||
TabOrder = 2
|
||||
object Label21: TLabel
|
||||
Left = 8
|
||||
Top = 84
|
||||
Top = 92
|
||||
Width = 100
|
||||
Height = 13
|
||||
Caption = 'Adresse de fermeture'
|
||||
end
|
||||
object Label22: TLabel
|
||||
Left = 8
|
||||
Top = 108
|
||||
Top = 116
|
||||
Width = 94
|
||||
Height = 13
|
||||
Caption = 'Adresse d'#39'ouverture'
|
||||
end
|
||||
object EditAdrFerme: TEdit
|
||||
Left = 120
|
||||
Top = 80
|
||||
Top = 88
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
@@ -3035,7 +3177,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object EditAdrOuvre: TEdit
|
||||
Left = 120
|
||||
Top = 104
|
||||
Top = 112
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 2
|
||||
@@ -3043,7 +3185,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object EditCdeFerme: TEdit
|
||||
Left = 168
|
||||
Top = 80
|
||||
Top = 88
|
||||
Width = 25
|
||||
Height = 21
|
||||
Hint = 'Commande de fermeture (0 '#224' 2)'
|
||||
@@ -3054,7 +3196,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object EditCdeOuvre: TEdit
|
||||
Left = 168
|
||||
Top = 104
|
||||
Top = 112
|
||||
Width = 25
|
||||
Height = 21
|
||||
Hint = 'Commande d'#39'ouverture (0 '#224' 2)'
|
||||
@@ -3065,7 +3207,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object ButtonTestFerme: TButton
|
||||
Left = 208
|
||||
Top = 80
|
||||
Top = 88
|
||||
Width = 27
|
||||
Height = 21
|
||||
Hint = 'Test de fermeture (mode CDM ou connect'#233' '#224' l'#39'interface)'
|
||||
@@ -3077,7 +3219,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object ButtonTestOuvre: TButton
|
||||
Left = 208
|
||||
Top = 104
|
||||
Top = 112
|
||||
Width = 27
|
||||
Height = 21
|
||||
Hint = 'Test d'#39'ouverture (mode CDM ou connect'#233' '#224' l'#39'interface)'
|
||||
@@ -3089,7 +3231,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object CheckPnPulse: TCheckBox
|
||||
Left = 8
|
||||
Top = 128
|
||||
Top = 136
|
||||
Width = 97
|
||||
Height = 17
|
||||
Hint =
|
||||
@@ -3103,7 +3245,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object RadioButtonSimple: TRadioButton
|
||||
Left = 24
|
||||
Top = 152
|
||||
Top = 174
|
||||
Width = 113
|
||||
Height = 17
|
||||
Hint = 'PN command'#233' par actionneurs'
|
||||
@@ -3115,7 +3257,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object RadioButtonZone: TRadioButton
|
||||
Left = 24
|
||||
Top = 168
|
||||
Top = 192
|
||||
Width = 113
|
||||
Height = 17
|
||||
Hint = 'PN command'#233' par m'#233'moires de zone'
|
||||
@@ -3127,7 +3269,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object RadioGroupActPN: TRadioGroup
|
||||
Left = 8
|
||||
Top = 16
|
||||
Top = 24
|
||||
Width = 233
|
||||
Height = 57
|
||||
Hint = 'action par accessoire DCC ou commande COM/USB'
|
||||
@@ -3141,8 +3283,8 @@ object FormConfig: TFormConfig
|
||||
OnClick = RadioGroupActPNClick
|
||||
end
|
||||
object ComboBoxPNCom: TComboBox
|
||||
Left = 88
|
||||
Top = 128
|
||||
Left = 8
|
||||
Top = 152
|
||||
Width = 145
|
||||
Height = 21
|
||||
Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
|
||||
|
||||
+1443
-480
File diff suppressed because it is too large.
Load diff
+239
-24
@@ -1,6 +1,6 @@
|
||||
object FormConfCellTCO: TFormConfCellTCO
|
||||
Left = 570
|
||||
Top = 171
|
||||
Left = 572
|
||||
Top = 151
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'FormConfCellTCO'
|
||||
ClientHeight = 473
|
||||
@@ -19,6 +19,152 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
OnKeyPress = FormKeyPress
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ImageGD: TImage
|
||||
Left = 96
|
||||
Top = 408
|
||||
Width = 57
|
||||
Height = 57
|
||||
Picture.Data = {
|
||||
07544269746D6170F6070000424DF60700000000000076000000280000003C00
|
||||
00003C000000010004000000000080070000C20E0000C20E0000100000000000
|
||||
0000000000000000800000800000008080008000000080008000808000008080
|
||||
8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFF0FFFFFFFFFFFFFFFFFFFF0FFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFF00000FFFFFFFFFFFFFFFFFFFF00000FFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFF0000000FFFFFFFFFFFFFFFFFFFF0000000FFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFF00000000FFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFF
|
||||
0000FFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFF
|
||||
0000FFFFFFFFFF0000000000FFFFFFFFFFFFFFFFFFFF0000000000FFFFFFFFFF
|
||||
0000FFFFFFFFF000000000000000000000000000000000000000000FFFFFFFFF
|
||||
0000FFFFFFFF00000000000000000000000000000000000000000000FFFFFFFF
|
||||
0000FFFFFFF0000000000000000000000000000000000000000000000FFFFFFF
|
||||
0000FFFFFFF0000000000000000000000000000000000000000000000FFFFFFF
|
||||
0000FFFFFFFF00000000000000000000000000000000000000000000FFFFFFFF
|
||||
0000FFFFFFFFF000000000000000000000000000000000000000000FFFFFFFFF
|
||||
0000FFFFFFFFFF0000000000FFFFFFFFFFFFFFFFFFFF0000000000FFFFFFFFFF
|
||||
0000FFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFF
|
||||
0000FFFFFFFFFFFF00000000FFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFF0000000FFFFFFFFFFFFFFFFFFFF0000000FFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFF00000FFFFFFFFFFFFFFFFFFFF00000FFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFF000FFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFF0FFFFFFFFFFFFFFFFFFFF0FFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000}
|
||||
Visible = False
|
||||
end
|
||||
object ImageHB: TImage
|
||||
Left = 152
|
||||
Top = 408
|
||||
Width = 57
|
||||
Height = 57
|
||||
Picture.Data = {
|
||||
07544269746D6170F6070000424DF60700000000000076000000280000003C00
|
||||
00003C000000010004000000000080070000C20E0000C20E0000100000000000
|
||||
0000000000000000800000800000008080008000000080008000808000008080
|
||||
8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFF0000000000FFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFF00000000000000FFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFF0000000000000000000000FFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFF000000000000000000000000FFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFF00000000000000000000000000FFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFF00000000000000000000000000FFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFF000000000000000000000000FFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFF0000000000000000000000FFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFF000000000000000000FFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFF00000000000000FFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFF000000000000FFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFF0000000000FFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
0000}
|
||||
Visible = False
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 8
|
||||
Top = 304
|
||||
@@ -92,6 +238,8 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = False
|
||||
TabOrder = 1
|
||||
object Label15: TLabel
|
||||
Left = 8
|
||||
@@ -108,7 +256,7 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 192
|
||||
Top = 14
|
||||
Top = 6
|
||||
Width = 53
|
||||
Height = 20
|
||||
Caption = 'Adresse : '
|
||||
@@ -121,7 +269,7 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
end
|
||||
object ImagePaletteCC: TImage
|
||||
Left = 128
|
||||
Top = 24
|
||||
Top = 16
|
||||
Width = 41
|
||||
Height = 41
|
||||
OnMouseDown = ImagePaletteCCMouseDown
|
||||
@@ -144,8 +292,8 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
OnChange = EditTypeImageChange
|
||||
end
|
||||
object GroupBoxOrientation: TGroupBox
|
||||
Left = 0
|
||||
Top = 192
|
||||
Left = 8
|
||||
Top = 152
|
||||
Width = 273
|
||||
Height = 57
|
||||
Caption = 'Orientation du signal'
|
||||
@@ -257,7 +405,7 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
end
|
||||
object EditAdrElement: TEdit
|
||||
Left = 200
|
||||
Top = 40
|
||||
Top = 38
|
||||
Width = 33
|
||||
Height = 24
|
||||
Hint = 'Adresse DCC de l'#39#233'l'#233'ment'
|
||||
@@ -268,7 +416,7 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
end
|
||||
object ButtonFond: TButton
|
||||
Left = 8
|
||||
Top = 96
|
||||
Top = 88
|
||||
Width = 97
|
||||
Height = 33
|
||||
Caption = 'Couleur de fond de la cellule'
|
||||
@@ -284,7 +432,7 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
end
|
||||
object RadioGroupSel: TRadioGroup
|
||||
Left = 128
|
||||
Top = 80
|
||||
Top = 72
|
||||
Width = 153
|
||||
Height = 57
|
||||
Caption = 'S'#233'lection clic ic'#244'ne ci-dessus'
|
||||
@@ -299,6 +447,24 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
end
|
||||
object CheckBoxEncadre: TCheckBox
|
||||
Left = 16
|
||||
Top = 134
|
||||
Width = 161
|
||||
Height = 17
|
||||
Hint = 'Ajoute un cadre autour des textes'
|
||||
Caption = 'Cellule(s) encadr'#233'es sur texte'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 6
|
||||
OnClick = CheckBoxEncadreClick
|
||||
end
|
||||
end
|
||||
object CheckPinv: TCheckBox
|
||||
Left = 8
|
||||
@@ -393,35 +559,84 @@ object FormConfCellTCO: TFormConfCellTCO
|
||||
end
|
||||
object GroupBoxCanton: TGroupBox
|
||||
Left = 16
|
||||
Top = 152
|
||||
Top = 160
|
||||
Width = 281
|
||||
Height = 129
|
||||
Caption = 'Canton'
|
||||
TabOrder = 6
|
||||
object LabelNumC: TLabel
|
||||
Left = 19
|
||||
Top = 17
|
||||
Left = 11
|
||||
Top = 20
|
||||
Width = 97
|
||||
Height = 13
|
||||
Caption = 'Num'#233'ro du canton : '
|
||||
end
|
||||
object RadioGroupAlign: TRadioGroup
|
||||
Left = 16
|
||||
Top = 40
|
||||
Width = 257
|
||||
Height = 57
|
||||
Caption = 'Placement des trains'
|
||||
Items.Strings = (
|
||||
'Centr'#233
|
||||
'Align'#233' '#224' gauche'
|
||||
'Align'#233' '#224' droite')
|
||||
object LabelInfo: TLabel
|
||||
Left = 160
|
||||
Top = 20
|
||||
Width = 10
|
||||
Height = 13
|
||||
Caption = 'xx'
|
||||
end
|
||||
object ImageSens: TImage
|
||||
Left = 232
|
||||
Top = 80
|
||||
Width = 33
|
||||
Height = 33
|
||||
Stretch = True
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 8
|
||||
Top = 52
|
||||
Width = 249
|
||||
Height = 13
|
||||
Caption = 'Sens impos'#233' de circulation dans le canton :'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object EditCanton: TEdit
|
||||
Left = 112
|
||||
Top = 16
|
||||
Width = 33
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
OnClick = RadioGroupAlignClick
|
||||
OnChange = EditCantonChange
|
||||
OnExit = EditCantonExit
|
||||
end
|
||||
object RadioButtonGH: TRadioButton
|
||||
Left = 48
|
||||
Top = 72
|
||||
Width = 177
|
||||
Height = 17
|
||||
Caption = 'Sens gauche/haut uniquement'
|
||||
TabOrder = 1
|
||||
OnClick = RadioButtonGHClick
|
||||
end
|
||||
object RadioButtonDB: TRadioButton
|
||||
Left = 48
|
||||
Top = 88
|
||||
Width = 177
|
||||
Height = 17
|
||||
Caption = 'Sens droit/bas uniquement'
|
||||
TabOrder = 2
|
||||
OnClick = RadioButtonDBClick
|
||||
end
|
||||
object RadioButtonDS: TRadioButton
|
||||
Left = 48
|
||||
Top = 104
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Double sens'
|
||||
TabOrder = 3
|
||||
OnClick = RadioButtonDSClick
|
||||
end
|
||||
end
|
||||
object ImageListIcones: TImageList
|
||||
Left = 160
|
||||
Top = 8
|
||||
Bitmap = {
|
||||
494C010118001D00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||
0000000000003600000028000000400000008000000001002000000000000080
|
||||
|
||||
+247
-59
@@ -42,7 +42,16 @@ type
|
||||
BitBtnAnnule: TBitBtn;
|
||||
GroupBoxCanton: TGroupBox;
|
||||
LabelNumC: TLabel;
|
||||
RadioGroupAlign: TRadioGroup;
|
||||
EditCanton: TEdit;
|
||||
LabelInfo: TLabel;
|
||||
CheckBoxEncadre: TCheckBox;
|
||||
RadioButtonGH: TRadioButton;
|
||||
RadioButtonDB: TRadioButton;
|
||||
RadioButtonDS: TRadioButton;
|
||||
ImageSens: TImage;
|
||||
ImageGD: TImage;
|
||||
ImageHB: TImage;
|
||||
Label4: TLabel;
|
||||
procedure EditAdrElementChange(Sender: TObject);
|
||||
procedure EditTexteCCTCOChange(Sender: TObject);
|
||||
procedure ButtonFonteClick(Sender: TObject);
|
||||
@@ -72,7 +81,12 @@ type
|
||||
procedure BitBtnAnnuleClick(Sender: TObject);
|
||||
procedure ListBoxActionKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure RadioGroupAlignClick(Sender: TObject);
|
||||
procedure EditCantonExit(Sender: TObject);
|
||||
procedure EditCantonChange(Sender: TObject);
|
||||
procedure CheckBoxEncadreClick(Sender: TObject);
|
||||
procedure RadioButtonGHClick(Sender: TObject);
|
||||
procedure RadioButtonDBClick(Sender: TObject);
|
||||
procedure RadioButtonDSClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
@@ -100,14 +114,12 @@ procedure actualise(indexTCO : integer);
|
||||
|
||||
implementation
|
||||
|
||||
uses UnitPrinc,UnitAnalyseSegCDM,UnitConfigTCO,UnitTCO;
|
||||
uses UnitPrinc,UnitAnalyseSegCDM,UnitConfigTCO,UnitTCO,selection_train;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
//https://codes-sources.commentcamarche.net/forum/affich-1015879-ajouter-un-icon-dans-un-listbox
|
||||
|
||||
|
||||
|
||||
// procédure qui met la bd à jour, et réactualise la cellule, ce qui appelle "select elements"
|
||||
procedure stocke_bd;
|
||||
var Bim,x,y,act : integer;
|
||||
@@ -123,7 +135,6 @@ begin
|
||||
affiche_cellule(IndexTCOCourant,x,Y);
|
||||
actualise(indexTCOCourant);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
// affiche les élements de l'index dans la fenetre
|
||||
@@ -190,13 +201,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// actualise le contenu de la fenetre et de la zone tco
|
||||
// actualise le contenu de la fenetre et de la zone tco par rapport à la cellule cliquée
|
||||
procedure actualise(indexTCO : integer);
|
||||
var i,Bimage,oriente,piedFeu,act : integer;
|
||||
var i,Bimage,oriente,piedFeu,act,sens : integer;
|
||||
s : string;
|
||||
ip : Timage;
|
||||
r : trect;
|
||||
sauvConfcellTCO : boolean;
|
||||
sauvConfcellTCO,H : boolean;
|
||||
begin
|
||||
if (indexTCO=0) or (formConfCellTCO=nil) then exit;
|
||||
if affevt then affiche('FormConfigCellTCO actualise',clyellow);
|
||||
@@ -206,61 +217,128 @@ begin
|
||||
//with FormConfCellTCO.ImagePaletteCC.Picture.Bitmap do
|
||||
with FormConfCellTCO.ImagePaletteCC do
|
||||
begin
|
||||
// efface l'icone
|
||||
Picture.Bitmap.width:=iconeX;
|
||||
Picture.bitmap.height:=iconeY;
|
||||
// effacer l'icone
|
||||
r:=Rect(0,0,iconeX,iconeY);
|
||||
//with FormConfCellTCO.ImagePaletteCC.canvas do
|
||||
with Picture.Bitmap.Canvas do
|
||||
// with Picture.Bitmap.Canvas do
|
||||
begin
|
||||
Pen.Mode:=pmCopy;
|
||||
Pen.Width:=1;
|
||||
Pen.color:=tco[indexTCO,XclicC,YclicC].CouleurFond;
|
||||
Brush.Color:=tco[indexTCO,XclicC,YclicC].couleurFond;
|
||||
Brush.style:=bsSolid;
|
||||
fillRect(r);
|
||||
end;
|
||||
// efface l'icone
|
||||
Picture.Bitmap.width:=iconeX;
|
||||
Picture.bitmap.height:=iconeY;
|
||||
// effacer l'icone
|
||||
r:=Rect(0,0,iconeX,iconeY);
|
||||
//with FormConfCellTCO.ImagePaletteCC.canvas do
|
||||
with Picture.Bitmap.Canvas do
|
||||
// with Picture.Bitmap.Canvas do
|
||||
begin
|
||||
Pen.Mode:=pmCopy;
|
||||
Pen.Width:=1;
|
||||
Pen.color:=tco[indexTCO,XclicC,YclicC].CouleurFond;
|
||||
Brush.Color:=tco[indexTCO,XclicC,YclicC].couleurFond;
|
||||
Brush.style:=bsSolid;
|
||||
fillRect(r);
|
||||
end;
|
||||
end;
|
||||
FormConfCellTCO.ImagePaletteCC.Repaint;
|
||||
Bimage:=tco[indexTCO,XClicC,YClicC].Bimage;
|
||||
|
||||
FormConfCellTCO.CheckBoxEncadre.visible:=Bimage=0;
|
||||
|
||||
formConfCellTCO.GroupBox1.caption:='Texte';
|
||||
if isCanton(Bimage) then
|
||||
begin
|
||||
with formConfCellTCO do
|
||||
begin
|
||||
// ramener la coordonnée cliquée à l'origine du canton
|
||||
if (Bimage>=Id_cantonH) and (Bimage<=Id_cantonH+9) then xClicC:=xClicC-(Bimage-Id_cantonH);
|
||||
if (Bimage>=Id_cantonV) and (Bimage<=Id_cantonV+9) then yClicC:=yClicC-(Bimage-Id_cantonV);
|
||||
if (Bimage>=Id_cantonH) and (Bimage<=Id_cantonH+9) then
|
||||
begin
|
||||
H:=true;
|
||||
xClicC:=xClicC-(Bimage-Id_cantonH);
|
||||
end;
|
||||
if (Bimage>=Id_cantonV) and (Bimage<=Id_cantonV+9) then
|
||||
begin
|
||||
H:=false;
|
||||
yClicC:=yClicC-(Bimage-Id_cantonV);
|
||||
end;
|
||||
XclicCell[indexTCO]:=XclicC;
|
||||
YclicCell[indexTCO]:=YclicC;
|
||||
|
||||
GroupBoxOrientation.visible:=false;
|
||||
GroupBoxImplantation.visible:=false;
|
||||
GroupBoxAction.Visible:=false;
|
||||
|
||||
sens:=tco[indexTCO,xClicC,yClicC].SensCirc;
|
||||
with GroupBoxCanton do
|
||||
begin
|
||||
visible:=true;
|
||||
left:=16;
|
||||
top:=152;
|
||||
top:=158;
|
||||
width:=280;
|
||||
height:=130;
|
||||
EditTypeImage.Enabled:=false;
|
||||
with RadioGroupAlign do
|
||||
GroupBox1.caption:='Nom du canton';
|
||||
end;
|
||||
|
||||
with RadioButtonGH do // gauche ou haut
|
||||
begin
|
||||
if H then
|
||||
begin
|
||||
ItemIndex:=TCO[indexTCO,Xclicc,YClicC].pont; // Alignement
|
||||
if isCantonH(Bimage) then
|
||||
Caption:='Sens gauche';
|
||||
if sens=SensGauche then
|
||||
begin
|
||||
items[1]:='Aligné à gauche';
|
||||
items[2]:='Aligné à droite';
|
||||
ImageSens.Picture:=FormSelTrain.ImageGauche.Picture;
|
||||
checked:=true;
|
||||
end
|
||||
else
|
||||
begin
|
||||
items[1]:='Aligné en haut';
|
||||
items[2]:='Aligné en bas';
|
||||
checked:=false;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
// vertical
|
||||
begin
|
||||
Caption:='Sens haut';
|
||||
if sens=SensHaut then
|
||||
begin
|
||||
ImageSens.Picture:=FormSelTrain.ImageHaut.Picture;
|
||||
checked:=true;
|
||||
end
|
||||
else
|
||||
begin
|
||||
checked:=false;
|
||||
end;
|
||||
end
|
||||
end;
|
||||
|
||||
with RadioButtonDB do // droit ou bas
|
||||
begin
|
||||
if H then
|
||||
begin
|
||||
Caption:='Sens droit';
|
||||
if sens=SensDroit then
|
||||
begin
|
||||
ImageSens.Picture:=FormSelTrain.ImageDroite.Picture;
|
||||
checked:=true;
|
||||
end
|
||||
else checked:=false;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Caption:='Sens bas';
|
||||
if sens=SensBas then
|
||||
begin
|
||||
ImageSens.Picture:=FormSelTrain.ImageBas.Picture;
|
||||
checked:=true;
|
||||
end
|
||||
else checked:=false;
|
||||
end
|
||||
end;
|
||||
with RadioButtonDS do
|
||||
begin
|
||||
if Sens=0 then
|
||||
begin
|
||||
checked:=true;
|
||||
if H then
|
||||
ImageSens.Picture:=FormConfCellTCO.ImageGD.Picture
|
||||
else
|
||||
ImageSens.Picture:=FormConfCellTCO.ImageHB.Picture;
|
||||
end
|
||||
else checked:=false;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
@@ -300,6 +378,7 @@ begin
|
||||
begin
|
||||
with formConfCellTCO do
|
||||
begin
|
||||
CheckBoxEncadre.checked:=tco[indexTCO,XclicC,YclicC].Buttoir=1;
|
||||
with GroupBoxOrientation do
|
||||
begin
|
||||
visible:=true;
|
||||
@@ -313,7 +392,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
if (Bimage=1) or (Bimage=10) or (Bimage=11) or (Bimage=20) then
|
||||
begin
|
||||
if tco[indexTCO,XclicC,YclicC].buttoir<>0 then
|
||||
@@ -548,7 +626,7 @@ begin
|
||||
if (Bimage=Id_cantonV) or (Bimage=Id_cantonH) then
|
||||
begin
|
||||
i:=index_canton(indexTCO,xclicC,yclicC);
|
||||
if i>0 then FormConfCellTCO.LabelNumC.caption:='Canton n°'+intToSTR(canton[i].numero)
|
||||
if i>0 then FormConfCellTCO.EditCanton.text:=intToSTR(canton[i].numero);
|
||||
end
|
||||
else FormConfCellTCO.LabelNumC.caption:='Elément de canton';
|
||||
end;
|
||||
@@ -604,6 +682,7 @@ procedure TFormConfCellTCO.EditTexteCCTCOChange(Sender: TObject);
|
||||
var i,El,x,y : integer;
|
||||
begin
|
||||
if clicTCO or not(ConfCellTCO) or actualize then exit;
|
||||
if affevt then Affiche('EditTexteCCTCOChange',clyellow);
|
||||
PCanvasTCO[indexTCOCourant].Brush.Color:=clfond[indexTCOCourant];
|
||||
x:=XclicCell[indexTCOCourant];
|
||||
y:=YclicCell[indexTCOCourant];
|
||||
@@ -622,7 +701,7 @@ begin
|
||||
i:=Index_canton(indexTCOCourant,x,y);
|
||||
if i=0 then exit;
|
||||
canton[i].nom:=EditTexteCCTCO.Text;
|
||||
Dessin_canton(indexTCOCourant,PcanvasTCO[indexTCOCourant],x,y,0,0);
|
||||
Dessin_canton(indexTCOCourant,PcanvasTCO[indexTCOCourant],x,y,0);
|
||||
end
|
||||
else
|
||||
affiche_texte(indexTCOCourant,x,y);
|
||||
@@ -631,6 +710,7 @@ begin
|
||||
if not(selectionaffichee[indexTCOcourant]) then _entoure_cell_clic(indexTCOCourant);
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormConfCellTCO.ButtonFonteClick(Sender: TObject);
|
||||
begin
|
||||
change_fonte(indexTCOcourant);
|
||||
@@ -640,6 +720,10 @@ procedure TFormConfCellTCO.FormCreate(Sender: TObject);
|
||||
var i : integer;
|
||||
c : tcomponent;
|
||||
begin
|
||||
//RadioButtonGH.Visible:=not(diffusion);
|
||||
//RadioButtonDB.Visible:=not(diffusion);
|
||||
//RadioButtonDS.Visible:=not(diffusion);
|
||||
|
||||
// fenetre toujours dessus
|
||||
position:=poMainFormCenter;
|
||||
if affevt then Affiche('FormConfCellTCO create',clLime);
|
||||
@@ -732,6 +816,7 @@ end;
|
||||
procedure TFormConfCellTCO.CheckPinvClick(Sender: TObject);
|
||||
var Bimage : integer;
|
||||
begin
|
||||
if affevt then Affiche('CheckPinvClick',clyellow);
|
||||
if (XclicCell[indexTCOcourant]=0) or (XclicCell[indexTCOcourant]>NbreCellX[indexTCOcourant]) or (YclicCell[indexTCOcourant]=0) or (YclicCell[indexTCOcourant]>NbreCelly[indexTCOcourant]) then exit;
|
||||
Bimage:=tco[indexTCOcourant,XclicCell[indexTCOcourant],YclicCell[indexTCOcourant]].Bimage;
|
||||
if (bimage=2) or (bimage=3) or (bimage=4) or (bimage=5) or (bimage=12) or (bimage=13) or
|
||||
@@ -954,7 +1039,7 @@ begin
|
||||
end;
|
||||
|
||||
// traitement des buttoirs : mode buttoir supporté par les éléments 1 10 11 20
|
||||
if ((element=1) or (element=10) or (element=11) or (element=20)) and (FormConfCellTCO.RadioGroupSel.Itemindex=1) then
|
||||
if ((element=1) or (element=10) or (element=11) or (element=20)) and (FormConfCellTCO.RadioGroupSel.Itemindex=1) then
|
||||
begin
|
||||
efface_entoure(IndexTCOCourant);
|
||||
if not(testbit(tco[IndexTCOCourant,XclicCell[indexTCOCourant],YclicCell[indexTCOCourant]].buttoir,c)) then
|
||||
@@ -1004,16 +1089,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TFormConfCellTCO.FormHide(Sender: TObject);
|
||||
begin
|
||||
if affevt then Affiche('FormFoncCellTCO hide',clyellow);
|
||||
ConfCellTCO:=false;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TFormConfCellTCO.ListBoxActionMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
@@ -1079,16 +1160,14 @@ begin
|
||||
if clicTCO then exit;
|
||||
|
||||
act:=ligneclicAction+1;
|
||||
|
||||
case act of
|
||||
AcActSortie :
|
||||
begin
|
||||
val(EditParam2.Text,i,erreur);
|
||||
if erreur<>0 then exit;
|
||||
tco[IndexTCOCourant,XclicCell[indexTCOCourant],YclicCell[indexTCOCourant]].sortie:=i;
|
||||
Affiche_cellule(IndexTCOCourant,XclicCell[indexTCOCourant],YclicCell[indexTCOCourant]);
|
||||
end;
|
||||
|
||||
AcActSortie :
|
||||
begin
|
||||
val(EditParam2.Text,i,erreur);
|
||||
if erreur<>0 then exit;
|
||||
tco[IndexTCOCourant,XclicCell[indexTCOCourant],YclicCell[indexTCOCourant]].sortie:=i;
|
||||
Affiche_cellule(IndexTCOCourant,XclicCell[indexTCOCourant],YclicCell[indexTCOCourant]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -1111,13 +1190,122 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormConfCellTCO.RadioGroupAlignClick(Sender: TObject);
|
||||
var idc : integer;
|
||||
begin
|
||||
TCO[indexTCOCourant,XclicCell[indexTCOcourant],YclicCell[indexTCOcourant]].pont:=RadiogroupAlign.ItemIndex;
|
||||
idc:=TCO[indexTCOCourant,XclicCell[indexTCOcourant],YclicCell[indexTCOcourant]].PiedFeu;
|
||||
if (idc>0) and (idc<=ncantons) then dessin_canton(IdC,0,0);
|
||||
|
||||
|
||||
procedure TFormConfCellTCO.EditCantonExit(Sender: TObject);
|
||||
var NumC,i,erreur :integer;
|
||||
trouve : boolean;
|
||||
begin
|
||||
val(editcanton.Text,NumC,erreur);
|
||||
if erreur<>0 then exit;
|
||||
i:=1;
|
||||
repeat
|
||||
trouve:=canton[i].numero=NumC;
|
||||
inc(i);
|
||||
until trouve or (i>nCantons);
|
||||
if trouve then
|
||||
begin
|
||||
LabelInfo.caption:='Le canton '+intToSTR(NumC)+' existe déja';
|
||||
exit;
|
||||
end;
|
||||
LabelInfo.caption:='';
|
||||
|
||||
erreur:=index_canton(indexTCOcourant,xclicC,yclicC);
|
||||
canton[erreur].numero:=NumC;
|
||||
end;
|
||||
|
||||
procedure TFormConfCellTCO.EditCantonChange(Sender: TObject);
|
||||
var x,y,NumC,i,erreur :integer;
|
||||
trouve : boolean;
|
||||
begin
|
||||
val(editcanton.Text,NumC,erreur);
|
||||
if erreur<>0 then exit;
|
||||
i:=1;
|
||||
repeat
|
||||
trouve:=canton[i].numero=NumC;
|
||||
inc(i);
|
||||
until trouve or (i>nCantons);
|
||||
if trouve then
|
||||
begin
|
||||
LabelInfo.caption:='Le canton '+intToSTR(NumC)+' existe déja';
|
||||
exit;
|
||||
end;
|
||||
LabelInfo.caption:='';
|
||||
|
||||
erreur:=index_canton(indexTCOcourant,xclicC,yclicC);
|
||||
canton[erreur].numero:=NumC;
|
||||
x:=canton[erreur].x;
|
||||
y:=canton[erreur].y;
|
||||
TCO[indexTCOCourant,x,y].NumCanton:=NumC; // mettre à jour le numéro de canton
|
||||
end;
|
||||
|
||||
procedure TFormConfCellTCO.RadioButtonGHClick(Sender: TObject);
|
||||
var idc,x,y,sens : integer;
|
||||
H : boolean;
|
||||
begin
|
||||
Idc:=index_canton(indexTCOcourant,xclicC,yclicC);
|
||||
x:=canton[Idc].x;
|
||||
y:=canton[Idc].y;
|
||||
H:=IsCantonH(IndexTCOCourant,x,y);
|
||||
if H then
|
||||
begin
|
||||
ImageSens.Picture:=FormSelTrain.ImageGauche.Picture;
|
||||
sens:=SensGauche;
|
||||
end
|
||||
else
|
||||
begin
|
||||
ImageSens.Picture:=FormSelTrain.ImageHaut.Picture;
|
||||
sens:=SensHaut;
|
||||
end;
|
||||
TCO[indexTCOCourant,x,y].SensCirc:=Sens;
|
||||
end;
|
||||
|
||||
procedure TFormConfCellTCO.RadioButtonDBClick(Sender: TObject);
|
||||
var idc,x,y,sens : integer;
|
||||
H : boolean;
|
||||
begin
|
||||
Idc:=index_canton(indexTCOcourant,xclicC,yclicC);
|
||||
x:=canton[Idc].x;
|
||||
y:=canton[Idc].y;
|
||||
H:=IsCantonH(IndexTCOCourant,x,y);
|
||||
if H then
|
||||
begin
|
||||
ImageSens.Picture:=FormSelTrain.ImageDroite.Picture;
|
||||
sens:=SensDroit
|
||||
end
|
||||
else
|
||||
begin
|
||||
ImageSens.Picture:=FormSelTrain.ImageBas.Picture;
|
||||
sens:=SensBas;
|
||||
end;
|
||||
TCO[indexTCOCourant,x,y].SensCirc:=Sens;
|
||||
end;
|
||||
|
||||
procedure TFormConfCellTCO.RadioButtonDSClick(Sender: TObject);
|
||||
var idc,x,y: integer;
|
||||
h : boolean;
|
||||
begin
|
||||
Idc:=index_canton(indexTCOcourant,xclicC,yclicC);
|
||||
x:=canton[Idc].x;
|
||||
y:=canton[Idc].y;
|
||||
H:=IsCantonH(IndexTCOCourant,x,y);
|
||||
if H then
|
||||
ImageSens.Picture:=ImageGD.Picture
|
||||
else
|
||||
ImageSens.Picture:=ImageHB.Picture;
|
||||
TCO[indexTCOCourant,x,y].SensCirc:=0;
|
||||
end;
|
||||
|
||||
procedure TFormConfCellTCO.CheckBoxEncadreClick(Sender: TObject);
|
||||
var i : integer;
|
||||
begin
|
||||
if clicTCO or not(ConfCellTCO) or actualize then exit;
|
||||
if checkBoxEncadre.Checked then i:=1 else i:=0;
|
||||
tco[indexTCOcourant,XclicCell[indexTCOcourant],YclicCell[indexTCOcourant]].Buttoir:=i;
|
||||
efface_entoure(indexTCOcourant);
|
||||
SelectionAffichee[indexTCOcourant]:=false;
|
||||
//affiche_cellule(XclicCell[indexTCO],YclicCell[indexTCO]);
|
||||
affiche_tco(indexTCOcourant);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
+1
-1
@@ -464,7 +464,7 @@ begin
|
||||
if (erreur<>0) or (adr<1) then exit;
|
||||
ancdebug:=NivDebug;
|
||||
NivDebug:=3;
|
||||
if PresTrainPrec(Adr,Nb_cantons_Sig,false,voie,adrtrain) then AfficheDebug('Présence train '+intToSTR(AdrTrain),clYellow) else
|
||||
if PresTrainPrec(Adr,Nb_cantons_Sig,false,adrtrain,voie) then AfficheDebug('Présence train '+intToSTR(AdrTrain),clYellow) else
|
||||
AfficheDebug('Absence train',clyellow);
|
||||
NivDebug:=AncDebug;
|
||||
end;
|
||||
|
||||
@@ -32,6 +32,13 @@ object FormFicheHoraire: TFormFicheHoraire
|
||||
Width = 3
|
||||
Height = 13
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 208
|
||||
Top = 328
|
||||
Width = 296
|
||||
Height = 13
|
||||
Caption = 'Les horaires sont sauvegard'#233's dans le fichier '#39'FicheHoraire.txt"'
|
||||
end
|
||||
object ButtonOk: TButton
|
||||
Left = 16
|
||||
Top = 304
|
||||
|
||||
@@ -12,6 +12,7 @@ type
|
||||
StringGridFO: TStringGrid;
|
||||
Label1: TLabel;
|
||||
LabelErreur: TLabel;
|
||||
Label2: TLabel;
|
||||
procedure ButtonOkClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
@@ -201,7 +202,6 @@ begin
|
||||
if champ<>0 then delete(s,1,champ);
|
||||
end;
|
||||
|
||||
|
||||
inc(col);
|
||||
until (col>stringGridFO.ColCount-1) or (pos(',',s)=0);
|
||||
|
||||
|
||||
+20
-2
@@ -579,12 +579,30 @@ object FormHorloge: TFormHorloge
|
||||
end
|
||||
object ButtonAh: TButton
|
||||
Left = 312
|
||||
Top = 224
|
||||
Width = 75
|
||||
Top = 176
|
||||
Width = 81
|
||||
Height = 33
|
||||
Caption = 'Afficher l'#39'horloge'
|
||||
TabOrder = 5
|
||||
WordWrap = True
|
||||
OnClick = ButtonAhClick
|
||||
end
|
||||
object ButtonLance: TButton
|
||||
Left = 312
|
||||
Top = 216
|
||||
Width = 81
|
||||
Height = 33
|
||||
Caption = 'Lancer l'#39'horloge'
|
||||
TabOrder = 6
|
||||
OnClick = ButtonLanceClick
|
||||
end
|
||||
object ButtonArrete: TButton
|
||||
Left = 312
|
||||
Top = 256
|
||||
Width = 81
|
||||
Height = 33
|
||||
Caption = 'Arr'#234'te l'#39'horloge'
|
||||
TabOrder = 7
|
||||
OnClick = ButtonArreteClick
|
||||
end
|
||||
end
|
||||
@@ -34,6 +34,8 @@ type
|
||||
ButtonAh: TButton;
|
||||
CheckBoxAffiche: TCheckBox;
|
||||
SpinEditHInit: TSpinEdit;
|
||||
ButtonLance: TButton;
|
||||
ButtonArrete: TButton;
|
||||
procedure ButtonOkClick(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure TrackBarTempsChange(Sender: TObject);
|
||||
@@ -50,6 +52,8 @@ type
|
||||
procedure ButtonAhClick(Sender: TObject);
|
||||
procedure CheckBoxAfficheClick(Sender: TObject);
|
||||
procedure SpinEditHInitChange(Sender: TObject);
|
||||
procedure ButtonLanceClick(Sender: TObject);
|
||||
procedure ButtonArreteClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
@@ -304,4 +308,14 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TFormHorloge.ButtonLanceClick(Sender: TObject);
|
||||
begin
|
||||
Demarre_horloge;
|
||||
end;
|
||||
|
||||
procedure TFormHorloge.ButtonArreteClick(Sender: TObject);
|
||||
begin
|
||||
horloge:=false;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,39 @@
|
||||
object FormInfo: TFormInfo
|
||||
Left = 310
|
||||
Top = 250
|
||||
BorderIcons = [biMaximize, biHelp]
|
||||
BorderStyle = bsNone
|
||||
Caption = 'FormInfo'
|
||||
ClientHeight = 50
|
||||
ClientWidth = 575
|
||||
Color = clBackground
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnActivate = FormActivate
|
||||
OnCreate = FormCreate
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelInfo: TLabel
|
||||
Left = 8
|
||||
Top = 16
|
||||
Width = 54
|
||||
Height = 20
|
||||
Caption = 'LabelInfo'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clYellow
|
||||
Font.Height = -16
|
||||
Font.Name = 'Arial Narrow'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
WordWrap = True
|
||||
end
|
||||
object Timerinfo: TTimer
|
||||
OnTimer = TimerinfoTimer
|
||||
Left = 8
|
||||
Top = 8
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,49 @@
|
||||
unit UnitInfo;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, StdCtrls;
|
||||
|
||||
type
|
||||
TFormInfo = class(TForm)
|
||||
Timerinfo: TTimer;
|
||||
LabelInfo: TLabel;
|
||||
procedure TimerinfoTimer(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
{ Déclarations publiques }
|
||||
end;
|
||||
|
||||
var
|
||||
FormInfo: TFormInfo;
|
||||
TickInfo : integer;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TFormInfo.TimerinfoTimer(Sender: TObject);
|
||||
begin
|
||||
if TickInfo>0 then
|
||||
begin
|
||||
dec(TickInfo);
|
||||
if TickInfo=0 then close;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormInfo.FormActivate(Sender: TObject);
|
||||
begin
|
||||
TickInfo:=5;
|
||||
end;
|
||||
|
||||
procedure TFormInfo.FormCreate(Sender: TObject);
|
||||
begin
|
||||
labelInfo.Width:=formInfo.Width-20;
|
||||
end;
|
||||
|
||||
end.
|
||||
+18
-17
@@ -60,7 +60,7 @@ object FormModifAction: TFormModifAction
|
||||
Top = 64
|
||||
Width = 729
|
||||
Height = 337
|
||||
ActivePage = TabSheet1
|
||||
ActivePage = TabSheetDecl
|
||||
MultiLine = True
|
||||
TabOrder = 2
|
||||
object TabSheetDecl: TTabSheet
|
||||
@@ -195,7 +195,7 @@ object FormModifAction: TFormModifAction
|
||||
Left = 224
|
||||
Top = 216
|
||||
Width = 481
|
||||
Height = 65
|
||||
Height = 73
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
@@ -229,7 +229,7 @@ object FormModifAction: TFormModifAction
|
||||
ParentFont = False
|
||||
end
|
||||
object Shape2: TShape
|
||||
Left = 216
|
||||
Left = 232
|
||||
Top = 8
|
||||
Width = 3
|
||||
Height = 293
|
||||
@@ -258,9 +258,9 @@ object FormModifAction: TFormModifAction
|
||||
OnDrawItem = ListBoxCondTotDrawItem
|
||||
end
|
||||
object ListBoxConditions: TListBox
|
||||
Left = 232
|
||||
Left = 248
|
||||
Top = 28
|
||||
Width = 217
|
||||
Width = 201
|
||||
Height = 201
|
||||
Hint = 'Condition de r'#233'alisation du d'#233'clencheur'
|
||||
ItemHeight = 13
|
||||
@@ -271,9 +271,9 @@ object FormModifAction: TFormModifAction
|
||||
OnMouseDown = ListBoxConditionsMouseDown
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 464
|
||||
Left = 488
|
||||
Top = 24
|
||||
Width = 249
|
||||
Width = 225
|
||||
Height = 265
|
||||
Caption = 'Param'#232'tres de la condition'
|
||||
TabOrder = 2
|
||||
@@ -329,7 +329,7 @@ object FormModifAction: TFormModifAction
|
||||
OnChange = Champ1Change
|
||||
end
|
||||
object Champ2: TLabeledEdit
|
||||
Left = 176
|
||||
Left = 168
|
||||
Top = 40
|
||||
Width = 41
|
||||
Height = 21
|
||||
@@ -420,7 +420,7 @@ object FormModifAction: TFormModifAction
|
||||
Caption = 'Op'#233'rations'
|
||||
ImageIndex = 2
|
||||
object Shape1: TShape
|
||||
Left = 216
|
||||
Left = 232
|
||||
Top = 8
|
||||
Width = 3
|
||||
Height = 293
|
||||
@@ -481,7 +481,7 @@ object FormModifAction: TFormModifAction
|
||||
object ComboBoxFamille: TComboBox
|
||||
Left = 0
|
||||
Top = 32
|
||||
Width = 201
|
||||
Width = 217
|
||||
Height = 21
|
||||
ItemHeight = 0
|
||||
TabOrder = 0
|
||||
@@ -490,7 +490,7 @@ object FormModifAction: TFormModifAction
|
||||
object ListBoxOper: TListBox
|
||||
Left = 0
|
||||
Top = 60
|
||||
Width = 201
|
||||
Width = 217
|
||||
Height = 185
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@@ -503,9 +503,9 @@ object FormModifAction: TFormModifAction
|
||||
OnDrawItem = ListBoxOperDrawItem
|
||||
end
|
||||
object ListBoxOperations: TListBox
|
||||
Left = 232
|
||||
Left = 248
|
||||
Top = 28
|
||||
Width = 217
|
||||
Width = 225
|
||||
Height = 201
|
||||
Hint = 'Liste chronologique des op'#233'rations '#224' effectuer'
|
||||
ItemHeight = 13
|
||||
@@ -514,12 +514,13 @@ object FormModifAction: TFormModifAction
|
||||
TabOrder = 2
|
||||
OnDblClick = ListBoxOperationsDblClick
|
||||
OnDrawItem = ListBoxOperationsDrawItem
|
||||
OnKeyDown = ListBoxOperationsKeyDown
|
||||
OnMouseDown = ListBoxOperationsMouseDown
|
||||
end
|
||||
object GroupBoxParam: TGroupBox
|
||||
Left = 464
|
||||
Left = 488
|
||||
Top = 24
|
||||
Width = 249
|
||||
Width = 225
|
||||
Height = 265
|
||||
Caption = 'Param'#232'tres de l'#39'op'#233'ration'
|
||||
TabOrder = 3
|
||||
@@ -627,7 +628,7 @@ object FormModifAction: TFormModifAction
|
||||
Caption = 'Etat'
|
||||
end
|
||||
object LabeledEditTrain: TLabeledEdit
|
||||
Left = 24
|
||||
Left = 16
|
||||
Top = 184
|
||||
Width = 161
|
||||
Height = 21
|
||||
@@ -676,7 +677,7 @@ object FormModifAction: TFormModifAction
|
||||
OnClick = CheckBoxRAZClick
|
||||
end
|
||||
object ComboBoxAccComUSB: TComboBox
|
||||
Left = 24
|
||||
Left = 16
|
||||
Top = 144
|
||||
Width = 201
|
||||
Height = 21
|
||||
|
||||
+228
-170
@@ -124,6 +124,8 @@ type
|
||||
procedure SpinEditEtat2Change(Sender: TObject);
|
||||
procedure RadioEtatSignalClick(Sender: TObject);
|
||||
procedure SpinEditEtatopChange(Sender: TObject);
|
||||
procedure ListBoxOperationsKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
@@ -327,30 +329,30 @@ var nop,op,top,decl : integer;
|
||||
r : double;
|
||||
s :string;
|
||||
begin
|
||||
decl:=Tablo_Actionneur[i].declencheur;
|
||||
decl:=Tablo_Action[i].declencheur;
|
||||
s:='Le déclencheur ';
|
||||
case decl of
|
||||
DeclHorloge :
|
||||
s:=s+'horloge à '+format('%.2d',[Tablo_Actionneur[i].heure])+'h'+format('%.2d',[Tablo_Actionneur[i].minute]);
|
||||
s:=s+'horloge à '+format('%.2d',[Tablo_Action[i].heure])+'h'+format('%.2d',[Tablo_Action[i].minute]);
|
||||
DeclPeriph :
|
||||
s:=s+'périphérique : '+Tablo_Actionneur[i].ordrePeriph;
|
||||
s:=s+'périphérique : '+Tablo_Action[i].ordrePeriph;
|
||||
DeclAccessoire :
|
||||
s:=s+'accessoire '+intToSTR(Tablo_Actionneur[i].adresse);
|
||||
s:=s+'accessoire '+intToSTR(Tablo_Action[i].adresse);
|
||||
DeclDetAct :
|
||||
begin
|
||||
s:=s+'détecteur/Actionneur '+intToSTR(Tablo_Actionneur[i].adresse);
|
||||
s:=s+' par le train "'+Tablo_Actionneur[i].trainDecl+'"';
|
||||
s:=s+'détecteur/Actionneur '+intToSTR(Tablo_Action[i].adresse);
|
||||
s:=s+' par le train "'+Tablo_Action[i].trainDecl+'"';
|
||||
end;
|
||||
DeclZoneDet :
|
||||
s:=s+'Zone détection '+intToSTR(Tablo_Actionneur[i].adresse)+' '+intToSTR(Tablo_Actionneur[i].adresse2);
|
||||
s:=s+'Zone détection '+intToSTR(Tablo_Action[i].adresse)+' '+intToSTR(Tablo_Action[i].adresse2);
|
||||
DeclDemarTrain :
|
||||
s:=s+'démarrage du train '+Tablo_Actionneur[i].trainDecl+' au seuil de '+intToSTR(Tablo_Actionneur[i].adresse);
|
||||
s:=s+'démarrage du train '+Tablo_Action[i].trainDecl+' au seuil de '+intToSTR(Tablo_Action[i].adresse);
|
||||
DeclArretTrain :
|
||||
s:=s+'arrêt du train '+Tablo_Actionneur[i].trainDecl+' au seuil de '+intToSTR(Tablo_Actionneur[i].adresse);
|
||||
s:=s+'arrêt du train '+Tablo_Action[i].trainDecl+' au seuil de '+intToSTR(Tablo_Action[i].adresse);
|
||||
DeclSignal :
|
||||
begin
|
||||
s:=s+'changement du signal '+intToSTR(Tablo_Actionneur[i].adresse);
|
||||
case Tablo_Actionneur[i].etat of
|
||||
s:=s+'changement du signal '+intToSTR(Tablo_Action[i].adresse);
|
||||
case Tablo_Action[i].etat of
|
||||
0 : s:=s+' sur ouverture';
|
||||
1 : s:=s+' sur voie libre';
|
||||
2 : s:=s+' sur ouverture restreinte';
|
||||
@@ -361,25 +363,25 @@ begin
|
||||
|
||||
// conditions
|
||||
s:=s+#13;
|
||||
nop:=tablo_actionneur[i].NbCond;
|
||||
nop:=Tablo_Action[i].NbCond;
|
||||
for op:=1 to nop do
|
||||
begin
|
||||
s:=s+'condition ';
|
||||
top:=tablo_actionneur[i].tabloCond[op].numcondition;
|
||||
top:=Tablo_Action[i].tabloCond[op].numcondition;
|
||||
case top of
|
||||
CondVrai : s:=s+'toujours vraie ';
|
||||
CondFaux : s:=s+'toujours fausse ';
|
||||
CondVitTrain : s:=s+'vitesse train '+tablo_actionneur[i].tabloCond[op].train+' '+intToSTR(tablo_actionneur[i].tabloCond[op].vitmini)+
|
||||
' '+intToSTR(tablo_actionneur[i].tabloCond[op].vitMaxi);
|
||||
CondPosAcc : s:=s+' position d''accessoire '+intToSTR(tablo_actionneur[i].tabloCond[op].accessoire)+' état '+intToSTR(tablo_actionneur[i].tabloCond[op].etat);
|
||||
CondHorl : s:=s+' horloge '+intToSTR(tablo_actionneur[i].tabloCond[op].HeureMin)+'h'+intToSTR(tablo_actionneur[i].tabloCond[op].MinuteMin)+' à '+
|
||||
intToSTR(tablo_actionneur[i].tabloCond[op].HeureMax)+'h'+intToSTR(tablo_actionneur[i].tabloCond[op].MinuteMax)+' ';
|
||||
condTrainSig : s:=s+'train '+tablo_actionneur[i].tabloCond[op].train+' arrêté au signal '+intToSTR(tablo_actionneur[i].tabloCond[op].Adresse);
|
||||
CondVitTrain : s:=s+'vitesse train '+Tablo_Action[i].tabloCond[op].train+' '+intToSTR(Tablo_Action[i].tabloCond[op].vitmini)+
|
||||
' '+intToSTR(Tablo_Action[i].tabloCond[op].vitMaxi);
|
||||
CondPosAcc : s:=s+' position d''accessoire '+intToSTR(Tablo_Action[i].tabloCond[op].accessoire)+' état '+intToSTR(Tablo_Action[i].tabloCond[op].etat);
|
||||
CondHorl : s:=s+' horloge '+intToSTR(Tablo_Action[i].tabloCond[op].HeureMin)+'h'+intToSTR(Tablo_Action[i].tabloCond[op].MinuteMin)+' à '+
|
||||
intToSTR(Tablo_Action[i].tabloCond[op].HeureMax)+'h'+intToSTR(Tablo_Action[i].tabloCond[op].MinuteMax)+' ';
|
||||
condTrainSig : s:=s+'train '+Tablo_Action[i].tabloCond[op].train+' arrêté au signal '+intToSTR(Tablo_Action[i].tabloCond[op].Adresse);
|
||||
end;
|
||||
s:=s+#13;
|
||||
end;
|
||||
|
||||
nop:=Tablo_Actionneur[i].NbOperations;
|
||||
nop:=Tablo_Action[i].NbOperations;
|
||||
|
||||
if nop=0 then s:=s+'ne déclenche aucune opération'+#13;
|
||||
if nop=1 then s:=s+'déclenche 1 opération :'+#13;
|
||||
@@ -389,29 +391,29 @@ begin
|
||||
|
||||
for op:=1 to nop do
|
||||
begin
|
||||
top:=Tablo_Actionneur[i].tabloop[op].numoperation;
|
||||
top:=Tablo_Action[i].tabloop[op].numoperation;
|
||||
case top of
|
||||
ActionAffTCO : s:=s+'Affiche TCO '+intToSTR(Tablo_Actionneur[i].tabloop[op].NumTCO)+#13;
|
||||
ActionAffTCO : s:=s+'Affiche TCO '+intToSTR(Tablo_Action[i].tabloop[op].NumTCO)+#13;
|
||||
ActionAffSC : s:=s+'Affiche signaux_complexes'+#13;
|
||||
ActionAffCDM : s:=s+'Affiche CDM rail'+#13;
|
||||
ActionAccessoire :
|
||||
begin
|
||||
s:=s+'Pilote l''accessoire '+intToSTR(Tablo_Actionneur[i].tabloop[op].adresse)+
|
||||
' à '+intToSTR(Tablo_Actionneur[i].tabloop[op].etat);
|
||||
if Tablo_Actionneur[i].tabloop[op].zero then s:=s+' impulsionnel'+#13 else s:=s+' maintenu'+#13;
|
||||
s:=s+'Pilote l''accessoire '+intToSTR(Tablo_Action[i].tabloop[op].adresse)+
|
||||
' à '+intToSTR(Tablo_Action[i].tabloop[op].etat);
|
||||
if Tablo_Action[i].tabloop[op].zero then s:=s+' impulsionnel'+#13 else s:=s+' maintenu'+#13;
|
||||
end;
|
||||
ActionArretTRains : s:=s+'Arrêt des trains'+#13;
|
||||
ActionLanceHorl : s:=s+'Lance l''horloge'+#13;
|
||||
ActionArretHorl : s:=s+'Arrête l''horloge'+#13;
|
||||
ActionInitHorl : s:=s+'Initialise l''horloge'+#13;
|
||||
ActionAffHorl : s:=s+'Affiche l''horloge'+#13;
|
||||
ActionVitesse : s:=s+'Modifie la vitesse du train '+Tablo_Actionneur[i].tabloop[op].train+' à '+intToSTR(Tablo_Actionneur[i].tabloop[op].vitesse)+#13;
|
||||
ActionCdePeriph : s:=s+'Pilote le périphérique '+intToSTR(Tablo_Actionneur[i].tabloop[op].periph)+' chaîne : '+Tablo_Actionneur[i].tabloop[op].chaine+#13;
|
||||
ActionFonctionF : s:=s+'Fonction F'+intToSTR(Tablo_Actionneur[i].tabloop[op].fonctionF)+' train dest='+Tablo_Actionneur[i].tabloop[op].train+#13;
|
||||
ActionSon : s:=s+'Son '+Tablo_Actionneur[i].tabloop[op].train+#13;
|
||||
ActionVitesse : s:=s+'Modifie la vitesse du train '+Tablo_Action[i].tabloop[op].train+' à '+intToSTR(Tablo_Action[i].tabloop[op].vitesse)+#13;
|
||||
ActionCdePeriph : s:=s+'Pilote le périphérique '+intToSTR(Tablo_Action[i].tabloop[op].periph)+' chaîne : '+Tablo_Action[i].tabloop[op].chaine+#13;
|
||||
ActionFonctionF : s:=s+'Fonction F'+intToSTR(Tablo_Action[i].tabloop[op].fonctionF)+' train dest='+Tablo_Action[i].tabloop[op].train+#13;
|
||||
ActionSon : s:=s+'Son '+Tablo_Action[i].tabloop[op].train+#13;
|
||||
ActionTempo :
|
||||
begin
|
||||
nop:=Tablo_Actionneur[i].tabloop[op].tempoF;
|
||||
nop:=Tablo_Action[i].tabloop[op].tempoF;
|
||||
r:=nop/10;
|
||||
s:=s+'Temporisation '+intToSTR(nop)+' ('+Format('%.1f', [r])+'s)'#13;
|
||||
end;
|
||||
@@ -427,10 +429,11 @@ procedure Aff_champs(index,IndexCond,IndexAction : integer);
|
||||
var i,decl,act,cond,Nb,icone : integer;
|
||||
s : string;
|
||||
begin
|
||||
if (index<1) or clicListe then exit;
|
||||
if (index<1) then exit;
|
||||
if clicListe then exit;
|
||||
clicliste:=true;
|
||||
// Affiche('Aff_champs('+intToSTR(index)+','+intToSTR(indexAction)+')',clYellow);
|
||||
decl:=Tablo_Actionneur[index].declencheur;
|
||||
decl:=Tablo_Action[index].declencheur;
|
||||
formModifAction.ListBoxDeclench.ItemIndex:=decl-1;
|
||||
|
||||
// comboboxActions
|
||||
@@ -453,20 +456,20 @@ begin
|
||||
Lines.Add(s);
|
||||
end;
|
||||
|
||||
FormModifAction.LabeledEditNomAct.Text:=Tablo_Actionneur[index].NomAction;
|
||||
FormModifAction.LabeledEditNomAct.Text:=Tablo_Action[index].NomAction;
|
||||
|
||||
// ListBox opérations
|
||||
with FormModifAction.ListBoxOperations do
|
||||
begin
|
||||
clear;
|
||||
formConfig.ListBoxOperations.Clear;
|
||||
for i:=1 to Tablo_Actionneur[index].NbOperations do
|
||||
for i:=1 to Tablo_Action[index].NbOperations do
|
||||
begin
|
||||
act:=Tablo_Actionneur[index].tabloOp[i].numoperation;
|
||||
act:=Tablo_Action[index].tabloOp[i].numoperation;
|
||||
if act<=NbreOperations then
|
||||
begin
|
||||
s:=operations[act].nom;
|
||||
if not(Tablo_Actionneur[index].tabloOp[i].valide) then s:=s+' [dévalidé]';
|
||||
if not(Tablo_Action[index].tabloOp[i].valide) then s:=s+' [dévalidé]';
|
||||
if act<1 then icone:=0 else icone:=act-1;
|
||||
|
||||
items.Add(Format('%d%s', [icone, s])); // valeur d'index de l'icone dans la ImagelistIcones
|
||||
@@ -474,18 +477,20 @@ begin
|
||||
// listboxOperations de la formConfig
|
||||
formConfig.ListBoxOperations.Items.add(Format('%d%s', [act-1, s]));
|
||||
itemHeight:=17;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if indexaction<>0 then itemIndex:=indexaction-1;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// listbox conditions
|
||||
with FormModifAction.ListBoxConditions do
|
||||
begin
|
||||
clear;
|
||||
for i:=1 to Tablo_Actionneur[index].NbCond do
|
||||
for i:=1 to Tablo_Action[index].NbCond do
|
||||
begin
|
||||
cond:=Tablo_Actionneur[index].tabloCond[i].numcondition;
|
||||
cond:=Tablo_Action[index].tabloCond[i].numcondition;
|
||||
s:=conditions[cond].nom;
|
||||
case cond of
|
||||
CondVrai : icone:=iconeVrai;
|
||||
@@ -511,7 +516,7 @@ begin
|
||||
formConfig.ListBoxActions.Items.add(s);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
efface_tous_parametres;
|
||||
|
||||
// déclencheurs
|
||||
@@ -519,8 +524,8 @@ begin
|
||||
case decl of
|
||||
DeclHorloge :
|
||||
begin
|
||||
EditAdr.text:=intToSTR(Tablo_Actionneur[index].heure);
|
||||
EditAdr2.text:=intToSTR(Tablo_Actionneur[index].minute);
|
||||
EditAdr.text:=intToSTR(Tablo_Action[index].heure);
|
||||
EditAdr2.text:=intToSTR(Tablo_Action[index].minute);
|
||||
LabelHeure.visible:=true;
|
||||
LabelAdresse.visible:=true;
|
||||
EditAdr.Visible:=true;
|
||||
@@ -539,7 +544,7 @@ begin
|
||||
end;
|
||||
DeclPeriph :
|
||||
begin
|
||||
EditTrainDecl.Text:=Tablo_Actionneur[index].ordrePeriph;
|
||||
EditTrainDecl.Text:=Tablo_Action[index].ordrePeriph;
|
||||
LabelHeure.visible:=false;
|
||||
LabelAdresse.visible:=false;
|
||||
EditAdr.Visible:=false;
|
||||
@@ -562,11 +567,11 @@ begin
|
||||
end;
|
||||
DeclAccessoire :
|
||||
begin
|
||||
EditAdr.text:=intToSTR(Tablo_Actionneur[index].adresse);
|
||||
EditAdr.text:=intToSTR(Tablo_Action[index].adresse);
|
||||
|
||||
with SpinEditEtat do
|
||||
begin
|
||||
text:=intToSTR(Tablo_Actionneur[index].etat);
|
||||
text:=intToSTR(Tablo_Action[index].etat);
|
||||
MaxValue:=2;
|
||||
Hint:='Etat de l''accessoire'+#13+
|
||||
'0=nul'+#13+
|
||||
@@ -595,9 +600,9 @@ begin
|
||||
|
||||
DeclDetAct :
|
||||
begin
|
||||
EditAdr.text:=intToSTR(Tablo_Actionneur[index].adresse);
|
||||
EditAdr.text:=intToSTR(Tablo_Action[index].adresse);
|
||||
EditTrainDecl.Visible:=true;
|
||||
EditTrainDecl.Text:=Tablo_Actionneur[index].trainDecl;
|
||||
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
||||
|
||||
EdittrainDecl.Hint:='Train(s) déclencheur(s) séparés par des virgules pour lesquels la condition s''applique.'
|
||||
+#13+'Mettre X pour tous les trains.'+#13+'Déclenchement par actionneur uniquement';
|
||||
@@ -611,7 +616,7 @@ begin
|
||||
|
||||
with SpinEditEtat do
|
||||
begin
|
||||
text:=intToSTR(Tablo_Actionneur[index].etat);
|
||||
text:=intToSTR(Tablo_Action[index].etat);
|
||||
MaxValue:=1;
|
||||
Hint:='Etat du détecteur/actionneur'+#13+
|
||||
'0=désactivé'+#13+
|
||||
@@ -633,10 +638,10 @@ begin
|
||||
|
||||
DeclZoneDet :
|
||||
begin
|
||||
EditAdr.text:=intToSTR(Tablo_Actionneur[index].adresse);
|
||||
EditAdr2.text:=intToSTR(Tablo_Actionneur[index].adresse2);
|
||||
EditAdr.text:=intToSTR(Tablo_Action[index].adresse);
|
||||
EditAdr2.text:=intToSTR(Tablo_Action[index].adresse2);
|
||||
|
||||
EditTrainDecl.Text:=Tablo_Actionneur[index].trainDecl;
|
||||
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
||||
EditAdr.Hint:='Adresse1 de la zone de détection du déclencheur';
|
||||
EditAdr2.Hint:='Adresse2 de la zone de détection du déclencheur';
|
||||
LabelAdresse.visible:=true;
|
||||
@@ -652,7 +657,7 @@ begin
|
||||
|
||||
with SpinEditEtat do
|
||||
begin
|
||||
text:=intToSTR(Tablo_Actionneur[index].etat);
|
||||
text:=intToSTR(Tablo_Action[index].etat);
|
||||
MaxValue:=1;
|
||||
Hint:='Etat de la zone de détection'+#13+
|
||||
'0=désactivé'+#13+
|
||||
@@ -680,8 +685,8 @@ begin
|
||||
EdittrainDecl.Hint:='Train déclencheur unique';
|
||||
|
||||
EditADR.Hint:='Seuil de vitesse de démarrage du train ';
|
||||
EditTrainDecl.Text:=Tablo_Actionneur[index].trainDecl;
|
||||
EditAdr.Text:=IntToSTR(Tablo_Actionneur[index].adresse);
|
||||
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
||||
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
|
||||
RichEditInf.Lines.Add('Déclenchement par démarrage d''un train à un seuil donné');
|
||||
ImageIcone.Picture:=nil;
|
||||
formConfCellTCO.ImageListIcones.GetBitmap(IconeDemarTrain,ImageIcone.Picture.Bitmap);
|
||||
@@ -698,8 +703,8 @@ begin
|
||||
|
||||
EditAdr.Visible:=true;
|
||||
EditADR.Hint:='Seuil de vitesse d''arrêt du train';
|
||||
EditTrainDecl.Text:=Tablo_Actionneur[index].trainDecl;
|
||||
EditAdr.Text:=IntToSTR(Tablo_Actionneur[index].adresse);
|
||||
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
||||
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
|
||||
RichEditInf.Lines.Add('Déclenchement par arrêt d''un train à un seuil donné');
|
||||
ImageIcone.Picture:=nil;
|
||||
formConfCellTCO.ImageListIcones.GetBitmap(IconeArretTrain,ImageIcone.Picture.Bitmap);
|
||||
@@ -709,8 +714,8 @@ begin
|
||||
DeclSignal :
|
||||
begin
|
||||
LabelAdresse.Visible:=true;
|
||||
EditAdr.text:=intToSTR(Tablo_Actionneur[index].adresse);
|
||||
RadioEtatSignal.ItemIndex:=Tablo_Actionneur[index].Etat;
|
||||
EditAdr.text:=intToSTR(Tablo_Action[index].adresse);
|
||||
RadioEtatSignal.ItemIndex:=Tablo_Action[index].Etat;
|
||||
LabelAdresse.Caption:='Adresse';
|
||||
EditAdr.Hint:='Adresse de base du signal';
|
||||
EditAdr.Visible:=true;
|
||||
@@ -727,15 +732,15 @@ begin
|
||||
// conditions
|
||||
if indexCond>0 then
|
||||
begin
|
||||
cond:=Tablo_Actionneur[index].tablocond[indexCond].numcondition;
|
||||
cond:=Tablo_Action[index].tablocond[indexCond].numcondition;
|
||||
with formModifAction do
|
||||
begin
|
||||
case cond of
|
||||
CondVitTrain :
|
||||
begin
|
||||
champ1.Text:=intToSTR(Tablo_actionneur[index].tabloCond[indexCond].vitmini);
|
||||
champ2.Text:=intToSTR(Tablo_actionneur[index].tabloCond[indexCond].vitmaxi);
|
||||
ChampTrain.text:=Tablo_actionneur[index].tabloCond[indexCond].train;
|
||||
champ1.Text:=intToSTR(Tablo_Action[index].tabloCond[indexCond].vitmini);
|
||||
champ2.Text:=intToSTR(Tablo_Action[index].tabloCond[indexCond].vitmaxi);
|
||||
ChampTrain.text:=Tablo_Action[index].tabloCond[indexCond].train;
|
||||
Champ1.EditLabel.Caption:='Vitesse'+#13+'mini';
|
||||
Champ2.EditLabel.Caption:='Vitesse'+#13+'maxi';
|
||||
Champ1.Hint:='Vitesse minimale du train pour la condition';
|
||||
@@ -747,9 +752,9 @@ begin
|
||||
end;
|
||||
CondPosAcc :
|
||||
begin
|
||||
champ1.Text:=intToSTR(Tablo_actionneur[index].tabloCond[indexCond].accessoire);
|
||||
champ1.Text:=intToSTR(Tablo_Action[index].tabloCond[indexCond].accessoire);
|
||||
Champ1.Hint:='Adresse DCC de l''accessoire pour la condition';
|
||||
SpinEditEtat2.Value:=Tablo_actionneur[index].tabloCond[indexCond].etat;
|
||||
SpinEditEtat2.Value:=Tablo_Action[index].tabloCond[indexCond].etat;
|
||||
SpinEditEtat2.visible:=true;
|
||||
SpinEditEtat2.hint:='Etat de l''accessoire'+#13+
|
||||
'0=nul'+#13+
|
||||
@@ -763,10 +768,10 @@ begin
|
||||
end;
|
||||
condHorl :
|
||||
begin
|
||||
SpinEditHeure1.Value:=Tablo_actionneur[index].tabloCond[indexCond].HeureMin;
|
||||
SpinEditmn1.Value:=Tablo_actionneur[index].tabloCond[indexCond].MinuteMin;
|
||||
SpinEditHeure2.Value:=Tablo_actionneur[index].tabloCond[indexCond].HeureMax;
|
||||
SpinEditmn2.Value:=Tablo_actionneur[index].tabloCond[indexCond].MinuteMax;
|
||||
SpinEditHeure1.Value:=Tablo_Action[index].tabloCond[indexCond].HeureMin;
|
||||
SpinEditmn1.Value:=Tablo_Action[index].tabloCond[indexCond].MinuteMin;
|
||||
SpinEditHeure2.Value:=Tablo_Action[index].tabloCond[indexCond].HeureMax;
|
||||
SpinEditmn2.Value:=Tablo_Action[index].tabloCond[indexCond].MinuteMax;
|
||||
|
||||
SpinEditHeure1.visible:=true;
|
||||
SpinEditHeure2.visible:=true;
|
||||
@@ -777,9 +782,9 @@ begin
|
||||
end;
|
||||
condTrainSig :
|
||||
begin
|
||||
champ1.Text:=intToSTR(Tablo_actionneur[index].tabloCond[indexCond].adresse);
|
||||
champ1.Text:=intToSTR(Tablo_Action[index].tabloCond[indexCond].adresse);
|
||||
champ1.editLabel.Caption:='Adresse du signal';
|
||||
champTrain.Text:=Tablo_actionneur[index].tabloCond[indexCond].train;
|
||||
champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
|
||||
champ1.Visible:=true;
|
||||
champTrain.Visible:=true;
|
||||
end;
|
||||
@@ -788,7 +793,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
Nb:=Tablo_Actionneur[index].NbOperations;
|
||||
Nb:=Tablo_Action[index].NbOperations;
|
||||
|
||||
// si pas d'action sélectionnée et que la liste n'est pas nulle, sélectionner la première
|
||||
if (Nb>0) and (indexAction=0) then
|
||||
@@ -801,7 +806,7 @@ begin
|
||||
if Nb>=indexAction then
|
||||
begin
|
||||
|
||||
Act:=Tablo_actionneur[index].tabloop[indexAction].numoperation;
|
||||
Act:=Tablo_Action[index].tabloop[indexAction].numoperation;
|
||||
|
||||
with formModifAction do
|
||||
begin
|
||||
@@ -811,7 +816,7 @@ begin
|
||||
begin
|
||||
LabeledEditAdresse.Visible:=true;
|
||||
LabeledEditAdresse.EditLabel.Caption:='TCO n°';
|
||||
LabeledEditAdresse.Text:=intToSTR(Tablo_actionneur[index].tabloop[indexAction].NumTCO);
|
||||
LabeledEditAdresse.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].NumTCO);
|
||||
end;
|
||||
ActionAccessoire :
|
||||
begin
|
||||
@@ -827,9 +832,9 @@ begin
|
||||
'2=droit';
|
||||
|
||||
checkBoxRaz.Visible:=true;
|
||||
LabeledEditAdresse.Text:=intToSTR(Tablo_actionneur[index].tabloop[indexAction].adresse);
|
||||
SpinEditEtatop.Value:=Tablo_actionneur[index].tabloop[indexAction].etat;
|
||||
checkBoxRAZ.Checked:=Tablo_actionneur[index].tabloop[indexAction].zero;
|
||||
LabeledEditAdresse.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
||||
SpinEditEtatop.Value:=Tablo_Action[index].tabloop[indexAction].etat;
|
||||
checkBoxRAZ.Checked:=Tablo_Action[index].tabloop[indexAction].zero;
|
||||
end;
|
||||
ActionVitesse :
|
||||
begin
|
||||
@@ -838,8 +843,8 @@ begin
|
||||
LabeledEditTrain.Visible:=true;
|
||||
LabeledEditTrain.EditLabel.Caption:='Train destinataire';
|
||||
LabeledEditTrain.hint:='Nom unique du train';
|
||||
LabeledEditAdresse.Text:=intToSTR(Tablo_actionneur[index].tabloop[indexAction].vitesse);
|
||||
LabeledEditTrain.Text:=Tablo_actionneur[index].tabloop[indexAction].train;
|
||||
LabeledEditAdresse.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].vitesse);
|
||||
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].train;
|
||||
end;
|
||||
ActionCdePeriph :
|
||||
begin
|
||||
@@ -848,8 +853,8 @@ begin
|
||||
LabelPeriph.Visible:=true;
|
||||
LabeledEditTrain.EditLabel.Caption:='Commande';
|
||||
LabeledEditTrain.Hint:='Commande Ascii';
|
||||
LabeledEditTrain.Text:=Tablo_actionneur[index].tabloop[indexAction].chaine;
|
||||
ComboBoxAccComUSB.itemIndex:=Tablo_actionneur[index].tabloop[indexAction].periph-1;
|
||||
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].chaine;
|
||||
ComboBoxAccComUSB.itemIndex:=Tablo_Action[index].tabloop[indexAction].periph-1;
|
||||
end;
|
||||
ActionFonctionF :
|
||||
begin
|
||||
@@ -859,9 +864,9 @@ begin
|
||||
LabeledEditFonctionF.EditLabel.Caption:='Fonction F';
|
||||
LabeledEditTrain.Visible:=true;
|
||||
LabeledEditTrain.hint:='Nom unique du train';
|
||||
LabeledEditFonctionF.Text:=intToSTR(Tablo_actionneur[index].tabloop[indexAction].fonctionF);
|
||||
LabeledEditTempoF.Text:=intToSTR(Tablo_actionneur[index].tabloop[indexAction].TempoF);
|
||||
LabeledEditTrain.Text:=Tablo_actionneur[index].tabloop[indexAction].train;
|
||||
LabeledEditFonctionF.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].fonctionF);
|
||||
LabeledEditTempoF.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].TempoF);
|
||||
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].train;
|
||||
end;
|
||||
ActionSon :
|
||||
begin
|
||||
@@ -870,13 +875,13 @@ begin
|
||||
SpeedButtonCharger.Visible:=true;
|
||||
LabeledEditTrain.EditLabel.Caption:='Son';
|
||||
LabeledEditTrain.Hint:='fichier son';
|
||||
LabeledEditTrain.Text:=Tablo_actionneur[index].tabloop[indexAction].train;
|
||||
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].train;
|
||||
end;
|
||||
ActionTempo :
|
||||
begin
|
||||
LabeledEditTempoF.Visible:=true;
|
||||
LabeledEditTempoF.EditLabel.Caption:='Temporisation (x100 ms)';
|
||||
LabeledEditTempoF.Text:=intToSTR(Tablo_actionneur[index].tabloop[indexAction].TempoF);
|
||||
LabeledEditTempoF.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].TempoF);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -934,7 +939,7 @@ begin
|
||||
i:=Index_Operation(s);
|
||||
|
||||
if (IndexDest<0) then IndexDest:=0;
|
||||
Tablo_Actionneur[ligneClicAct+1].TabloOp[IndexDest+1].numoperation:=i;
|
||||
Tablo_Action[ligneClicAct+1].TabloOp[IndexDest+1].numoperation:=i;
|
||||
|
||||
listboxoperations.Items[indexDest]:=ListBoxOper.Items[indexSrc];
|
||||
|
||||
@@ -954,14 +959,14 @@ begin
|
||||
if i=0 then exit;
|
||||
|
||||
idBD:=ligneClicAct+1;
|
||||
NbOp:=Tablo_Actionneur[idBD].NbOperations;
|
||||
NbCond:=Tablo_Actionneur[idBD].NbCond;
|
||||
NbOp:=Tablo_Action[idBD].NbOperations;
|
||||
NbCond:=Tablo_Action[idBD].NbCond;
|
||||
inc(NbOp);
|
||||
Tablo_Actionneur[idBD].NbOperations:=NbOp;
|
||||
Setlength(Tablo_Actionneur[idBD].tabloOp,NbOp+1);
|
||||
Tablo_Action[idBD].NbOperations:=NbOp;
|
||||
Setlength(Tablo_Action[idBD].tabloOp,NbOp+1);
|
||||
// le nouveau numéro d'opération c'est l'index de la listboxOper
|
||||
Tablo_Actionneur[idBD].tabloOp[NbOp].numoperation:=i;
|
||||
Tablo_Actionneur[idBD].tabloOp[NbOp].valide:=true;
|
||||
Tablo_Action[idBD].tabloOp[NbOp].numoperation:=i;
|
||||
Tablo_Action[idBD].tabloOp[NbOp].valide:=true;
|
||||
|
||||
Aff_champs(idbd,nbCond,Nbop);
|
||||
clicAction:=NbOp-1;
|
||||
@@ -969,43 +974,48 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TFormModifAction.SpeedButtonSupprimeClick(Sender: TObject);
|
||||
|
||||
|
||||
procedure supprime_operation;
|
||||
var i,indexSrc,idBD,NbOp,NumOp : integer;
|
||||
s : string;
|
||||
begin
|
||||
indexSrc:=listboxOperations.ItemIndex;
|
||||
indexSrc:=formModifaction.listboxOperations.ItemIndex;
|
||||
if indexSrc<0 then exit;
|
||||
|
||||
idBD:=ligneClicAct+1;
|
||||
NbOp:=Tablo_Actionneur[idBD].NbOperations;
|
||||
NbOp:=Tablo_Action[idBD].NbOperations;
|
||||
if NbOp<1 then exit;
|
||||
|
||||
NumOp:=Tablo_Actionneur[idBD].TabloOp[indexSrc+1].numoperation;
|
||||
s:='Voulez vous supprimer l''action '+#13+operations[NumOp].Nom+' ?';
|
||||
NumOp:=Tablo_Action[idBD].TabloOp[indexSrc+1].numoperation;
|
||||
s:='Voulez vous supprimer l''opération '+#13+operations[NumOp].Nom+' ?';
|
||||
|
||||
if Application.MessageBox(pchar(s),pchar('confirm'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit;
|
||||
|
||||
// supprimer
|
||||
listboxoperations.Items.Delete(indexSrc);
|
||||
FormModifAction.listboxoperations.Items.Delete(indexSrc);
|
||||
for i:=IndexSrc+1 to NbOp-1 do
|
||||
begin
|
||||
Tablo_Actionneur[idBD].TabloOp[i]:=Tablo_Actionneur[idBD].TabloOp[i+1];
|
||||
Tablo_Action[idBD].TabloOp[i]:=Tablo_Action[idBD].TabloOp[i+1];
|
||||
end;
|
||||
|
||||
dec(NbOp);
|
||||
Tablo_Actionneur[idBD].NbOperations:=NbOp;
|
||||
Setlength(Tablo_Actionneur[idBD].tabloOp,NbOp+1);
|
||||
Tablo_Action[idBD].NbOperations:=NbOp;
|
||||
Setlength(Tablo_Action[idBD].tabloOp,NbOp+1);
|
||||
|
||||
Aff_champs(idBD,1,IndexSrc+1);
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
// réencoder la ligne
|
||||
// réencoder la ligne
|
||||
s:=encode_actions(idBD);
|
||||
// maj combobox
|
||||
ComboBoxActions.Items[idBD-1]:=s;
|
||||
ComboBoxActions.ItemIndex:=idbd-1;
|
||||
FormModifAction.ComboBoxActions.Items[idBD-1]:=s;
|
||||
FormModifAction.ComboBoxActions.ItemIndex:=idbd-1;
|
||||
end;
|
||||
|
||||
procedure TFormModifAction.SpeedButtonSupprimeClick(Sender: TObject);
|
||||
begin
|
||||
supprime_operation;
|
||||
end;
|
||||
|
||||
procedure TFormModifAction.SpinButton1UpClick(Sender: TObject);
|
||||
@@ -1020,9 +1030,9 @@ begin
|
||||
|
||||
|
||||
if (indexSrc<1) then exit;
|
||||
top:=Tablo_Actionneur[idBD].TabloOp[idOp-1];
|
||||
Tablo_Actionneur[idBD].TabloOp[idOp-1]:=Tablo_Actionneur[idBD].TabloOp[idOp];
|
||||
Tablo_Actionneur[idBD].TabloOp[idOp]:=top;
|
||||
top:=Tablo_Action[idBD].TabloOp[idOp-1];
|
||||
Tablo_Action[idBD].TabloOp[idOp-1]:=Tablo_Action[idBD].TabloOp[idOp];
|
||||
Tablo_Action[idBD].TabloOp[idOp]:=top;
|
||||
|
||||
// réencoder la ligne
|
||||
s:=encode_actions(idBD);
|
||||
@@ -1034,9 +1044,9 @@ begin
|
||||
with FormModifAction.ListBoxOperations do
|
||||
begin
|
||||
clear;
|
||||
for i:=1 to Tablo_Actionneur[idBD].NbOperations do
|
||||
for i:=1 to Tablo_Action[idBD].NbOperations do
|
||||
begin
|
||||
no:=Tablo_Actionneur[idBD].tabloOp[i].numoperation;
|
||||
no:=Tablo_Action[idBD].tabloOp[i].numoperation;
|
||||
items.Add(Format('%d%s', [no-1, operations[no].nom])); // valeur d'index de l'icone dans la ImagelistIcones
|
||||
itemHeight:=17;
|
||||
end;
|
||||
@@ -1060,12 +1070,12 @@ begin
|
||||
idop:=indexSrc+1;
|
||||
|
||||
|
||||
no:=Tablo_Actionneur[idBD].NbOperations;
|
||||
no:=Tablo_Action[idBD].NbOperations;
|
||||
|
||||
if (indexSrc+1>=No) then exit;
|
||||
top:=Tablo_Actionneur[idBD].TabloOp[idOp+1];
|
||||
Tablo_Actionneur[idBD].TabloOp[idOp+1]:=Tablo_Actionneur[idBD].TabloOp[idOp];
|
||||
Tablo_Actionneur[idBD].TabloOp[idOp]:=top;
|
||||
top:=Tablo_Action[idBD].TabloOp[idOp+1];
|
||||
Tablo_Action[idBD].TabloOp[idOp+1]:=Tablo_Action[idBD].TabloOp[idOp];
|
||||
Tablo_Action[idBD].TabloOp[idOp]:=top;
|
||||
|
||||
|
||||
// réencoder la ligne
|
||||
@@ -1078,9 +1088,9 @@ begin
|
||||
with FormModifAction.ListBoxOperations do
|
||||
begin
|
||||
clear;
|
||||
for i:=1 to Tablo_Actionneur[idBD].NbOperations do
|
||||
for i:=1 to Tablo_Action[idBD].NbOperations do
|
||||
begin
|
||||
no:=Tablo_Actionneur[idBD].tabloOp[i].numoperation;
|
||||
no:=Tablo_Action[idBD].tabloOp[i].numoperation;
|
||||
items.Add(Format('%d%s', [no-1, operations[no].nom])); // valeur d'index de l'icone dans la ImagelistIcones
|
||||
itemHeight:=17;
|
||||
end;
|
||||
@@ -1111,16 +1121,16 @@ begin
|
||||
index:=ligneclicAct+1;
|
||||
if affevt then Affiche('EditAdrChange',clyellow);
|
||||
|
||||
decl:=Tablo_actionneur[ligneclicAct+1].declencheur;
|
||||
decl:=Tablo_Action[ligneclicAct+1].declencheur;
|
||||
val(editAdr.Text,i,erreur);
|
||||
if (i<0) or (erreur<>0) then exit;
|
||||
|
||||
if decl=DeclHorloge then
|
||||
begin
|
||||
if (i>23) then exit;
|
||||
Tablo_actionneur[index].heure:=i;
|
||||
Tablo_Action[index].heure:=i;
|
||||
end
|
||||
else Tablo_actionneur[index].adresse:=i;
|
||||
else Tablo_Action[index].adresse:=i;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
|
||||
@@ -1130,7 +1140,7 @@ begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
index:=ligneclicAct+1;
|
||||
|
||||
decl:=Tablo_actionneur[ligneclicAct+1].declencheur;
|
||||
decl:=Tablo_Action[ligneclicAct+1].declencheur;
|
||||
|
||||
if (decl<>DeclZoneDet) and (decl<>DeclHorloge) then exit;
|
||||
|
||||
@@ -1140,9 +1150,9 @@ begin
|
||||
if decl=DeclHorloge then
|
||||
begin
|
||||
if (i>59) then exit;
|
||||
Tablo_actionneur[index].minute:=i;
|
||||
Tablo_Action[index].minute:=i;
|
||||
end;
|
||||
if decl=DeclZoneDet then Tablo_actionneur[index].adresse2:=i;
|
||||
if decl=DeclZoneDet then Tablo_Action[index].adresse2:=i;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
|
||||
@@ -1152,12 +1162,12 @@ begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
index:=ligneclicAct+1;
|
||||
|
||||
decl:=Tablo_actionneur[ligneclicAct+1].declencheur;
|
||||
decl:=Tablo_Action[ligneclicAct+1].declencheur;
|
||||
if (decl<>declAccessoire) and (decl<>DeclDetAct) and (decl<>DeclZoneDet) then exit;
|
||||
|
||||
val(SpinEditEtat.Text,i,erreur);
|
||||
if (i<0) or (i>2) or (erreur<>0) then exit;
|
||||
Tablo_actionneur[index].etat:=i;
|
||||
Tablo_Action[index].etat:=i;
|
||||
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1169,13 +1179,13 @@ begin
|
||||
if affevt then Affiche('EditTrainDeclChange',clyellow);
|
||||
index:=ligneclicAct+1;
|
||||
|
||||
decl:=Tablo_actionneur[ligneclicAct+1].declencheur;
|
||||
decl:=Tablo_Action[ligneclicAct+1].declencheur;
|
||||
if (decl<>declDetAct) and (decl<>DeclZoneDet) and (decl<>DeclPeriph) and
|
||||
(decl<>DeclDemarTrain) and (decl<>DeclArretTrain) then exit;
|
||||
|
||||
if (decl=declDetAct) or (decl=DeclZoneDet) or (decl=DeclDemarTrain) or (decl=DeclArretTrain)
|
||||
then Tablo_actionneur[index].trainDecl:=EditTrainDecl.text;
|
||||
if decl=DeclPeriph then Tablo_actionneur[index].ordrePeriph:=EditTrainDecl.text;
|
||||
then Tablo_Action[index].trainDecl:=EditTrainDecl.text;
|
||||
if decl=DeclPeriph then Tablo_Action[index].ordrePeriph:=EditTrainDecl.text;
|
||||
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1195,11 +1205,11 @@ var i,erreur,op : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
val(LabeledEditAdresse.Text,i,erreur);
|
||||
op:=Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
op:=Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
case op of
|
||||
ActionAffTCO : Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].numTCO:=i;
|
||||
ActionAccessoire: Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].adresse:=i;
|
||||
ActionVitesse : Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].vitesse:=i;
|
||||
ActionAffTCO : Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].numTCO:=i;
|
||||
ActionAccessoire: Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].adresse:=i;
|
||||
ActionVitesse : Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].vitesse:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1210,10 +1220,10 @@ begin
|
||||
if clicAction<0 then exit;
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
val(LabeledEditFonctionF.Text,i,erreur);
|
||||
op:=Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
op:=Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
case op of
|
||||
ActionFonctionF : Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].FonctionF:=i;
|
||||
ActionTempo : Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].TempoF:=i;
|
||||
ActionFonctionF : Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].FonctionF:=i;
|
||||
ActionTempo : Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].TempoF:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1223,7 +1233,7 @@ var op : integer;
|
||||
s : string;
|
||||
begin
|
||||
if (clicAction<0) or clicListe then exit;
|
||||
op:=Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
op:=Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
if (op=ActionFonctionF) or (op=ActionVitesse) or (op=ActionSon) then
|
||||
begin
|
||||
s:=LabeledEditTrain.Text;
|
||||
@@ -1233,9 +1243,9 @@ begin
|
||||
exit;
|
||||
end;
|
||||
labelInfo.Caption:='';
|
||||
Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].train:=s;
|
||||
Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].train:=s;
|
||||
end;
|
||||
if op=ActionCdePeriph then Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].chaine:=LabeledEditTrain.Text;
|
||||
if op=ActionCdePeriph then Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].chaine:=LabeledEditTrain.Text;
|
||||
maj_combocactions(ligneclicact);
|
||||
end;
|
||||
|
||||
@@ -1260,8 +1270,8 @@ begin
|
||||
begin
|
||||
s:=openDialogSon.FileName;
|
||||
LabeledEditTrain.Text:=s;
|
||||
op:=Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
if op=ActionSon then Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].train:=s;
|
||||
op:=Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
if op=ActionSon then Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].train:=s;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1270,8 +1280,8 @@ procedure TFormModifAction.CheckBoxRAZClick(Sender: TObject);
|
||||
var op : integer;
|
||||
begin
|
||||
if clicAction<0 then exit;
|
||||
op:=Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
if (op=ActionAccessoire) then Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].zero:=CheckBoxRaz.Checked;
|
||||
op:=Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
if (op=ActionAccessoire) then Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].zero:=CheckBoxRaz.Checked;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
|
||||
@@ -1417,7 +1427,7 @@ begin
|
||||
ClicDeclenche:=ListBoxdeclench.itemindex;
|
||||
if clicDeclenche<0 then exit;
|
||||
i:=Clicdeclenche+1;
|
||||
Tablo_actionneur[ligneclicAct+1].declencheur:=i;
|
||||
Tablo_Action[ligneclicAct+1].declencheur:=i;
|
||||
Aff_champs(ligneclicAct+1,0,0);
|
||||
|
||||
end;
|
||||
@@ -1428,7 +1438,7 @@ begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
index:=ligneclicAct+1;
|
||||
|
||||
Tablo_actionneur[index].NomAction:=LabeledEditNomAct.text;
|
||||
Tablo_Action[index].NomAction:=LabeledEditNomAct.text;
|
||||
|
||||
Aff_champs(index,0,0);
|
||||
end;
|
||||
@@ -1441,7 +1451,7 @@ begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
index:=ligneclicAct+1;
|
||||
if affevt then affiche('Evt ComboBox Change',clyellow);
|
||||
Tablo_Actionneur[ligneClicAct+1].TabloOp[clicaction+1].periph:=formModifAction.ComboBoxAccComUSB.ItemIndex+1;
|
||||
Tablo_Action[ligneClicAct+1].TabloOp[clicaction+1].periph:=formModifAction.ComboBoxAccComUSB.ItemIndex+1;
|
||||
Aff_champs(index,0,clicaction+1);
|
||||
end;
|
||||
|
||||
@@ -1451,14 +1461,14 @@ begin
|
||||
if clicAction<0 then exit;
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
val(LabeledEditTempoF.Text,i,erreur);
|
||||
Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].TempoF:=i;
|
||||
Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].TempoF:=i;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
|
||||
procedure TFormModifAction.ListBoxOperationsDblClick(Sender: TObject);
|
||||
begin
|
||||
if (clicAction<0) or (ligneclicAct<0) or clicliste then exit;
|
||||
Tablo_Actionneur[ligneclicAct+1].tabloOp[clicaction+1].valide:=not(Tablo_Actionneur[ligneclicAct+1].tabloOp[clicaction+1].valide);
|
||||
Tablo_Action[ligneclicAct+1].tabloOp[clicaction+1].valide:=not(Tablo_Action[ligneclicAct+1].tabloOp[clicaction+1].valide);
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
|
||||
@@ -1520,7 +1530,7 @@ begin
|
||||
i:=Index_Condition(s);
|
||||
|
||||
if (IndexDest<0) then IndexDest:=0;
|
||||
Tablo_Actionneur[ligneClicAct+1].TabloCond[IndexDest+1].numCondition:=i;
|
||||
Tablo_Action[ligneClicAct+1].TabloCond[IndexDest+1].numCondition:=i;
|
||||
|
||||
listboxConditions.Items[indexDest]:=ListBoxCondTot.Items[indexSrc];
|
||||
|
||||
@@ -1535,11 +1545,11 @@ var cond,i,erreur : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
val(Champ1.Text,i,erreur);
|
||||
cond:=Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
case cond of
|
||||
CondVitTrain : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].vitmini:=i;
|
||||
CondPosAcc : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].accessoire:=i;
|
||||
CondTrainSig : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].adresse:=i;
|
||||
CondVitTrain : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].vitmini:=i;
|
||||
CondPosAcc : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].accessoire:=i;
|
||||
CondTrainSig : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].adresse:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1549,9 +1559,9 @@ var cond,i,erreur : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
val(Champ2.Text,i,erreur);
|
||||
cond:=Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
case cond of
|
||||
CondVitTrain : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].vitmaxi:=i;
|
||||
CondVitTrain : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].vitmaxi:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1561,9 +1571,9 @@ var cond,i : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
i:=SpinEditHeure1.Value;
|
||||
cond:=Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
case cond of
|
||||
CondHorl : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].HeureMin:=i;
|
||||
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].HeureMin:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1574,9 +1584,9 @@ var cond,i : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
i:=SpinEditMn1.Value;
|
||||
cond:=Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
case cond of
|
||||
CondHorl : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].MinuteMin:=i;
|
||||
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].MinuteMin:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1586,9 +1596,9 @@ var cond,i : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
i:=SpinEditHeure2.Value;
|
||||
cond:=Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
case cond of
|
||||
CondHorl : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].HeureMax:=i;
|
||||
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].HeureMax:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1598,9 +1608,9 @@ var cond,i : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
i:=SpinEditMn2.Value;
|
||||
cond:=Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
case cond of
|
||||
CondHorl : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].MinuteMax:=i;
|
||||
CondHorl : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].MinuteMax:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
|
||||
@@ -1610,9 +1620,9 @@ procedure TFormModifAction.ChampTrainChange(Sender: TObject);
|
||||
var cond : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
cond:=Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
case cond of
|
||||
CondVitTrain,CondTrainSig : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].train:=ChampTrain.Text;
|
||||
CondVitTrain,CondTrainSig : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].train:=ChampTrain.Text;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
|
||||
@@ -1623,9 +1633,9 @@ var cond,i : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
i:=SpinEditEtat2.Value;
|
||||
cond:=Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
cond:=Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].numcondition;
|
||||
case cond of
|
||||
CondPosAcc : Tablo_actionneur[ligneclicact+1].tabloCond[cliccond+1].etat:=i;
|
||||
CondPosAcc : Tablo_Action[ligneclicact+1].tabloCond[cliccond+1].etat:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
@@ -1637,21 +1647,69 @@ begin
|
||||
index:=ligneclicAct+1;
|
||||
if affevt then Affiche('EditAdrChange',clyellow);
|
||||
|
||||
Tablo_actionneur[index].etat:=RadioEtatSignal.ItemIndex;
|
||||
Tablo_Action[index].etat:=RadioEtatSignal.ItemIndex;
|
||||
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
|
||||
procedure TFormModifAction.SpinEditEtatopChange(Sender: TObject);
|
||||
var i,erreur,op : integer;
|
||||
var i,op : integer;
|
||||
begin
|
||||
if (ligneclicAct<0) or clicliste then exit;
|
||||
i:=SpinEditEtatop.Value;
|
||||
op:=Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
op:=Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].numoperation;
|
||||
case op of
|
||||
ActionAccessoire : Tablo_actionneur[ligneclicact+1].tabloOp[clicaction+1].etat:=i;
|
||||
ActionAccessoire : Tablo_Action[ligneclicact+1].tabloOp[clicaction+1].etat:=i;
|
||||
end;
|
||||
maj_combocactions(ligneclicAct);
|
||||
end;
|
||||
|
||||
procedure TFormModifAction.ListBoxOperationsKeyDown(Sender: TObject;
|
||||
var Key: Word; Shift: TShiftState);
|
||||
var nb : integer;
|
||||
begin
|
||||
nb:=Tablo_Action[ligneclicAct+1].NbOperations;
|
||||
if (nb<1) or clicliste then exit;
|
||||
if key=VK_delete then supprime_operation;
|
||||
|
||||
exit; // interfére,ce avec montée baisse
|
||||
if ord(Key)=VK_UP then
|
||||
begin
|
||||
clicListe:=true;
|
||||
//with FormModifAction.ListBoxOperations.Items do
|
||||
begin
|
||||
if clicAction>0 then
|
||||
begin
|
||||
dec(clicaction);
|
||||
Aff_champs(ligneclicAct+1,ClicCond+1,ClicAction+1);
|
||||
Formconfig.ListBoxactions.Itemindex:=clicaction;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
if ord(Key)=VK_DOWN then
|
||||
begin
|
||||
//if clicListe then exit;
|
||||
clicListe:=true;
|
||||
//with Formconfig.ListBoxactions.Items do
|
||||
begin
|
||||
if clicaction<nb-1 then
|
||||
begin
|
||||
inc(clicaction);
|
||||
Aff_champs(ligneclicAct+1,ClicCond+1,ClicAction+1);
|
||||
Formconfig.ListBoxactions.Itemindex:=clicaction;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
if (Shift = [ssCtrl]) and (key = ord('A')) then
|
||||
begin
|
||||
ListBoxOperations.SelectAll;
|
||||
end;
|
||||
|
||||
clicListe:=false;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
end.
|
||||
+3
-3
@@ -38,13 +38,13 @@ begin
|
||||
// Crée l'objet FwPolicy2
|
||||
fwPolicy2:=CreateOleObject('HNetCfg.FwPolicy2');
|
||||
RulesObject:=fwPolicy2.Rules;
|
||||
CurrentProfiles:=fwPolicy2.CurrentProfileTypes;
|
||||
//CurrentProfiles:=net_fw_profile2_private or net_fw_profile2_public;
|
||||
// CurrentProfiles:=fwPolicy2.CurrentProfileTypes;
|
||||
CurrentProfiles:=net_fw_profile2_private or net_fw_profile2_public; //autorise les profils privés et publics
|
||||
|
||||
//Crée l'objet de la règle.
|
||||
NewRule:=CreateOleObject('HNetCfg.FWRule');
|
||||
|
||||
NewRule.Name:=sp;
|
||||
NewRule.Name:=sp;
|
||||
NewRule.Description:='Autorise le socket de/vers '+sp;
|
||||
|
||||
NewRule.Applicationname:=fichier;
|
||||
|
||||
+4
-4
@@ -999,7 +999,7 @@ object FormPilote: TFormPilote
|
||||
Top = 32
|
||||
Width = 169
|
||||
Height = 17
|
||||
Caption = 'Voie libre clignotant'
|
||||
Caption = 'vert clignotant'
|
||||
TabOrder = 1
|
||||
OnClick = RadioVertCliClick
|
||||
end
|
||||
@@ -1017,7 +1017,7 @@ object FormPilote: TFormPilote
|
||||
Top = 64
|
||||
Width = 169
|
||||
Height = 17
|
||||
Caption = 'Avertissement clignotant'
|
||||
Caption = 'Jaune clignotant'
|
||||
TabOrder = 3
|
||||
OnClick = RadioJaunecliClick
|
||||
end
|
||||
@@ -1035,7 +1035,7 @@ object FormPilote: TFormPilote
|
||||
Top = 96
|
||||
Width = 161
|
||||
Height = 17
|
||||
Caption = 'Rouge cli'
|
||||
Caption = 'Rouge clignotant'
|
||||
TabOrder = 5
|
||||
OnClick = RadioRougeCliClick
|
||||
end
|
||||
@@ -1148,7 +1148,7 @@ object FormPilote: TFormPilote
|
||||
OnClick = CheckVerrouCarreClick
|
||||
end
|
||||
object GroupBox3: TGroupBox
|
||||
Left = 101
|
||||
Left = 133
|
||||
Top = 40
|
||||
Width = 192
|
||||
Height = 73
|
||||
|
||||
+360
@@ -106,10 +106,38 @@ chevron =7; chevron_F=128;
|
||||
clignote =8; clignote_F=256;
|
||||
Bita1 =15; Bita1_F=32768; // mise à 1 de bit signal combiné pour belge
|
||||
|
||||
// décodeur LEB
|
||||
carreLEB=1;
|
||||
VioletLEB=2;
|
||||
SemaphoreLEB=3;
|
||||
avertissementLEB=4;
|
||||
BlancLeb=5;
|
||||
VoieLibreLEB=6;
|
||||
rougeCliLEB=7;
|
||||
jauneCliLEB=8;
|
||||
blancCliLEB=9;
|
||||
vertCliLEB=10;
|
||||
Rappel30LEB=11;
|
||||
Rappel60LEB=12;
|
||||
AvertissementRappel30LEB=13;
|
||||
JauneCliRappel30LEB=14;
|
||||
AvertissementRappel60LEB=15;
|
||||
JaunecliRappel60LEB=16;
|
||||
Ralen30LEB=17;
|
||||
Ralen60LEB=18;
|
||||
JauneCliRalen60LEB=19;
|
||||
|
||||
var
|
||||
FormPilote: TFormPilote;
|
||||
EtatFeuPilote : word;
|
||||
AdrPilote : integer;
|
||||
tableLEB : array[1..41,1..19] of
|
||||
record
|
||||
offset, // offset en mode linéaire
|
||||
sortie, // numéro de sortie en mode linéaire
|
||||
code // code de pilotage en mode binaire
|
||||
: integer;
|
||||
end;
|
||||
|
||||
procedure dessine_signal_pilote;
|
||||
procedure couleurs_pilote;
|
||||
@@ -479,5 +507,337 @@ begin
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
// initialisation de l'unité
|
||||
begin
|
||||
// les offsets sont incrémentés tous les 2, on alterne les sorties entre droit et dévié ;
|
||||
// offset et sortie sont pour le mode linéaire ; code est pour le mode binaire
|
||||
// cible 1 vert rouge
|
||||
tableLeb[1,3].offset:=0; tableLeb[1,3].sortie:=const_droit; tableLeb[1,3].code:=0;// sémaphore
|
||||
tableLeb[1,6].offset:=0; tableLeb[1,6].sortie:=const_devie; tableLeb[1,6].code:=1;// voie libre
|
||||
tableLeb[1,7].offset:=1; tableLeb[1,7].sortie:=const_droit; tableLeb[1,7].code:=2;// rouge cli
|
||||
tableLeb[1,10].offset:=1; tableLeb[1,10].sortie:=const_devie;tableLeb[1,10].code:=4; // vert cli
|
||||
|
||||
// cible 2 vert rouge
|
||||
tableLeb[2,3].offset:=0; tableLeb[2,3].sortie:=const_droit; tableLeb[2,3].code:=0; // sémaphore
|
||||
tableLeb[2,6].offset:=0; tableLeb[2,6].sortie:=const_devie; tableLeb[2,6].code:=1;// voie libre
|
||||
tableLeb[2,7].offset:=1; tableLeb[2,7].sortie:=const_droit; tableLeb[2,7].code:=2;// rouge cli
|
||||
tableLeb[2,10].offset:=1; tableLeb[2,10].sortie:=const_devie; tableLeb[2,10].code:=4;// vert cli
|
||||
|
||||
// cible 3 vert rouge jaune
|
||||
tableLeb[3,3].offset:=0; tableLeb[3,3].sortie:=const_droit; tableLeb[3,3].code:=0; // sémaphore
|
||||
tableLeb[3,4].offset:=0; tableLeb[3,4].sortie:=const_devie; tableLeb[3,4].code:=1; // avertissement
|
||||
tableLeb[3,6].offset:=1; tableLeb[3,6].sortie:=const_droit; tableLeb[3,6].code:=2; // voie libre
|
||||
tableLeb[3,7].offset:=1; tableLeb[3,7].sortie:=const_devie; tableLeb[3,7].code:=3; // rouge cli
|
||||
tableLeb[3,8].offset:=2; tableLeb[3,8].sortie:=const_droit; tableLeb[3,8].code:=4; // jaune cli
|
||||
tableLeb[3,10].offset:=2; tableLeb[3,10].sortie:=const_devie;tableLeb[3,10].code:=5; // vert cli
|
||||
|
||||
// cible 4 blanc violet
|
||||
tableLeb[4,2].offset:=0; tableLeb[4,2].sortie:=const_droit; tableLeb[4,2].code:=0;// violet
|
||||
tableLeb[4,5].offset:=0; tableLeb[4,5].sortie:=const_devie; tableLeb[4,5].code:=1;// blanc
|
||||
tableLeb[4,9].offset:=1; tableLeb[4,9].sortie:=const_droit; tableLeb[4,9].code:=2;// blanc cli
|
||||
|
||||
// cible 5 carré vert
|
||||
tableLeb[5,1].offset:=0; tableLeb[5,1].sortie:=const_droit; tableLeb[5,1].code:=0;// carré
|
||||
tableLeb[5,3].offset:=0; tableLeb[5,3].sortie:=const_devie; tableLeb[5,3].code:=1;// sémaphore
|
||||
tableLeb[5,6].offset:=1; tableLeb[5,6].sortie:=const_droit; tableLeb[5,6].code:=2;// voie libre
|
||||
tableLeb[5,7].offset:=1; tableLeb[5,7].sortie:=const_devie; tableLeb[5,7].code:=3;// rouge cli
|
||||
tableLeb[5,10].offset:=2; tableLeb[5,10].sortie:=const_droit; tableLeb[5,10].code:=4;// vert cli
|
||||
|
||||
// cible 6 carré vert jaune
|
||||
tableLeb[6,1].offset:=0; tableLeb[6,1].sortie:=const_droit;tableLeb[6,1].code:=0; // carré
|
||||
tableLeb[6,3].offset:=0; tableLeb[6,3].sortie:=const_devie;tableLeb[6,3].code:=1; // sémaphore
|
||||
tableLeb[6,4].offset:=1; tableLeb[6,4].sortie:=const_droit;tableLeb[6,4].code:=2; // avertissement
|
||||
tableLeb[6,6].offset:=1; tableLeb[6,6].sortie:=const_droit;tableLeb[6,6].code:=3; // voie libre
|
||||
tableLeb[6,7].offset:=2; tableLeb[6,7].sortie:=const_devie;tableLeb[6,7].code:=4; // rouge cli
|
||||
tableLeb[6,8].offset:=2; tableLeb[6,8].sortie:=const_devie;tableLeb[6,8].code:=5; // jaune cli
|
||||
tableLeb[6,10].offset:=3; tableLeb[6,10].sortie:=const_droit;tableLeb[6,10].code:=6; // vert cli
|
||||
|
||||
// cible 7 carré vert jaune blanc
|
||||
tableLeb[7,1].offset:=0; tableLeb[7,1].sortie:=const_droit;tableLeb[7,1].code:=0; // carré
|
||||
tableLeb[7,3].offset:=0; tableLeb[7,3].sortie:=const_devie;tableLeb[7,3].code:=2; // sémaphore
|
||||
tableLeb[7,4].offset:=1; tableLeb[7,4].sortie:=const_droit;tableLeb[7,4].code:=3; // avertissement
|
||||
tableLeb[7,5].offset:=1; tableLeb[7,5].sortie:=const_devie;tableLeb[7,5].code:=1; // blanc
|
||||
tableLeb[7,6].offset:=2; tableLeb[7,6].sortie:=const_droit;tableLeb[7,6].code:=4; // voie libre
|
||||
tableLeb[7,7].offset:=2; tableLeb[7,7].sortie:=const_devie;tableLeb[7,7].code:=6; // rouge cli
|
||||
tableLeb[7,8].offset:=3; tableLeb[7,8].sortie:=const_devie;tableLeb[7,8].code:=7; // jaune cli
|
||||
tableLeb[7,9].offset:=3; tableLeb[7,9].sortie:=const_droit;tableLeb[7,9].code:=5; // blanc cli
|
||||
tableLeb[7,10].offset:=4; tableLeb[7,10].sortie:=const_droit;tableLeb[7,10].code:=8; // vert cli
|
||||
|
||||
// cible 8 violet rouge vert jaune blanc
|
||||
tableLeb[8,2].offset:=0; tableLeb[8,2].sortie:=const_droit;tableLeb[8,2].code:=0; // violet
|
||||
tableLeb[8,3].offset:=0; tableLeb[8,3].sortie:=const_devie;tableLeb[8,3].code:=2; // sémaphore
|
||||
tableLeb[8,4].offset:=1; tableLeb[8,4].sortie:=const_droit;tableLeb[8,4].code:=3; // avertissement
|
||||
tableLeb[8,5].offset:=1; tableLeb[8,5].sortie:=const_devie;tableLeb[8,5].code:=1; // blanc
|
||||
tableLeb[8,6].offset:=2; tableLeb[8,6].sortie:=const_droit;tableLeb[8,6].code:=4; // voie libre
|
||||
tableLeb[8,7].offset:=2; tableLeb[8,7].sortie:=const_devie;tableLeb[8,7].code:=6; // rouge cli
|
||||
tableLeb[8,8].offset:=3; tableLeb[8,8].sortie:=const_devie;tableLeb[8,8].code:=7; // jaune cli
|
||||
tableLeb[8,9].offset:=3; tableLeb[8,9].sortie:=const_droit;tableLeb[8,9].code:=5; // blanc cli
|
||||
tableLeb[8,10].offset:=4; tableLeb[8,10].sortie:=const_droit;tableLeb[8,10].code:=8; // vert cli
|
||||
|
||||
// cible 9 rouge vert jaune ralen
|
||||
tableLeb[9,3].offset:=0; tableLeb[9,3].sortie:=const_droit;tableLeb[9,3].code:=0; // sémaphore
|
||||
tableLeb[9,4].offset:=0; tableLeb[9,4].sortie:=const_devie;tableLeb[9,4].code:=1; // avertissement
|
||||
tableLeb[9,6].offset:=1; tableLeb[9,6].sortie:=const_droit;tableLeb[9,6].code:=2; // voie libre
|
||||
tableLeb[9,7].offset:=1; tableLeb[9,7].sortie:=const_devie;tableLeb[9,7].code:=3; // rouge cli
|
||||
tableLeb[9,8].offset:=2; tableLeb[9,8].sortie:=const_droit;tableLeb[9,8].code:=4; // jaune cli
|
||||
tableLeb[9,10].offset:=2; tableLeb[9,10].sortie:=const_devie;tableLeb[9,10].code:=5; // vert cli
|
||||
tableLeb[9,17].offset:=3; tableLeb[9,17].sortie:=const_droit;tableLeb[9,17].code:=6; // ralen 30
|
||||
tableLeb[9,18].offset:=3; tableLeb[9,18].sortie:=const_devie;tableLeb[9,18].code:=7; // ralen 60
|
||||
tableLeb[9,19].offset:=4; tableLeb[9,19].sortie:=const_droit;tableLeb[9,19].code:=8; // jaune cli + ralen 60
|
||||
|
||||
// cible 10 carré sémaphore vert jaune ralen
|
||||
tableLeb[10,1].offset:=0; tableLeb[10,1].sortie:=const_droit; tableLeb[10,1].code:=0;// carré
|
||||
tableLeb[10,3].offset:=0; tableLeb[10,3].sortie:=const_devie; tableLeb[10,3].code:=1;// sémaphore
|
||||
tableLeb[10,4].offset:=1; tableLeb[10,4].sortie:=const_droit; tableLeb[10,4].code:=2;// avertissement
|
||||
tableLeb[10,6].offset:=1; tableLeb[10,6].sortie:=const_devie; tableLeb[10,6].code:=3;// voie libre
|
||||
tableLeb[10,7].offset:=2; tableLeb[10,7].sortie:=const_droit; tableLeb[10,7].code:=4;// rouge cli
|
||||
tableLeb[10,8].offset:=2; tableLeb[10,8].sortie:=const_devie; tableLeb[10,8].code:=5;// jaune cli
|
||||
tableLeb[10,10].offset:=3; tableLeb[10,10].sortie:=const_droit;tableLeb[10,10].code:=6; // vert cli
|
||||
tableLeb[10,17].offset:=3; tableLeb[10,17].sortie:=const_devie;tableLeb[10,17].code:=7; // ralen 30
|
||||
tableLeb[10,18].offset:=4; tableLeb[10,18].sortie:=const_droit;tableLeb[10,18].code:=8; // ralen 60
|
||||
tableLeb[10,19].offset:=4; tableLeb[10,19].sortie:=const_devie;tableLeb[10,19].code:=9; // jaune cli + ralen 60
|
||||
|
||||
// cible 11 violet sémaphore vert jaune ralen
|
||||
tableLeb[11,2].offset:=0; tableLeb[11,2].sortie:=const_droit; tableLeb[11,2].code:=0;// violet
|
||||
tableLeb[11,3].offset:=0; tableLeb[11,3].sortie:=const_devie; tableLeb[11,3].code:=1;// sémaphore
|
||||
tableLeb[11,4].offset:=1; tableLeb[11,4].sortie:=const_droit; tableLeb[11,4].code:=2;// avertissement
|
||||
tableLeb[11,6].offset:=1; tableLeb[11,6].sortie:=const_devie; tableLeb[11,6].code:=3;// voie libre
|
||||
tableLeb[11,7].offset:=2; tableLeb[11,7].sortie:=const_droit; tableLeb[11,7].code:=4;// rouge cli
|
||||
tableLeb[11,8].offset:=2; tableLeb[11,8].sortie:=const_devie; tableLeb[11,8].code:=5;// jaune cli
|
||||
tableLeb[11,10].offset:=3; tableLeb[11,10].sortie:=const_droit;tableLeb[11,10].code:=6; // vert cli
|
||||
tableLeb[11,17].offset:=3; tableLeb[11,17].sortie:=const_devie;tableLeb[11,17].code:=7; // ralen 30
|
||||
tableLeb[11,18].offset:=4; tableLeb[11,18].sortie:=const_droit;tableLeb[11,18].code:=8; // ralen 60
|
||||
tableLeb[11,19].offset:=4; tableLeb[11,19].sortie:=const_devie;tableLeb[11,19].code:=9; // jaune cli + ralen 60
|
||||
|
||||
// cible 12 carré blanc sémaphore vert jaune ralen
|
||||
tableLeb[12,1].offset:=0; tableLeb[12,1].sortie:=const_droit; tableLeb[12,1].code:=0;// carré
|
||||
tableLeb[12,3].offset:=0; tableLeb[12,3].sortie:=const_devie; tableLeb[12,3].code:=2;// sémaphore
|
||||
tableLeb[12,4].offset:=1; tableLeb[12,4].sortie:=const_droit; tableLeb[12,4].code:=3;// avertissement
|
||||
tableLeb[12,5].offset:=1; tableLeb[12,5].sortie:=const_devie; tableLeb[12,5].code:=1;// blanc
|
||||
tableLeb[12,6].offset:=2; tableLeb[12,6].sortie:=const_droit; tableLeb[12,6].code:=4;// voie libre
|
||||
tableLeb[12,7].offset:=2; tableLeb[12,7].sortie:=const_devie; tableLeb[12,7].code:=6;// rouge cli
|
||||
tableLeb[12,8].offset:=3; tableLeb[12,8].sortie:=const_droit; tableLeb[12,8].code:=7;// jaune cli
|
||||
tableLeb[12,9].offset:=3; tableLeb[12,9].sortie:=const_devie; tableLeb[12,9].code:=5;// blanc cli
|
||||
tableLeb[12,10].offset:=4; tableLeb[12,10].sortie:=const_droit;tableLeb[12,10].code:=8; // vert cli
|
||||
tableLeb[12,17].offset:=4; tableLeb[12,17].sortie:=const_devie;tableLeb[12,17].code:=9; // ralen 30
|
||||
tableLeb[12,18].offset:=5; tableLeb[12,18].sortie:=const_droit;tableLeb[12,18].code:=10; // ralen 60
|
||||
tableLeb[12,19].offset:=5; tableLeb[12,19].sortie:=const_devie;tableLeb[12,19].code:=11; // jaune cli + ralen 60
|
||||
|
||||
// cible 13 violet blanc sémaphore vert jaune ralen
|
||||
tableLeb[13,2].offset:=0; tableLeb[13,2].sortie:=const_droit; tableLeb[13,2].code:=0;// violet
|
||||
tableLeb[13,3].offset:=0; tableLeb[13,3].sortie:=const_devie; tableLeb[13,3].code:=2;// sémaphore
|
||||
tableLeb[13,4].offset:=1; tableLeb[13,4].sortie:=const_droit; tableLeb[13,4].code:=3;// avertissement
|
||||
tableLeb[13,5].offset:=1; tableLeb[13,5].sortie:=const_devie; tableLeb[13,5].code:=1;// blanc
|
||||
tableLeb[13,6].offset:=2; tableLeb[13,6].sortie:=const_droit; tableLeb[13,6].code:=4;// voie libre
|
||||
tableLeb[13,7].offset:=2; tableLeb[13,7].sortie:=const_devie; tableLeb[13,7].code:=6;// rouge cli
|
||||
tableLeb[13,8].offset:=3; tableLeb[13,8].sortie:=const_droit; tableLeb[13,8].code:=7;// jaune cli
|
||||
tableLeb[13,9].offset:=3; tableLeb[13,9].sortie:=const_devie; tableLeb[13,9].code:=5;// blanc cli
|
||||
tableLeb[13,10].offset:=4; tableLeb[13,10].sortie:=const_droit;tableLeb[13,10].code:=8; // vert cli
|
||||
tableLeb[13,17].offset:=4; tableLeb[13,17].sortie:=const_devie;tableLeb[13,17].code:=9; // ralen 30
|
||||
tableLeb[13,18].offset:=5; tableLeb[13,18].sortie:=const_droit;tableLeb[13,18].code:=10; // ralen 60
|
||||
tableLeb[13,19].offset:=5; tableLeb[13,19].sortie:=const_devie;tableLeb[13,19].code:=11; // jaune cli + ralen 60
|
||||
|
||||
// cible 14 mode linéaire
|
||||
tableLeb[14,1].offset:=0; tableLeb[14,1].sortie:=const_droit; tableLeb[14,1].code:=0; // carré
|
||||
tableLeb[14,3].offset:=0; tableLeb[14,3].sortie:=const_devie; tableLeb[14,3].code:=1;// sémaphore
|
||||
tableLeb[14,4].offset:=1; tableLeb[14,4].sortie:=const_droit; tableLeb[14,4].code:=2;// avertissement
|
||||
tableLeb[14,6].offset:=1; tableLeb[14,6].sortie:=const_devie; tableLeb[14,6].code:=3;// voie libre
|
||||
tableLeb[14,7].offset:=2; tableLeb[14,7].sortie:=const_droit; tableLeb[14,7].code:=4;// rouge cli
|
||||
tableLeb[14,8].offset:=2; tableLeb[14,8].sortie:=const_devie; tableLeb[14,8].code:=5;// jaune cli
|
||||
tableLeb[14,10].offset:=3; tableLeb[14,10].sortie:=const_droit; tableLeb[14,10].code:=6;// vert cli
|
||||
tableLeb[14,11].offset:=3; tableLeb[14,11].sortie:=const_devie; tableLeb[14,11].code:=7;// rappel 30
|
||||
tableLeb[14,12].offset:=4; tableLeb[14,12].sortie:=const_droit; tableLeb[14,12].code:=8;// rappel 60
|
||||
tableLeb[14,13].offset:=4; tableLeb[14,13].sortie:=const_devie; tableLeb[14,13].code:=9;// avertissement + rappel 30
|
||||
tableLeb[14,14].offset:=5; tableLeb[14,14].sortie:=const_droit; tableLeb[14,14].code:=10;// jaune cli + rappel 30
|
||||
tableLeb[14,15].offset:=5; tableLeb[14,15].sortie:=const_devie; tableLeb[14,15].code:=11;// avertissement + rappel 60
|
||||
tableLeb[14,16].offset:=6; tableLeb[14,16].sortie:=const_droit; tableLeb[14,16].code:=12;// jaune cli + rappel 60
|
||||
|
||||
// cible 15 mode linéaire ralen et rappel
|
||||
tableLeb[15,1].offset:=0; tableLeb[15,1].sortie:=const_droit; tableLeb[15,1].code:=0;// carré
|
||||
tableLeb[15,3].offset:=0; tableLeb[15,3].sortie:=const_devie; tableLeb[15,3].code:=1;// sémaphore
|
||||
tableLeb[15,4].offset:=1; tableLeb[15,4].sortie:=const_droit; tableLeb[15,4].code:=2;// avertissement
|
||||
tableLeb[15,6].offset:=1; tableLeb[15,6].sortie:=const_devie; tableLeb[15,6].code:=3;// voie libre
|
||||
tableLeb[15,7].offset:=2; tableLeb[15,7].sortie:=const_droit; tableLeb[15,7].code:=4;// rouge cli
|
||||
tableLeb[15,8].offset:=2; tableLeb[15,8].sortie:=const_devie; tableLeb[15,8].code:=5;// jaune cli
|
||||
tableLeb[15,10].offset:=3; tableLeb[15,10].sortie:=const_droit;tableLeb[15,10].code:=6; // vert cli
|
||||
tableLeb[15,11].offset:=3; tableLeb[15,11].sortie:=const_devie;tableLeb[15,11].code:=7; // rappel 30
|
||||
tableLeb[15,12].offset:=4; tableLeb[15,12].sortie:=const_droit;tableLeb[15,12].code:=8; // rappel 60
|
||||
tableLeb[15,13].offset:=4; tableLeb[15,13].sortie:=const_devie;tableLeb[15,13].code:=9; // avertissement + rappel 30
|
||||
tableLeb[15,14].offset:=5; tableLeb[15,14].sortie:=const_droit;tableLeb[15,14].code:=10; // jaune cli + rappel 30
|
||||
tableLeb[15,15].offset:=5; tableLeb[15,15].sortie:=const_devie;tableLeb[15,15].code:=11; // avertissement + rappel 60
|
||||
tableLeb[15,16].offset:=6; tableLeb[15,16].sortie:=const_droit;tableLeb[15,16].code:=12; // jaune cli + rappel 60
|
||||
tableLeb[15,17].offset:=6; tableLeb[15,17].sortie:=const_devie;tableLeb[15,17].code:=13; // ralen 30
|
||||
tableLeb[15,18].offset:=7; tableLeb[15,18].sortie:=const_droit;tableLeb[15,18].code:=14; // ralen 60
|
||||
tableLeb[15,19].offset:=7; tableLeb[15,19].sortie:=const_devie;tableLeb[15,19].code:=15; // jaune cli + ralen 60
|
||||
|
||||
// cible 16 mode linéaire violet rappel
|
||||
tableLeb[16,2].offset:=0; tableLeb[16,2].sortie:=const_droit; tableLeb[16,2].code:=0;// violet
|
||||
tableLeb[16,3].offset:=0; tableLeb[16,3].sortie:=const_devie; tableLeb[16,3].code:=1;// sémaphore
|
||||
tableLeb[16,4].offset:=1; tableLeb[16,4].sortie:=const_droit; tableLeb[16,4].code:=2;// avertissement
|
||||
tableLeb[16,6].offset:=1; tableLeb[16,6].sortie:=const_devie; tableLeb[16,6].code:=3;// voie libre
|
||||
tableLeb[16,7].offset:=2; tableLeb[16,7].sortie:=const_droit; tableLeb[16,7].code:=4;// rouge cli
|
||||
tableLeb[16,8].offset:=2; tableLeb[16,8].sortie:=const_devie; tableLeb[16,8].code:=5;// jaune cli
|
||||
tableLeb[16,10].offset:=3; tableLeb[16,10].sortie:=const_droit; tableLeb[16,10].code:=6;// vert cli
|
||||
tableLeb[16,11].offset:=3; tableLeb[16,11].sortie:=const_devie; tableLeb[16,11].code:=7;// rappel 30
|
||||
tableLeb[16,12].offset:=4; tableLeb[16,12].sortie:=const_droit; tableLeb[16,12].code:=8;// rappel 60
|
||||
tableLeb[16,13].offset:=4; tableLeb[16,13].sortie:=const_devie; tableLeb[16,13].code:=9;// avertissement + rappel 30
|
||||
tableLeb[16,14].offset:=5; tableLeb[16,14].sortie:=const_droit; tableLeb[16,14].code:=10;// jaune cli + rappel 30
|
||||
tableLeb[16,15].offset:=5; tableLeb[16,15].sortie:=const_devie; tableLeb[16,15].code:=11;// avertissement + rappel 60
|
||||
tableLeb[16,16].offset:=6; tableLeb[16,16].sortie:=const_droit; tableLeb[16,16].code:=12;// jaune cli + rappel 60
|
||||
|
||||
// cible 17 mode linéaire carré violet blanc rappel
|
||||
tableLeb[17,1].offset:=0; tableLeb[17,1].sortie:=const_droit; tableLeb[17,1].code:=0;// carré
|
||||
tableLeb[17,3].offset:=0; tableLeb[17,3].sortie:=const_devie; tableLeb[17,3].code:=2;// sémaphore
|
||||
tableLeb[17,4].offset:=1; tableLeb[17,4].sortie:=const_droit; tableLeb[17,4].code:=3;// avertissement
|
||||
tableLeb[17,5].offset:=1; tableLeb[17,5].sortie:=const_devie; tableLeb[17,5].code:=1;// blanc
|
||||
tableLeb[17,6].offset:=2; tableLeb[17,6].sortie:=const_droit; tableLeb[17,6].code:=4;// voie libre
|
||||
tableLeb[17,7].offset:=2; tableLeb[17,7].sortie:=const_devie; tableLeb[17,7].code:=6;// rouge cli
|
||||
tableLeb[17,8].offset:=3; tableLeb[17,8].sortie:=const_droit; tableLeb[17,8].code:=7;// jaune cli
|
||||
tableLeb[17,9].offset:=3; tableLeb[17,9].sortie:=const_devie; tableLeb[17,9].code:=5;// blanc cli
|
||||
tableLeb[17,10].offset:=4; tableLeb[17,10].sortie:=const_droit; tableLeb[17,10].code:=8;// vert cli
|
||||
tableLeb[17,11].offset:=4; tableLeb[17,11].sortie:=const_devie; tableLeb[17,11].code:=9;// rappel 30
|
||||
tableLeb[17,12].offset:=5; tableLeb[17,12].sortie:=const_droit; tableLeb[17,12].code:=10;// rappel 60
|
||||
tableLeb[17,13].offset:=5; tableLeb[17,13].sortie:=const_devie; tableLeb[17,13].code:=11;// avertissement + rappel 30
|
||||
tableLeb[17,14].offset:=6; tableLeb[17,14].sortie:=const_droit; tableLeb[17,14].code:=12;// jaune cli + rappel 30
|
||||
tableLeb[17,15].offset:=6; tableLeb[17,15].sortie:=const_devie; tableLeb[17,15].code:=13;// avertissement + rappel 60
|
||||
tableLeb[17,16].offset:=7; tableLeb[17,16].sortie:=const_droit; tableLeb[17,16].code:=14;// jaune cli + rappel 60
|
||||
|
||||
// cible 18 mode linéaire Violet blanc rappel
|
||||
tableLeb[18,2].offset:=0; tableLeb[18,2].sortie:=const_droit; tableLeb[18,2].code:=0;// violet
|
||||
tableLeb[18,3].offset:=0; tableLeb[18,3].sortie:=const_devie; tableLeb[18,3].code:=2;// sémaphore
|
||||
tableLeb[18,4].offset:=1; tableLeb[18,4].sortie:=const_droit; tableLeb[18,4].code:=3;// avertissement
|
||||
tableLeb[18,5].offset:=1; tableLeb[18,5].sortie:=const_devie; tableLeb[18,5].code:=1;// blanc
|
||||
tableLeb[18,6].offset:=2; tableLeb[18,6].sortie:=const_droit; tableLeb[18,6].code:=4;// voie libre
|
||||
tableLeb[18,7].offset:=2; tableLeb[18,7].sortie:=const_devie; tableLeb[18,7].code:=6;// rouge cli
|
||||
tableLeb[18,8].offset:=3; tableLeb[18,8].sortie:=const_droit; tableLeb[18,8].code:=7;// jaune cli
|
||||
tableLeb[18,9].offset:=3; tableLeb[18,9].sortie:=const_devie; tableLeb[18,9].code:=5;// blanc cli
|
||||
tableLeb[18,10].offset:=4; tableLeb[18,10].sortie:=const_droit; tableLeb[18,10].code:=8;// vert cli
|
||||
tableLeb[18,11].offset:=4; tableLeb[18,11].sortie:=const_devie; tableLeb[18,11].code:=9;// rappel 30
|
||||
tableLeb[18,12].offset:=5; tableLeb[18,12].sortie:=const_droit; tableLeb[18,12].code:=10;// rappel 60
|
||||
tableLeb[18,13].offset:=5; tableLeb[18,13].sortie:=const_devie; tableLeb[18,13].code:=11;// avertissement + rappel 30
|
||||
tableLeb[18,14].offset:=6; tableLeb[18,14].sortie:=const_droit; tableLeb[18,14].code:=12;// jaune cli + rappel 30
|
||||
tableLeb[18,15].offset:=6; tableLeb[18,15].sortie:=const_devie; tableLeb[18,15].code:=13;// avertissement + rappel 60
|
||||
tableLeb[18,16].offset:=7; tableLeb[18,16].sortie:=const_droit; tableLeb[18,16].code:=14;// jaune cli + rappel 60
|
||||
|
||||
// cible 19 mode linéaire carré blanc ralen rappel
|
||||
tableLeb[19,1].offset:=0; tableLeb[19,1].sortie:=const_droit; tableLeb[19,1].code:=0;// carré
|
||||
tableLeb[19,3].offset:=0; tableLeb[19,3].sortie:=const_devie; tableLeb[19,3].code:=2;// sémaphore
|
||||
tableLeb[19,4].offset:=1; tableLeb[19,4].sortie:=const_droit; tableLeb[19,4].code:=3;// avertissement
|
||||
tableLeb[19,5].offset:=1; tableLeb[19,5].sortie:=const_devie; tableLeb[19,5].code:=1;// blanc
|
||||
tableLeb[19,6].offset:=2; tableLeb[19,6].sortie:=const_droit; tableLeb[19,6].code:=4;// voie libre
|
||||
tableLeb[19,7].offset:=2; tableLeb[19,7].sortie:=const_devie; tableLeb[19,7].code:=6;// rouge cli
|
||||
tableLeb[19,8].offset:=3; tableLeb[19,8].sortie:=const_droit; tableLeb[19,8].code:=7;// jaune cli
|
||||
tableLeb[19,9].offset:=3; tableLeb[19,9].sortie:=const_devie; tableLeb[19,9].code:=5;// blanc cli
|
||||
tableLeb[19,10].offset:=4; tableLeb[19,10].sortie:=const_droit;tableLeb[19,10].code:=8; // vert cli
|
||||
tableLeb[19,11].offset:=4; tableLeb[19,11].sortie:=const_devie;tableLeb[19,11].code:=9; // rappel 30
|
||||
tableLeb[19,12].offset:=5; tableLeb[19,12].sortie:=const_droit;tableLeb[19,12].code:=10; // rappel 60
|
||||
tableLeb[19,13].offset:=5; tableLeb[19,13].sortie:=const_devie;tableLeb[19,13].code:=11; // avertissement + rappel 30
|
||||
tableLeb[19,14].offset:=6; tableLeb[19,14].sortie:=const_droit;tableLeb[19,14].code:=12; // jaune cli + rappel 30
|
||||
tableLeb[19,15].offset:=6; tableLeb[19,15].sortie:=const_devie;tableLeb[19,15].code:=13; // avertissement + rappel 60
|
||||
tableLeb[19,16].offset:=7; tableLeb[19,16].sortie:=const_droit;tableLeb[19,16].code:=14; // jaune cli + rappel 60
|
||||
tableLeb[19,17].offset:=7; tableLeb[19,17].sortie:=const_devie;tableLeb[19,17].code:=15; // ralen 30
|
||||
tableLeb[19,18].offset:=8; tableLeb[19,18].sortie:=const_droit;tableLeb[19,18].code:=16; // ralen 60
|
||||
tableLeb[19,19].offset:=8; tableLeb[19,19].sortie:=const_devie;tableLeb[19,19].code:=17; // jaune cli + ralen 60
|
||||
|
||||
// cible 20 mode linéaire violet blanc ralen rappel
|
||||
tableLeb[20,2].offset:=0; tableLeb[20,2].sortie:=const_droit; tableLeb[20,2].code:=0;// violet
|
||||
tableLeb[20,3].offset:=0; tableLeb[20,3].sortie:=const_devie; tableLeb[20,3].code:=2;// sémaphore
|
||||
tableLeb[20,4].offset:=1; tableLeb[20,4].sortie:=const_droit; tableLeb[20,4].code:=3;// avertissement
|
||||
tableLeb[20,5].offset:=1; tableLeb[20,5].sortie:=const_devie; tableLeb[20,5].code:=1;// blanc
|
||||
tableLeb[20,6].offset:=2; tableLeb[20,6].sortie:=const_droit; tableLeb[20,6].code:=4;// voie libre
|
||||
tableLeb[20,7].offset:=2; tableLeb[20,7].sortie:=const_devie; tableLeb[20,7].code:=6;// rouge cli
|
||||
tableLeb[20,8].offset:=3; tableLeb[20,8].sortie:=const_droit; tableLeb[20,8].code:=7;// jaune cli
|
||||
tableLeb[20,9].offset:=3; tableLeb[20,9].sortie:=const_devie; tableLeb[20,9].code:=5;// blanc cli
|
||||
tableLeb[20,10].offset:=4; tableLeb[20,10].sortie:=const_droit;tableLeb[20,10].code:=8; // vert cli
|
||||
tableLeb[20,11].offset:=4; tableLeb[20,11].sortie:=const_devie;tableLeb[20,11].code:=9; // rappel 30
|
||||
tableLeb[20,12].offset:=5; tableLeb[20,12].sortie:=const_droit;tableLeb[20,12].code:=10; // rappel 60
|
||||
tableLeb[20,13].offset:=5; tableLeb[20,13].sortie:=const_devie;tableLeb[20,13].code:=11; // avertissement + rappel 30
|
||||
tableLeb[20,14].offset:=6; tableLeb[20,14].sortie:=const_droit;tableLeb[20,14].code:=12; // jaune cli + rappel 30
|
||||
tableLeb[20,15].offset:=6; tableLeb[20,15].sortie:=const_devie;tableLeb[20,15].code:=13; // avertissement + rappel 60
|
||||
tableLeb[20,16].offset:=7; tableLeb[20,16].sortie:=const_droit;tableLeb[20,16].code:=14; // jaune cli + rappel 60
|
||||
tableLeb[20,17].offset:=7; tableLeb[20,17].sortie:=const_devie;tableLeb[20,17].code:=15; // ralen 30
|
||||
tableLeb[20,18].offset:=8; tableLeb[20,18].sortie:=const_droit;tableLeb[20,18].code:=16; // ralen 60
|
||||
tableLeb[20,19].offset:=8; tableLeb[20,19].sortie:=const_devie;tableLeb[20,19].code:=17; // jaune cli + ralen 60
|
||||
|
||||
// cible 21 ronde vert jaune
|
||||
tableLeb[21,4].offset:=0; tableLeb[21,4].sortie:=const_droit; tableLeb[21,4].code:=0;// avertissement
|
||||
tableLeb[21,6].offset:=0; tableLeb[21,6].sortie:=const_devie; tableLeb[21,6].code:=1;// voie libre
|
||||
tableLeb[21,8].offset:=1; tableLeb[21,8].sortie:=const_droit; tableLeb[21,8].code:=2;// jaune cli
|
||||
tableLeb[21,10].offset:=1; tableLeb[21,10].sortie:=const_devie;tableLeb[21,10].code:=3; // vert cli
|
||||
|
||||
// cible 22 ronde vert jaune rouge
|
||||
tableLeb[22,4].offset:=0; tableLeb[22,4].sortie:=const_droit;tableLeb[22,4].code:=0; // avertissement
|
||||
tableLeb[22,6].offset:=0; tableLeb[22,6].sortie:=const_devie;tableLeb[22,6].code:=1; // voie libre
|
||||
tableLeb[22,8].offset:=1; tableLeb[22,8].sortie:=const_droit;tableLeb[22,8].code:=2; // jaune cli
|
||||
|
||||
// cible 23 ronde vert 2 jaune rouge
|
||||
tableLeb[23,1].offset:=0; tableLeb[23,1].sortie:=const_droit;tableLeb[23,1].code:=0; // carré
|
||||
tableLeb[23,4].offset:=0; tableLeb[23,4].sortie:=const_devie;tableLeb[23,4].code:=1; // avertissement
|
||||
tableLeb[23,6].offset:=1; tableLeb[23,6].sortie:=const_droit;tableLeb[23,6].code:=2; // voie libre
|
||||
tableLeb[23,8].offset:=1; tableLeb[23,8].sortie:=const_devie;tableLeb[23,8].code:=3; // jaune cli
|
||||
tableLeb[23,10].offset:=2; tableLeb[23,10].sortie:=const_droit;tableLeb[23,10].code:=4; // vert cli
|
||||
|
||||
// cible 24 ronde 3 jaunes
|
||||
tableLeb[24,4].offset:=0; tableLeb[24,4].sortie:=const_droit; tableLeb[24,4].code:=0;// avertissement
|
||||
tableLeb[24,8].offset:=0; tableLeb[24,8].sortie:=const_devie; tableLeb[24,8].code:=1;// jaune cli
|
||||
tableLeb[24,17].offset:=1; tableLeb[24,17].sortie:=const_droit; tableLeb[24,17].code:=2;// ralen 30
|
||||
tableLeb[24,18].offset:=1; tableLeb[24,18].sortie:=const_devie; tableLeb[24,18].code:=3;// ralen 60
|
||||
tableLeb[24,19].offset:=2; tableLeb[24,19].sortie:=const_droit; tableLeb[24,19].code:=4;// jaune cli + ralen 60
|
||||
|
||||
// cible 25 ronde vert 3 jaunes
|
||||
tableLeb[25,4].offset:=0; tableLeb[25,4].sortie:=const_droit; tableLeb[25,4].code:=0;// avertissement
|
||||
tableLeb[25,6].offset:=0; tableLeb[25,6].sortie:=const_devie; tableLeb[25,6].code:=1; // voie libre
|
||||
tableLeb[25,8].offset:=1; tableLeb[25,8].sortie:=const_droit; tableLeb[25,8].code:=2; // jaune cli
|
||||
tableLeb[25,10].offset:=1; tableLeb[25,10].sortie:=const_devie; tableLeb[25,10].code:=3;// vert cli
|
||||
tableLeb[25,17].offset:=2; tableLeb[25,17].sortie:=const_droit; tableLeb[25,17].code:=4;// ralen 30
|
||||
tableLeb[25,18].offset:=2; tableLeb[25,18].sortie:=const_devie; tableLeb[25,18].code:=5;// ralen 60
|
||||
tableLeb[25,19].offset:=3; tableLeb[25,19].sortie:=const_droit; tableLeb[25,19].code:=6;// jaune cli + ralen 60
|
||||
|
||||
// cible 26 ronde rouge vert 4 jaunes
|
||||
tableLeb[26,1].offset:=0; tableLeb[26,1].sortie:=const_droit; tableLeb[26,1].code:=0;// carré
|
||||
tableLeb[26,4].offset:=0; tableLeb[26,4].sortie:=const_devie; tableLeb[26,4].code:=1;// avertissement
|
||||
tableLeb[26,6].offset:=1; tableLeb[26,6].sortie:=const_droit; tableLeb[26,6].code:=2;// voie libre
|
||||
tableLeb[26,8].offset:=1; tableLeb[26,8].sortie:=const_devie; tableLeb[26,8].code:=3;// jaune cli
|
||||
tableLeb[26,10].offset:=2; tableLeb[26,10].sortie:=const_droit;tableLeb[26,10].code:=4; // vert cli
|
||||
tableLeb[26,17].offset:=2; tableLeb[26,17].sortie:=const_devie;tableLeb[26,17].code:=5; // ralen 30
|
||||
tableLeb[26,18].offset:=3; tableLeb[26,18].sortie:=const_droit;tableLeb[26,18].code:=6; // ralen 60
|
||||
tableLeb[26,19].offset:=3; tableLeb[26,19].sortie:=const_devie;tableLeb[26,19].code:=7; // jaune cli + ralen 60
|
||||
|
||||
// cible 27 carré vert blanc
|
||||
tableLeb[27,1].offset:=0; tableLeb[27,1].sortie:=const_droit; tableLeb[27,1].code:=0;// carré
|
||||
tableLeb[27,3].offset:=0; tableLeb[27,3].sortie:=const_devie; tableLeb[27,3].code:=2;// sémaphore
|
||||
tableLeb[27,5].offset:=1; tableLeb[27,5].sortie:=const_droit; tableLeb[27,5].code:=1;// blanc
|
||||
tableLeb[27,6].offset:=1; tableLeb[27,6].sortie:=const_devie; tableLeb[27,6].code:=3;// voie libre
|
||||
tableLeb[27,7].offset:=2; tableLeb[27,7].sortie:=const_droit; tableLeb[27,7].code:=5;// rouge cli
|
||||
tableLeb[27,9].offset:=2; tableLeb[27,9].sortie:=const_devie; tableLeb[27,9].code:=4;// blanc cli
|
||||
tableLeb[27,10].offset:=3; tableLeb[27,10].sortie:=const_droit;tableLeb[27,10].code:=6; // vert cli
|
||||
|
||||
// cible 28 carré vert violet blanc jaune
|
||||
tableLeb[28,2].offset:=0; tableLeb[28,2].sortie:=const_droit; tableLeb[28,2].code:=0;// violet
|
||||
tableLeb[28,4].offset:=0; tableLeb[28,4].sortie:=const_devie; tableLeb[28,4].code:=2;// avertissement
|
||||
tableLeb[28,5].offset:=1; tableLeb[28,5].sortie:=const_droit; tableLeb[28,5].code:=1;// blanc
|
||||
tableLeb[28,6].offset:=1; tableLeb[28,6].sortie:=const_devie; tableLeb[28,6].code:=3;// voie libre
|
||||
tableLeb[28,8].offset:=2; tableLeb[28,8].sortie:=const_droit; tableLeb[28,8].code:=5;// jaune cli
|
||||
tableLeb[28,9].offset:=2; tableLeb[28,9].sortie:=const_devie; tableLeb[28,9].code:=4;// blanc cli
|
||||
tableLeb[28,10].offset:=3; tableLeb[28,10].sortie:=const_droit; tableLeb[28,10].code:=6;// vert cli
|
||||
|
||||
// cible 29 carré vert rouge
|
||||
tableLeb[29,3].offset:=0; tableLeb[29,3].sortie:=const_droit; tableLeb[29,3].code:=0;// sémaphore
|
||||
tableLeb[29,6].offset:=0; tableLeb[29,6].sortie:=const_devie; tableLeb[29,6].code:=1;// voie libre
|
||||
tableLeb[29,7].offset:=1; tableLeb[29,7].sortie:=const_droit; tableLeb[29,7].code:=2;// rouge cli
|
||||
tableLeb[29,10].offset:=1; tableLeb[29,10].sortie:=const_devie; tableLeb[29,10].code:=3;// vert cli
|
||||
|
||||
// cible 41 carré jaune rappel
|
||||
tableLeb[41,1].offset:=0; tableLeb[41,1].sortie:=const_droit;tableLeb[41,1].code:=0; // carré
|
||||
tableLeb[41,3].offset:=0; tableLeb[41,3].sortie:=const_devie;tableLeb[41,3].code:=1; // sémaphore
|
||||
tableLeb[41,4].offset:=1; tableLeb[41,4].sortie:=const_droit;tableLeb[41,4].code:=2; // avertissement
|
||||
tableLeb[41,7].offset:=1; tableLeb[41,7].sortie:=const_devie;tableLeb[41,7].code:=3; // rouge cli
|
||||
tableLeb[41,8].offset:=2; tableLeb[41,8].sortie:=const_droit;tableLeb[41,8].code:=4; // jaune cli
|
||||
tableLeb[41,11].offset:=2; tableLeb[41,11].sortie:=const_devie;tableLeb[41,11].code:=5; // rappel 30
|
||||
tableLeb[41,12].offset:=3; tableLeb[41,12].sortie:=const_droit;tableLeb[41,12].code:=6; // rappel 60
|
||||
tableLeb[41,13].offset:=3; tableLeb[41,13].sortie:=const_devie;tableLeb[41,13].code:=7; // avertissement + rappel 30
|
||||
tableLeb[41,14].offset:=4; tableLeb[41,14].sortie:=const_droit;tableLeb[41,14].code:=8; // jaune cli + rappel 30
|
||||
tableLeb[41,15].offset:=4; tableLeb[41,15].sortie:=const_devie;tableLeb[41,15].code:=9; // avertissement + rappel 60
|
||||
tableLeb[41,16].offset:=5; tableLeb[41,16].sortie:=const_droit;tableLeb[41,16].code:=10; // jaune cli + rappel 60
|
||||
|
||||
end.
|
||||
+27
-35
@@ -1,6 +1,6 @@
|
||||
object FormPrinc: TFormPrinc
|
||||
Left = 54
|
||||
Top = 186
|
||||
Left = 81
|
||||
Top = 253
|
||||
Width = 1148
|
||||
Height = 624
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
@@ -20,8 +20,8 @@ object FormPrinc: TFormPrinc
|
||||
OnCreate = FormCreate
|
||||
OnResize = FormResize
|
||||
DesignSize = (
|
||||
1132
|
||||
566)
|
||||
1140
|
||||
573)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelTitre: TLabel
|
||||
@@ -1429,7 +1429,7 @@ object FormPrinc: TFormPrinc
|
||||
Visible = False
|
||||
end
|
||||
object LabelClock: TLabel
|
||||
Left = 936
|
||||
Left = 1040
|
||||
Top = 0
|
||||
Width = 85
|
||||
Height = 22
|
||||
@@ -1445,8 +1445,8 @@ object FormPrinc: TFormPrinc
|
||||
end
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Top = 544
|
||||
Width = 1132
|
||||
Top = 551
|
||||
Width = 1140
|
||||
Height = 22
|
||||
Panels = <
|
||||
item
|
||||
@@ -1472,23 +1472,12 @@ object FormPrinc: TFormPrinc
|
||||
end>
|
||||
OnDrawPanel = StatusBar1DrawPanel
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 1023
|
||||
Top = 0
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Button1'
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object GrandPanel: TPanel
|
||||
Left = 8
|
||||
Top = 48
|
||||
Width = 1057
|
||||
Height = 484
|
||||
TabOrder = 2
|
||||
TabOrder = 1
|
||||
DesignSize = (
|
||||
1057
|
||||
484)
|
||||
@@ -1518,7 +1507,6 @@ object FormPrinc: TFormPrinc
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
PopupMenu = PopupMenuFenRich
|
||||
ReadOnly = True
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 0
|
||||
WordWrap = False
|
||||
@@ -2048,24 +2036,13 @@ object FormPrinc: TFormPrinc
|
||||
end
|
||||
end
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 360
|
||||
Top = 0
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = 'Affiche routes'
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 496
|
||||
Left = 504
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = 'Button3'
|
||||
TabOrder = 4
|
||||
Visible = False
|
||||
Caption = 'Route'
|
||||
TabOrder = 2
|
||||
OnClick = Button3Click
|
||||
end
|
||||
object Timer1: TTimer
|
||||
@@ -2144,6 +2121,10 @@ object FormPrinc: TFormPrinc
|
||||
Caption = 'Codification des cantons'
|
||||
OnClick = Codificationdescantons1Click
|
||||
end
|
||||
object Codificationdestrains1: TMenuItem
|
||||
Caption = 'Codification des trains'
|
||||
OnClick = Codificationdestrains1Click
|
||||
end
|
||||
object N5: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
@@ -2432,8 +2413,19 @@ object FormPrinc: TFormPrinc
|
||||
end
|
||||
object Roulage1: TMenuItem
|
||||
Caption = 'Roulage'
|
||||
object Routes1: TMenuItem
|
||||
Caption = 'Fen'#234'tre des routes'
|
||||
OnClick = Routes1Click
|
||||
end
|
||||
object Afficheroutespartrain1: TMenuItem
|
||||
Caption = 'Affiche les routes par train'
|
||||
OnClick = Afficheroutespartrain1Click
|
||||
end
|
||||
object N17: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object OpRoulage: TMenuItem
|
||||
Caption = 'Op'#233'rations de roulage'
|
||||
Caption = 'Positionner les aiguillages en position initiale'
|
||||
OnClick = OpRoulageClick
|
||||
end
|
||||
object RazResa: TMenuItem
|
||||
|
||||
+3681
-1374
File diff suppressed because it is too large.
Load diff
+133
@@ -0,0 +1,133 @@
|
||||
object FormRoute: TFormRoute
|
||||
Left = 201
|
||||
Top = 182
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Route'
|
||||
ClientHeight = 257
|
||||
ClientWidth = 634
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnActivate = FormActivate
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelInfo: TLabel
|
||||
Left = 16
|
||||
Top = 16
|
||||
Width = 324
|
||||
Height = 13
|
||||
Caption =
|
||||
'Cliquer sur une route pour la visualiser sur le TCO et l'#39'affecte' +
|
||||
'r au train'
|
||||
end
|
||||
object LabelNombre: TLabel
|
||||
Left = 19
|
||||
Top = 192
|
||||
Width = 29
|
||||
Height = 13
|
||||
Caption = 'Route'
|
||||
end
|
||||
object ImageTrainR: TImage
|
||||
Left = 376
|
||||
Top = 8
|
||||
Width = 241
|
||||
Height = 33
|
||||
ParentShowHint = False
|
||||
ShowHint = False
|
||||
end
|
||||
object ListBoxRoutes: TListBox
|
||||
Left = 16
|
||||
Top = 80
|
||||
Width = 609
|
||||
Height = 105
|
||||
Hint = 'S'#233'lectionne une route pour l'#39'affecter au train courant'
|
||||
Color = clBlack
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clYellow
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
ItemHeight = 13
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
OnKeyDown = ListBoxRoutesKeyDown
|
||||
OnMouseDown = ListBoxRoutesMouseDown
|
||||
end
|
||||
object ButtonEfface: TButton
|
||||
Left = 424
|
||||
Top = 216
|
||||
Width = 97
|
||||
Height = 33
|
||||
Hint = 'Efface la route du tco'
|
||||
Caption = 'Efface route du TCO'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
WordWrap = True
|
||||
OnClick = ButtonEffaceClick
|
||||
end
|
||||
object ButtonQuitte: TButton
|
||||
Left = 16
|
||||
Top = 216
|
||||
Width = 89
|
||||
Height = 33
|
||||
Caption = 'Quitter'
|
||||
TabOrder = 2
|
||||
OnClick = ButtonQuitteClick
|
||||
end
|
||||
object ButtonDetail: TButton
|
||||
Left = 320
|
||||
Top = 216
|
||||
Width = 97
|
||||
Height = 33
|
||||
Hint = 'D'#233'tail route'
|
||||
Caption = 'D'#233'tail route'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 3
|
||||
OnClick = ButtonDetailClick
|
||||
end
|
||||
object ButtonRAZ: TButton
|
||||
Left = 528
|
||||
Top = 216
|
||||
Width = 97
|
||||
Height = 33
|
||||
Hint = 'Annule toutes les routes pour ce train'
|
||||
Caption = 'D'#233'valider routes'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 4
|
||||
OnClick = ButtonRAZClick
|
||||
end
|
||||
object ComboBoxTrains: TComboBox
|
||||
Left = 16
|
||||
Top = 48
|
||||
Width = 601
|
||||
Height = 21
|
||||
Style = csDropDownList
|
||||
ItemHeight = 13
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
end
|
||||
object ButtonFenPil: TButton
|
||||
Left = 232
|
||||
Top = 216
|
||||
Width = 83
|
||||
Height = 33
|
||||
Hint = 'Ouvre la fen'#234'tre de pilotage des trains'
|
||||
Caption = 'Fen'#234'tre de pilotage'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 6
|
||||
WordWrap = True
|
||||
OnClick = ButtonFenPilClick
|
||||
end
|
||||
end
|
||||
+421
@@ -0,0 +1,421 @@
|
||||
unit UnitRoute;
|
||||
|
||||
// choix des routes pour un train
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ComCtrls, ShellCtrls, StdCtrls, ExtCtrls , UnitPrinc;
|
||||
|
||||
type
|
||||
TFormRoute = class(TForm)
|
||||
ListBoxRoutes: TListBox;
|
||||
ButtonEfface: TButton;
|
||||
LabelInfo: TLabel;
|
||||
ButtonQuitte: TButton;
|
||||
LabelNombre: TLabel;
|
||||
ButtonDetail: TButton;
|
||||
ButtonRAZ: TButton;
|
||||
ImageTrainR: TImage;
|
||||
ComboBoxTrains: TComboBox;
|
||||
ButtonFenPil: TButton;
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure ListBoxRoutesMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure ButtonEffaceClick(Sender: TObject);
|
||||
procedure ButtonQuitteClick(Sender: TObject);
|
||||
procedure ButtonDetailClick(Sender: TObject);
|
||||
procedure ButtonRAZClick(Sender: TObject);
|
||||
procedure ListBoxRoutesKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure ButtonFenPilClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
{ Déclarations publiques }
|
||||
end;
|
||||
|
||||
var
|
||||
FormRoute: TFormRoute;
|
||||
parcoursDet : TUneroute;
|
||||
AncLigneRoute,LigneRoute,IdTrainCourant : integer;
|
||||
|
||||
procedure raz_route_fenetre;
|
||||
procedure raz_toutes_routes;
|
||||
procedure efface_route_tco;
|
||||
function affiche_route_tco : boolean;
|
||||
procedure Efface_Affiche_route;
|
||||
|
||||
implementation
|
||||
|
||||
uses UnitDebug,unitTCO,UnitConfig, UnitRouteTrains;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
// efface la route parcoursDet[]
|
||||
procedure efface_route_tco;
|
||||
var n,det1,det2,i,indexAig : integer;
|
||||
t : tequipement;
|
||||
begin
|
||||
n:=parcoursdet[0].adresse;
|
||||
det1:=parcoursdet[1].adresse;
|
||||
for i:=2 to n do
|
||||
begin
|
||||
det2:=parcoursdet[i].adresse;
|
||||
t:=ParcoursDet[i].typ;
|
||||
if (t=aig) or (t=tjd) or (t=triple) then
|
||||
begin
|
||||
indexaig:=index_aig(ParcoursDet[i].adresse);
|
||||
aiguillage[indexAig].AncPos:=aiguillage[indexAig].position; // sauve position
|
||||
aiguillage[indexAig].position:=parcoursDet[i].pos;
|
||||
end;
|
||||
if t=det then
|
||||
begin
|
||||
zone_tco(1,det1,det2,1,0,0,true); // mode "aiguillages mis"
|
||||
det1:=det2;
|
||||
end;
|
||||
end;
|
||||
// remettre les aiguillages
|
||||
for i:=2 to n do
|
||||
begin
|
||||
t:=ParcoursDet[i].typ;
|
||||
if (t=aig) or (t=tjd) or (t=triple) then
|
||||
begin
|
||||
indexaig:=index_aig(ParcoursDet[i].adresse);
|
||||
aiguillage[indexAig].Position:=aiguillage[indexAig].AncPos; // restitue position
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// efface la fenetre et la route du tco
|
||||
procedure raz_route_fenetre;
|
||||
begin
|
||||
efface_route_tco;
|
||||
|
||||
formRoute.ListBoxRoutes.Clear;
|
||||
ligneroute:=-1;
|
||||
end;
|
||||
|
||||
// Affiche sans effacer l'ancienne, la route du TCO du tableau ParcoursDet[]
|
||||
// détruit l'index du train dans le canton !!!! zizi
|
||||
function Affiche_route_TCO : boolean ;
|
||||
var i,n,det1,det2,indexAig : integer;
|
||||
t :tequipement;
|
||||
ok : boolean;
|
||||
begin
|
||||
//exit;
|
||||
n:=ParcoursDet[0].adresse;
|
||||
ok:=true;
|
||||
det1:=parcoursDet[1].adresse;
|
||||
for i:=2 to n do
|
||||
begin
|
||||
t:=ParcoursDet[i].typ;
|
||||
if (t=aig) or (t=tjd) or (t=triple) then
|
||||
begin
|
||||
indexaig:=index_aig(ParcoursDet[i].adresse);
|
||||
aiguillage[indexAig].AncPos:=aiguillage[IndexAig].position; // sauvegarder position
|
||||
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
|
||||
if t=det then
|
||||
begin
|
||||
det2:=ParcoursDet[i].adresse;
|
||||
ok:=zone_tco(1,det1,det2,1,0,1,true) and ok;
|
||||
det1:=det2;
|
||||
end;
|
||||
end;
|
||||
|
||||
// remettre la position d'origine des aiguillages
|
||||
for i:=1 to n do
|
||||
begin
|
||||
t:=ParcoursDet[i].typ;
|
||||
if (t=aig) or (t=tjd) or (t=triple) then
|
||||
begin
|
||||
indexaig:=index_aig(ParcoursDet[i].adresse);
|
||||
aiguillage[indexAig].Position:=aiguillage[IndexAig].AncPos; // remettre position
|
||||
end;
|
||||
end;
|
||||
result:=ok;
|
||||
end;
|
||||
|
||||
// Efface, fabrique le tableau ParcoursDet[] depuis TabloRoute[id] affiche la route dans le TCO contenue dans ParcoursDet[]
|
||||
procedure Efface_Affiche_route;
|
||||
var n,id : integer;
|
||||
ok : boolean;
|
||||
s : string;
|
||||
begin
|
||||
AncLigneRoute:=LigneRoute;
|
||||
|
||||
if LigneRoute<0 then exit;
|
||||
id:=LigneRoute+1;
|
||||
formRoute.ButtonDetail.caption:='Détail route '+intToSTR(id);
|
||||
formRoute.ButtonEfface.caption:='Efface route '+intToSTR(id)+' du TCO';
|
||||
|
||||
efface_route_tco;
|
||||
|
||||
// fabriquer le tableau parcoursDet[] depuis tabloRoute[]
|
||||
parcoursDet:=tabloRoute[id];
|
||||
n:=ParcoursDet[0].adresse;
|
||||
|
||||
// Affiche les routes
|
||||
ok:=Affiche_route_tco;
|
||||
|
||||
s:='Route '+intToSTR(id)+'/'+intToSTR(NbreRoutes)+' : '+intToSTR(n)+' éléments';
|
||||
//if not(ok) then s:=s+' - Route pas affichable car des éléments ne sont pas au TCO';
|
||||
formRoute.LabelNombre.Caption:=s;
|
||||
end;
|
||||
|
||||
|
||||
procedure clic_route(r : integer);
|
||||
var idTrain : integer;
|
||||
begin
|
||||
LigneRoute:=r;
|
||||
// copier la route au train
|
||||
if (idcantonroute<1) or (ligneroute<0) then exit;
|
||||
idTrain:=Index_Train_adresse(canton[idCantonRoute].AdrTrainRoute);
|
||||
//IdTrain:=canton[idcantonRoute].indexTrain;
|
||||
if idtrain<1 then
|
||||
begin
|
||||
// le train a été déplacé
|
||||
affiche('Anomalie 50',clred);
|
||||
exit;
|
||||
end;
|
||||
|
||||
trains[idTrain].route:=tabloroute[LigneRoute+1];
|
||||
|
||||
formRoute.ButtonFenPil.enabled:=trains[IdTrain].route[0].adresse<>0;
|
||||
|
||||
Efface_affiche_route;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
// affiche les routes du train courant
|
||||
procedure maj_fenetre;
|
||||
var l,pluslongue,n,j,pixelLength : integer;
|
||||
s,chaineLongue : string;
|
||||
begin
|
||||
if (cantonorg=0) or (cantonDest=0) then FormRoute.caption:='Pas de canton depart/arrivée' else
|
||||
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)+')';
|
||||
plusLongue:=0;
|
||||
|
||||
formRoute.ButtonDetail.caption:='Détail route ';
|
||||
formRoute.ButtonEfface.caption:='Efface route ';
|
||||
|
||||
if idcantonRoute<>0 then formRoute.ListBoxRoutes.Hint:='Sélectionne une route pour l''affecter au train '+canton[idcantonRoute].NomTrain;
|
||||
formRoute.listBoxRoutes.Clear;
|
||||
|
||||
// trouver le canton dest d'après le canton origine cliqué
|
||||
if IdCantonClic=0 then exit;
|
||||
idCantonRoute:=index_canton_numero(canton[idCantonClic].NumcantonOrg);
|
||||
|
||||
if idcantonroute<>0 then
|
||||
begin
|
||||
IdTrainCourant:=canton[idcantonRoute].indexTrain;
|
||||
if idTrainCourant>9000 then
|
||||
begin
|
||||
Affiche('Anomalie 626 ',clred);
|
||||
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';
|
||||
|
||||
for j:=1 to NbreRoutes do
|
||||
begin
|
||||
n:=tabloroute[j,0].adresse;
|
||||
s:=intToSTR(j)+'. ';
|
||||
s:=s+route_to_string(tabloroute[j]);
|
||||
l:=Length(s);
|
||||
if l>pluslongue then
|
||||
begin
|
||||
chainelongue:=s;
|
||||
pluslongue:=l;
|
||||
end;
|
||||
|
||||
FormRoute.listBoxRoutes.Items.Add(s);
|
||||
end;
|
||||
|
||||
PixelLength:=FormRoute.ListboxRoutes.Canvas.TextWidth(chaineLongue)+30;
|
||||
// positionne une scrollbar dans la listbox - pour l'enlever, envoyer 0 dans pixelLength
|
||||
SendMessage(FormRoute.ListBoxRoutes.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0);
|
||||
|
||||
// icone train
|
||||
if idcantonRoute<>0 then Maj_icone_train(FormRoute.ImageTrainR,idTrainCourant);
|
||||
|
||||
formRoute.ButtonFenPil.enabled:=trains[IdTrainCourant].route[0].adresse<>0;
|
||||
|
||||
if NbreRoutes=1 then clic_route(0);
|
||||
end;
|
||||
|
||||
procedure TFormRoute.FormActivate(Sender: TObject);
|
||||
begin
|
||||
maj_fenetre;
|
||||
end;
|
||||
|
||||
procedure TFormRoute.ListBoxRoutesMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
LigneRoute:=listBoxRoutes.Itemindex;
|
||||
clic_route(ligneRoute);
|
||||
end;
|
||||
|
||||
procedure TFormRoute.ButtonEffaceClick(Sender: TObject);
|
||||
begin
|
||||
efface_route_tco;
|
||||
end;
|
||||
|
||||
procedure TFormRoute.ButtonQuitteClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormRoute.ButtonDetailClick(Sender: TObject);
|
||||
var i,j,n,p : integer;
|
||||
s : string;
|
||||
typ : tequipement;
|
||||
begin
|
||||
if ligneroute<0 then exit;
|
||||
with formprinc do
|
||||
begin
|
||||
windowState:=wsNormal; //Maximized;
|
||||
show;
|
||||
BringToFront;
|
||||
end;
|
||||
|
||||
j:=ligneroute+1;
|
||||
n:=tabloroute[j,0].adresse;
|
||||
Affiche('Route '+intToSTR(j)+' ---------------n='+intToSTR(n),clwhite);
|
||||
for i:=1 to n do
|
||||
begin
|
||||
s:=intToSTR(tabloroute[j,i].adresse)+' '+BTypeToChaine(tabloroute[j,i].typ)+' ';
|
||||
p:=tabloRoute[j,i].pos;
|
||||
typ:=tabloRoute[j,i].typ;
|
||||
if (typ=aig) or (typ=tjd) or (typ=tjs) or (typ=triple) then
|
||||
begin
|
||||
case p of
|
||||
const_droit : s:=s+'droit';
|
||||
const_devie : s:=s+'dev';
|
||||
0 : s:=s+'talon';
|
||||
else s:=s+intToSTR(p);
|
||||
end;
|
||||
if tabloroute[j,i].talon then s:=s+' (en talon)';
|
||||
end;
|
||||
Affiche(s,clyellow);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure RAZ_toutes_routes;
|
||||
var i,idt : integer;
|
||||
begin
|
||||
efface_route_tco;
|
||||
raz_route_fenetre;
|
||||
|
||||
// raz état des boutons des cantons org et dest
|
||||
if cantonOrg>0 then canton[cantonOrg].bouton:=0;
|
||||
if cantonDest>0 then canton[cantonDest].bouton:=0;
|
||||
|
||||
i:=index_canton_numero(cantonOrg);
|
||||
if i>0 then
|
||||
begin
|
||||
canton[i].bouton:=0;
|
||||
dessin_canton(i,0); // remet le bouton jaune du canton org
|
||||
// raz la route du train
|
||||
idt:=canton[i].indexTrain;
|
||||
if idt>0 then
|
||||
begin
|
||||
trains[idt].route[0].adresse:=0;
|
||||
end;
|
||||
end;
|
||||
|
||||
i:=index_canton_numero(cantonDest);
|
||||
if i>0 then
|
||||
begin
|
||||
canton[i].bouton:=0;
|
||||
dessin_canton(i,0); // remet le bouton jaune du canton dest
|
||||
end;
|
||||
|
||||
// efface icone train
|
||||
with formRoute do
|
||||
begin
|
||||
ImageTrainR.Canvas.Rectangle(0,0,ImageTrainr.Width,ImageTrainr.Height);
|
||||
labelNombre.caption:='';
|
||||
end;
|
||||
|
||||
formRoute.ButtonFenPil.enabled:=false;
|
||||
|
||||
formRoute.caption:='Routes';
|
||||
|
||||
NbreRoutes:=0;
|
||||
detDepart:=0;
|
||||
detAtrouve:=0;
|
||||
cantonOrg:=0;
|
||||
cantonDest:=0;
|
||||
end;
|
||||
|
||||
procedure TFormRoute.ButtonRAZClick(Sender: TObject);
|
||||
begin
|
||||
raz_toutes_routes;
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TFormRoute.ListBoxRoutesKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if (ord(Key)=VK_UP) and (ligneroute>0) then
|
||||
begin
|
||||
dec(ligneRoute);
|
||||
efface_affiche_route;
|
||||
end;
|
||||
if (ord(Key)=VK_DOWN) and (ligneroute+1<NbreRoutes) then
|
||||
begin
|
||||
inc(ligneRoute);
|
||||
efface_affiche_route;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormRoute.FormCreate(Sender: TObject);
|
||||
begin
|
||||
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';
|
||||
|
||||
// fenêtre toujours devant
|
||||
SetWindowPos(Handle,HWND_TOPMOST,0,0,0,0,SWP_NoMove or SWP_NoSize);
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormRoute.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
var idtrain : integer;
|
||||
begin
|
||||
if (idcantonroute<1) or (idcantonRoute>nCantons) then exit;
|
||||
IdTrain:=canton[idcantonRoute].indexTrain;
|
||||
if idtrain>0 then
|
||||
begin
|
||||
caption:='Routes';
|
||||
if trains[idTrain].route[0].adresse<>0 then raz_route_fenetre;
|
||||
// efface icone train
|
||||
with formRoute do
|
||||
begin
|
||||
ImageTrainR.Canvas.Rectangle(0,0,ImageTrainr.Width,ImageTrainr.Height);
|
||||
labelNombre.caption:='';
|
||||
end;
|
||||
|
||||
end;
|
||||
efface_route_tco;
|
||||
end;
|
||||
|
||||
procedure TFormRoute.ButtonFenPilClick(Sender: TObject);
|
||||
begin
|
||||
indexTrainFR:=canton[idcantonRoute].indexTrain;
|
||||
FormRouteTrain.show;
|
||||
close;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,121 @@
|
||||
object FormRouteTrain: TFormRouteTrain
|
||||
Left = 518
|
||||
Top = 183
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Liste des routes affect'#233'es aux trains'
|
||||
ClientHeight = 156
|
||||
ClientWidth = 580
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
OnActivate = FormActivate
|
||||
OnClose = FormClose
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object ImageTrainR: TImage
|
||||
Left = 328
|
||||
Top = 8
|
||||
Width = 241
|
||||
Height = 33
|
||||
ParentShowHint = False
|
||||
ShowHint = False
|
||||
end
|
||||
object LabelRoute: TLabel
|
||||
Left = 16
|
||||
Top = 48
|
||||
Width = 71
|
||||
Height = 13
|
||||
Caption = 'Route affect'#233'e'
|
||||
end
|
||||
object ComboBoxTrains: TComboBox
|
||||
Left = 16
|
||||
Top = 16
|
||||
Width = 225
|
||||
Height = 21
|
||||
Style = csDropDownList
|
||||
ItemHeight = 13
|
||||
TabOrder = 0
|
||||
OnChange = ComboBoxTrainsChange
|
||||
end
|
||||
object ButtonQuitte: TButton
|
||||
Left = 8
|
||||
Top = 118
|
||||
Width = 89
|
||||
Height = 33
|
||||
Caption = 'Quitter'
|
||||
TabOrder = 1
|
||||
OnClick = ButtonQuitteClick
|
||||
end
|
||||
object RichEditRoute: TRichEdit
|
||||
Left = 8
|
||||
Top = 64
|
||||
Width = 569
|
||||
Height = 49
|
||||
Color = clNone
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clYellow
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
OnMouseDown = RichEditRouteMouseDown
|
||||
end
|
||||
object ButtonEfface: TButton
|
||||
Left = 480
|
||||
Top = 120
|
||||
Width = 97
|
||||
Height = 33
|
||||
Hint = 'Efface le trac'#233' du train s'#233'lectionn'#233' du TCO'
|
||||
Caption = 'Efface route du TCO'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 3
|
||||
WordWrap = True
|
||||
OnClick = ButtonEffaceClick
|
||||
end
|
||||
object ButtonSupprime: TButton
|
||||
Left = 371
|
||||
Top = 120
|
||||
Width = 97
|
||||
Height = 33
|
||||
Hint = 'Supprime la route du train s'#233'lectionn'#233
|
||||
Caption = 'Supprimer la route du train'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 4
|
||||
WordWrap = True
|
||||
OnClick = ButtonSupprimeClick
|
||||
end
|
||||
object ButtonRouler1Tr: TButton
|
||||
Left = 256
|
||||
Top = 120
|
||||
Width = 107
|
||||
Height = 33
|
||||
Hint = 'Roule le train s'#233'lectionn'#233' s'#39'il dispose d'#39'une route'
|
||||
Caption = 'Rouler le train'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 5
|
||||
WordWrap = True
|
||||
OnClick = ButtonRouler1TrClick
|
||||
end
|
||||
object ButtonRoulerTsTrains: TButton
|
||||
Left = 168
|
||||
Top = 120
|
||||
Width = 75
|
||||
Height = 33
|
||||
Hint = 'Roule tous les trains qui ont une route affect'#233'e'
|
||||
Caption = 'Rouler tous les trains'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 6
|
||||
WordWrap = True
|
||||
OnClick = ButtonRoulerTsTrainsClick
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,472 @@
|
||||
unit UnitRouteTrains;
|
||||
|
||||
// choix de la route pour tous les trains
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls;
|
||||
|
||||
type
|
||||
TFormRouteTrain = class(TForm)
|
||||
ComboBoxTrains: TComboBox;
|
||||
ImageTrainR: TImage;
|
||||
ButtonQuitte: TButton;
|
||||
RichEditRoute: TRichEdit;
|
||||
LabelRoute: TLabel;
|
||||
ButtonEfface: TButton;
|
||||
ButtonSupprime: TButton;
|
||||
ButtonRouler1Tr: TButton;
|
||||
ButtonRoulerTsTrains: TButton;
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure ButtonQuitteClick(Sender: TObject);
|
||||
procedure ComboBoxTrainsChange(Sender: TObject);
|
||||
procedure RichEditRouteMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure ButtonEffaceClick(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure ButtonSupprimeClick(Sender: TObject);
|
||||
procedure ButtonRouler1TrClick(Sender: TObject);
|
||||
procedure ButtonRoulerTsTrainsClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
{ Déclarations publiques }
|
||||
end;
|
||||
|
||||
var
|
||||
FormRouteTrain: TFormRouteTrain;
|
||||
|
||||
function aig_canton(idTrain,detect : integer) : integer;
|
||||
function demarre_index_train(indexTrain : integer) : boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses unitprinc,UnitConfig,unitTCO,UnitHorloge,unitFicheHoraire,UnitDebug,UnitRoute;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
// démarre un train si le signal n'est pas au rouge
|
||||
// appelé par gestion des horaires dans le timer ou bouton rouler 1 train ou rouler tous les trains
|
||||
function demarre_index_train(indexTrain : integer) : boolean;
|
||||
var i,n,det1,el2,vitesse,AdrTrain,idcanton,voie1,voie2,indexSig1,indexSig2,AdrSig1,AdrSig2,AdrSig,
|
||||
detect,indexSig : integer;
|
||||
tel2 : tequipement;
|
||||
trouve : boolean;
|
||||
Train,s : string;
|
||||
|
||||
begin
|
||||
formprinc.SBMarcheArretLoco.Visible:=true;
|
||||
//Affiche('demarre_index_Train',clWhite);
|
||||
// si il y a un signal sur le détecteur de démarrage du train est il au rouge?
|
||||
i:=1;
|
||||
AdrTrain:=Trains[indexTrain].adresse;
|
||||
Train:=Trains[indexTrain].nom_train;
|
||||
|
||||
|
||||
detect:=trains[indexTrain].dernierdet;
|
||||
index_signal_det(detect,voie1,indexSig1,voie2,indexSig2);
|
||||
AdrSig1:=0;AdrSig2:=0;
|
||||
if indexSig1<>0 then AdrSig1:=signaux[indexSig1].adresse;
|
||||
if indexSig2<>0 then AdrSig2:=signaux[indexSig2].adresse;
|
||||
|
||||
// si le détecteur sur le train au départ dispose d'un signal
|
||||
if (AdrSig1<>0) or (AdrSig2<>0) then
|
||||
begin
|
||||
// trouver le premier détecteur de la route et son suivant non traité pour trouver le signal dans le bon sens
|
||||
n:=trains[indexTrain].route[0].adresse;
|
||||
i:=1;det1:=0;el2:=0;trouve:=false;
|
||||
with trains[indexTrain] do
|
||||
begin
|
||||
repeat
|
||||
if route[i].typ=det then
|
||||
begin
|
||||
det1:=route[i].adresse;
|
||||
el2:=route[i+1].adresse;tel2:=route[i+1].typ;
|
||||
trouve:=true
|
||||
end;
|
||||
inc(i);
|
||||
until trouve or (i>n);
|
||||
end;
|
||||
|
||||
//trouve le signal dans le bon sens
|
||||
IndexSig:=0;
|
||||
if AdrSig1<>0 then
|
||||
begin
|
||||
if (signaux[indexSig1].Adr_el_suiv1=el2) and (signaux[indexSig1].Btype_suiv1=tel2) then IndexSig:=IndexSig1;
|
||||
end;
|
||||
if adrSig2<>0 then
|
||||
begin
|
||||
if (signaux[indexSig2].Adr_el_suiv1=el2) and (signaux[indexSig2].Btype_suiv1=tel2) then IndexSig:=IndexSig2;
|
||||
end;
|
||||
|
||||
AdrSig:=signaux[indexSig].adresse;
|
||||
if traceliste then Affiche('Le signal dans le bon sens est '+intToSTR(AdrSig)+' '+chaine_signal(AdrSig),clOrange);
|
||||
if signal_rouge(AdrSig) then
|
||||
begin
|
||||
s:='Le train '+train+' est arreté au signal '+intToSTR(signaux[IndexSig].adresse);
|
||||
affiche(s,clyellow);
|
||||
trains[indexTrain].roulage:=1;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
vitesse:=trains[indexTrain].VitNominale;
|
||||
if roulage then
|
||||
begin
|
||||
if trains[indexTrain].inverse then vitesse:=-vitesse;
|
||||
Idcanton:=trains[indexTrain].canton;
|
||||
|
||||
//init_route_canton(idcanton,Indextrain,true);
|
||||
|
||||
end;
|
||||
|
||||
if horloge then
|
||||
begin
|
||||
// trouver le train dans la grille horaire
|
||||
i:=1;
|
||||
trouve:=false;
|
||||
while (i<MaxHoraire) and not(trouve)do
|
||||
begin
|
||||
trouve:=grilleHoraire[i].NomTrain=train;
|
||||
inc(i);
|
||||
end;
|
||||
dec(i);
|
||||
vitesse:=GrilleHoraire[i].vitesse;
|
||||
trains[indexTrain].roulage:=2;
|
||||
vitesse_loco(train,indextrain,adrTrain,vitesse,true);
|
||||
exit;
|
||||
end;
|
||||
|
||||
Maj_Signaux(true); // avec détecteurs
|
||||
|
||||
if not(roulage) then exit;
|
||||
|
||||
s:='Lancement du train '+train;
|
||||
if detect<>0 then s:=s+' depuis détecteur '+intToSTR(Detect);
|
||||
Affiche(s,clYellow);
|
||||
AfficheDebug(s,clyellow);
|
||||
trains[indexTrain].roulage:=2;
|
||||
if traceListe then AfficheDebug(s,clyellow);
|
||||
|
||||
trains[indextrain].TempoDemarre:=trains[indexTrain].TempsDemarreSig;
|
||||
end;
|
||||
|
||||
|
||||
procedure maj_infos(idtrain : integer);
|
||||
var i : integer;
|
||||
s : string;
|
||||
begin
|
||||
formRouteTrain.comboBoxTrains.Clear;
|
||||
|
||||
for i:=1 to NTrains do
|
||||
begin
|
||||
s:=trains[i].nom_train;
|
||||
if trains[i].route[0].adresse<>0 then s:=s+' [route affectée]';
|
||||
formRouteTrain.comboBoxTrains.items.add(s);
|
||||
end;
|
||||
|
||||
formRouteTrain.comboBoxTrains.ItemIndex:=indexTrainFR-1;
|
||||
|
||||
Maj_icone_train(FormRouteTrain.ImageTrainR,idTrain);
|
||||
with formRouteTrain do
|
||||
begin
|
||||
RicheditRoute.Clear;
|
||||
RichEditRoute.Lines.Add(route_to_string(trains[idTrain].route));
|
||||
if trains[idtrain].route[0].adresse<>0 then
|
||||
begin
|
||||
labelroute.caption:='Route affectée au train '+trains[idtrain].nom_train;
|
||||
ButtonRouler1tr.caption:='Rouler le train '+trains[idtrain].nom_train;
|
||||
ButtonRouler1tr.enabled:=true;
|
||||
end
|
||||
else
|
||||
begin
|
||||
labelroute.caption:='Pas de route affectée au train '+trains[idtrain].nom_train;
|
||||
ButtonRouler1tr.caption:=' ';
|
||||
ButtonRouler1tr.enabled:=false;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormRouteTrain.FormActivate(Sender: TObject);
|
||||
begin
|
||||
maj_infos(indexTrainFR);
|
||||
|
||||
if ntrains>0 then Maj_icone_train(FormRouteTrain.ImageTrainR,indexTrainFR);
|
||||
end;
|
||||
|
||||
procedure TFormRouteTrain.ButtonQuitteClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TFormRouteTrain.ComboBoxTrainsChange(Sender: TObject);
|
||||
begin
|
||||
indexTrainFR:=ComboBoxTrains.ItemIndex+1;
|
||||
efface_route_tco;
|
||||
maj_infos(indexTrainFR);
|
||||
end;
|
||||
|
||||
procedure TFormRouteTrain.RichEditRouteMouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
// si le train de la route est en roulage, ne pas afficher la route car
|
||||
// sinon les index des trains passent à 0 dans les cantons par la fonction zone_tco
|
||||
if trains[indexTrainFR].roulage=0 then affiche_route_tco;
|
||||
end;
|
||||
|
||||
procedure TFormRouteTrain.ButtonEffaceClick(Sender: TObject);
|
||||
begin
|
||||
efface_route_tco;
|
||||
end;
|
||||
|
||||
procedure TFormRouteTrain.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
begin
|
||||
efface_route_tco;
|
||||
end;
|
||||
|
||||
procedure TFormRouteTrain.ButtonSupprimeClick(Sender: TObject);
|
||||
var r : integer;
|
||||
begin
|
||||
indexTrainFR:=ComboBoxTrains.ItemIndex+1;
|
||||
if indexTrainFR<1 then exit;
|
||||
if trains[indexTrainfr].route[0].adresse<1 then exit;
|
||||
|
||||
r:=MessageDlg('Voulez-vous supprimer cette route du train '+Trains[indexTrainFR].nom_train+' ?'
|
||||
,mtConfirmation,[mbNo,mbYes],0) ;
|
||||
if r=mrNo then exit;
|
||||
|
||||
efface_route_tco;
|
||||
|
||||
supprime_route_train(indexTrainFR);
|
||||
maj_infos(indexTrainFR);
|
||||
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'au signal suivant. Si oui, sortir.
|
||||
// phase 2 : positionner les aiguillages
|
||||
// phase 3 : réserver les aiguillages
|
||||
function aig_canton(idTrain,detect : integer) : integer;
|
||||
var AdrSig,n,i,ideb,iFin,AdrTrain,etat,pointeur,voie1,voie2,indexSig1,indexSig2,
|
||||
Trainexistant,adr,pos,index,Ncanton,icanton : integer;
|
||||
typ: tequipement;
|
||||
trainTiers,SigBonSens : boolean;
|
||||
s : string;
|
||||
begin
|
||||
//traceliste:=true;
|
||||
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 traceListe 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;
|
||||
|
||||
if (detect=trains[idTrain].route[n].adresse) and (trains[idTrain].route[n].typ=det) then
|
||||
begin
|
||||
// route traitée , arrêter le train
|
||||
trains[idTrain].TempoArretCour:=0;
|
||||
trains[idTrain].TempoArret:=50;
|
||||
end;
|
||||
|
||||
traintiers:=false;
|
||||
icanton:=0;
|
||||
ncanton:=0;
|
||||
TrainExistant:=0;
|
||||
ideb:=i;
|
||||
AdrSig:=0;
|
||||
SigBonSens:=false;
|
||||
if traceliste then Affiche('Aiguillages',clOrange);
|
||||
with trains[idtrain] do
|
||||
begin
|
||||
// boucle de vérification de réservation des aiguillages par un train tiers, 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
|
||||
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 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
|
||||
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 traceListe then Affiche(s,clWhite);
|
||||
if portCommOuvert or parSocketLenz or CDM_connecte then sleep(Tempo_Aig);
|
||||
end;
|
||||
// réservation
|
||||
aiguillage[index].adrTrain:=AdrTrain;
|
||||
end;
|
||||
if typ=det then detecteur[adr].AdrTrainRes:=adrTrain;
|
||||
Texte_aig_fond(adr);
|
||||
end;
|
||||
end;
|
||||
maj_signaux(false);
|
||||
end;
|
||||
|
||||
// bouton rouler 1 train
|
||||
procedure TFormRouteTrain.ButtonRouler1TrClick(Sender: TObject);
|
||||
var demarre : boolean;
|
||||
begin
|
||||
if (indexTrainFR<1) then exit;
|
||||
roulage:=true;
|
||||
efface_route_tco;
|
||||
maj_signaux(true);
|
||||
|
||||
// positionner les aiguillages de la route
|
||||
// si le train est doté d'une route
|
||||
if trains[indexTrainFR].route[0].adresse>0 then
|
||||
begin
|
||||
aig_canton(indexTrainFR,trains[indexTrainFR].route[1].adresse);
|
||||
demarre:=demarre_index_train(indexTrainFR); // met la mémoire de roulage du train à 1
|
||||
end;
|
||||
close;
|
||||
end;
|
||||
|
||||
// bouton rouler tous les trains
|
||||
procedure TFormRouteTrain.ButtonRoulerTsTrainsClick(Sender: TObject);
|
||||
var idtrain : integer;
|
||||
demarre : boolean;
|
||||
begin
|
||||
if (indexTrainFR<1) then exit;
|
||||
roulage:=true;
|
||||
efface_route_tco;
|
||||
maj_signaux(true);
|
||||
maj_signaux(true);
|
||||
|
||||
// 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
|
||||
begin
|
||||
//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
|
||||
end;
|
||||
close;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
+193
-30
@@ -1,8 +1,8 @@
|
||||
object FormTCO: TFormTCO
|
||||
Left = 116
|
||||
Top = 138
|
||||
Width = 1219
|
||||
Height = 612
|
||||
Left = 229
|
||||
Top = 65
|
||||
Width = 1013
|
||||
Height = 607
|
||||
VertScrollBar.Visible = False
|
||||
Caption = 'c'
|
||||
Color = clBtnFace
|
||||
@@ -24,12 +24,12 @@ object FormTCO: TFormTCO
|
||||
OnKeyPress = FormKeyPress
|
||||
OnMouseWheel = FormMouseWheel
|
||||
DesignSize = (
|
||||
1211
|
||||
561)
|
||||
1005
|
||||
556)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelZoom: TLabel
|
||||
Left = 1169
|
||||
Left = 963
|
||||
Top = 0
|
||||
Width = 32
|
||||
Height = 13
|
||||
@@ -43,7 +43,7 @@ object FormTCO: TFormTCO
|
||||
ParentFont = False
|
||||
end
|
||||
object ImageTemp: TImage
|
||||
Left = 1022
|
||||
Left = 816
|
||||
Top = 8
|
||||
Width = 121
|
||||
Height = 121
|
||||
@@ -53,17 +53,169 @@ object FormTCO: TFormTCO
|
||||
ShowHint = True
|
||||
end
|
||||
object ImageTemp2: TImage
|
||||
Left = 894
|
||||
Left = 688
|
||||
Top = 137
|
||||
Width = 248
|
||||
Height = 256
|
||||
Anchors = [akTop, akRight]
|
||||
end
|
||||
object ImageDrapVert: TImage
|
||||
Left = 744
|
||||
Top = 0
|
||||
Width = 64
|
||||
Height = 64
|
||||
Picture.Data = {
|
||||
07544269746D617076080000424D760800000000000076000000280000004000
|
||||
0000400000000100040000000000000800000000000000000000100000000000
|
||||
0000000000000000800000800000008080008000000080008000808000008080
|
||||
8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFF8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF888FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFF00888FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF0078FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFF0078FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFF00078FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFF8888FFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFF00078FFFFFFFFFFFFFFFFFF887778888FFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFF00788FFFFFFFFFFFFFFF887706777788888FFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFF00788FFFFFFFFFFFFFF88AAAAAAA77777788FFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFF00778FFFFFFFFFFFFF87AAAAAAAAAAAAA778FFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFF000788FFFFFFFFFF887AAAAAAAAAAAAAA078FFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFF00778FFFFFFFF8880AAAAAAAAAAAAAAA6778FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFF0077788FFF88887AAAAAAAAAAAAAAAAAA778FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFF00000778887770AAAAAAAAAAAAAAAAAAA078FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF0060777770AAAAAAAAAAAAAAAAAAAAAA078FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF006AAAAAAAAAAAAAAAAAAAAAAAAAAAAA078FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAAAAAAAAAAAAAAAAAA078FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA778FFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA778FFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA078FFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA778FFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA778FFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0788FFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA778FFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA078FFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA778FFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA778FFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA88FFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAAAAAAAAAAAAFFFFF8AAAA88FFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAAAAAAAAAA8FFFFFFFFFF80FFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAAAAAA88FFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAAAAA88FFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAAAAAA78FFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAA08FFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFF000AAAAAAAAAAAAA88FFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAAA88FFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF00AAAAAAAAAAA8FFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF000AAAAAAAA88FFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF00088FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFF08FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFF}
|
||||
end
|
||||
object ImageDrapRouge: TImage
|
||||
Left = 744
|
||||
Top = 72
|
||||
Width = 64
|
||||
Height = 64
|
||||
Picture.Data = {
|
||||
07544269746D617076080000424D760800000000000076000000280000004000
|
||||
0000400000000100040000000000000800000000000000000000100000000000
|
||||
0000000000000000800000800000008080008000000080008000808000008080
|
||||
8000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF
|
||||
FF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFF8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF888FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFF00888FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF0078FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFF0078FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFF00078FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFF00788FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFF00778FFFFFFFFFFFFFFFFFFFF8888FFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFF00078FFFFFFFFFFFFFFFFFF887778888FFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFF00788FFFFFFFFFFFFFFF887706777788888FFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFF00788FFFFFFFFFFFFFF88999999977777788FFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFF00778FFFFFFFFFFFFF879999999999999778FFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFF000788FFFFFFFFFF88799999999999999078FFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFF00778FFFFFFFF88809999999999999996778FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFF0077788FFF88887999999999999999999778FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFF000007788877709999999999999999999078FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF00607777709999999999999999999999078FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF00699999999999999999999999999999078FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF00099999999999999999999999999999078FFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFF000999999999999999999999999999999778FFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFF00999999999999999999999999999999778FFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFF00999999999999999999999999999999078FFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFF000999999999999999999999999999999778FFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFF00999999999999999999999999999999778FFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFF009999999999999999999999999999990788FFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFF000999999999999999999999999999999778FFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFF000999999999999999999999999999999078FFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFF009999999999999999999999999999999778FFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFF000999999999999999999999999999999778FFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFF000999999999999999999999999999999988FFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFF00999999999999999999999FFFFF8999988FFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFF0099999999999999999998FFFFFFFFFF80FFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFF0009999999999999999988FFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFF000999999999999999988FFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFF0099999999999999978FFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFF000999999999999908FFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFF000999999999999988FFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF0099999999999988FFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF00999999999998FFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF0009999999988FFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFF00088FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFF08FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFF}
|
||||
end
|
||||
object ScrollBox: TScrollBox
|
||||
Left = 8
|
||||
Top = 12
|
||||
Width = 691
|
||||
Height = 365
|
||||
Width = 485
|
||||
Height = 360
|
||||
HorzScrollBar.Smooth = True
|
||||
HorzScrollBar.Tracking = True
|
||||
VertScrollBar.Smooth = True
|
||||
@@ -74,13 +226,14 @@ object FormTCO: TFormTCO
|
||||
ParentColor = False
|
||||
TabOrder = 1
|
||||
DesignSize = (
|
||||
687
|
||||
361)
|
||||
481
|
||||
356)
|
||||
object ImageTCO: TImage
|
||||
Left = 120
|
||||
Top = 41
|
||||
Width = 490
|
||||
Height = 275
|
||||
Width = 284
|
||||
Height = 270
|
||||
Hint = 'Hint'
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
AutoSize = True
|
||||
ParentShowHint = False
|
||||
@@ -95,7 +248,7 @@ object FormTCO: TFormTCO
|
||||
end
|
||||
end
|
||||
object TrackBarZoom: TTrackBar
|
||||
Left = 1167
|
||||
Left = 961
|
||||
Top = 15
|
||||
Width = 41
|
||||
Height = 311
|
||||
@@ -113,8 +266,8 @@ object FormTCO: TFormTCO
|
||||
end
|
||||
object PanelBas: TPanel
|
||||
Left = 0
|
||||
Top = 413
|
||||
Width = 1203
|
||||
Top = 408
|
||||
Width = 997
|
||||
Height = 140
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
Color = clActiveBorder
|
||||
@@ -127,7 +280,7 @@ object FormTCO: TFormTCO
|
||||
TabOrder = 2
|
||||
OnDragOver = PanelBasDragOver
|
||||
DesignSize = (
|
||||
1203
|
||||
997
|
||||
140)
|
||||
object Label1: TLabel
|
||||
Left = 240
|
||||
@@ -935,7 +1088,7 @@ object FormTCO: TFormTCO
|
||||
ParentFont = False
|
||||
end
|
||||
object ButtonSauveTCO: TButton
|
||||
Left = 1094
|
||||
Left = 888
|
||||
Top = 8
|
||||
Width = 96
|
||||
Height = 33
|
||||
@@ -947,7 +1100,7 @@ object FormTCO: TFormTCO
|
||||
OnClick = ButtonSauveTCOClick
|
||||
end
|
||||
object ButtonConfigTCO: TButton
|
||||
Left = 1094
|
||||
Left = 888
|
||||
Top = 48
|
||||
Width = 96
|
||||
Height = 33
|
||||
@@ -958,7 +1111,7 @@ object FormTCO: TFormTCO
|
||||
OnClick = ButtonConfigTCOClick
|
||||
end
|
||||
object ButtonSimu: TButton
|
||||
Left = 882
|
||||
Left = 676
|
||||
Top = 80
|
||||
Width = 113
|
||||
Height = 25
|
||||
@@ -1050,6 +1203,7 @@ object FormTCO: TFormTCO
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
OnChange = EditAdrElementChange
|
||||
OnClick = EditAdrElementClick
|
||||
@@ -1151,7 +1305,7 @@ object FormTCO: TFormTCO
|
||||
end
|
||||
end
|
||||
object buttonRaz: TButton
|
||||
Left = 1095
|
||||
Left = 889
|
||||
Top = 88
|
||||
Width = 97
|
||||
Height = 33
|
||||
@@ -1163,7 +1317,7 @@ object FormTCO: TFormTCO
|
||||
OnClick = buttonRazClick
|
||||
end
|
||||
object ButtonCalibrage: TButton
|
||||
Left = 922
|
||||
Left = 716
|
||||
Top = 56
|
||||
Width = 75
|
||||
Height = 25
|
||||
@@ -1174,7 +1328,7 @@ object FormTCO: TFormTCO
|
||||
OnClick = ButtonCalibrageClick
|
||||
end
|
||||
object ButtonDessiner: TButton
|
||||
Left = 991
|
||||
Left = 785
|
||||
Top = 48
|
||||
Width = 97
|
||||
Height = 33
|
||||
@@ -1190,7 +1344,7 @@ object FormTCO: TFormTCO
|
||||
OnClick = ButtonDessinerClick
|
||||
end
|
||||
object ButtonAffSC: TButton
|
||||
Left = 991
|
||||
Left = 785
|
||||
Top = 8
|
||||
Width = 97
|
||||
Height = 33
|
||||
@@ -1202,7 +1356,7 @@ object FormTCO: TFormTCO
|
||||
OnClick = ButtonAffSCClick
|
||||
end
|
||||
object RadioGroupSel: TRadioGroup
|
||||
Left = 843
|
||||
Left = 637
|
||||
Top = 8
|
||||
Width = 138
|
||||
Height = 49
|
||||
@@ -1221,12 +1375,14 @@ object FormTCO: TFormTCO
|
||||
OnClick = RadioGroupSelClick
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 1032
|
||||
Top = 96
|
||||
Left = 800
|
||||
Top = 88
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = 'Button1'
|
||||
TabOrder = 9
|
||||
Visible = False
|
||||
OnClick = Button1Click
|
||||
end
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
@@ -1399,7 +1555,7 @@ object FormTCO: TFormTCO
|
||||
Caption = 'Masquer bandeau'
|
||||
OnClick = BandeauClick
|
||||
end
|
||||
object Affichage1: TMenuItem
|
||||
object Affichage: TMenuItem
|
||||
Caption = 'Affichage'
|
||||
object Mosaquehorizontale1: TMenuItem
|
||||
Caption = 'Mosa'#239'que horizontale'
|
||||
@@ -1417,5 +1573,12 @@ object FormTCO: TFormTCO
|
||||
OnClick = AfficherSignauxComplexes1Click
|
||||
end
|
||||
end
|
||||
object Routes: TMenuItem
|
||||
Caption = 'Routes'
|
||||
object AffRoutes: TMenuItem
|
||||
Caption = 'Fen'#234'tre des routes'
|
||||
OnClick = AffRoutesClick
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
+1099
-412
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -1,6 +1,6 @@
|
||||
object FormAig: TFormAig
|
||||
Left = 630
|
||||
Top = 144
|
||||
Left = 496
|
||||
Top = 217
|
||||
Width = 363
|
||||
Height = 204
|
||||
Caption = 'Pilotage de l'#39'aiguillage'
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ begin
|
||||
buttonDev2.Visible:=false;
|
||||
buttonDroit2.Visible:=false;
|
||||
LabelAdr2.Visible:=false;
|
||||
exit;
|
||||
if diffusion then exit;
|
||||
end;
|
||||
|
||||
aigC:=(aiguillage[i].modele=aig);
|
||||
|
||||
-122
@@ -1,122 +0,0 @@
|
||||
object FormRoulage: TFormRoulage
|
||||
Left = 368
|
||||
Top = 142
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Roulage des trains'
|
||||
ClientHeight = 275
|
||||
ClientWidth = 307
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
KeyPreview = True
|
||||
OldCreateOrder = False
|
||||
Position = poMainFormCenter
|
||||
OnActivate = FormActivate
|
||||
OnCreate = FormCreate
|
||||
OnKeyPress = FormKeyPress
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object Label1: TLabel
|
||||
Left = 96
|
||||
Top = 8
|
||||
Width = 116
|
||||
Height = 20
|
||||
Caption = 'Roulage des trains'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = 'Arial Narrow'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object LabelTexte: TLabel
|
||||
Left = 17
|
||||
Top = 32
|
||||
Width = 120
|
||||
Height = 13
|
||||
Caption = '. '
|
||||
end
|
||||
object ButtonInitAig: TButton
|
||||
Left = 16
|
||||
Top = 56
|
||||
Width = 273
|
||||
Height = 25
|
||||
Caption = 'Positionner les aiguillages en position initiale'
|
||||
TabOrder = 0
|
||||
OnClick = ButtonInitAigClick
|
||||
end
|
||||
object ButtonSauve: TButton
|
||||
Left = 16
|
||||
Top = 184
|
||||
Width = 273
|
||||
Height = 25
|
||||
Hint =
|
||||
'Enregistre la configuration de placement dans le fichier de conf' +
|
||||
'iguration'
|
||||
Caption = 'Enregistrer la configuration de placement'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
OnClick = ButtonSauveClick
|
||||
end
|
||||
object ButtonLanceRoutage: TButton
|
||||
Left = 16
|
||||
Top = 88
|
||||
Width = 273
|
||||
Height = 25
|
||||
Caption = 'Lancer le roulage'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clInfoText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
OnClick = ButtonLanceRoutageClick
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 216
|
||||
Top = 240
|
||||
Width = 81
|
||||
Height = 25
|
||||
Caption = 'Config trains'
|
||||
TabOrder = 3
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object ButtonArretroutage: TButton
|
||||
Left = 16
|
||||
Top = 152
|
||||
Width = 273
|
||||
Height = 25
|
||||
Hint = 'Arr'#234't des trains et lib'#232're les r'#233'servations'
|
||||
Caption = 'Arr'#234't du roulage'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 4
|
||||
OnClick = ButtonArretroutageClick
|
||||
end
|
||||
object BitBtn1: TBitBtn
|
||||
Left = 8
|
||||
Top = 240
|
||||
Width = 73
|
||||
Height = 25
|
||||
TabOrder = 5
|
||||
OnClick = BitBtn1Click
|
||||
Kind = bkClose
|
||||
end
|
||||
object ButtonArretTrains: TButton
|
||||
Left = 16
|
||||
Top = 120
|
||||
Width = 273
|
||||
Height = 25
|
||||
Hint = 'Arr'#234'te tous les trains'
|
||||
Caption = 'Arr'#234't des trains'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 6
|
||||
OnClick = ButtonArretTrainsClick
|
||||
end
|
||||
end
|
||||
-299
@@ -1,299 +0,0 @@
|
||||
unit Unitplace;
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, unitprinc, unitpilote , unitDebug, Buttons, ExtCtrls;
|
||||
|
||||
type
|
||||
TFormRoulage = class(TForm)
|
||||
Label1: TLabel;
|
||||
ButtonInitAig: TButton;
|
||||
ButtonSauve: TButton;
|
||||
LabelTexte: TLabel;
|
||||
ButtonLanceRoutage: TButton;
|
||||
Button1: TButton;
|
||||
ButtonArretroutage: TButton;
|
||||
BitBtn1: TBitBtn;
|
||||
ButtonArretTrains: TButton;
|
||||
procedure ButtonInitAigClick(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure ButtonSauveClick(Sender: TObject);
|
||||
procedure FormKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ButtonLanceRoutageClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure BitBtn1Click(Sender: TObject);
|
||||
procedure ButtonArretTrainsClick(Sender: TObject);
|
||||
procedure ButtonArretroutageClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
{ Déclarations publiques }
|
||||
end;
|
||||
|
||||
var
|
||||
FormRoulage: TFormRoulage;
|
||||
|
||||
procedure couleurs_place;
|
||||
function demarre_index_train(indexTrain : integer) : boolean;
|
||||
procedure init_route(indexeventdet,prec,detect,indextrain : integer);
|
||||
procedure raz_route(indexeventdet,prec,detect,indextrain : integer);
|
||||
|
||||
implementation
|
||||
|
||||
uses UnitConfig, UnitTCO , UnitHorloge, unitFicheHoraire, Selection_Train;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
||||
procedure raz_route(indexeventdet,prec,detect,indextrain : integer);
|
||||
begin
|
||||
if indexeventdet>N_trains then exit;
|
||||
Affiche('RAZ route',clyellow);
|
||||
detecteur[detect].etat:=false;
|
||||
detecteur[detect].AdrTrain:=0;
|
||||
detecteur[detect].train:='';
|
||||
detecteur[detect].IndexTrain:=0;
|
||||
|
||||
// dévalider zone
|
||||
MemZone[prec,detect].etat:=false;
|
||||
MemZone[prec,detect].train:='';
|
||||
MemZone[prec,detect].Adrtrain:=0;
|
||||
MemZone[prec,detect].IndexTrain:=0;
|
||||
//Affiche(inttostr(prec)+' '+intToSTR(detect),clorange);
|
||||
|
||||
// raz 1er élément du tableau
|
||||
event_det_train[indexeventdet].NbEl:=0 ;
|
||||
event_det_train[indexeventdet].AdrTrain:=0;
|
||||
event_det_train[indexeventdet].det[1].adresse:=0;
|
||||
event_det_train[indexeventdet].det[1].etat:=false;
|
||||
event_det_train[indexeventdet].nom_train:='';
|
||||
|
||||
// il faudrait supprimer et décaler indexeventdet
|
||||
|
||||
detecteur[detect].AdrTrain:=0;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
// monte le détecteur detect, affecte son train, valide la zone
|
||||
// remplit le tableau event_det_train
|
||||
procedure init_route(indexeventdet,prec,detect,indextrain : integer);
|
||||
begin
|
||||
if indexeventdet>N_trains then exit;
|
||||
|
||||
detecteur[detect].etat:=true;
|
||||
detecteur[detect].AdrTrain:=trains[indextrain].adresse;
|
||||
detecteur[detect].train:=trains[indextrain].nom_train;
|
||||
detecteur[detect].IndexTrain:=indextrain;
|
||||
|
||||
// valider zone précédente
|
||||
MemZone[prec,detect].etat:=true;
|
||||
MemZone[prec,detect].train:=trains[indextrain].Nom_train;
|
||||
MemZone[prec,detect].Adrtrain:=trains[indextrain].adresse;
|
||||
MemZone[prec,detect].IndexTrain:=indextrain;
|
||||
//Affiche(inttostr(prec)+' '+intToSTR(detect),clorange);
|
||||
|
||||
// remplir 1er élément du tableau
|
||||
event_det_train[indexeventdet].NbEl:=1 ;
|
||||
event_det_train[indexeventdet].AdrTrain:=trains[indextrain].adresse;
|
||||
event_det_train[indexeventdet].det[1].adresse:=prec;
|
||||
event_det_train[indexeventdet].det[1].etat:=false;
|
||||
event_det_train[indexeventdet].nom_train:=trains[indextrain].nom_train;
|
||||
|
||||
Event_Detecteur(detect,true,trains[indexTrain].nom_train);
|
||||
detecteur[detect].AdrTrain:=trains[indexTrain].adresse;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormRoulage.ButtonInitAigClick(Sender: TObject);
|
||||
begin
|
||||
if cdm_connecte then
|
||||
begin
|
||||
Affiche('Placement des trains incompatible en mode CDM rail',clOrange);
|
||||
exit;
|
||||
end;
|
||||
ButtonLanceRoutage.Enabled:=false;
|
||||
init_aiguillages;
|
||||
ButtonLanceRoutage.Enabled:=true;
|
||||
end;
|
||||
|
||||
procedure TFormRoulage.FormActivate(Sender: TObject);
|
||||
begin
|
||||
if affevt then affiche('FormPlace activate',clLime);
|
||||
defocusControl(ButtonInitAig,false);
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormRoulage.Button1Click(Sender: TObject);
|
||||
begin
|
||||
formconfig.PageControl.ActivePage:=formconfig.TabSheetTrains;
|
||||
formconfig.showmodal;
|
||||
formconfig.Close;
|
||||
end;
|
||||
|
||||
procedure TFormRoulage.ButtonSauveClick(Sender: TObject);
|
||||
begin
|
||||
sauve_config;
|
||||
end;
|
||||
|
||||
procedure TFormRoulage.FormKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
if key=chr(27) then close;
|
||||
end;
|
||||
|
||||
// démarre un train si le signal n'est pas au rouge
|
||||
function demarre_index_train(indexTrain : integer) : boolean;
|
||||
var det,vitesse,AdrTrain,i,adrSignal,id,a,idcanton,sens : integer;
|
||||
trouve,rouge : boolean;
|
||||
Train,s : string;
|
||||
|
||||
begin
|
||||
// si il y a un signal sur le détecteur de démarrage du train est il au rouge?
|
||||
i:=1;
|
||||
AdrTrain:=Trains[indexTrain].adresse;
|
||||
Train:=Trains[indexTrain].nom_train;
|
||||
det:=0;
|
||||
|
||||
vitesse:=trains[indexTrain].VitNominale;
|
||||
if roulage then
|
||||
begin
|
||||
if trains[indexTrain].inverse then vitesse:=-vitesse;
|
||||
Idcanton:=trains[indexTrain].canton;
|
||||
{if idcanton>0 then
|
||||
begin
|
||||
sens:=canton[idcanton].Sens;
|
||||
if (sens=sensdroit) or (sens=senshaut) then det:=canton[idcanton].el2;
|
||||
if (sens=sensGauche) or (sens=sensbas) then det:=canton[idcanton].el1;
|
||||
end;}
|
||||
|
||||
init_route_canton(idcanton,Indextrain,true);
|
||||
end;
|
||||
|
||||
if horloge then
|
||||
begin
|
||||
// trouver le train dans la grille horaire
|
||||
i:=1;
|
||||
trouve:=false;
|
||||
while (i<MaxHoraire) and not(trouve)do
|
||||
begin
|
||||
trouve:=grilleHoraire[i].NomTrain=train;
|
||||
inc(i);
|
||||
end;
|
||||
dec(i);
|
||||
vitesse:=GrilleHoraire[i].vitesse;
|
||||
vitesse_loco(train,indextrain,adrTrain,vitesse,true);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
// vitesse_loco('',adrTrain,j,trains[j].VitNominale,not(placement[j].inverse),true);
|
||||
vitesse_loco('',indextrain,adrTrain,vitesse,true);
|
||||
Maj_Signaux(true); // avec détecteurs
|
||||
s:='Lancement du train '+train;
|
||||
if det<>0 then s:=s+' depuis détecteur '+intToSTR(Det);
|
||||
Affiche(s,clYellow);
|
||||
if traceListe then AfficheDebug(s,clyellow);
|
||||
|
||||
|
||||
//if roulage then reserve_canton(Det,suivant,adrtrain,0,nCantonsRes);
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormRoulage.ButtonLanceRoutageClick(Sender: TObject);
|
||||
var i,j,adrDet,AdrTrain : integer;
|
||||
trouve,demarre : boolean;
|
||||
begin
|
||||
if cdm_connecte then
|
||||
begin
|
||||
Affiche('Le placement des trains incompatible en mode CDM rail',clOrange);
|
||||
exit;
|
||||
end;
|
||||
|
||||
trouve:=false;
|
||||
|
||||
for i:=1 to ncantons do
|
||||
begin
|
||||
adrTrain:=canton[i].adresseTrain;
|
||||
if adrTrain<>0 then
|
||||
begin
|
||||
trouve:=true;
|
||||
roulage:=true;
|
||||
j:=index_train_adresse(AdrTrain);
|
||||
demarre:=demarre_index_train(j);
|
||||
|
||||
end;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
|
||||
// au moins un train démarre
|
||||
if trouve then
|
||||
begin
|
||||
Maj_Signaux(true);
|
||||
Formprinc.LabelTitre.caption:=titre+' - Mode roulage en cours';
|
||||
with Formprinc.SBMarcheArretLoco do
|
||||
begin
|
||||
Visible:=true;
|
||||
end;
|
||||
end;
|
||||
if not(trouve) then Affiche('Pas de train placé sur les cantons du TCO',clOrange);
|
||||
end;
|
||||
|
||||
procedure TFormRoulage.ButtonArretTrainsClick(Sender: TObject);
|
||||
var i : integer;
|
||||
begin
|
||||
roulage:=false;
|
||||
avecRESA:=formConfig.CheckBoxRESA.Checked;
|
||||
Affiche('Arrêt du roulage de tous les trains',clorange);
|
||||
Formprinc.LabelTitre.caption:=titre+' ';
|
||||
for i:=1 to ntrains do
|
||||
vitesse_loco('',i,trains[i].adresse,0,true);
|
||||
end;
|
||||
|
||||
procedure couleurs_place;
|
||||
var i : integer;
|
||||
c : tComponent;
|
||||
begin
|
||||
if sombre then with formRoulage do
|
||||
begin
|
||||
color:=couleurFond;
|
||||
for i:=0 to ComponentCount-1 do
|
||||
begin
|
||||
c:=Components[i];
|
||||
composant(c,couleurFond,couleurTexte);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormRoulage.FormCreate(Sender: TObject);
|
||||
begin
|
||||
if affevt then affiche('FormPlace Create',clLime);
|
||||
if debug=1 then Affiche('Début création fenetre Place',clLime);
|
||||
position:=poMainFormCenter;
|
||||
PlaceAffiche:=true;
|
||||
couleurs_place;
|
||||
if debug=1 then Affiche('Fin création fenetre Place',clLime);
|
||||
end;
|
||||
|
||||
procedure TFormRoulage.BitBtn1Click(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TFormRoulage.ButtonArretroutageClick(Sender: TObject);
|
||||
var i : integer;
|
||||
begin
|
||||
roulage:=false;
|
||||
Affiche('Arrêt du roulage de tous les trains et libération des aiguillages',clorange);
|
||||
Formprinc.LabelTitre.caption:=titre+' ';
|
||||
for i:=1 to ntrains do
|
||||
vitesse_loco('',i,trains[i].adresse,0,true);
|
||||
raz_tout;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
+32
-20
@@ -5,7 +5,7 @@ object FormSelTrain: TFormSelTrain
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'S'#233'lection train'
|
||||
ClientHeight = 311
|
||||
ClientWidth = 745
|
||||
ClientWidth = 768
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@@ -16,13 +16,13 @@ object FormSelTrain: TFormSelTrain
|
||||
OnActivate = FormActivate
|
||||
OnCreate = FormCreate
|
||||
DesignSize = (
|
||||
745
|
||||
768
|
||||
311)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelInfo: TLabel
|
||||
Left = 176
|
||||
Top = 280
|
||||
Left = 104
|
||||
Top = 288
|
||||
Width = 44
|
||||
Height = 13
|
||||
Caption = 'LabelInfo'
|
||||
@@ -35,10 +35,10 @@ object FormSelTrain: TFormSelTrain
|
||||
Caption = 'Canton'
|
||||
end
|
||||
object ImageBas: TImage
|
||||
Left = 488
|
||||
Left = 472
|
||||
Top = 8
|
||||
Width = 41
|
||||
Height = 41
|
||||
Width = 57
|
||||
Height = 57
|
||||
Picture.Data = {
|
||||
07544269746D6170F6070000424DF60700000000000076000000280000003C00
|
||||
00003C0000000100040000000000800700000000000000000000100000000000
|
||||
@@ -329,7 +329,7 @@ object FormSelTrain: TFormSelTrain
|
||||
Height = 13
|
||||
end
|
||||
object ButtonOK: TButton
|
||||
Left = 74
|
||||
Left = 9
|
||||
Top = 280
|
||||
Width = 75
|
||||
Height = 24
|
||||
@@ -338,26 +338,38 @@ object FormSelTrain: TFormSelTrain
|
||||
TabOrder = 0
|
||||
OnClick = ButtonOKClick
|
||||
end
|
||||
object ComboBoxCanton: TComboBox
|
||||
Left = 64
|
||||
Top = 8
|
||||
Width = 185
|
||||
Height = 21
|
||||
ItemHeight = 13
|
||||
TabOrder = 1
|
||||
OnChange = ComboBoxCantonChange
|
||||
end
|
||||
object StringGridTrains: TStringGrid
|
||||
Left = 8
|
||||
Top = 40
|
||||
Width = 721
|
||||
Height = 225
|
||||
Top = 64
|
||||
Width = 753
|
||||
Height = 209
|
||||
ColCount = 6
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goAlwaysShowEditor]
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 1
|
||||
TabOrder = 2
|
||||
OnDrawCell = StringGridTrainsDrawCell
|
||||
OnKeyDown = StringGridTrainsKeyDown
|
||||
OnSelectCell = StringGridTrainsSelectCell
|
||||
end
|
||||
object ComboBoxCanton: TComboBox
|
||||
Left = 64
|
||||
Top = 8
|
||||
Width = 169
|
||||
Height = 21
|
||||
ItemHeight = 13
|
||||
TabOrder = 2
|
||||
OnChange = ComboBoxCantonChange
|
||||
object ButtonSauve: TButton
|
||||
Left = 624
|
||||
Top = 280
|
||||
Width = 129
|
||||
Height = 25
|
||||
Hint = 'Sauvegarde le placement des trains dans les cantons'
|
||||
Caption = 'Sauvegarder'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 3
|
||||
OnClick = ButtonSauveClick
|
||||
end
|
||||
end
|
||||
+244
-349
@@ -4,12 +4,11 @@ interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, Grids, ExtCtrls;
|
||||
Dialogs, StdCtrls, Grids, ExtCtrls, UnitPrinc;
|
||||
|
||||
type
|
||||
TFormSelTrain = class(TForm)
|
||||
ButtonOK: TButton;
|
||||
StringGridTrains: TStringGrid;
|
||||
LabelInfo: TLabel;
|
||||
ComboBoxCanton: TComboBox;
|
||||
Label1: TLabel;
|
||||
@@ -18,6 +17,8 @@ type
|
||||
Imagegauche: TImage;
|
||||
ImageDroite: TImage;
|
||||
LabelCanton: TLabel;
|
||||
StringGridTrains: TStringGrid;
|
||||
ButtonSauve: TButton;
|
||||
procedure ButtonOKClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure StringGridTrainsDrawCell(Sender: TObject; ACol,
|
||||
@@ -28,6 +29,7 @@ type
|
||||
procedure StringGridTrainsKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure ComboBoxCantonChange(Sender: TObject);
|
||||
procedure ButtonSauveClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
@@ -37,22 +39,25 @@ type
|
||||
var
|
||||
FormSelTrain: TFormSelTrain;
|
||||
x,y,El,largC,hautC,indexTrainClic : Integer;
|
||||
routeSav : TuneRoute;
|
||||
|
||||
procedure actualise_seltrains;
|
||||
procedure affecte_Train_canton(AdrTrain,idcanton : integer);
|
||||
procedure raz_trains_Idcanton(idc : integer);
|
||||
procedure raz_cantons_train(AdrTrain : integer);
|
||||
procedure init_route_canton(idcanton,IdTrain : integer;init : boolean);
|
||||
procedure trouve_det_canton(idcanton : integer;var el1,el2 : integer);
|
||||
function trouve_det_suiv_canton(idcanton,detecteur,sensTCO : integer) : integer;
|
||||
|
||||
implementation
|
||||
|
||||
uses UnitPrinc,UnitConfigCellTCO,UnitTCO,UnitPlace,unitconfig,unitDebug;
|
||||
uses UnitConfigCellTCO,UnitTCO,unitconfig,unitDebug, UnitRouteTrains,
|
||||
UnitInfo;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
// supprime une entrée du tableau event_det_train contenant l'adresse du train
|
||||
procedure supprime_route(adresse : integer);
|
||||
var index,i,j : integer;
|
||||
var i,j : integer;
|
||||
trouve : boolean;
|
||||
begin
|
||||
i:=1;
|
||||
@@ -69,273 +74,51 @@ begin
|
||||
begin
|
||||
event_det_train[j]:=event_det_train[j+1];
|
||||
end;
|
||||
dec(n_trains);
|
||||
dec(n_trains); // nombre de trains en circulation
|
||||
end;
|
||||
end;
|
||||
|
||||
// initialise (init=true) ou raze (init=false) la route d'un train qui a été affectée au canton
|
||||
procedure init_route_canton(idcanton,IdTrain : integer;init : boolean);
|
||||
var horz : boolean;
|
||||
el1,el2,suiv,prec,sens,t : integer;
|
||||
// trouve les détecteurs contigus au canton en fonction des aiguillages positionnés
|
||||
procedure trouve_det_canton(idcanton : integer;var el1,el2 : integer);
|
||||
var suiv,prec :integer;
|
||||
tel1,tel2 : tequipement;
|
||||
s : string;
|
||||
begin
|
||||
//Affiche('Init_route_canton '+intToSTR(idcanton)+' '+inttoSTR(idtrain),clYellow);
|
||||
renseigne_canton(idcanton);
|
||||
sens:=canton[IdCanton].Sens; // direction du train sur le canton
|
||||
horz:=canton[idcanton].horizontal;
|
||||
if horz then
|
||||
el1:=canton[idCanton].el1; // gauche
|
||||
tel1:=canton[idCanton].typ1;
|
||||
el2:=canton[idCanton].el2; // droit
|
||||
tel2:=canton[idCanton].typ2;
|
||||
// si le suivant n'est pas un détecteur, le trouver
|
||||
if (tel2<>det) and (tel2<>buttoir) then
|
||||
begin
|
||||
if sens=SensDroit then //-------------------------------
|
||||
begin
|
||||
el1:=canton[idCanton].el1; // gauche
|
||||
tel1:=canton[idCanton].typ1;
|
||||
el2:=canton[idCanton].el2; // droit
|
||||
tel2:=canton[idCanton].typ2;
|
||||
// si le suivant n'est pas un détecteur, le trouver
|
||||
if (tel2<>det) and (tel1<>buttoir) then
|
||||
begin
|
||||
suiv:=detecteur_suivant_El(el1,tel1,el2,tel2,1); // arrêt sur suivant
|
||||
el2:=suiv;
|
||||
end;
|
||||
// si le précédent n'est pas un détecteur, le trouver
|
||||
if (tel1<>det) and (tel1<>buttoir) then
|
||||
begin
|
||||
prec:=detecteur_suivant_El(el2,tel2,el1,tel1,1); // arrêt sur suivant
|
||||
el2:=prec;
|
||||
end;
|
||||
if init then
|
||||
begin
|
||||
//Affiche('nouvelle route vers droit',clYellow);
|
||||
inc(n_trains);
|
||||
s:=trains[idtrain].nom_train;
|
||||
event_det_train[n_trains].NbEl:=1 ;
|
||||
event_det_train[n_trains].AdrTrain:=trains[idtrain].adresse;
|
||||
event_det_train[n_trains].det[1].adresse:=el2;
|
||||
event_det_train[n_trains].det[1].etat:=false;
|
||||
event_det_train[n_trains].nom_train:=s;
|
||||
event_det_train[n_trains].NbEl:=1;
|
||||
|
||||
MemZone[el1,el2].etat:=true;
|
||||
MemZone[el1,el2].train:=s;
|
||||
MemZone[el1,el2].AdrTrain:=trains[idtrain].adresse;
|
||||
maj_signaux(true);
|
||||
|
||||
Affiche_Evt('1-0. Tampon train @'+intToStr(trains[idtrain].adresse)+' '+event_det_train[n_trains].nom_train+'--------',clWhite);
|
||||
Affiche_Evt(intToSTR(event_det_train[n_trains].det[1].adresse),clwhite);
|
||||
|
||||
// réserver le canton
|
||||
if roulage then
|
||||
begin
|
||||
t:=canton[idcanton].ntco;
|
||||
zone_tco(t,el2,6,0,0,12); // élément contigu à droite (6) du canton
|
||||
reserve_canton(el2,xcanton,trains[idtrain].adresse,0,nCantonsRes);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
// supprimer les 2 sens
|
||||
MemZone[el1,el2].etat:=false;
|
||||
MemZone[el1,el2].train:='';
|
||||
MemZone[el1,el2].AdrTrain:=0;
|
||||
MemZone[el2,el1].etat:=false;
|
||||
MemZone[el2,el1].train:='';
|
||||
MemZone[el2,el1].AdrTrain:=0;
|
||||
|
||||
maj_signaux(true);
|
||||
supprime_route(trains[idTrain].adresse);
|
||||
end;
|
||||
end;
|
||||
if Sens=SensGauche then //-------------------------------
|
||||
begin
|
||||
el2:=canton[idCanton].el1; // gauche dans el2
|
||||
tel2:=canton[idCanton].typ1;
|
||||
el1:=canton[idCanton].el2; // droit dans el1
|
||||
tel1:=canton[idCanton].typ2;
|
||||
// si le suivant n'est pas un détecteur, le trouver
|
||||
if (tel1<>det) and (tel1<>buttoir) then
|
||||
begin
|
||||
suiv:=detecteur_suivant_El(el1,tel1,el2,tel2,1); // arrêt sur suivant
|
||||
el2:=suiv;
|
||||
end;
|
||||
// si le précédent n'est pas un détecteur, le trouver
|
||||
if (tel2<>det) and (tel1<>buttoir) then
|
||||
begin
|
||||
prec:=detecteur_suivant_El(el2,tel2,el1,tel1,1); // arrêt sur suivant
|
||||
el2:=prec;
|
||||
end;
|
||||
if init then
|
||||
begin
|
||||
//Affiche('nouvelle route vers gauche',clYellow);
|
||||
inc(n_trains);
|
||||
//init_route(n_trains,el2,el1,idtrain);
|
||||
s:=trains[idtrain].nom_train;
|
||||
event_det_train[n_trains].NbEl:=1 ;
|
||||
event_det_train[n_trains].AdrTrain:=trains[idtrain].adresse;
|
||||
event_det_train[n_trains].det[1].adresse:=el2;
|
||||
event_det_train[n_trains].det[1].etat:=false;
|
||||
event_det_train[n_trains].nom_train:=s;
|
||||
event_det_train[n_trains].NbEl:=1;
|
||||
|
||||
MemZone[el1,el2].etat:=true;
|
||||
MemZone[el1,el2].train:=s;
|
||||
MemZone[el1,el2].AdrTrain:=trains[idtrain].adresse;
|
||||
maj_signaux(true);
|
||||
|
||||
// réserver le canton
|
||||
if roulage then
|
||||
begin
|
||||
t:=canton[idcanton].ntco;
|
||||
zone_tco(t,el2,5,0,0,12); // élément contigu à gauche (5) du canton
|
||||
reserve_canton(el2,xcanton,trains[idtrain].adresse,0,nCantonsRes);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
// supprimer les 2 sens
|
||||
MemZone[el2,el1].etat:=false;
|
||||
MemZone[el2,el1].train:='';
|
||||
MemZone[el2,el1].AdrTrain:=0;
|
||||
|
||||
MemZone[el1,el2].etat:=false;
|
||||
MemZone[el1,el2].train:='';
|
||||
MemZone[el1,el2].AdrTrain:=0;
|
||||
maj_signaux(true);
|
||||
supprime_route(trains[idTrain].adresse);
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
// canton vertical
|
||||
begin
|
||||
if Sens=SensBas then
|
||||
begin
|
||||
el1:=canton[idCanton].el1; // haut
|
||||
tel1:=canton[idCanton].typ1;
|
||||
el2:=canton[idCanton].el2; // bas
|
||||
tel2:=canton[idCanton].typ2;
|
||||
// si le suivant n'est pas un détecteur, le trouver
|
||||
if (tel2<>det) and (tel1<>buttoir) then
|
||||
begin
|
||||
suiv:=detecteur_suivant_El(el1,tel1,el2,tel2,1); // arrêt sur suivant
|
||||
el2:=suiv;
|
||||
end;
|
||||
// si le précédent n'est pas un détecteur, le trouver
|
||||
if (tel1<>det) and (tel1<>buttoir) then
|
||||
begin
|
||||
prec:=detecteur_suivant_El(el2,tel2,el1,tel1,1); // arrêt sur suivant
|
||||
el2:=prec;
|
||||
end;
|
||||
if init then
|
||||
begin
|
||||
//Affiche('nouvelle route vers bas',clYellow);
|
||||
inc(n_trains);
|
||||
s:=trains[idtrain].nom_train;
|
||||
event_det_train[n_trains].NbEl:=1 ;
|
||||
event_det_train[n_trains].AdrTrain:=trains[idtrain].adresse;
|
||||
event_det_train[n_trains].det[1].adresse:=el2;
|
||||
event_det_train[n_trains].det[1].etat:=false;
|
||||
event_det_train[n_trains].nom_train:=s;
|
||||
event_det_train[n_trains].NbEl:=1;
|
||||
|
||||
MemZone[el1,el2].etat:=true;
|
||||
MemZone[el1,el2].train:=s;
|
||||
MemZone[el1,el2].AdrTrain:=trains[idtrain].adresse;
|
||||
maj_signaux(true);
|
||||
|
||||
// réserver le canton
|
||||
if roulage then
|
||||
begin
|
||||
t:=canton[idcanton].ntco;
|
||||
zone_tco(t,el2,8,0,0,12); // élément contigu en bas (8) du canton
|
||||
reserve_canton(el2,xcanton,trains[idtrain].adresse,0,nCantonsRes);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
// supprimer les 2 sens
|
||||
MemZone[el1,el2].etat:=false;
|
||||
MemZone[el1,el2].train:='';
|
||||
MemZone[el1,el2].AdrTrain:=0;
|
||||
|
||||
MemZone[el2,el1].etat:=false;
|
||||
MemZone[el2,el1].train:='';
|
||||
MemZone[el2,el1].AdrTrain:=0;
|
||||
maj_signaux(true);
|
||||
supprime_route(trains[idTrain].adresse);
|
||||
end;
|
||||
end;
|
||||
if Sens=SensHaut then
|
||||
begin
|
||||
el2:=canton[idCanton].el1; // haut dans el2
|
||||
tel2:=canton[idCanton].typ1;
|
||||
el1:=canton[idCanton].el2; // bas dans el1
|
||||
tel1:=canton[idCanton].typ2;
|
||||
// si le suivant n'est pas un détecteur, le trouver
|
||||
if (tel1<>det) and (tel1<>buttoir) then
|
||||
begin
|
||||
suiv:=detecteur_suivant_El(el1,tel1,el2,tel2,1); // arrêt sur suivant
|
||||
el2:=suiv;
|
||||
end;
|
||||
// si le précédent n'est pas un détecteur, le trouver
|
||||
if (tel2<>det) and (tel1<>buttoir) then
|
||||
begin
|
||||
prec:=detecteur_suivant_El(el2,tel2,el1,tel1,1); // arrêt sur suivant
|
||||
el2:=prec;
|
||||
end;
|
||||
if init then
|
||||
begin
|
||||
//Affiche('nouvelle route vers haut',clYellow);
|
||||
inc(n_trains);
|
||||
//init_route(n_trains,el2,el1,idtrain);
|
||||
s:=trains[idtrain].nom_train;
|
||||
event_det_train[n_trains].NbEl:=1 ;
|
||||
event_det_train[n_trains].AdrTrain:=trains[idtrain].adresse;
|
||||
event_det_train[n_trains].det[1].adresse:=el2;
|
||||
event_det_train[n_trains].det[1].etat:=false;
|
||||
event_det_train[n_trains].nom_train:=s;
|
||||
event_det_train[n_trains].NbEl:=1;
|
||||
|
||||
MemZone[el2,el1].etat:=false;
|
||||
MemZone[el2,el1].train:='';
|
||||
MemZone[el2,el1].AdrTrain:=0;
|
||||
|
||||
MemZone[el1,el2].etat:=true;
|
||||
MemZone[el1,el2].train:=s;
|
||||
MemZone[el1,el2].AdrTrain:=trains[idtrain].adresse;
|
||||
maj_signaux(true);
|
||||
|
||||
// réserver le canton
|
||||
if roulage then
|
||||
begin
|
||||
t:=canton[idcanton].ntco;
|
||||
zone_tco(t,el2,7,0,0,12); // élément contigu en haut (7) du canton
|
||||
reserve_canton(el2,xcanton,trains[idtrain].adresse,0,nCantonsRes);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
// supprimer les 2 sens
|
||||
MemZone[el1,el2].etat:=false;
|
||||
MemZone[el1,el2].train:='';
|
||||
MemZone[el1,el2].AdrTrain:=0;
|
||||
|
||||
MemZone[el2,el1].etat:=false;
|
||||
MemZone[el2,el1].train:='';
|
||||
MemZone[el2,el1].AdrTrain:=0;
|
||||
maj_signaux(true);
|
||||
supprime_route(trains[idTrain].adresse);
|
||||
end;
|
||||
end;
|
||||
suiv:=detecteur_suivant(el1,tel1,el2,tel2,1); // arrêt sur suivant
|
||||
if suiv>9990 then suiv:=0;
|
||||
el2:=suiv;
|
||||
end;
|
||||
// si le précédent n'est pas un détecteur, le trouver
|
||||
if (tel1<>det) and (tel1<>buttoir) then
|
||||
begin
|
||||
prec:=detecteur_suivant(el2,tel2,el1,tel1,1); // arrêt sur suivant
|
||||
if suiv>9990 then suiv:=0;
|
||||
el1:=prec;
|
||||
end;
|
||||
end;
|
||||
|
||||
// trouve le détecteur suivant sur le canton idcanton, au détecteur "détecteur" dans le sensTCO
|
||||
function trouve_det_suiv_canton(idcanton,detecteur,sensTCO : integer) : integer;
|
||||
var t : integer;
|
||||
begin
|
||||
t:=canton[idcanton].ntco;
|
||||
zone_tco(t,detecteur,sensTCO,0,0,12,false); // élément contigu à droite (6) du canton , résultat dans xcanton , teste les 2 pos des aig
|
||||
if tel1=Aig then xcanton:=detecteur_suivant(detecteur,det,xcanton,aig,1);
|
||||
result:=xcanton;
|
||||
end;
|
||||
|
||||
// supprime le train AdrTrain de tous les cantons, et réaffiche les cantons effacés concernés
|
||||
procedure raz_cantons_train(AdrTrain : integer);
|
||||
var i,t,idcanton,idTCO,x,y : integer;
|
||||
var i,t,idTCO,x,y : integer;
|
||||
begin
|
||||
if (AdrTrain=0) then exit;
|
||||
//Affiche('Raz_cantons_train(Adr='+intToSTR(AdrTrain)+')',clyellow);
|
||||
//Affiche('Raz_cantons_train @='+intToSTR(AdrTrain),clyellow);
|
||||
if adrTrain<>0 then
|
||||
begin
|
||||
for i:=1 to Ncantons do
|
||||
@@ -353,47 +136,23 @@ begin
|
||||
y:=canton[i].y;
|
||||
tco[idTCO,x,y].train:=0;
|
||||
tco[idTCO,x,y].mode:=0;
|
||||
Dessin_canton(idTCO,pcanvasTCO[idTCO],x,y,0,0);
|
||||
Dessin_canton(idTCO,pcanvasTCO[idTCO],x,y,0);
|
||||
end;
|
||||
end;
|
||||
exit;
|
||||
end;
|
||||
{
|
||||
if indexTrain<>0 then
|
||||
begin
|
||||
for i:=1 to Ncantons do
|
||||
begin
|
||||
if canton[i].indexTrain=IndexTrain then
|
||||
begin
|
||||
t:=canton[i].indexTrain;
|
||||
trains[t].canton:=0;
|
||||
|
||||
canton[i].indexTrain:=0;
|
||||
canton[i].adresseTrain:=0;
|
||||
canton[i].NomTrain:='';
|
||||
idTCO:=canton[i].Ntco;
|
||||
x:=canton[i].x;
|
||||
y:=canton[i].y;
|
||||
tco[idTCO,x,y].train:=0;
|
||||
tco[idTCO,x,y].mode:=0;
|
||||
Dessin_canton(idTCO,pcanvasTCO[idTCO],x,y,0,0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
}
|
||||
|
||||
end;
|
||||
|
||||
|
||||
// affecte le train id train ou adresse au canton et au TCO.
|
||||
// affecte le train id train ou adresse à l'Index canton et au TCO.
|
||||
// désaffecte ce train pour tous les autres canton
|
||||
// si adrTrain=9999 , train inconnu
|
||||
// si adrTrain=0 ; efface
|
||||
// et les pointeurs de trains de l'idTrain sont razés
|
||||
procedure affecte_Train_canton(AdrTrain,idcanton : integer);
|
||||
var idTrain,t,i : integer;
|
||||
var idTrain,t : integer;
|
||||
begin
|
||||
//Affiche('Affecte_train_canton: IdTrain='+intToSTR(idTrain)+' @='+intToSTR(AdrTrain)+' canton='+intToSTR(idcanton),clorange);
|
||||
//Affiche('Affecte_train_canton: IdTrain='+intToSTR(idTrain)+' @='+intToSTR(AdrTrain)+' Idcanton='+intToSTR(idcanton),clorange);
|
||||
if (IdCanton>0) and (idCanton<=nCantons) then
|
||||
begin
|
||||
if (AdrTrain<>0) and (adrTrain<>9999) then
|
||||
@@ -427,7 +186,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// renvoie x,y El et indexCanton en variable globale
|
||||
// renvoie x,y El et indexCanton de IdCantonSelect en variable globale
|
||||
procedure quel_canton;
|
||||
begin
|
||||
if IdCantonSelect=0 then exit;
|
||||
@@ -436,6 +195,7 @@ begin
|
||||
El:=tco[indexTCOCourant,x,y].BImage;
|
||||
end;
|
||||
|
||||
// dessine la flèche dans la colonne 6 de la stringrid
|
||||
procedure Dessine_fleche(ligne : integer;r : Trect);
|
||||
var indexTrain,IdCanton : integer;
|
||||
Image : TImage;
|
||||
@@ -449,7 +209,7 @@ begin
|
||||
|
||||
with StringGridTrains do
|
||||
begin
|
||||
case canton[idcanton].Sens of
|
||||
case canton[idcanton].SensLoco of
|
||||
1 : Image:=ImageGauche;
|
||||
2 : Image:=ImageDroite;
|
||||
3 : Image:=ImageHaut;
|
||||
@@ -469,8 +229,12 @@ begin
|
||||
// maj de la stringGrig
|
||||
if IdCantonSelect>0 then
|
||||
begin
|
||||
s:='Canton '+intToSTR(IdCantonSelect)+' encadré par '+intToSTR(canton[IdCantonSelect].el1);
|
||||
i:=canton[IdCantonSelect].Sens1;
|
||||
s:='Sélection d''un train';
|
||||
s:=s+' au canton '+intToSTR(canton[IdCantonSelect].numero)+' : '+canton[IdCantonSelect].nom;
|
||||
FormSelTrain.caption:=s;
|
||||
|
||||
s:='Canton '+intToSTR(canton[IdCantonSelect].numero)+' encadré par '+intToSTR(canton[IdCantonSelect].el1);
|
||||
i:=canton[IdCantonSelect].SensEl1;
|
||||
case i of
|
||||
SensHaut : s:=s+' haut ';
|
||||
SensBas : s:=s+' bas ';
|
||||
@@ -479,7 +243,7 @@ begin
|
||||
end;
|
||||
s:=s+' '+intToSTR(canton[IdCantonSelect].el2);
|
||||
|
||||
i:=canton[IdCantonSelect].Sens2;
|
||||
i:=canton[IdCantonSelect].SensEl2;
|
||||
case i of
|
||||
SensHaut : s:=s+' haut ';
|
||||
SensBas : s:=s+' bas ';
|
||||
@@ -488,7 +252,7 @@ begin
|
||||
end;
|
||||
|
||||
s:=s+' loco vers ';
|
||||
i:=canton[IdCantonSelect].Sens;
|
||||
i:=canton[IdCantonSelect].SensLoco;
|
||||
case i of
|
||||
SensHaut : s:=s+' haut ';
|
||||
SensBas : s:=s+' bas ';
|
||||
@@ -514,11 +278,13 @@ begin
|
||||
s:='N°'+intToSTR(t)+' ';
|
||||
if t<>0 then s:=s+NomfichierTCO[t];
|
||||
cells[5,i]:=s;
|
||||
if trains[i].route[0].adresse<>0 then s:=' oui' else s:='';
|
||||
cells[7,i]:=s;
|
||||
end
|
||||
else
|
||||
begin
|
||||
cells[3,i]:=''; cells[4,i]:=''; cells[5,i]:='';
|
||||
cells[6,i]:=''; // efface la fleche
|
||||
cells[6,i]:=''; // efface la flèche
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -534,11 +300,6 @@ end;
|
||||
procedure TFormSelTrain.FormCreate(Sender: TObject);
|
||||
var i,x,y : integer;
|
||||
begin
|
||||
{ SetWindowPos(Handle,HWND_TOPMOST,0,0,0,0,SWP_NoMove or SWP_NoSize);
|
||||
Canton[3].indexTrain:=1;
|
||||
TCO[1,canton[3].x,canton[3].y].train:=1;
|
||||
trains[1].canton:=3;
|
||||
}
|
||||
|
||||
with ImageHaut do begin Width:=60;Height:=60;visible:=false; end;
|
||||
with ImageBas do begin Width:=60;Height:=60;visible:=false; end;
|
||||
@@ -553,7 +314,7 @@ begin
|
||||
//Options:=StringGridTrains.Options+[goEditing];
|
||||
Hint:='Sélection d''un train';
|
||||
ShowHint:=true;
|
||||
ColCount:=7;
|
||||
ColCount:=8; // nombre de colonnes
|
||||
RowCount:=Ntrains+1;
|
||||
Options := StringGridTrains.Options + [goEditing];
|
||||
ColWidths[0]:=30;
|
||||
@@ -561,18 +322,19 @@ begin
|
||||
ColWidths[2]:=150; // nom du train
|
||||
ColWidths[3]:=60; // canton
|
||||
ColWidths[4]:=100;
|
||||
ColWidths[5]:=100;
|
||||
ColWidths[5]:=120;
|
||||
ColWidths[6]:=30;
|
||||
|
||||
ColWidths[7]:=35;
|
||||
|
||||
Cells[1,0]:='Icône';
|
||||
Cells[2,0]:='Nom du train';
|
||||
Cells[3,0]:='N°canton';
|
||||
Cells[3,0]:='Affectation'+#13+'au canton';
|
||||
Cells[4,0]:='Nom du canton';
|
||||
Cells[5,0]:='TCO';
|
||||
Cells[6,0]:='Sens';
|
||||
Cells[7,0]:='Route';
|
||||
|
||||
RowHeights[0]:=22;
|
||||
RowHeights[0]:=30;
|
||||
end;
|
||||
|
||||
for i:=1 to ntrains do
|
||||
@@ -588,7 +350,7 @@ begin
|
||||
begin
|
||||
for x:=0 to RowCount-1 do
|
||||
for y:=0 to ColCount-1 do
|
||||
StringGridTrains.Options := StringGridTrains.Options - [goEditing] - [goRangeSelect];
|
||||
StringGridTrains.Options:=StringGridTrains.Options - [goEditing] - [goRangeSelect];
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -596,21 +358,38 @@ end;
|
||||
procedure TFormSelTrain.StringGridTrainsDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGridDrawState);
|
||||
var indextrain,l,h,hautdest,largdest : integer;
|
||||
rd : double;
|
||||
r : trect;
|
||||
coul: Tcolor;
|
||||
s : string;
|
||||
begin
|
||||
// Affiche('DrawCell '+intToSTR(Acol)+'x'+intToSTR(Arow),clred);
|
||||
|
||||
// titres sur 2 lignes
|
||||
if Arow=0 then
|
||||
with StringGridTrains do
|
||||
begin
|
||||
if Pos(#13,Cells[ACol,ARow])>0 then
|
||||
begin
|
||||
Coul:=canvas.Pixels[5,5]; // trouver la couleur de la première ligne de la stringgrid, car elle change en fonction des styles
|
||||
Canvas.Brush.Color:=coul;
|
||||
Canvas.FillRect(Rect); // Efface la cellule qu'on va réécrire en mode WORDBREAK
|
||||
|
||||
Inc(Rect.Left, 2);
|
||||
Inc(Rect.Top, 2);
|
||||
DrawText(Canvas.Handle,PChar(Cells[ACol, ARow]),-1,Rect,DT_NOPREFIX or DT_WORDBREAK);
|
||||
end;
|
||||
end;
|
||||
|
||||
// affiche l'icone du train
|
||||
if (Acol=1) and (Arow>0) then
|
||||
with StringGridTrains do
|
||||
begin
|
||||
|
||||
// dessine le train dans la colonne 1
|
||||
indextrain:=Arow;
|
||||
if trains[indexTrain].icone<>nil then
|
||||
begin
|
||||
// source
|
||||
//Affiche(intToSTR(Acol)+' '+intToSTR(Arow),clred);
|
||||
|
||||
//Affiche(intToSTR(Acol)+' '+intToSTR(Arow),clred);
|
||||
l:=Trains[indextrain].Icone.width;
|
||||
h:=Trains[indextrain].Icone.Height;
|
||||
if h=0 then exit;
|
||||
@@ -627,7 +406,6 @@ begin
|
||||
HautDest:=round(LargDest/rd);
|
||||
end;
|
||||
|
||||
//y:=rect.bottom-rect.top-HautDest;
|
||||
TransparentBlt(canvas.Handle,rect.Left+2,rect.Top,largDest,hautDest,
|
||||
Trains[indexTrain].Icone.canvas.Handle,0,0,l,h,clWhite);
|
||||
end;
|
||||
@@ -636,27 +414,23 @@ begin
|
||||
// dessine les fleches
|
||||
if (Acol=6) and (Arow>0) then
|
||||
dessine_fleche(Arow,rect);
|
||||
end;
|
||||
|
||||
// c = numéro de canton
|
||||
procedure xxraz_trains_canton(c : integer);
|
||||
var ax,ay,i,ic : integer;
|
||||
begin
|
||||
|
||||
for i:=1 to Ntrains do
|
||||
// le carré de route
|
||||
if (acol=7) and (aRow>0) then
|
||||
begin
|
||||
ic:=trains[i].canton;
|
||||
if ic=c then
|
||||
if trains[Arow].route[0].adresse<>0 then
|
||||
begin
|
||||
trains[i].canton:=0;
|
||||
if ic<>0 then
|
||||
with StringGridTrains.Canvas do
|
||||
begin
|
||||
ax:=canton[Ic].x;
|
||||
ay:=canton[Ic].y;
|
||||
tco[IndexTCOCourant,ax,ay].train:=0;
|
||||
canton[Ic].indexTrain:=0;
|
||||
canton[Ic].adresseTrain:=0;
|
||||
canton[Ic].NomTrain:='';
|
||||
pen.color:=clBlue;
|
||||
pen.Width:=3;
|
||||
rectangle(rect);
|
||||
s:='route';
|
||||
r.Left:=rect.Left+2;
|
||||
r.Top:=rect.Top+4;
|
||||
r.Right:=rect.Right-2;
|
||||
r.Bottom:=rect.Bottom-2;
|
||||
DrawText(Handle,PChar(s), -1,r ,DT_VCENTER or DT_CENTER or dt_wordbreak);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -666,12 +440,15 @@ end;
|
||||
procedure raz_trains_idcanton(idc : integer);
|
||||
var ax,ay,i,ic : integer;
|
||||
begin
|
||||
if traceliste then Affiche('Raz train affectés au canton index='+intToSTR(idc),clyellow);
|
||||
for i:=1 to Ntrains do
|
||||
begin
|
||||
ic:=index_canton_numero(trains[i].canton);
|
||||
if ic=idc then
|
||||
begin
|
||||
routeSav:=trains[i].route; // sauvegarde la route
|
||||
trains[i].canton:=0;
|
||||
trains[i].route[0].adresse:=0;
|
||||
if ic<>0 then
|
||||
begin
|
||||
ax:=canton[Ic].x;
|
||||
@@ -685,18 +462,23 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// cliqué sur cellule pour changer la sélection du train ou la flèche
|
||||
|
||||
// cliqué sur cellule pour changer la sélection du train ou voir la route ou la flèche
|
||||
procedure TFormSelTrain.StringGridTrainsSelectCell(Sender: TObject; ACol,
|
||||
ARow: Integer; var CanSelect: Boolean);
|
||||
var f,AutreTrain,AutreCanton,idAutrecanton,i : integer;
|
||||
var f,AutreTrain,AutreCanton,idAutrecanton,i,ancienSens,AdrTrain,IdTrain,sensloco : integer;
|
||||
faire : boolean;
|
||||
s : string;
|
||||
begin
|
||||
if IdCantonSelect=0 then IdCantonSelect:=AncienIdCantonSelect;
|
||||
if affevt then Affiche('FormSelTrain.StringGridTrainsSelectCell '+intToSTR(ACol)+' '+intToSTR(ARow),clYellow);
|
||||
if (Arow>nTrains) or (IdCantonSelect<1) then exit;
|
||||
|
||||
faire:=false;
|
||||
//------------change la sélection du train
|
||||
if (Arow>=1) and (ACol<=5) then
|
||||
begin
|
||||
AncienSens:=0;
|
||||
indexTrainClic:=Arow;
|
||||
// Affiche('ligne='+intToSTR(Arow)+' col='+intToSTR(Acol),clyellow);
|
||||
|
||||
@@ -709,43 +491,83 @@ begin
|
||||
idAutrecanton:=index_canton_numero(autreCanton);
|
||||
if (IdAutrecanton<>0) and (IdAutreCanton<>IdCantonSelect) then
|
||||
begin
|
||||
LabelInfo.caption:='Le train '+intToSTR(IndexTrainClic)+' est affecté au canton '+intToSTR(AutreCanton);
|
||||
LabelInfo.caption:='Le train '+intToSTR(IndexTrainClic)+' '+trains[IndexTrainClic].nom_train+' est affecté au canton '+intToSTR(AutreCanton);
|
||||
exit;
|
||||
end;
|
||||
|
||||
if Trains[IndexTrainClic].route[0].adresse<>0 then
|
||||
begin
|
||||
s:='Le train '+Trains[IndexTrainClic].nom_train+' a une route affectée.'+#13+
|
||||
'Supprimer le train du canton va également supprimer sa route.'+#13+
|
||||
'Voulez vous supprimer le train du canton ?';
|
||||
|
||||
if Application.MessageBox(pchar(s),pchar('Confirmation de suppression de train du canton '+intToSTR(canton[IdCantonSelect].numero)),
|
||||
MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit;
|
||||
|
||||
supprime_route_train(indextrainclic);
|
||||
StringGridTrains.cells[7,ARow]:='';
|
||||
end;
|
||||
|
||||
if faire then
|
||||
begin
|
||||
// vérifier si un autre train est affecté au canton
|
||||
AutreTrain:=canton[IdCantonSelect].indexTrain;
|
||||
if autreTrain<>0 then
|
||||
begin
|
||||
LabelInfo.caption:='Le train '+intToSTR(AutreTrain)+' est déjà affecté au canton - Effacement';
|
||||
LabelInfo.caption:='Le train '+intToSTR(AutreTrain)+' '+trains[AutreTrain].nom_train+' est déjà affecté au canton - Effacement';
|
||||
// affecter la route de l'ancien train au nouveau train
|
||||
routeSav:=trains[AutreTrain].route; // sauve la route
|
||||
trains[AutreTrain].route[0].adresse:=0;
|
||||
StringGridTrains.Cells[7,AutreTrain]:='';
|
||||
trains[IndexTrainClic].route:=routeSav;
|
||||
|
||||
AncienSens:=canton[idcantonSelect].SensLoco;
|
||||
faire:=true;
|
||||
if trains[indexTrainClic].canton=canton[IdCantonSelect].numero then faire:=false ; // ne pas faire l'affectaction, c'est une désaffectaction
|
||||
raz_trains_idcanton(IdCantonSelect);
|
||||
|
||||
|
||||
raz_trains_idcanton(IdCantonSelect); // au retour, route contient la route du train razé du canton
|
||||
//Affiche('Et 1',clYellow);
|
||||
init_route_canton(IdCantonSelect,indexTrainClic,false); // raz du placement du train et de sa route
|
||||
maj_signaux(true);
|
||||
end;
|
||||
|
||||
|
||||
// affecter le train, le canton et le TCO
|
||||
if faire then
|
||||
begin
|
||||
if canton[IdCantonSelect].horizontal then canton[IdCantonSelect].Sens:=SensDroit else canton[IdCantonSelect].Sens:=SensBas;
|
||||
//Affiche('Et 2',clYellow);
|
||||
affecte_Train_canton(trains[indexTrainClic].adresse,IdCantonSelect);
|
||||
init_route_canton(IdCantonSelect,indexTrainClic,true); // placement du train
|
||||
if anciensens=0 then if canton[IdCantonSelect].horizontal then SensLoco:=SensDroit else SensLoco:=SensBas;
|
||||
if ancienSens<>0 then SensLoco:=ancienSens;
|
||||
|
||||
if (canton[IdCantonSelect].sensCirc<>0) then sensLoco:=canton[IdCantonSelect].sensCirc ;
|
||||
|
||||
canton[IdCantonSelect].SensLoco:=sensLoco;
|
||||
affecte_Train_canton(trains[indexTrainClic].adresse,IdCantonSelect); // le train affecté contient la route du train razé
|
||||
|
||||
maj_signaux(true);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// change le sens----------------------------
|
||||
// change le sens - (cliqué sur la flèche)---------------------------
|
||||
if Acol=6 then
|
||||
begin
|
||||
// si on a cliqué sur un train affecté, on procède
|
||||
IdAutreCanton:=index_canton_numero(trains[Arow].canton);
|
||||
if IdAutreCanton>0 then
|
||||
begin
|
||||
f:=canton[IdAutreCanton].Sens;
|
||||
AdrTrain:=canton[IdAutreCanton].adresseTrain;
|
||||
IdTrain:=index_train_adresse(AdrTrain);
|
||||
// si le train a une route affectée
|
||||
if Trains[IdTrain].route[0].adresse<>0 then
|
||||
begin
|
||||
s:='Le train '+Trains[idTrain].nom_train+' a une route affectée.'+#13+
|
||||
'Changer son sens de départ va détruire sa route.'+#13+
|
||||
'Voulez vous changer le sens du train?';
|
||||
if Application.MessageBox(pchar(s),pchar('Confirmation pour changer le sens du train'), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION)=idNo then exit;
|
||||
supprime_route_train(idTrain);
|
||||
end;
|
||||
|
||||
f:=canton[IdAutreCanton].SensLoco;
|
||||
|
||||
inc(f);
|
||||
if canton[IdAutreCanton].horizontal then
|
||||
@@ -756,14 +578,29 @@ begin
|
||||
begin
|
||||
if (f=5) or (f<SensHaut) then f:=SensHaut;
|
||||
end;
|
||||
if (canton[IdAutreCanton].sensCirc<>0) and (canton[IdAutreCanton].SensCirc<>f) then
|
||||
begin
|
||||
s:='Le sens de circulation du canton '+intToSTR(canton[IdAutreCanton].numero)+' ne permet pas de positionner le train dans ce sens';
|
||||
LabelInfo.Caption:=s;
|
||||
FormInfo.LabelInfo.caption:=s;
|
||||
FormInfo.Top:=top+10;
|
||||
FormInfo.Left:=left+10;
|
||||
FormInfo.Show;
|
||||
exit;
|
||||
end;
|
||||
|
||||
renseigne_canton(IdAutreCanton);
|
||||
canton[IdAutreCanton].Sens:=f;
|
||||
canton[IdAutreCanton].SensLoco:=f;
|
||||
//Affiche('Et 3',clYellow);
|
||||
init_route_canton(IdCantonSelect,indexTrainClic,false); // raz du placement du train et de sa route
|
||||
init_route_canton(IdCantonSelect,indexTrainClic,true); // placement du train et de sa route
|
||||
maj_signaux(true);
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
// cliqué sur la route
|
||||
if Acol=7 then
|
||||
begin
|
||||
indexTrainFR:=Arow;
|
||||
formRouteTrain.show;
|
||||
end;
|
||||
|
||||
maj_stringGrig;
|
||||
@@ -771,43 +608,97 @@ begin
|
||||
// met à jour les cantons
|
||||
for i:=1 to nCantons do
|
||||
begin
|
||||
dessin_canton(i,0,0);
|
||||
dessin_canton(i,0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
// actualise la fenetre
|
||||
procedure actualise_seltrains;
|
||||
var s : string;
|
||||
i : integer;
|
||||
begin
|
||||
with formSelTrain.StringGridTrains do
|
||||
begin
|
||||
RowCount:=Ntrains+1;
|
||||
for i:=1 to ntrains do
|
||||
begin
|
||||
cells[2,i]:=trains[i].nom_train;
|
||||
end;
|
||||
end;
|
||||
|
||||
Quel_canton;
|
||||
s:='Sélection d''un train';
|
||||
if IdCantonSelect>0 then s:=s+' au canton '+intToSTR(IdCantonSelect)+' : '+canton[IdCantonSelect].nom;
|
||||
FormSelTrain.caption:=s;
|
||||
|
||||
with formSelTrain.ComboBoxCanton do
|
||||
begin
|
||||
clear;
|
||||
for i:=1 to nCantons do items.add('Canton n°'+IntToSTR(canton[i].numero)+' '+canton[i].nom);
|
||||
for i:=1 to nCantons do items.add('Canton n°'+IntToSTR(canton[i].numero)+' '+canton[i].nom);
|
||||
ItemIndex:=IdCantonSelect-1;
|
||||
end;
|
||||
|
||||
if IdCantonSelect=0 then formSelTrain.labelInfo.caption:='Sélectionnez un canton';
|
||||
|
||||
maj_stringGrig; // change indexcanton
|
||||
|
||||
end;
|
||||
|
||||
|
||||
// positionne la VertscrollBar de la stringGrid
|
||||
procedure Positionne_SG(n : integer);
|
||||
var i : integer;
|
||||
{
|
||||
SB_LINEUP ;
|
||||
SB_LINELEFT ;
|
||||
SB_LINEDOWN ;
|
||||
SB_LINERIGHT ;
|
||||
SB_PAGEUP ;
|
||||
SB_PAGELEFT ;
|
||||
SB_PAGEDOWN ;
|
||||
SB_PAGERIGHT ;
|
||||
SB_THUMBPOSITION ;
|
||||
SB_THUMBTRACK ;
|
||||
SB_TOP ;
|
||||
SB_LEFT ;
|
||||
SB_BOTTOM ;
|
||||
SB_RIGHT ;
|
||||
SB_ENDSCROLL ;
|
||||
}
|
||||
begin
|
||||
// Positionne la stringGrid
|
||||
SendMessage(formSelTrain.StringGridTrains.Handle, WM_VScroll, SB_TOP, 0); // déplace en haut
|
||||
for i:=1 to n-5 do // 7-2 c'est le nombre de lignes affichées par la stringgrid
|
||||
SendMessage(formSelTrain.StringGridTrains.Handle, WM_VScroll, SB_LINEDOWN, 0); // déplace d'une ligne à la fois
|
||||
end;
|
||||
|
||||
procedure TFormSelTrain.FormActivate(Sender: TObject);
|
||||
var n,i,IndexTrain : integer;
|
||||
trouve : boolean;
|
||||
NomTrain : string;
|
||||
begin
|
||||
actualise_Seltrains;
|
||||
if IdcantonSelect=0 then exit;
|
||||
IndexTrain:=canton[IdCantonSelect].indexTrain;
|
||||
NomTrain:=trains[indexTrain].nom_train;
|
||||
// trouver si le train est dans la grille
|
||||
with StringGridTrains do
|
||||
begin
|
||||
i:=1;n:=RowCount;
|
||||
repeat
|
||||
trouve:=cells[2,i]=nomTrain;
|
||||
inc(i);
|
||||
until trouve or (i>=n);
|
||||
if trouve then
|
||||
begin
|
||||
Positionne_SG(i);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TFormSelTrain.StringGridTrainsKeyDown(Sender: TObject;
|
||||
var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
key:=0; // évite le mouvement de sélection par les touches
|
||||
key:=0; // empêche le mouvement de sélection par les touches
|
||||
end;
|
||||
|
||||
procedure TFormSelTrain.ComboBoxCantonChange(Sender: TObject);
|
||||
@@ -818,6 +709,10 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormSelTrain.ButtonSauveClick(Sender: TObject);
|
||||
begin
|
||||
Sauve_config;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
+22
-12
@@ -1,6 +1,5 @@
|
||||
unit verif_version;
|
||||
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
@@ -26,7 +25,7 @@ var
|
||||
chemin_Dest,chemin_src,date_creation,nombre_tel : string;
|
||||
f : text;
|
||||
|
||||
Const VersionSC ='8.8'; // sert à la comparaison de la version publiée
|
||||
Const VersionSC ='9.0'; // sert à la comparaison de la version publiée
|
||||
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
|
||||
// pour unzip
|
||||
SHCONTCH_NOPROGRESSBOX = 4;
|
||||
@@ -171,7 +170,7 @@ begin
|
||||
AssignFile(f,chemin_dest+'log-install.txt');
|
||||
Rewrite(f);
|
||||
|
||||
log('Mise à jour de signaux complexes V'+version+' le '+DateToStr(date)+' à '+TimeToStr(Time)+' ',clYellow);
|
||||
log('Mise à jour de signaux complexes V'+versionSC+' le '+DateToStr(date)+' à '+TimeToStr(Time)+' ',clYellow);
|
||||
log('Téléchargement réussi, décompression',clyellow);
|
||||
formVersion.close;
|
||||
|
||||
@@ -191,11 +190,12 @@ begin
|
||||
close(f);
|
||||
Affiche('Installation de la nouvelle version',clyellow);
|
||||
Sleep(2000);
|
||||
i:=ShellExecute(Formprinc.Handle,'open',
|
||||
Pchar('installeur.exe'),
|
||||
Pchar(''), // paramètre
|
||||
PChar('') // répertoire
|
||||
,SW_SHOWNORMAL);
|
||||
i:=ShellExecute(Formprinc.Handle,pchar('runas'), // mode admin
|
||||
Pchar('installeur.exe'),
|
||||
Pchar(''), // paramètre
|
||||
PChar(''), // répertoire
|
||||
SW_SHOWNORMAL);
|
||||
|
||||
if i>32 then
|
||||
begin
|
||||
Application.Terminate;
|
||||
@@ -216,7 +216,7 @@ var description,s,s2,s3,Version_p,Url,LocalFile,nomfichier,date_creation_ang : s
|
||||
V_utile,V_publie : real;
|
||||
SV_publie : char;
|
||||
taille : longint;
|
||||
comm : array[1..10] of string;
|
||||
comm : array[1..20] of string;
|
||||
|
||||
function supprime_anti(s : string) : string;
|
||||
var i : integer;
|
||||
@@ -276,8 +276,18 @@ begin
|
||||
Ncomm:=0;
|
||||
if DownloadURL_NOCache(Url,localFile,taille) then
|
||||
begin
|
||||
if not(FileExists(localfile)) then
|
||||
begin
|
||||
Affiche('Erreur fichier dépot non écrit. Vérifiez les droits du répertoire ',clred);
|
||||
Affiche(GetCurrentDir,clred);
|
||||
Affiche('Voir la notice page 9 : Refus de modification des fichiers du dossier par Windows',clred);
|
||||
result:=0;
|
||||
exit;
|
||||
end;
|
||||
|
||||
AssignFile(fichier,LocalFile);
|
||||
reset(fichier);
|
||||
|
||||
while not(eof(fichier)) and (not(trouve_version) or not(trouve_zip)) do
|
||||
begin
|
||||
readln(fichier,s);
|
||||
@@ -317,7 +327,7 @@ begin
|
||||
begin
|
||||
//description:=utf8Decode(description);
|
||||
i:=1 ; j:=1;
|
||||
// couper en chaînes
|
||||
// couper en chaînes et mettre dans comm[]
|
||||
repeat
|
||||
j:=pos('\r',description);
|
||||
if j<>0 then
|
||||
@@ -332,7 +342,7 @@ begin
|
||||
begin
|
||||
delete(description,j,2);
|
||||
end;
|
||||
until j=0;
|
||||
until (j=0) or (i>=20);
|
||||
//
|
||||
ncomm:=i;
|
||||
comm[i]:=supprime_anti(description);
|
||||
@@ -381,7 +391,7 @@ begin
|
||||
FormVersion.Top:=10;
|
||||
FormVersion.Left:=10;
|
||||
FormVersion.show;
|
||||
s:='Vous utilisez la version '+version+SousVersion+' mais il existe la version '+Version_p+SV_publie;
|
||||
s:='Vous utilisez la version '+versionSC+SousVersion+' mais il existe la version '+Version_p+SV_publie;
|
||||
if nComm>0 then
|
||||
begin
|
||||
FormVersion.Memo1.lines.Clear;
|
||||
|
||||
+9
-3
@@ -250,7 +250,13 @@ version 8.6 : Gestion des d
|
||||
Création d'actionneurs "horloge" et "vitesse train".
|
||||
version 8.7 : Les actionneurs deviennent les actions, et un déclencheur peut déclencher plusieurs opérations
|
||||
version 8.8 : Création des cantons dans les TCO qui reçoivent une icone de train.
|
||||
Création des icônes de trains -> recopiez le repertoire [icones] dans celui de signaux_commplexes
|
||||
Création des icônes de trains -> recopiez le repertoire [icones] dans celui de signaux_complexes
|
||||
Création de nouveaux déclencheurs, conditions et opérations.
|
||||
|
||||
|
||||
version 8.82 : Ajout d'une zone d'entrée pour le répertoire d'installation de CDM.
|
||||
version 8.83 : Améliorations diverses.
|
||||
version 9.0 : Pilotage des nouveaux décodeurs de signaux LEB (mode binaire, linéaire)
|
||||
En mode autonome:
|
||||
Pilotage des trains depuis le TCO
|
||||
Proposition des routes possibles depuis un train sur un détecteur de départ vers un détecteur d'arrivée sur le TCO.
|
||||
Pilotage des accessoires sans accusé de réception, ce qui fluidifie le trafic XpressNet
|
||||
|
||||
Reference in new issue
Block a user