This commit is contained in:
f1iwq2 committed 2024-03-06 15:41:14 +01:00
1 parent 315b803e40
commit 81d5c007d4
25 files changed
+2047 -1291

No files matched your search

+1
View File
@@ -70,6 +70,7 @@ procedure TFormImportation.EditBaseCroisChange(Sender: TObject);
var i,erreur : integer;
begin
val(editBaseCrois.text,i,erreur);
if i<0 then i:=0;
if erreur=0 then BaseCroisement:=i;
end;
BIN
View File
Binary file not shown.
-6
View File
@@ -130,9 +130,3 @@ OriginalFilename=
ProductName=
ProductVersion=8.1.0.0
Comments=
[HistoryLists\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
Count=1
Item0=$(DELPHI)\Lib\Debug
+4 -3
View File
@@ -2,8 +2,8 @@ program Signaux_complexes_GL;
uses
Forms,
UnitPrinc in 'UnitPrinc.pas' {FormPrinc},
UnitDebug in 'UnitDebug.pas' {FormDebug},
UnitPrinc in 'UnitPrinc.pas' {FormPrinc},
verif_version in 'verif_version.pas' {FormVersion},
UnitPilote in 'UnitPilote.pas' {FormPilote},
UnitSimule in 'UnitSimule.pas' {FormSimulation},
@@ -17,7 +17,8 @@ uses
Unitplace in 'Unitplace.pas' {FormPlace},
UnitPareFeu in 'UnitPareFeu.pas',
UnitAnalyseSegCDM in 'UnitAnalyseSegCDM.pas' {FormAnalyseCDM},
Importation in 'Importation.pas' {FormImportation};
Importation in 'Importation.pas' {FormImportation},
MSCommLib_TLB in 'MSCommLib_TLB.pas';
{$R *.res}
@@ -26,6 +27,7 @@ begin
Application.Initialize;
Application.Title := 'Signaux complexes GL';
Application.CreateForm(TFormPrinc, FormPrinc);
Application.CreateForm(TFormDebug, FormDebug);
Application.CreateForm(TFormVersion, FormVersion);
Application.CreateForm(TFormPilote, FormPilote);
Application.CreateForm(TFormSimulation, FormSimulation);
@@ -36,7 +38,6 @@ begin
Application.CreateForm(TFormConfCellTCO, FormConfCellTCO);
Application.CreateForm(TFormCDF, FormCDF);
Application.CreateForm(TFormPlace, FormPlace);
Application.CreateForm(TFormDebug, FormDebug);
Application.CreateForm(TFormAnalyseCDM, FormAnalyseCDM);
Application.CreateForm(TFormImportation, FormImportation);
{$IF CompilerVersion >= 28.0}
Binary file not shown.
+120 -120
View File
@@ -1,104 +1,104 @@
Start Length Name Class
0001:00000000 0018322CH .text CODE
0002:00000000 00002C88H .data DATA
0002:00002C88 045E33F9H .bss BSS
0001:00000000 0017F73CH .text CODE
0002:00000000 00002CB0H .data DATA
0002:00002CB0 045E33E9H .bss BSS
Detailed map of segments
0001:00000000 00005F13 C=CODE S=.text G=(none) M=System ACBP=A9
0001:00005F14 00000140 C=CODE S=.text G=(none) M=SysInit ACBP=A9
0001:00006054 00000108 C=CODE S=.text G=(none) M=Types ACBP=A9
0001:0000615C 00000F38 C=CODE S=.text G=(none) M=Windows ACBP=A9
0001:00007094 00000038 C=CODE S=.text G=(none) M=Messages ACBP=A9
0001:000070CC 00000338 C=CODE S=.text G=(none) M=SysConst ACBP=A9
0001:00007404 00006FF8 C=CODE S=.text G=(none) M=SysUtils ACBP=A9
0001:0000E3FC 0000081B C=CODE S=.text G=(none) M=VarUtils ACBP=A9
0001:0000EC18 0000809E C=CODE S=.text G=(none) M=Variants ACBP=A9
0001:00016CB8 000001A0 C=CODE S=.text G=(none) M=RTLConsts ACBP=A9
0001:00016E58 0000083C C=CODE S=.text G=(none) M=TypInfo ACBP=A9
0001:00017694 00000358 C=CODE S=.text G=(none) M=ActiveX ACBP=A9
0001:000179EC 0000A7EA C=CODE S=.text G=(none) M=Classes ACBP=A9
0001:000221D8 00000370 C=CODE S=.text G=(none) M=Consts ACBP=A9
0001:00022548 00009BFB C=CODE S=.text G=(none) M=Graphics ACBP=A9
0001:0002C144 00000124 C=CODE S=.text G=(none) M=Math ACBP=A9
0001:0002C268 000002B8 C=CODE S=.text G=(none) M=Contnrs ACBP=A9
0001:0002C520 00000198 C=CODE S=.text G=(none) M=CommCtrl ACBP=A9
0001:0002C6B8 00000787 C=CODE S=.text G=(none) M=MultiMon ACBP=A9
0001:0002CE40 00000038 C=CODE S=.text G=(none) M=Imm ACBP=A9
0001:0002CE78 00000FF8 C=CODE S=.text G=(none) M=HelpIntfs ACBP=A9
0001:0002DE70 00000058 C=CODE S=.text G=(none) M=WinSpool ACBP=A9
0001:0002DEC8 000010C8 C=CODE S=.text G=(none) M=Printers ACBP=A9
0001:0002EF90 0000031F C=CODE S=.text G=(none) M=FlatSB ACBP=A9
0001:0002F2B0 000003F0 C=CODE S=.text G=(none) M=SyncObjs ACBP=A9
0001:0002F6A0 000009BB C=CODE S=.text G=(none) M=UxTheme ACBP=A9
0001:0003005C 00000038 C=CODE S=.text G=(none) M=RichEdit ACBP=A9
0001:00030094 00000038 C=CODE S=.text G=(none) M=ToolWin ACBP=A9
0001:000300CC 00000048 C=CODE S=.text G=(none) M=ShellAPI ACBP=A9
0001:00030114 00000038 C=CODE S=.text G=(none) M=RegStr ACBP=A9
0001:0003014C 00000058 C=CODE S=.text G=(none) M=WinInet ACBP=A9
0001:000301A4 00000038 C=CODE S=.text G=(none) M=UrlMon ACBP=A9
0001:000301DC 0000007C C=CODE S=.text G=(none) M=ShlObj ACBP=A9
0001:00030258 00000060 C=CODE S=.text G=(none) M=CommDlg ACBP=A9
0001:000302B8 00000038 C=CODE S=.text G=(none) M=Dlgs ACBP=A9
0001:000302F0 000036D1 C=CODE S=.text G=(none) M=Dialogs ACBP=A9
0001:000339C4 00004ADA C=CODE S=.text G=(none) M=ExtCtrls ACBP=A9
0001:000384A0 00000090 C=CODE S=.text G=(none) M=ComStrs ACBP=A9
0001:00038530 000007A0 C=CODE S=.text G=(none) M=Clipbrd ACBP=A9
0001:00038CD0 00000128 C=CODE S=.text G=(none) M=StrUtils ACBP=A9
0001:00038DF8 00003821 C=CODE S=.text G=(none) M=Buttons ACBP=A9
0001:0003C61C 00000038 C=CODE S=.text G=(none) M=ExtDlgs ACBP=A9
0001:0003C654 00000068 C=CODE S=.text G=(none) M=IniFiles ACBP=A9
0001:0003C6BC 00000068 C=CODE S=.text G=(none) M=Registry ACBP=A9
0001:0003C724 0000006C C=CODE S=.text G=(none) M=Mapi ACBP=A9
0001:0003C790 00000058 C=CODE S=.text G=(none) M=ExtActns ACBP=A9
0001:0003C7E8 00000038 C=CODE S=.text G=(none) M=ListActns ACBP=A9
0001:0003C820 00009948 C=CODE S=.text G=(none) M=ComCtrls ACBP=A9
0001:00046168 00000EA0 C=CODE S=.text G=(none) M=Themes ACBP=A9
0001:00047008 0000C698 C=CODE S=.text G=(none) M=StdCtrls ACBP=A9
0001:000536A0 00000168 C=CODE S=.text G=(none) M=StdActns ACBP=A9
0001:00053808 00000D1F C=CODE S=.text G=(none) M=WinHelpViewer ACBP=A9
0001:00054528 00011403 C=CODE S=.text G=(none) M=Controls ACBP=A9
0001:0006592C 00001292 C=CODE S=.text G=(none) M=ActnList ACBP=A9
0001:00066BC0 00001B9C C=CODE S=.text G=(none) M=ImgList ACBP=A9
0001:0006875C 000066E1 C=CODE S=.text G=(none) M=Menus ACBP=A9
0001:0006EE40 0000CF8C C=CODE S=.text G=(none) M=Forms ACBP=A9
0001:0007BDCC 00000060 C=CODE S=.text G=(none) M=ComConst ACBP=A9
0001:0007BE2C 00001259 C=CODE S=.text G=(none) M=ComObj ACBP=A9
0001:0007D088 00000038 C=CODE S=.text G=(none) M=StdVCL ACBP=A9
0001:0007D0C0 00001793 C=CODE S=.text G=(none) M=AxCtrls ACBP=A9
0001:0007E854 00000060 C=CODE S=.text G=(none) M=OleConst ACBP=A9
0001:0007E8B4 00003519 C=CODE S=.text G=(none) M=OleCtrls ACBP=A9
0001:00081DD0 00000050 C=CODE S=.text G=(none) M=JConsts ACBP=A9
0001:00081E20 000133EC C=CODE S=.text G=(none) M=jpeg ACBP=A9
0001:0009520C 00000314 C=CODE S=.text G=(none) M=TlHelp32 ACBP=A9
0001:00095520 00000128 C=CODE S=.text G=(none) M=WinSock ACBP=A9
0001:00095648 00003A78 C=CODE S=.text G=(none) M=ScktComp ACBP=A9
0001:000990C0 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9
0001:000999AC 00000598 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9
0001:00099F44 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9
0001:00099F84 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9
0001:00099FBC 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9
0001:0009A9D4 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9
0001:0009CADC 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9
0001:000A5D28 0000191C C=CODE S=.text G=(none) M=UnitPilote ACBP=A9
0001:000A7644 0000057C C=CODE S=.text G=(none) M=Importation ACBP=A9
0001:000A7BC0 00019434 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
0001:000C0FF4 0000289B C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
0001:000C3890 00000D78 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
0001:000C4608 00003D24 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
0001:000C832C 00031BF8 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
0001:000F9F24 000031F0 C=CODE S=.text G=(none) M=UnitSR ACBP=A9
0001:000FD114 00002BF0 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
0001:000FFD04 0000283F C=CODE S=.text G=(none) M=verif_version ACBP=A9
0001:00102544 000011D0 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
0001:00103714 0003C750 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
0001:0013FE64 00002BCC C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
0001:00142A30 00000D2C C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
0001:0014375C 000027E8 C=CODE S=.text G=(none) M=Unitplace ACBP=A9
0001:00145F44 0003CE27 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9
0001:00182D6C 000004C0 C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9
0001:00000000 00005ED3 C=CODE S=.text G=(none) M=System ACBP=A9
0001:00005ED4 00000140 C=CODE S=.text G=(none) M=SysInit ACBP=A9
0001:00006014 00000108 C=CODE S=.text G=(none) M=Types ACBP=A9
0001:0000611C 00000F38 C=CODE S=.text G=(none) M=Windows ACBP=A9
0001:00007054 00000038 C=CODE S=.text G=(none) M=Messages ACBP=A9
0001:0000708C 00000338 C=CODE S=.text G=(none) M=SysConst ACBP=A9
0001:000073C4 00006FF8 C=CODE S=.text G=(none) M=SysUtils ACBP=A9
0001:0000E3BC 0000081B C=CODE S=.text G=(none) M=VarUtils ACBP=A9
0001:0000EBD8 0000804E C=CODE S=.text G=(none) M=Variants ACBP=A9
0001:00016C28 000001A0 C=CODE S=.text G=(none) M=RTLConsts ACBP=A9
0001:00016DC8 0000083C C=CODE S=.text G=(none) M=TypInfo ACBP=A9
0001:00017604 00000358 C=CODE S=.text G=(none) M=ActiveX ACBP=A9
0001:0001795C 0000A7EA C=CODE S=.text G=(none) M=Classes ACBP=A9
0001:00022148 00000370 C=CODE S=.text G=(none) M=Consts ACBP=A9
0001:000224B8 00009BFB C=CODE S=.text G=(none) M=Graphics ACBP=A9
0001:0002C0B4 00000124 C=CODE S=.text G=(none) M=Math ACBP=A9
0001:0002C1D8 000002B8 C=CODE S=.text G=(none) M=Contnrs ACBP=A9
0001:0002C490 00000198 C=CODE S=.text G=(none) M=CommCtrl ACBP=A9
0001:0002C628 00000787 C=CODE S=.text G=(none) M=MultiMon ACBP=A9
0001:0002CDB0 00000038 C=CODE S=.text G=(none) M=Imm ACBP=A9
0001:0002CDE8 00000FF8 C=CODE S=.text G=(none) M=HelpIntfs ACBP=A9
0001:0002DDE0 00000058 C=CODE S=.text G=(none) M=WinSpool ACBP=A9
0001:0002DE38 000010C8 C=CODE S=.text G=(none) M=Printers ACBP=A9
0001:0002EF00 0000031F C=CODE S=.text G=(none) M=FlatSB ACBP=A9
0001:0002F220 000003F0 C=CODE S=.text G=(none) M=SyncObjs ACBP=A9
0001:0002F610 000009BB C=CODE S=.text G=(none) M=UxTheme ACBP=A9
0001:0002FFCC 00000038 C=CODE S=.text G=(none) M=RichEdit ACBP=A9
0001:00030004 00000038 C=CODE S=.text G=(none) M=ToolWin ACBP=A9
0001:0003003C 00000048 C=CODE S=.text G=(none) M=ShellAPI ACBP=A9
0001:00030084 00000038 C=CODE S=.text G=(none) M=RegStr ACBP=A9
0001:000300BC 00000058 C=CODE S=.text G=(none) M=WinInet ACBP=A9
0001:00030114 00000038 C=CODE S=.text G=(none) M=UrlMon ACBP=A9
0001:0003014C 0000007C C=CODE S=.text G=(none) M=ShlObj ACBP=A9
0001:000301C8 00000060 C=CODE S=.text G=(none) M=CommDlg ACBP=A9
0001:00030228 00000038 C=CODE S=.text G=(none) M=Dlgs ACBP=A9
0001:00030260 000036D1 C=CODE S=.text G=(none) M=Dialogs ACBP=A9
0001:00033934 00004ADA C=CODE S=.text G=(none) M=ExtCtrls ACBP=A9
0001:00038410 00000090 C=CODE S=.text G=(none) M=ComStrs ACBP=A9
0001:000384A0 000007A0 C=CODE S=.text G=(none) M=Clipbrd ACBP=A9
0001:00038C40 00000128 C=CODE S=.text G=(none) M=StrUtils ACBP=A9
0001:00038D68 00003821 C=CODE S=.text G=(none) M=Buttons ACBP=A9
0001:0003C58C 00000038 C=CODE S=.text G=(none) M=ExtDlgs ACBP=A9
0001:0003C5C4 00000068 C=CODE S=.text G=(none) M=IniFiles ACBP=A9
0001:0003C62C 00000068 C=CODE S=.text G=(none) M=Registry ACBP=A9
0001:0003C694 0000006C C=CODE S=.text G=(none) M=Mapi ACBP=A9
0001:0003C700 00000058 C=CODE S=.text G=(none) M=ExtActns ACBP=A9
0001:0003C758 00000038 C=CODE S=.text G=(none) M=ListActns ACBP=A9
0001:0003C790 00009948 C=CODE S=.text G=(none) M=ComCtrls ACBP=A9
0001:000460D8 00000EA0 C=CODE S=.text G=(none) M=Themes ACBP=A9
0001:00046F78 0000C698 C=CODE S=.text G=(none) M=StdCtrls ACBP=A9
0001:00053610 00000168 C=CODE S=.text G=(none) M=StdActns ACBP=A9
0001:00053778 00000D1F C=CODE S=.text G=(none) M=WinHelpViewer ACBP=A9
0001:00054498 00011403 C=CODE S=.text G=(none) M=Controls ACBP=A9
0001:0006589C 00001292 C=CODE S=.text G=(none) M=ActnList ACBP=A9
0001:00066B30 00001B9C C=CODE S=.text G=(none) M=ImgList ACBP=A9
0001:000686CC 000066E1 C=CODE S=.text G=(none) M=Menus ACBP=A9
0001:0006EDB0 0000CF8C C=CODE S=.text G=(none) M=Forms ACBP=A9
0001:0007BD3C 00000050 C=CODE S=.text G=(none) M=JConsts ACBP=A9
0001:0007BD8C 000133EC C=CODE S=.text G=(none) M=jpeg ACBP=A9
0001:0008F178 00000060 C=CODE S=.text G=(none) M=ComConst ACBP=A9
0001:0008F1D8 00001259 C=CODE S=.text G=(none) M=ComObj ACBP=A9
0001:00090434 00000038 C=CODE S=.text G=(none) M=StdVCL ACBP=A9
0001:0009046C 00001793 C=CODE S=.text G=(none) M=AxCtrls ACBP=A9
0001:00091C00 00000060 C=CODE S=.text G=(none) M=OleConst ACBP=A9
0001:00091C60 00003519 C=CODE S=.text G=(none) M=OleCtrls ACBP=A9
0001:0009517C 00000314 C=CODE S=.text G=(none) M=TlHelp32 ACBP=A9
0001:00095490 00000128 C=CODE S=.text G=(none) M=WinSock ACBP=A9
0001:000955B8 00003A78 C=CODE S=.text G=(none) M=ScktComp ACBP=A9
0001:00099030 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9
0001:0009991C 00000598 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9
0001:00099EB4 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9
0001:00099EF4 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9
0001:00099F2C 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9
0001:0009A944 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9
0001:0009CA4C 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9
0001:000A5C98 00001820 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9
0001:000A74B8 0000057C C=CODE S=.text G=(none) M=Importation ACBP=A9
0001:000A7A34 000147DC C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
0001:000BC210 0000289B C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
0001:000BEAAC 00000C64 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
0001:000BF710 00003D24 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
0001:000C3434 00032118 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
0001:000F554C 00003410 C=CODE S=.text G=(none) M=UnitSR ACBP=A9
0001:000F895C 000027B4 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
0001:000FB110 0000284B C=CODE S=.text G=(none) M=verif_version ACBP=A9
0001:000FD95C 000011D0 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
0001:000FEB2C 00000C00 C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
0001:000FF72C 00002850 C=CODE S=.text G=(none) M=Unitplace ACBP=A9
0001:00101F7C 0003D29F C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9
0001:0013F21C 0003D35C C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
0001:0017C578 00002D04 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
0001:0017F27C 000004C0 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
@@ -123,15 +123,15 @@ Detailed map of segments
0002:00001030 00000020 C=DATA S=.data G=DGROUP M=ImgList ACBP=A9
0002:00001050 000000EC C=DATA S=.data G=DGROUP M=Menus ACBP=A9
0002:0000113C 00000124 C=DATA S=.data G=DGROUP M=Forms ACBP=A9
0002:00001260 00000030 C=DATA S=.data G=DGROUP M=ComObj ACBP=A9
0002:00001290 0000002C C=DATA S=.data G=DGROUP M=OleCtrls ACBP=A9
0002:000012BC 00000908 C=DATA S=.data G=DGROUP M=jpeg ACBP=A9
0002:00001BC4 00000058 C=DATA S=.data G=DGROUP M=MSCommLib_TLB ACBP=A9
0002:00001C1C 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9
0002:00001C28 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9
0002:00001C2C 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9
0002:00001C34 000000D4 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9
0002:00001D08 0000060D C=DATA S=.data G=DGROUP M=UnitPrinc ACBP=A9
0002:00001260 00000908 C=DATA S=.data G=DGROUP M=jpeg ACBP=A9
0002:00001B68 00000030 C=DATA S=.data G=DGROUP M=ComObj ACBP=A9
0002:00001B98 0000002C C=DATA S=.data G=DGROUP M=OleCtrls ACBP=A9
0002:00001BC4 00000080 C=DATA S=.data G=DGROUP M=MSCommLib_TLB ACBP=A9
0002:00001C44 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9
0002:00001C50 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9
0002:00001C54 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9
0002:00001C5C 000000D4 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9
0002:00001D30 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
@@ -189,14 +189,14 @@ Detailed map of segments
0002:00003BD4 0000000C C=BSS S=.bss G=DGROUP M=ImgList ACBP=A9
0002:00003BE0 00000010 C=BSS S=.bss G=DGROUP M=Menus ACBP=A9
0002:00003BF0 00000020 C=BSS S=.bss G=DGROUP M=Forms ACBP=A9
0002:00003C10 00000004 C=BSS S=.bss G=DGROUP M=ComConst ACBP=A9
0002:00003C14 00000011 C=BSS S=.bss G=DGROUP M=ComObj ACBP=A9
0002:00003C28 00000004 C=BSS S=.bss G=DGROUP M=StdVCL ACBP=A9
0002:00003C2C 0000001C C=BSS S=.bss G=DGROUP M=AxCtrls ACBP=A9
0002:00003C48 00000004 C=BSS S=.bss G=DGROUP M=OleConst ACBP=A9
0002:00003C4C 00000014 C=BSS S=.bss G=DGROUP M=OleCtrls ACBP=A9
0002:00003C60 00000004 C=BSS S=.bss G=DGROUP M=JConsts ACBP=A9
0002:00003C64 00000004 C=BSS S=.bss G=DGROUP M=jpeg ACBP=A9
0002:00003C10 00000004 C=BSS S=.bss G=DGROUP M=JConsts ACBP=A9
0002:00003C14 00000004 C=BSS S=.bss G=DGROUP M=jpeg ACBP=A9
0002:00003C18 00000004 C=BSS S=.bss G=DGROUP M=ComConst ACBP=A9
0002:00003C1C 00000011 C=BSS S=.bss G=DGROUP M=ComObj ACBP=A9
0002:00003C30 00000004 C=BSS S=.bss G=DGROUP M=StdVCL ACBP=A9
0002:00003C34 0000001C C=BSS S=.bss G=DGROUP M=AxCtrls ACBP=A9
0002:00003C50 00000004 C=BSS S=.bss G=DGROUP M=OleConst ACBP=A9
0002:00003C54 00000014 C=BSS S=.bss G=DGROUP M=OleCtrls ACBP=A9
0002:00003C68 00000048 C=BSS S=.bss G=DGROUP M=TlHelp32 ACBP=A9
0002:00003CB0 00000004 C=BSS S=.bss G=DGROUP M=WinSock ACBP=A9
0002:00003CB4 00000194 C=BSS S=.bss G=DGROUP M=ScktComp ACBP=A9
@@ -218,11 +218,11 @@ Detailed map of segments
0002:00430E84 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9
0002:00430E98 00000020 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9
0002:00430EB8 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9
0002:00430EBC 00000560 C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
0002:0043141C 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9
0002:00431448 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9
0002:00431454 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9
0002:0043145C 041B4F9C C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9
0002:00430EBC 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9
0002:00430EC8 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9
0002:00430ED0 041B4F80 C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9
0002:045E5E50 0000056C C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
0002:045E63BC 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9
Bound resource files
@@ -239,13 +239,13 @@ UnitTCO.dfm
UnitSR.dfm
UnitCDF.dfm
verif_version.dfm
UnitConfig.dfm
UnitDebug.dfm
UnitSimule.dfm
Unitplace.dfm
UnitPrinc.dfm
UnitConfig.dfm
UnitDebug.dfm
Signaux_complexes_GL.res
Signaux_complexes_GL.drf
Program entry point at 0001:0018307C
Program entry point at 0001:0017F58C
+34 -39
View File
@@ -1,7 +1,7 @@
unit UnitAnalyseSegCDM;
// importation des données de CDM
// Affichage de la page du réseau CDM
// les Tjs ne sont pas traitées
// les Tjs ne sont pas traitées (de toute façon CDM ne les gère pas)
// fichier source CDM générateur de l'export : cd_cdb.c version 2.0
interface
@@ -14,15 +14,13 @@ const
max_db = 20; // 20 détecteurs maxi entre 2 aiguillages
pisur180=pi/180 ;
_180surpi=180/pi;
// décalages d'affichages
yCrOffset=-5;
yCrOffset=-5; // décalages d'affichages pour les adresses
yCrOffset2=-14;
yTurnoutOffset=-16;
Zmini=50;
Zmaxi=100;
fond_cdm=$303000;
precision_clic=4; // précision du clic sur un élément
Zmini=50; // zoom mini
Zmaxi=100; // zoom maxi
fond_cdm=$303000; // couleur de fond de la fenêtre
precision_clic=4; // précision en pixels du clic sur un élément
type
TFormAnalyseCDM = class(TForm)
@@ -79,6 +77,7 @@ type
{ Déclarations publiques }
end;
// tableau des détecteurs sur un segment
TdetSeg= array[1..10] of record
index,periph : integer;
end;
@@ -88,12 +87,12 @@ type
end;
tDetect_cdm= array[1..max_db] of Trec_cdm;
// structure d'aiguillage de CDM
TAig_CDM = record
adresse,adrtriple,temps : integer;
modele : TEquipement ;
ADroit : integer ; // (TJD:identifiant extérieur) connecté sur la position droite en talon
ADroitB : char ; // P D S Z
ADevie : integer ; // (TJD:identifiant extérieur) adresse de l'élément connecté en position déviée
ADevieB : char; // caractère (D ou S)si aiguillage de l'élément connecté en position déviée
APointe : integer; // adresse de l'élément connecté en position droite ;
@@ -107,24 +106,20 @@ type
Adevie2B : char ;
// états d'une TJD (2 ou 4, 4 par défaut)
EtatTJD : integer;
// si l'aiguillage provient d'une traversée double jonction
bdj : boolean;
bdj : boolean; // si l'aiguillage provient d'une traversée double jonction
adrCDM : integer; // adresse de la bjd dans cdm
IndexSeg : integer; //
IndexSeg : integer;
end;
// structure segment, port et periph de CDM
TInter =
record
TInter = record
x,y,z : integer;
typ : string[20];
MirrorZ : integer;
MirrorParent : integer;
end;
Tport =
record
Tport = record
numero : integer; // numéro du port
typ : string[20];
x,y,z,angle : integer;
@@ -134,8 +129,7 @@ type
ConnecteAuSeg : integer; // connecté au segment
end;
TPeriph =
record
TPeriph = record
numero : integer; // numéro du port
typ : string[20];
pere : integer;
@@ -147,11 +141,10 @@ type
OnDevicePort : integer;
end;
Tsegment =
record
Tsegment = record
numero : integer;
typ : string[20]; // arc, turnout, ...
nport,nperiph,nInter : integer; // nombre de ports et de peripheriques et d'intersections
nport,nperiph,nInter : integer; // nombre de ports, de peripheriques et d'intersections
port : array of TPort;
periph : array of TPeriph;
inter : array of TInter;
@@ -193,7 +186,7 @@ uses Importation;
{$R *.dfm}
//
// renvoie l'index d'un aiguillage CDM d'adresse "adresse"
function index_aigCdm(adresse : integer) : integer;
var i : integer;
trouve : boolean;
@@ -206,7 +199,10 @@ begin
if trouve then result:=i-1 else result:=0;
end;
// cherche, isole et restreint la chaine s qui contient "chercher"
// cherche, isole et restreint la chaine s qui contient "chercher", et réduit s
// ex: isole_valeur(' periph #135 ','periph #',true)
// renvoie '135' et s='periph'
function isole_valeur(var s : string; chercher : string;afficheErr : boolean) : string;
var i : integer;
serr : string;
@@ -316,7 +312,7 @@ begin
val(s2,i,erreur);
Segment[nSeg-1].periph[nperiph-1].status:=i;
// peut être suivi de 'On device port'
// peut être suivi de 'On device port' si une adresse de détecteur ou d'actionneur se trouve sur l'appareil de voie
Segment[nSeg-1].periph[nperiph-1].OnDevicePort:=-1; // marqueur d'invalidité
s:=AnsiLowerCase(lignes[nligne+1]);
if pos('on device port',s)<>0 then
@@ -880,6 +876,7 @@ begin
degtoRad:=angle*pisur180;
end;
// dessine un arc dans le canvas, dont le centre est CenterX,Y de rayon , angle de départ et de stop en degrés
procedure D_Arc(Canvas: TCanvas; CenterX,CenterY: integer;
rayon: Integer; StartDegres, StopDegres: Double);
var
@@ -1009,7 +1006,7 @@ end;
// trace un arc selon les coordonnées CDM
procedure angle_cdm(canvas : Tcanvas;centreX,centreY:integer;debut,fin : double ;rayon : integer);
begin
coords(centreX,centreY);
coords(centreX,centreY); // transforme en coords windows
rayon:=round(rayon*reducX) div 1000;
D_arc(Canvas,centreX,centreY,rayon,debut,fin);
end;
@@ -1081,7 +1078,7 @@ end;
// dessine un arc orienté de xa,ya à xb,yb dans le canvas image (pas imprimante)
// coordonnées CDM
procedure arc_xy(canvas : tcanvas;centreX,centreY,rayon,xa,ya,xb,yb : integer);
procedure arc_xy_CDM(canvas : tcanvas;centreX,centreY,rayon,xa,ya,xb,yb : integer);
var x1,y1,x2,y2: integer ;
arcXa,arcYa,arcxb,arcYb,angleA,angleB,
cosA,SinA,CosB,SinB,vectoriel,AngleAB: double;
@@ -1235,7 +1232,7 @@ begin
canvas.pen.color:=clred;
//ligneCDM(canvas,milieuX,milieuY,centreX,centreY);
//ligneCDM(canvas,x0,y0,x1,y1);
arc_xy(canvas,centreX,centreY,round(rayonD)+250,x1,y1,x0,y0);
arc_xy_CDM(canvas,centreX,centreY,round(rayonD)+250,x1,y1,x0,y0);
centreX:=round(-rayonD*cos(alpha))+MilieuX;
centreY:=round(pente*centreX+b);
@@ -1243,7 +1240,7 @@ begin
canvas.pen.color:=clyellow;
//ligneCDM(canvas,milieuX,milieuY,centreX,centreY);
//ligneCDM(canvas,x0,y0,x1,y1);
arc_xy(canvas,centreX,centreY,round(rayonD)+250,x1,y1,x0,y0);
arc_xy_CDM(canvas,centreX,centreY,round(rayonD)+250,x1,y1,x0,y0);
exit;
// méthode directe
@@ -1284,7 +1281,7 @@ begin
centreX:=x0+5000;
centreY:=round(pente*centreX+b);
rayon:=round(sqrt(sqr(centreX-x0)+sqr(centreY-y0)));
arc_xy(canvas,centreX,centreY,rayon,x2,y2,x0,y0);
arc_xy_CDM(canvas,centreX,centreY,rayon,x2,y2,x0,y0);
// point de départ en vert
canvas.pen.color:=clLime;
@@ -1309,7 +1306,7 @@ begin
TmpBmp.Free;
end;
// rotation matricielle autour de Centre
// rotation matricielle de l'angle (en radians) autour de Centre
function XForm_Rotation(Angle : Single;Centre : TPoint) : TXForm;
var SinA,CosA: Extended;
begin
@@ -1389,7 +1386,7 @@ begin
GMode:=SetGraphicsMode(ACanvas.Handle, GM_ADVANCED);
if GetWorldTransform(ACanvas.Handle, XFormOld) then // renvoie la matrice courante dans XformOld
begin
// faire les transformations
// faire les 3 transformations
XFormRot:=XForm_Rotation(Angle,Point(l2,h2)); // rotation autour du centre
XFormScale:=XForm_Echelle(Zoom,Zoom,point(l2,h2)); // Zoom au point central
XFormXLat:=XForm_Translation(x-l2,y-h2); // décalage
@@ -1401,7 +1398,7 @@ begin
// calcule les coordonnées des 4 points de coins de l'icone qui a tourné et zoomé
// x0,y0 x3,y3
// x1,y1 x2,y2
d:=sqrt( sqr(l2)+ sqr(h2));
d:=sqrt(sqr(l2)+ sqr(h2));
//c1:=round(zoom*l2); // pour faire la rotation à la tete du train
//c2:=round(zoom*h2);
z:=zoom*d;
@@ -3845,7 +3842,7 @@ begin
end;
// compile le fichier Texte de CDM et l'importe
// compile le fichier Texte de CDM se trouvant en fenêtre principale et l'importe
procedure Compilation;
var s : string;
nombre,position,adresse,i,j,n,ISegA1,ISegA2,ISegA3,ISegA4,ISegCrois,SegBJD,
@@ -4638,8 +4635,6 @@ begin
result:=itablo>0;
end;
// allume la zone du détecteur "adresse"
procedure dessine_det(adresse : integer);
var p,centreX,CentreY,rayon,i,index,x,y,x1,y1,x2,y2,x3,y3,x4,y4,np,NindexR,NumPort,IndexportSuiv,NumSeg,indexport,
@@ -4705,7 +4700,7 @@ begin
x2:=segment[ind1].periph[per2].x;
y2:=segment[ind1].periph[per2].y;
canvas.pen.Color:=clred;
arc_xy(canvas,centreX,centreY,rayon,x1,y1,x2,y2);
arc_xy_CDM(canvas,centreX,centreY,rayon,x1,y1,x2,y2);
coords(centreX,centreY);
{coords(x2,y2);
@@ -4842,7 +4837,7 @@ begin
xs:=Segment[index].port[IndexPort].x;
ys:=Segment[index].port[IndexPort].y;
// donc tracer un arc de (x,y) détecteur à (xs,ys) port
arc_xy(canvas,centreX,centreY,rayon,x,y,xs,ys);
arc_xy_CDM(canvas,centreX,centreY,rayon,x,y,xs,ys);
end;
if (ctyp='straight') or (ctyp='pre_curve') or (ctyp='bumper_stop') then
begin
@@ -4917,7 +4912,7 @@ begin
xs:=Segment[index].port[IndexPort].x;
ys:=Segment[index].port[IndexPort].y;
// donc tracer un arc de (x,y) (détecteur) à (xs,ys) port
arc_xy(canvas,centreX,centreY,rayon,x,y,xs,ys);
arc_xy_CDM(canvas,centreX,centreY,rayon,x,y,xs,ys);
end;
if (ctyp='straight') or (ctyp='pre_curve') or (ctyp='bumper_stop') then
begin
+15 -14
View File
@@ -681,7 +681,7 @@ object FormConfig: TFormConfig
Top = 8
Width = 633
Height = 505
ActivePage = TabSheetCDM
ActivePage = TabSheetPeriph
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
@@ -1266,14 +1266,14 @@ object FormConfig: TFormConfig
end
object Label8: TLabel
Left = 14
Top = 50
Top = 48
Width = 82
Height = 13
Caption = 'Port de l'#39'interface'
end
object EditIPLenz: TEdit
Left = 176
Top = 24
Top = 20
Width = 81
Height = 21
TabStop = False
@@ -1281,7 +1281,7 @@ object FormConfig: TFormConfig
end
object EditportLenz: TEdit
Left = 176
Top = 48
Top = 44
Width = 81
Height = 21
TabStop = False
@@ -1944,7 +1944,7 @@ object FormConfig: TFormConfig
Left = 192
Top = 56
Width = 89
Height = 49
Height = 41
Hint =
'Change les adresses dans les points de connexions des aiguillage' +
's et des branches si on a chang'#233' l'#39'adresse d'#39'un aiguillage'
@@ -4035,7 +4035,7 @@ object FormConfig: TFormConfig
Height = 13
end
object SBMonte: TSpeedButton
Left = 240
Left = 256
Top = 184
Width = 25
Height = 33
@@ -4059,7 +4059,7 @@ object FormConfig: TFormConfig
OnClick = SBMonteClick
end
object SBDesc: TSpeedButton
Left = 240
Left = 256
Top = 224
Width = 25
Height = 33
@@ -4097,7 +4097,7 @@ object FormConfig: TFormConfig
object ListBoxPeriph: TListBox
Left = 8
Top = 96
Width = 233
Width = 249
Height = 273
Color = clBlack
Font.Charset = DEFAULT_CHARSET
@@ -4134,8 +4134,8 @@ object FormConfig: TFormConfig
OnClick = ButtonSupAccComClick
end
object GroupBoxDesc: TGroupBox
Left = 280
Top = 88
Left = 288
Top = 72
Width = 329
Height = 129
Caption = 'Description du p'#233'riph'#233'rique'
@@ -4148,9 +4148,9 @@ object FormConfig: TFormConfig
Caption = 'Nom du p'#233'riph'#233'rique'
end
object EditNomPeriph: TEdit
Left = 150
Left = 128
Top = 24
Width = 170
Width = 192
Height = 21
Hint = 'Nom au choix du p'#233'riph'#233'rique'
ParentShowHint = False
@@ -4163,12 +4163,13 @@ object FormConfig: TFormConfig
Left = 14
Top = 421
Width = 75
Height = 20
Height = 36
Hint = 'R'#233'ouvre les ports COMs et Sockets demand'#233's'
Caption = 'Ouvre COMs'
Caption = 'Ouvre COMs Sockets'
ParentShowHint = False
ShowHint = True
TabOrder = 4
WordWrap = True
OnClick = ButtonOuvreComClick
end
end
+280 -160
View File
@@ -358,7 +358,6 @@ type
Label31: TLabel;
Label39: TLabel;
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ListBoxAigMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
@@ -542,6 +541,7 @@ type
procedure ButtonPropageClick(Sender: TObject);
procedure EditAdrAigExit(Sender: TObject);
procedure EditAdrAigChange(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Déclarations privées }
@@ -658,7 +658,7 @@ var
// composants dynamiques
Gp1,GroupBoxAvance,GroupBoxExpert : TGroupBox;
CheckBoxCR,Cb1,Cb2,Cb3,CbVis : TCheckBox;
CheckBoxCR,Cb1,Cb2,Cb3,CbVis,cbDTR,cbRTS : TCheckBox;
MemoPeriph : Tmemo;
@@ -679,7 +679,7 @@ var
LabelStyle,LabelOuvreEcran,LabelAvance1,LabelAvance2,LabelAntiTO,
LabelTD,LabelNC,LabelFiltre,LabelAlgo,LabelNbSignBS,LabelnCantonsRes : Tlabel;
RadioReserve : TradioGroup;
RadioReserve,RadioServeurCDM : TradioGroup;
LabelDecCde : array[1..19] of TLabel;
@@ -896,7 +896,7 @@ begin
delete(s,1,i);
val(s,vitesse,i);
if (vitesse<>300) and (vitesse<>1200) and (vitesse<>2400) and (vitesse<>4800) and (vitesse<>9600) and
(vitesse<>19200) and (vitesse<>38400) and (vitesse<>57600) and (vitesse<>115200) then
(vitesse<>19200) and (vitesse<>38400) and (vitesse<>57600) and (vitesse<>115200) and (vitesse<>128000) and (vitesse<>256000) then
begin
Affiche('Vitesse COM ('+intToSTR(vitesse)+') incorrecte',clred);
result:=false;
@@ -947,6 +947,8 @@ begin
if Tablo_periph[index].ScvAct then s:=s+',1' else s:=s+',0';
if Tablo_periph[index].ScvVis then s:=s+',1' else s:=s+',0';
if Tablo_periph[index].cr then s:=s+',1' else s:=s+',0';
if Tablo_periph[index].dtr then s:=s+',1' else s:=s+',0';
if Tablo_periph[index].rts then s:=s+',1' else s:=s+',0';
s:=s+','+Tablo_periph[index].protocole;
result:=s;
@@ -1183,6 +1185,7 @@ begin
s:=s+intToSTR(Signaux[i].SR[nc].sortie0);
if nc<8 then s:=s+',' else s:=s+')';
end;
s:=s+',NA'+intToSTR(Signaux[i].na);
end;
// décodeur CDF ou digikeijs
@@ -1579,6 +1582,15 @@ begin
delete(s,1,k);
Signaux[i].SR[l].sortie0:=j;
end;
if length(s)>2 then
if copy(s,1,2)='NA' then
begin
delete(s,1,2);
val(s,j,erreur);
delete(s,1,erreur);
Signaux[i].na:=j;
end;
end;
// champ motif
@@ -2242,7 +2254,6 @@ var s,sa,SOrigine: string;
maxTablo_act:=1;
NbrePN:=0;Nligne:=1;
for i:=1 to 10 do tablo_com_cde[i].NumPeriph:=0;
// définition des actionneurs
repeat
@@ -3032,9 +3043,22 @@ var s,sa,SOrigine: string;
val(sa,i,erreur);
Tablo_periph[NbPeriph].cr:=i=1;
// nouveaux champ dtr
i:=pos(',',sa);Delete(sa,1,i);
val(sa,i,erreur);
Tablo_periph[NbPeriph].protocole:=sa;
if (i<2) and (upcase(sa[1])<>'C') then // adresse ip ou Com
begin
val(sa,i,erreur);
Tablo_periph[NbPeriph].dtr:=i=1;
i:=pos(',',sa);Delete(sa,1,i);
val(sa,i,erreur);
Tablo_periph[NbPeriph].rts:=i=1;
i:=pos(',',sa);Delete(sa,1,i);
end;
Tablo_periph[NbPeriph].protocole:=uppercase(sa);
i:=com_socket(NbPeriph);
if i=1 then
begin
@@ -3052,7 +3076,6 @@ var s,sa,SOrigine: string;
i:=extract_int(sa);
if i=0 then Affiche('Erreur 97 - Port COM nul : '+sOrigine,clred);
Tablo_periph[NbPeriph].NumCom:=i;
Tablo_com_cde[NbPeriph].NumPeriph:=NbPeriph;
end;
until (sOrigine='0') or (NbPeriph>=NbMaxi_Periph);
end;
@@ -4160,6 +4183,7 @@ begin
if (AdrBaseDetDccpp<0) or (AdrBaseDetDccpp>2048) then AdrBaseDetDccpp:=513;
mode_Reserve:=RadioReserve.ItemIndex; // 0 = par canton - 1=par détecteurs
serveurIPCDM_Touche:=radioServeurCDM.ItemIndex=0;
val(EditAlgo.Text,i,erreur);
if (i<1) or (i>1) then i:=1;
@@ -4220,142 +4244,6 @@ begin
end;
procedure TFormConfig.FormActivate(Sender: TObject);
var i : integer;
s : string;
begin
if affevt then affiche('FormConfig activate',clLime);
activ:=true;
clicListe:=false;
Edit_HG.Visible:=false;
labelHG.Visible:=false;
EditP1.Visible:=false;
EditP2.Visible:=false;
EditP3.Visible:=false;
EditP4.Visible:=false;
LabelTJD1.Visible:=false;
LabelTJD2.Visible:=false;
EditDevieS2.Visible:=false;
Label18.Visible:=false;
Label20.Visible:=false;
if AvecRoulage=1 then LabelInfVitesse.Visible:=false else LabelInfVitesse.Visible:=true;
EditP1.ReadOnly:=false;
EditP2.ReadOnly:=false;
EditP3.ReadOnly:=false;
EditP4.ReadOnly:=false;
EditPointe_BG.ReadOnly:=false;
EditDevie_HD.ReadOnly:=false;
EditDroit_BD.ReadOnly:=false;
Edit_HG.ReadOnly:=false;
CheckBoxAffMemo.Checked:=AffMemoFenetre=1;
EditNbCantons.text:=intToSTR(Nb_cantons_Sig);
EditTempoFeu.Text:=IntToSTR(Tempo_Signal);
EditNbDetDist.text:=IntToSTR(Nb_Det_dist);
EditAdrIPCDM.text:=adresseIPCDM;
EditPortCDM.Text:=IntToSTR(portCDM);
EditIPLenz.text:=AdresseIP;
EditportLenz.text:=IntToSTR(PortInterface);
EditTempoAig.Text:=IntToSTR(Tempo_Aig);
EditFiltrDet.text:=intToSTR(filtrageDet0);
EditnCantonsRes.Text:=intToSTR(nCantonsRes);
EditAntiTO.Text:=intToSTR(AntiTimeoutEthLenz);
{$IF CompilerVersion >= 28.0}
ComboStyle.itemIndex:=Style_Aff;
{$IFEND}
EditOuvreEcran.Text:=intToSTR(ecran_SC);
EditComUSB.Text:=PortCom;
EditFonte.text:=IntToSTR(TailleFonte);
editdebug.Text:=IntToSTR(debug);
CheckBoxVerifXpressNet.Checked:=Verif_AdrXpressNet=1;
editPortServeur.Text:=intToSTR(portServeur);
checkRoulage.Checked:=AvecRoulage=1;
EditTempoOctetUSB.text:=IntToSTR(TempoOctet);
EditTempoReponse.Text:=IntToSTR(TimoutMaxInterface);
RadioButton1.checked:=false;
RadioButton2.checked:=false;
if Valeur_entete=0 then RadioButton1.checked:=true;
if Valeur_entete=1 then RadioButton2.checked:=true;
LabelInfo.Width:=240;LabelInfo.Height:=65;LabelInfo.AutoSize:=false;
LabelResult.width:=137;LabelResult.Height:=25;
LabelNomSon.top:=16;LabelNomSon.Left:=48;
SpeedButtonJoue.Top:=60; SpeedButtonCharger.Top:=60;
EditSon.Top:=38;EditSon.Left:=16;
CheckBoxResa.Checked:=AvecResa;
CheckVerifVersion.Checked:=verifVersion;
CheckFenEt.Checked:=Fenetre=1;
CheckInfoVersion.Checked:=notificationVersion;
CheckLanceCDM.Checked:=LanceCDM;
CheckAvecTCO.checked:=avecTCO;
CheckBandeauTCO.Checked:=MasqueBandeauTCO;
RadioButtonSS.Checked:=ServeurInterfaceCDM=0;
RadioButtonXN.Checked:=ServeurInterfaceCDM=1;
RadioButtonP50.Checked:=ServeurInterfaceCDM=2;
RadioButtonSP.Checked:=ServeurInterfaceCDM=3;
RadioButtonFIS.Checked:=ServeurInterfaceCDM=4;
RadioButtonRS.Checked:=ServeurInterfaceCDM=5;
RadioButtonDCCpp.Checked:=ServeurInterfaceCDM=6;
RadioButtonECOS.Checked:=ServeurInterfaceCDM=7;
RadioButtonDCCpl.Checked:=ServeurInterfaceCDM=8;
RadioButton13.Checked:=ServeurRetroCDM=1;
RadioButton14.Checked:=ServeurRetroCDM=2;
RadioButton15.Checked:=ServeurRetroCDM=3;
RadioButton16.Checked:=ServeurRetroCDM=4;
RadioButton17.Checked:=ServeurRetroCDM=5;
RadioButton18.Checked:=ServeurRetroCDM=6;
checkBoxZ21.Checked:=Z21;
CheckBoxServAig.checked:=Srvc_Aig;
CheckBoxServDet.checked:=Srvc_Det;
CheckBoxServAct.checked:=Srvc_Act;
CheckServPosTrains.checked:=Srvc_Pos;
CheckBoxSrvSig.Checked:=Srvc_Sig;
CheckBoxRazSignaux.checked:=Raz_Acc_signaux;
CheckBoxInitAig.checked:=AvecInitAiguillages;
CheckPosAig.checked:=AvecDemandeAiguillages;
CheckBoxDemarUSB.checked:=AvecDemandeInterfaceUSB;
CheckBoxDemarEth.checked:=AvecDemandeInterfaceEth;
CheckBoxSombre.Checked:=sombre;
RadioButtonXpress.Checked:=protocole=1;
RadioButtonDcc.Checked:=protocole=2;
if NbreDecPers>0 then
ComboBoxNation.Itemindex:=decodeur_pers[1].nation-1;
clicListe:=true; // empeche le traitement de l'evt text
editLAY.Text:=lay;
LabelNbDecPers.caption:=intToSTR(NbreDecPers);
//l'onglet affiché est sélectionné à l'appel de la fiche dans l'unité UnitPrinc
clicListe:=false;
activ:=false;
if clicproprietes then clicListeSignal(IndexSignalClic);
clicproprietes:=false;
// aiguillages
ListBoxAig.Clear;
for i:=1 to MaxAiguillage do
begin
s:=encode_aig(i);
ListBoxAig.Items.AddObject(s, Pointer(clRed));
Aiguillage[i].modifie:=false;
end;
ListBoxAig.itemindex:=0;
RadioReserve.ItemIndex:=mode_Reserve;
editAlgo.Text:=intToSTR(Algo_localisation);
EditMaxSignalSens.Text:=intToSTR(Max_Signal_Sens);
end;
procedure champs_dec_centrale;
var i,nombre : integer;
@@ -4551,6 +4439,9 @@ begin
if pos('Det',s)<>0 then Tablo_periph[ligneClicAccPeriph+1].ScvDet:=cb.Checked;
if pos('Act',s)<>0 then Tablo_periph[ligneClicAccPeriph+1].ScvAct:=cb.Checked;
if pos('Vis',s)<>0 then Tablo_periph[ligneClicAccPeriph+1].ScvVis:=cb.Checked;
if pos('DTR',s)<>0 then Tablo_periph[ligneClicAccPeriph+1].dtr:=cb.Checked;;
if pos('RTS',s)<>0 then Tablo_periph[ligneClicAccPeriph+1].rts:=cb.Checked;
if s='CheckBoxCR' then Tablo_periph[ligneClicAccPeriph+1].CR:=cb.Checked;
s:=encode_Periph(ligneClicAccPeriph+1);
ListBoxPeriph.Items[ligneClicAccPeriph]:=s;
@@ -4730,7 +4621,6 @@ begin
LabelInfo.caption:='';
Tablo_periph[ligneClicAccPeriph+1].NumCom:=i;
Tablo_com_cde[ligneClicAccPeriph+1].NumPeriph:=ligneClicAccPeriph+1;
ListBoxPeriph.Selected[ligneClicAccPeriph]:=true;
maj_champs_combos(ligneClicAccPeriph+1);
@@ -4747,14 +4637,12 @@ begin
inc(NbPeriph_COMUSB);
if NbPeriph_COMUSB>MaxComUSBPeriph then labelInfo.Caption:='Nombre maxi de périphériques COM/USB atteint';
Tablo_periph[i].numComposant:=NbPeriph_COMUSB;
Tablo_com_cde[i].NumPeriph:=NbPeriph_COMUSB;
end;
if v=2 then
begin
inc(NbPeriph_Socket);
if NbPeriph_Socket>MaxComSocketPeriph then labelInfo.Caption:='Nombre maxi de périphériques socket atteint';
Tablo_periph[NbPeriph].numComposant:=NbPeriph_socket;
Tablo_com_cde[i].NumPeriph:=NbPeriph_Socket;
end;
end;
end;
@@ -4832,8 +4720,9 @@ procedure TFormConfig.FormCreate(Sender: TObject);
var i,j,x,y,l,LongestLength,PixelLength : integer;
cs,s,LongestString : string;
begin
if debug=1 then Affiche('Création fenêtre config',clLime);
if AffEvt or (debug=1) then Affiche('Création fenêtre config',clLime);
visible:=false;
clicListe:=true;
position:=poMainFormCenter;
cs:='ColorA='+IntToHex(couleurFond,6); // pour rajouter aux couleurs personnalisées de la fenetre couleur
@@ -4886,6 +4775,7 @@ begin
ShowHint:=false;
visible:=true;
end;
// création des champs dynamiques de l'onglet décodeurs
for i:=1 to 10 do
begin
@@ -5708,9 +5598,9 @@ begin
MemoPeriph:=Tmemo.Create(Formconfig.TabSheetPeriph);
with MemoPeriph do
begin
left:=gp1.Left-30;
left:=gp1.Left-20;
top:=LabelMP.Top+15;
width:=gp1.Width+30;
width:=gp1.Width+20;
height:=110;
parent:=TabSheetPeriph;
Name:='MemoPeriph';
@@ -5725,12 +5615,13 @@ begin
BoutonCom:=Tbutton.Create(FormConfig.TabSheetPeriph);
with BoutonCom do
begin
Left:=100;Top:=ButtonOuvreCom.top;Width:=75;Height:=20;
Left:=100;Top:=ButtonOuvreCom.top;Width:=75;Height:=36;
caption:='Lister COMs';
name:='BoutonCom';
parent:=FormConfig.TabSheetPeriph;
hint:='Affiche les ports COM/USB disponibles';
ShowHint:=true;
wordwrap:=true;
onclick:=formconfig.Bt_onclick;
end;
@@ -5792,6 +5683,31 @@ begin
onclick:=formconfig.cb_onclick;
end;
cbDTR:=TCheckBox.Create(FormConfig.TabSheetPeriph);
with cbDTR do
begin
parent:=groupBoxDesc;
Left:=200;Top:=LabelPortCde.Top+30;Width:=100;Height:=17;
caption:='DTR';
name:='cbDTR';
hint:='COM/USB uniquement.'+#13+'Décoché: mise à 0 de ligne DTR et évite le reset de la plupart des arduinos,'+#13+'ou peut bloquer la transmission sur d''autres.';
ShowHint:=true;
onclick:=formconfig.cb_onclick;
end;
cbRTS:=TCheckBox.Create(FormConfig.TabSheetPeriph);
with cbRTS do
begin
parent:=groupBoxDesc;
Left:=200;Top:=cbDTR.top+20;Width:=100;Height:=17;
caption:='RTS';
name:='cbRTS';
hint:='COM/USB uniquement : mise à 0 ou 1 de ligne RTS';
ShowHint:=true;
onclick:=formconfig.cb_onclick;
end;
// compilation avec D11----------------------------------------
{$IF CompilerVersion >= 28.0}
labelD11.Visible:=true;
@@ -5839,7 +5755,7 @@ begin
LabelAvance1:=TLabel.Create(FormConfig.TabAvance);
with LabelAvance1 do
begin
Left:=10;Top:=10;Width:=170;Height:=12;
Left:=10;Top:=10;Width:=180;Height:=12;
caption:='Paramètres avancés et experts';
name:='LabelAvance1';
Font.Style:=[fsBold];
@@ -5850,7 +5766,7 @@ begin
GroupBoxAvance:=TGroupBox.Create(FormConfig.TabAvance);
with GroupBoxAvance do
begin
Left:=20;Top:=40;Width:=350;Height:=150; // maxi=580
Left:=3;Top:=40;Width:=300;Height:=150; // maxi=580
caption:='Jeu de paramètres avancés';
name:='GroupBoxAvance';
parent:=TabAvance;
@@ -5961,7 +5877,7 @@ begin
RadioReserve:=TRadioGroup.Create(TabAvance);
with RadioReserve do
begin
Left:=20;Top:=GroupBoxAvance.top+GroupBoxAvance.Height+20;Width:=GroupBoxAvance.width;Height:=60;
Left:=5;Top:=GroupBoxAvance.top+GroupBoxAvance.Height+10;Width:=GroupBoxAvance.width;Height:=60;
name:='RadioReserve';
Caption:='Réservation des aiguillages';
parent:=TabAvance;
@@ -5971,11 +5887,12 @@ begin
items.Add('Réservation par canton');
items.Add('Réservation par détecteurs');
end;
GroupBoxExpert:=TGroupBox.Create(FormConfig.TabAvance);
with GroupBoxExpert do
begin
Left:=20;;Width:=350;Height:=100; // maxi=580
Top:=RadioReserve.Top+RadioReserve.Height+20 ;
Left:=GroupBoxAvance.Left;Width:=GroupBoxAvance.width;Height:=100; // maxi=580
Top:=RadioReserve.Top+RadioReserve.Height+10 ;
caption:='Jeu de paramètres experts';
name:='GroupBoxExpert';
parent:=TabAvance;
@@ -6021,6 +5938,19 @@ begin
ShowHint:=true;
end;
RadioServeurCDM:=TRadioGroup.Create(TabAvance);
with RadioServeurCDM do
begin
Left:=GroupBoxAvance.Left;Top:=GroupBoxExpert.top+GroupBoxExpert.Height+10;Width:=GroupBoxAvance.width;Height:=60;
name:='RadioServeurCDM';
Caption:='Méthode de démarrage du serveur de CDM rail';
parent:=TabAvance;
hint:='Démarrage du serveur COM-IP de CDMRail';
ShowHint:=true;
items.Add('Par simulation de touches');
items.Add('Par ligne de commande');
end;
ImageSignaux.picture.Assign(formpilote.ImageSignaux.Picture);
@@ -6155,7 +6085,11 @@ begin
cb2.Checked:=Tablo_periph[index].ScvDet;
cb3.Checked:=Tablo_periph[index].ScvAct;
cbVis.Checked:=Tablo_periph[index].ScvVis;
cbDTR.Checked:=Tablo_periph[index].dtr;
cbRTS.Checked:=Tablo_periph[index].rts;
CheckBoxCR.Checked:=Tablo_periph[index].cr;
EditPortCde.text:=Tablo_periph[index].protocole;
MemoPeriph.Clear;
clicliste:=false;
@@ -6163,7 +6097,7 @@ end;
// affiche le graphisme de l'aiguillage en fonction du tablo en index
procedure Aff_champs_aig_tablo(index : integer);
var Adresse,Adr2,ind,id2,erreur,position : integer;
var Adresse,Adr2,ind,id2,erreur,position,AncienAdresse : integer;
tjd,tri,tjs,croi : boolean;
s,ss : string;
i,vitesse : integer;
@@ -6408,6 +6342,17 @@ begin
if croi then s:='Croisement ' else s:='Aiguillage ';
formconfig.labelInfo.caption:=s+'décrivant la BJS '+intToSTR(aiguillage[index].AdrCDM);
end;
adresse:=aiguillage[ligneclicAig+1].Adresse;
if adresse=0 then exit;
index:=Index_Aig(Adresse);
AncienAdresse:=aiguillage[index].AncienAdresse;
if adresse<>AncienAdresse then
FormConfig.ButtonPropage.Hint:='Change les adresses '+intToSTR(AncienAdresse)+' dans les points de connexions'+#13+
'des aiguillages et des branches par l''adresse '+intToSTR(adresse)
else FormConfig.ButtonPropage.Hint:='Change les adresses dans les points de connexions'+#13+
'des aiguillages, des branches et des signaux'+#13+
'si on a changé l''adresse d''un aiguillage';
clicListe:=false;
end;
@@ -9320,6 +9265,32 @@ begin
Signaux[i].Aspect:=3;
Signaux[i].decodeur:=0;
Signaux[i].verrouCarre:=false;
Signaux[i].SR[1].sortie0:=1;
Signaux[i].SR[1].sortie1:=6;
Signaux[i].SR[2].sortie0:=2;
Signaux[i].SR[2].sortie1:=3;
Signaux[i].SR[3].sortie0:=9;
Signaux[i].SR[3].sortie1:=10;
Signaux[i].SR[4].sortie0:=4;
Signaux[i].SR[4].sortie1:=5;
Signaux[i].SR[5].sortie0:=7;
Signaux[i].SR[5].sortie1:=8;
Signaux[i].SR[6].sortie0:=0;
Signaux[i].SR[6].sortie1:=0;
Signaux[i].SR[7].sortie0:=16;
Signaux[i].SR[7].sortie1:=18;
Signaux[i].SR[8].sortie0:=19;
Signaux[i].SR[8].sortie1:=0;
Signaux[i].Na:=4;
cree_image(i);
s:=encode_signal(i);
@@ -9565,7 +9536,7 @@ begin
93,94,95,96,97,98,99 : nc:=4;
end;
end;
if dec=7 then nc:=8; // SR
if dec=7 then nc:=Signaux[i].Na; // SR
if dec=8 then // arcomora
begin
case x of
@@ -13509,7 +13480,6 @@ var ss,s : string;
s:=encode_Periph(i);
if s<>'' then
begin
Tablo_com_cde[i].NumPeriph:=i;
FormConfig.ListBoxPeriph.items.Add(s);
ajoute_champs_combos(i);
end;
@@ -13621,7 +13591,7 @@ begin
begin
if com_socket(i)=1 then // si port com$usb
begin
if connecte_port_usb_periph(i) then
if connecte_usb_periph(i) then
Affiche('COM'+intToSTR(Tablo_periph[i].numcom)+' périphérique ouvert',clLime)
else Affiche('COM'+intToSTR(Tablo_periph[i].numcom)+' périphérique non ouvert',clOrange);
end
@@ -13908,6 +13878,7 @@ begin
inc(i);
until (i=n) or trouve;
if not(trouve) then exit;
dec(i);
if i=0 then exit;
@@ -14252,12 +14223,16 @@ begin
end;
end;
ButtonPropage.Hint:='Change les adresses dans les points de connexions'+#13+
'des aiguillages, des branches et des signaux'+#13+
'si on a changé l''adresse d''un aiguillage';
clicListe:=false;
end;
procedure change_adr_aig;
var s : string;
nEtat,i,vide,erreur,index,adr2 : integer;
nEtat,i,vide,erreur,index,adr2,AncienAdresse : integer;
modele: TEquipement;
c : char;
begin
@@ -14339,6 +14314,14 @@ begin
end;
ListBoxSig.selected[ligneClicSig]:=true;
end;
adresse:=aiguillage[ligneclicAig+1].Adresse;
if adresse=0 then exit;
index:=Index_Aig(Adresse);
AncienAdresse:=aiguillage[index].AncienAdresse;
if adresse<>AncienAdresse then
ButtonPropage.Hint:='Change les adresses '+intToSTR(AncienAdresse)+' dans les points de connexions'+#13+
'des aiguillages et des branches par l''adresse '+intToSTR(adresse);
end;
end;
@@ -14357,6 +14340,143 @@ begin
change_adr_aig;
end;
procedure TFormConfig.FormActivate(Sender: TObject);
var i : integer;
s : string;
begin
if affevt or (debug=1) then affiche('FormConfig activate',clLime);
activ:=true;
clicListe:=false;
Edit_HG.Visible:=false;
labelHG.Visible:=false;
EditP1.Visible:=false;
EditP2.Visible:=false;
EditP3.Visible:=false;
EditP4.Visible:=false;
LabelTJD1.Visible:=false;
LabelTJD2.Visible:=false;
EditDevieS2.Visible:=false;
Label18.Visible:=false;
Label20.Visible:=false;
if AvecRoulage=1 then LabelInfVitesse.Visible:=false else LabelInfVitesse.Visible:=true;
EditP1.ReadOnly:=false;
EditP2.ReadOnly:=false;
EditP3.ReadOnly:=false;
EditP4.ReadOnly:=false;
EditPointe_BG.ReadOnly:=false;
EditDevie_HD.ReadOnly:=false;
EditDroit_BD.ReadOnly:=false;
Edit_HG.ReadOnly:=false;
CheckBoxAffMemo.Checked:=AffMemoFenetre=1;
EditNbCantons.text:=intToSTR(Nb_cantons_Sig);
EditTempoFeu.Text:=IntToSTR(Tempo_Signal);
EditNbDetDist.text:=IntToSTR(Nb_Det_dist);
EditAdrIPCDM.text:=adresseIPCDM;
EditPortCDM.Text:=IntToSTR(portCDM);
EditIPLenz.text:=AdresseIP;
EditportLenz.text:=IntToSTR(PortInterface);
EditTempoAig.Text:=IntToSTR(Tempo_Aig);
EditFiltrDet.text:=intToSTR(filtrageDet0);
EditnCantonsRes.Text:=intToSTR(nCantonsRes);
EditAntiTO.Text:=intToSTR(AntiTimeoutEthLenz);
{$IF CompilerVersion >= 28.0}
ComboStyle.itemIndex:=Style_Aff;
{$IFEND}
EditOuvreEcran.Text:=intToSTR(ecran_SC);
EditComUSB.Text:=PortCom;
EditFonte.text:=IntToSTR(TailleFonte);
editdebug.Text:=IntToSTR(debug);
CheckBoxVerifXpressNet.Checked:=Verif_AdrXpressNet=1;
editPortServeur.Text:=intToSTR(portServeur);
checkRoulage.Checked:=AvecRoulage=1;
EditTempoOctetUSB.text:=IntToSTR(TempoOctet);
EditTempoReponse.Text:=IntToSTR(TimoutMaxInterface);
RadioButton1.checked:=false;
RadioButton2.checked:=false;
if Valeur_entete=0 then RadioButton1.checked:=true;
if Valeur_entete=1 then RadioButton2.checked:=true;
LabelInfo.Width:=240;LabelInfo.Height:=65;LabelInfo.AutoSize:=false;
LabelResult.width:=137;LabelResult.Height:=25;
LabelNomSon.top:=16;LabelNomSon.Left:=48;
SpeedButtonJoue.Top:=60; SpeedButtonCharger.Top:=60;
EditSon.Top:=38;EditSon.Left:=16;
CheckBoxResa.Checked:=AvecResa;
CheckVerifVersion.Checked:=verifVersion;
CheckFenEt.Checked:=Fenetre=1;
CheckInfoVersion.Checked:=notificationVersion;
CheckLanceCDM.Checked:=LanceCDM;
CheckAvecTCO.checked:=avecTCO;
CheckBandeauTCO.Checked:=MasqueBandeauTCO;
RadioButtonSS.Checked:=ServeurInterfaceCDM=0;
RadioButtonXN.Checked:=ServeurInterfaceCDM=1;
RadioButtonP50.Checked:=ServeurInterfaceCDM=2;
RadioButtonSP.Checked:=ServeurInterfaceCDM=3;
RadioButtonFIS.Checked:=ServeurInterfaceCDM=4;
RadioButtonRS.Checked:=ServeurInterfaceCDM=5;
RadioButtonDCCpp.Checked:=ServeurInterfaceCDM=6;
RadioButtonECOS.Checked:=ServeurInterfaceCDM=7;
RadioButtonDCCpl.Checked:=ServeurInterfaceCDM=8;
RadioButton13.Checked:=ServeurRetroCDM=1;
RadioButton14.Checked:=ServeurRetroCDM=2;
RadioButton15.Checked:=ServeurRetroCDM=3;
RadioButton16.Checked:=ServeurRetroCDM=4;
RadioButton17.Checked:=ServeurRetroCDM=5;
RadioButton18.Checked:=ServeurRetroCDM=6;
checkBoxZ21.Checked:=Z21;
CheckBoxServAig.checked:=Srvc_Aig;
CheckBoxServDet.checked:=Srvc_Det;
CheckBoxServAct.checked:=Srvc_Act;
CheckServPosTrains.checked:=Srvc_Pos;
CheckBoxSrvSig.Checked:=Srvc_Sig;
CheckBoxRazSignaux.checked:=Raz_Acc_signaux;
CheckBoxInitAig.checked:=AvecInitAiguillages;
CheckPosAig.checked:=AvecDemandeAiguillages;
CheckBoxDemarUSB.checked:=AvecDemandeInterfaceUSB;
CheckBoxDemarEth.checked:=AvecDemandeInterfaceEth;
CheckBoxSombre.Checked:=sombre;
RadioButtonXpress.Checked:=protocole=1;
RadioButtonDcc.Checked:=protocole=2;
if NbreDecPers>0 then
ComboBoxNation.Itemindex:=decodeur_pers[1].nation-1;
clicListe:=true; // empeche le traitement de l'evt text
editLAY.Text:=lay;
LabelNbDecPers.caption:=intToSTR(NbreDecPers);
//l'onglet affiché est sélectionné à l'appel de la fiche dans l'unité UnitPrinc
clicListe:=false;
activ:=false;
if clicproprietes then clicListeSignal(IndexSignalClic);
clicproprietes:=false;
// aiguillages
ListBoxAig.Clear;
for i:=1 to MaxAiguillage do
begin
s:=encode_aig(i);
ListBoxAig.Items.AddObject(s, Pointer(clRed));
Aiguillage[i].modifie:=false;
end;
ListBoxAig.itemindex:=0;
RadioReserve.ItemIndex:=mode_Reserve;
if serveurIPCDM_Touche then RadioServeurCDM.ItemIndex:=0 else RadioServeurCDM.ItemIndex:=1;
editAlgo.Text:=intToSTR(Algo_localisation);
EditMaxSignalSens.Text:=intToSTR(Max_Signal_Sens);
end;
end.
+6 -3
View File
@@ -338,7 +338,7 @@ object FormConfCellTCO: TFormConfCellTCO
object EditNumTCO: TEdit
Left = 104
Top = 20
Width = 33
Width = 25
Height = 21
TabOrder = 1
OnChange = EditNumTCOChange
@@ -366,7 +366,10 @@ object FormConfCellTCO: TFormConfCellTCO
Top = 72
Width = 89
Height = 17
Hint = 'Active un accessoire de fa'#231'on impulsionelle'
Caption = 'Activer sortie'
ParentShowHint = False
ShowHint = True
TabOrder = 4
OnClick = RadioButtonActionClick
end
@@ -392,10 +395,10 @@ object FormConfCellTCO: TFormConfCellTCO
object RadioButtonStop: TRadioButton
Left = 8
Top = 88
Width = 177
Width = 137
Height = 17
Hint = 'Arr'#234'te tous les trains (mode autonome et CDM)'
Caption = 'Arr'#234'ter toutes les trains'
Caption = 'Arr'#234'ter tous les trains'
ParentShowHint = False
ShowHint = True
TabOrder = 7
+2 -2
View File
@@ -477,7 +477,7 @@ var i : integer;
begin
// fenetre toujours dessus
position:=poMainFormCenter;
if affevt then Affiche('FormConfCellTCO create',clyellow);
if affevt then Affiche('FormConfCellTCO create',clLime);
actualize:=false;
SetWindowPos(Handle,HWND_TOPMOST,0,0,0,0,SWP_NoMove or SWP_NoSize);
iconeX:=50; // taille de l'icone
@@ -594,7 +594,7 @@ end;
procedure TFormConfCellTCO.FormActivate(Sender: TObject);
begin
if indexTCOcourant=0 then exit;
if affevt then Affiche('FormConfCellTCO activate',clyellow);
if affevt then Affiche('FormConfCellTCO activate',clLime);
if selectionaffichee[indexTCOcourant] then ButtonFond.caption:='Couleur de fond de la sélection'
else ButtonFond.caption:='Couleur de fond de la cellule';
ConfCellTCO:=true;
+318 -281
View File
@@ -1,12 +1,13 @@
object FormDebug: TFormDebug
Left = 234
Top = 128
Width = 884
Height = 732
Left = 196
Top = 37
VertScrollBar.Increment = 67
VertScrollBar.Position = 17
VertScrollBar.Tracking = True
VertScrollBar.Visible = False
AutoScroll = False
Caption = 'Fen'#234'tre de d'#233'bug'
ClientHeight = 757
ClientWidth = 946
Color = clWindow
TransparentColorValue = clTeal
Font.Charset = DEFAULT_CHARSET
@@ -21,13 +22,40 @@ object FormDebug: TFormDebug
OnCreate = FormCreate
OnKeyPress = FormKeyPress
DesignSize = (
859
701)
946
757)
PixelsPerInch = 96
TextHeight = 13
object ScrollBoxDebug: TScrollBox
Left = 0
Top = 0
Width = 940
Height = 772
HorzScrollBar.Visible = False
Anchors = [akLeft, akTop, akRight, akBottom]
Color = clBtnFace
ParentColor = False
TabOrder = 0
DesignSize = (
919
768)
object LabelTitreDebug: TLabel
Left = 543
Top = 8
Width = 131
Height = 18
Anchors = [akTop, akRight]
Caption = 'Fen'#234'tre de d'#233'bug'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Arial'
Font.Style = [fsBold, fsItalic]
ParentFont = False
end
object Label1: TLabel
Left = 615
Top = -13
Left = 695
Top = 10
Width = 108
Height = 13
Anchors = [akTop, akRight]
@@ -41,84 +69,38 @@ object FormDebug: TFormDebug
ParentColor = False
ParentFont = False
end
object LabelTitreDebug: TLabel
Left = 463
Top = -15
Width = 131
Height = 18
Anchors = [akTop, akRight]
Caption = 'Fen'#234'tre de d'#233'bug'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Arial'
Font.Style = [fsBold, fsItalic]
ParentFont = False
end
object EditNivDebug: TEdit
Left = 774
Top = -15
Width = 49
Height = 21
Anchors = [akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
object RichDebug: TRichEdit
Left = 0
Top = 0
Width = 522
Height = 753
Anchors = [akLeft, akTop, akRight]
Color = clMaroon
Lines.Strings = (
'RichDebug')
PopupMenu = PopupMenuRD
ScrollBars = ssBoth
TabOrder = 0
Text = 'EditNivDebug'
OnKeyPress = EditNivDebugKeyPress
OnChange = RichDebugChange
end
object ButtonEcrLog: TButton
Left = 462
Top = 311
Width = 97
Height = 29
Anchors = [akTop, akRight]
Caption = 'Sauvegarder le log'
TabOrder = 1
OnClick = ButtonEcrLogClick
end
object ButtonRazTampon: TButton
Left = 462
Top = 343
Width = 97
Height = 33
Anchors = [akTop, akRight]
Caption = 'Raz Tampon Ev'#232'nements ---->'
TabOrder = 2
WordWrap = True
OnClick = ButtonRazTamponClick
end
object ButtonCherche: TButton
Left = 462
Top = 279
object ButtonRazTout: TButton
Left = 533
Top = 216
Width = 97
Height = 25
Hint = 'Cherche la cha'#238'ne "erreur"'
Hint =
'Supprime les trains d'#233'tect'#233's ou en cas de nouveau RUN, permet de' +
' partir de 0'
Anchors = [akTop, akRight]
Caption = 'Chercher erreurs'
Caption = 'RAZ tous trains'
ParentShowHint = False
ShowHint = True
TabOrder = 3
OnClick = ButtonChercheClick
end
object ButtonAffEvtChrono: TButton
Left = 462
Top = 239
Width = 97
Height = 33
Anchors = [akTop, akRight]
Caption = 'Affiche Evts d'#233'tecteurs et aig'
TabOrder = 4
WordWrap = True
OnClick = ButtonAffEvtChronoClick
TabOrder = 1
OnClick = ButtonRazToutClick
end
object ButtonCop: TButton
Left = 462
Top = 191
Left = 533
Top = 248
Width = 97
Height = 41
Anchors = [akTop, akRight]
@@ -129,25 +111,225 @@ object FormDebug: TFormDebug
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 5
TabOrder = 2
WordWrap = True
OnClick = ButtonCopClick
end
object ButtonAffEvtChrono: TButton
Left = 533
Top = 296
Width = 97
Height = 33
Anchors = [akTop, akRight]
Caption = 'Affiche Evts d'#233'tecteurs et aig'
TabOrder = 3
WordWrap = True
OnClick = ButtonAffEvtChronoClick
end
object ButtonCherche: TButton
Left = 533
Top = 336
Width = 97
Height = 25
Hint = 'Cherche la cha'#238'ne "erreur"'
Anchors = [akTop, akRight]
Caption = 'Chercher erreurs'
ParentShowHint = False
ShowHint = True
TabOrder = 4
OnClick = ButtonChercheClick
end
object ButtonEcrLog: TButton
Left = 533
Top = 184
Width = 97
Height = 29
Anchors = [akTop, akRight]
Caption = 'Sauvegarder le log'
TabOrder = 5
OnClick = ButtonEcrLogClick
end
object ButtonRazTampon: TButton
Left = 533
Top = 368
Width = 97
Height = 33
Anchors = [akTop, akRight]
Caption = 'Raz Tampon Ev'#232'nements ---->'
TabOrder = 6
WordWrap = True
OnClick = ButtonRazTamponClick
end
object ButtonRazLog: TButton
Left = 462
Top = 383
Left = 533
Top = 408
Width = 97
Height = 33
Anchors = [akTop, akRight]
Caption = 'Raz Tampon Log <-----'
TabOrder = 6
TabOrder = 7
WordWrap = True
OnClick = ButtonRazLogClick
end
object GroupBox1: TGroupBox
Left = 468
Top = 583
Width = 369
object MemoEvtDet: TRichEdit
Left = 638
Top = 186
Width = 272
Height = 263
Anchors = [akTop, akRight]
Color = clBlack
ScrollBars = ssVertical
TabOrder = 8
OnChange = MemoEvtDetChange
end
object GroupBox5: TGroupBox
Left = 530
Top = 456
Width = 380
Height = 57
Anchors = [akTop, akRight]
Caption = 'Simulation d'#233'tecteur / actionneur'
Color = cl3DLight
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
TabOrder = 9
object EditSimuDet: TEdit
Left = 16
Top = 24
Width = 33
Height = 21
Hint = 'Adresse d'#39'un d'#233'tecteur'
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
object ButtonSimuDet0: TButton
Left = 72
Top = 16
Width = 65
Height = 33
Caption = 'D'#233'tecteur '#224' 0'
TabOrder = 1
WordWrap = True
OnClick = ButtonSimuDet0Click
end
object ButtonSimuDet1: TButton
Left = 152
Top = 16
Width = 65
Height = 33
Caption = 'D'#233'tecteur '#224' 1'
TabOrder = 2
WordWrap = True
OnClick = ButtonSimuDet1Click
end
object ButtonSimuAct0: TButton
Left = 224
Top = 16
Width = 65
Height = 33
Caption = 'Actionneur '#224' 0'
TabOrder = 3
WordWrap = True
OnClick = ButtonSimuAct0Click
end
object ButtonSimuAct1: TButton
Left = 296
Top = 16
Width = 65
Height = 33
Caption = 'Actionneur '#224' 1'
TabOrder = 4
WordWrap = True
OnClick = ButtonSimuAct1Click
end
end
object GroupBox6: TGroupBox
Left = 530
Top = 520
Width = 380
Height = 52
Anchors = [akTop, akRight]
Caption = 'Sorties'
Color = cl3DLight
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
TabOrder = 10
object Label3: TLabel
Left = 16
Top = 24
Width = 38
Height = 13
Caption = 'Adresse'
end
object Label5: TLabel
Left = 104
Top = 24
Width = 27
Height = 13
Caption = 'Sortie'
end
object EditAdresse: TEdit
Left = 64
Top = 18
Width = 33
Height = 21
Hint = 'Adresse d'#39'accessoire'
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
object EditSortie: TEdit
Left = 136
Top = 18
Width = 25
Height = 21
Hint = 'Sortie 1 ou 2'
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object Button1: TButton
Left = 224
Top = 16
Width = 49
Height = 25
Hint =
'Mise '#224' 1 de la sortie - attention peut d'#233'truire les moteurs '#224' bo' +
'bine'
Caption = 'Mise '#224' 1'
ParentShowHint = False
ShowHint = True
TabOrder = 2
OnClick = Button1Click
end
object Button0: TButton
Left = 280
Top = 16
Width = 49
Height = 25
Hint = 'Mise '#224' 0 de la sortie'
Caption = 'Mise '#224' 0'
ParentShowHint = False
ShowHint = True
TabOrder = 3
OnClick = Button0Click
end
end
object GroupBoxPrim: TGroupBox
Left = 532
Top = 584
Width = 378
Height = 185
Anchors = [akTop, akRight]
Caption = 'Fonctions primitives'
@@ -159,7 +341,7 @@ object FormDebug: TFormDebug
Font.Style = []
ParentColor = False
ParentFont = False
TabOrder = 7
TabOrder = 11
object GroupBox3: TGroupBox
Left = 8
Top = 16
@@ -181,7 +363,7 @@ object FormDebug: TFormDebug
ParentFont = False
end
object ButtonSigSuiv: TButton
Left = 8
Left = 0
Top = 16
Width = 49
Height = 49
@@ -194,7 +376,7 @@ object FormDebug: TFormDebug
OnClick = ButtonSigSuivClick
end
object ButtonCanSuivSig: TButton
Left = 72
Left = 48
Top = 16
Width = 65
Height = 49
@@ -217,24 +399,45 @@ object FormDebug: TFormDebug
TabOrder = 2
end
object ButtonCP: TButton
Left = 152
Left = 112
Top = 16
Width = 81
Height = 49
Hint = 'Renvoie l'#39#233'tat des 3 cantons pr'#233'c'#233'dents au signal'
Caption = 'Etat 3 cantons pr'#233'c'#233'dents signal'
ParentShowHint = False
ShowHint = True
TabOrder = 3
WordWrap = True
OnClick = ButtonCPClick
end
object Button2: TButton
Left = 192
Top = 16
Width = 57
Height = 49
Hint =
'Teste si la position des aiguillages en aval du signal doivent i' +
'nsiquer un carr'#233' sur le signal'
Caption = 'Cond Carr'#233' aiguillages'
ParentShowHint = False
ShowHint = True
TabOrder = 4
WordWrap = True
OnClick = Button2Click
end
object ButtonAigDevie: TButton
Left = 248
Top = 16
Width = 57
Height = 49
Caption = 'Cond Carr'#233' aiguillages'
TabOrder = 4
Hint = 'Test si des aiguillages sont d'#233'vi'#233's apr'#232's le signal'
Caption = 'Aig d'#233'vi'#233' apr'#232's signal'
ParentShowHint = False
ShowHint = True
TabOrder = 5
WordWrap = True
OnClick = Button2Click
OnClick = ButtonAigDevieClick
end
end
object GroupBox4: TGroupBox
@@ -295,9 +498,9 @@ object FormDebug: TFormDebug
end
end
object GroupBox2: TGroupBox
Left = 460
Top = 3
Width = 384
Left = 534
Top = 28
Width = 376
Height = 149
Anchors = [akTop, akRight]
Caption = 'S'#233'lections d'#39'affichage'
@@ -309,7 +512,7 @@ object FormDebug: TFormDebug
Font.Style = []
ParentColor = False
ParentFont = False
TabOrder = 8
TabOrder = 12
object CheckAffSig: TCheckBox
Left = 8
Top = 16
@@ -456,7 +659,7 @@ object FormDebug: TFormDebug
OnClick = CheckBox1Click
end
object CheckDebugTCO: TCheckBox
Left = 256
Left = 248
Top = 128
Width = 121
Height = 17
@@ -472,7 +675,7 @@ object FormDebug: TFormDebug
OnClick = CheckDebugTCOClick
end
object CheckDetSIg: TCheckBox
Left = 256
Left = 248
Top = 112
Width = 121
Height = 17
@@ -491,7 +694,7 @@ object FormDebug: TFormDebug
OnClick = CheckDetSIgClick
end
object CheckBoxPrinc: TCheckBox
Left = 256
Left = 248
Top = 96
Width = 121
Height = 17
@@ -507,203 +710,37 @@ object FormDebug: TFormDebug
OnClick = CheckBoxPrincClick
end
end
object RichDebug: TRichEdit
Left = 8
Top = -9
Width = 445
Height = 685
Anchors = [akLeft, akTop, akRight, akBottom]
Lines.Strings = (
'RichDebug')
PopupMenu = PopupMenuRD
ScrollBars = ssBoth
TabOrder = 9
OnChange = RichDebugChange
end
object GroupBox5: TGroupBox
Left = 468
Top = 471
Width = 372
Height = 57
object EditNivDebug: TEdit
Left = 819
Top = 8
Width = 49
Height = 21
Anchors = [akTop, akRight]
Caption = 'Simulation d'#233'tecteur / actionneur'
Color = cl3DLight
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Color = clBlue
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
TabOrder = 10
object EditSimuDet: TEdit
Left = 16
Top = 24
Width = 33
Height = 21
Hint = 'Adresse d'#39'un d'#233'tecteur'
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
object ButtonSimuDet0: TButton
Left = 72
Top = 16
Width = 65
Height = 33
Caption = 'D'#233'tecteur '#224' 0'
TabOrder = 1
WordWrap = True
OnClick = ButtonSimuDet0Click
end
object ButtonSimuDet1: TButton
Left = 152
Top = 16
Width = 65
Height = 33
Caption = 'D'#233'tecteur '#224' 1'
TabOrder = 2
WordWrap = True
OnClick = ButtonSimuDet1Click
end
object ButtonSimuAct0: TButton
Left = 224
Top = 16
Width = 65
Height = 33
Caption = 'Actionneur '#224' 0'
TabOrder = 3
WordWrap = True
OnClick = ButtonSimuAct0Click
end
object ButtonSimuAct1: TButton
Left = 296
Top = 16
Width = 65
Height = 33
Caption = 'Actionneur '#224' 1'
TabOrder = 4
WordWrap = True
OnClick = ButtonSimuAct1Click
end
end
object ButtonRazTout: TButton
Left = 463
Top = 159
Width = 97
Height = 25
Hint =
'Supprime les trains d'#233'tect'#233's ou en cas de nouveau RUN, permet de' +
' partir de 0'
Anchors = [akTop, akRight]
Caption = 'RAZ tous trains'
ParentShowHint = False
ShowHint = True
TabOrder = 11
OnClick = ButtonRazToutClick
end
object GroupBox6: TGroupBox
Left = 468
Top = 535
Width = 372
Height = 41
Anchors = [akTop, akRight]
Caption = 'Sorties'
Color = cl3DLight
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
TabOrder = 12
object Label3: TLabel
Left = 16
Top = 16
Width = 38
Height = 13
Caption = 'Adresse'
end
object Label5: TLabel
Left = 104
Top = 16
Width = 27
Height = 13
Caption = 'Sortie'
end
object EditAdresse: TEdit
Left = 64
Top = 10
Width = 33
Height = 21
Hint = 'Adresse d'#39'accessoire'
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
object EditSortie: TEdit
Left = 136
Top = 10
Width = 25
Height = 21
Hint = 'Sortie 1 ou 2'
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object Button1: TButton
Left = 224
Top = 8
Width = 49
Height = 25
Hint =
'Mise '#224' 1 de la sortie - attention peut d'#233'truire les moteurs '#224' bo' +
'bine'
Caption = 'Mise '#224' 1'
ParentShowHint = False
ShowHint = True
TabOrder = 2
OnClick = Button1Click
end
object Button0: TButton
Left = 280
Top = 8
Width = 49
Height = 25
Hint = 'Mise '#224' 0 de la sortie'
Caption = 'Mise '#224' 0'
ParentShowHint = False
ShowHint = True
TabOrder = 3
OnClick = Button0Click
end
end
object MemoEvtDet: TRichEdit
Left = 565
Top = 157
Width = 280
Height = 307
Anchors = [akTop, akRight]
Color = clBlack
ScrollBars = ssVertical
TabOrder = 13
OnChange = MemoEvtDetChange
Text = 'EditNivDebug'
OnKeyPress = EditNivDebugKeyPress
end
end
object SaveDialog: TSaveDialog
Left = 760
Top = 472
Left = 752
Top = 72
end
object PopupMenuRE: TPopupMenu
Left = 768
Top = 432
Left = 752
Top = 32
object copier1: TMenuItem
Caption = 'copier'
end
end
object PopupMenuRD: TPopupMenu
Left = 808
Top = 360
Left = 752
Top = 104
object Copier2: TMenuItem
Caption = 'Copier'
OnClick = Copier2Click
+110 -59
View File
@@ -8,19 +8,47 @@ uses
type
TFormDebug = class(TForm)
EditNivDebug: TEdit;
Label1: TLabel;
LabelTitreDebug: TLabel;
SaveDialog: TSaveDialog;
ButtonEcrLog: TButton;
ButtonRazTampon: TButton;
ButtonCherche: TButton;
ButtonAffEvtChrono: TButton;
ButtonCop: TButton;
PopupMenuRE: TPopupMenu;
copier1: TMenuItem;
PopupMenuRD: TPopupMenu;
Copier2: TMenuItem;
ScrollBoxDebug: TScrollBox;
RichDebug: TRichEdit;
ButtonRazTout: TButton;
ButtonCop: TButton;
ButtonAffEvtChrono: TButton;
ButtonCherche: TButton;
ButtonEcrLog: TButton;
ButtonRazTampon: TButton;
ButtonRazLog: TButton;
GroupBox1: TGroupBox;
MemoEvtDet: TRichEdit;
GroupBox5: TGroupBox;
EditSimuDet: TEdit;
ButtonSimuDet0: TButton;
ButtonSimuDet1: TButton;
ButtonSimuAct0: TButton;
ButtonSimuAct1: TButton;
GroupBox6: TGroupBox;
Label3: TLabel;
Label5: TLabel;
EditAdresse: TEdit;
EditSortie: TEdit;
Button1: TButton;
Button0: TButton;
GroupBoxPrim: TGroupBox;
GroupBox3: TGroupBox;
Label4: TLabel;
ButtonSigSuiv: TButton;
ButtonCanSuivSig: TButton;
EditSigSuiv: TEdit;
ButtonCP: TButton;
Button2: TButton;
GroupBox4: TGroupBox;
ButtonDetSuiv: TButton;
EditPrec: TEdit;
EditActuel: TEdit;
ButtonElSuiv: TButton;
GroupBox2: TGroupBox;
CheckAffSig: TCheckBox;
CheckBoxEvtDetAig: TCheckBox;
@@ -28,42 +56,16 @@ type
CheckTrame: TCheckBox;
CheckBoxAffFD: TCheckBox;
CheckBoxAffDebDecSig: TCheckBox;
GroupBox3: TGroupBox;
ButtonSigSuiv: TButton;
ButtonCanSuivSig: TButton;
EditSigSuiv: TEdit;
Label4: TLabel;
GroupBox4: TGroupBox;
ButtonDetSuiv: TButton;
EditPrec: TEdit;
EditActuel: TEdit;
ButtonCP: TButton;
Button2: TButton;
RichDebug: TRichEdit;
PopupMenuRD: TPopupMenu;
Copier2: TMenuItem;
GroupBox5: TGroupBox;
ButtonSimuDet0: TButton;
ButtonSimuDet1: TButton;
EditSimuDet: TEdit;
ButtonRazTout: TButton;
EditDebugSignal: TEdit;
CheckBoxTiers: TCheckBox;
ButtonSimuAct0: TButton;
ButtonSimuAct1: TButton;
ButtonElSuiv: TButton;
CheckBox1: TCheckBox;
CheckDebugTCO: TCheckBox;
GroupBox6: TGroupBox;
EditAdresse: TEdit;
Label3: TLabel;
Label5: TLabel;
EditSortie: TEdit;
Button1: TButton;
Button0: TButton;
MemoEvtDet: TRichEdit;
CheckDetSIg: TCheckBox;
CheckBoxPrinc: TCheckBox;
LabelTitreDebug: TLabel;
Label1: TLabel;
EditNivDebug: TEdit;
ButtonAigDevie: TButton;
procedure FormCreate(Sender: TObject);
procedure ButtonEcrLogClick(Sender: TObject);
procedure EditNivDebugKeyPress(Sender: TObject; var Key: Char);
@@ -103,6 +105,8 @@ type
procedure MemoEvtDetChange(Sender: TObject);
procedure CheckDetSIgClick(Sender: TObject);
procedure CheckBoxPrincClick(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure ButtonAigDevieClick(Sender: TObject);
private
{ Déclarations privées }
public
@@ -172,7 +176,10 @@ begin
for i:=0 to ComponentCount-1 do
begin
c:=Components[i];
composant(c,couleurFond,couleurTexte);
if c is tScrollBox then
begin
(c as tScrollBox).Color:=color;
end;
end;
end;
end;
@@ -193,16 +200,38 @@ end;
procedure TFormDebug.FormCreate(Sender: TObject);
var s: string;
begin
if affevt then affiche('FormDebug create',clLime);
if debug=1 then Affiche('Création fenêtre debug',clLime);
if affevt or (debug=1) then affiche('FormDebug create',clLime);
EditNivDebug.Text:='0';
RichDebug.WordWrap:=false; // interdit la coupure des chaînes en limite du composant
RichDebug.color:=$33;
//constraints.MaxHeight:=800; // taille Y maxi
initform:=false;
visible:=false;
RichDebug.clear;
s:=DateToStr(date)+' '+TimeToStr(Time)+' ';
Autoscroll:=true; // permet l'affichage de l'ascenseur dans radstudio
// l'ascenseur de la fenetre dans D11 ------------
// ne fonctionne que si le style est windows !!! (bug du VCL)
// obligé d'utiliser une scrollBox
DebugAffiche:=true;
RichDebug.Height:=scrollBoxdebug.Height-30;
RichDebug.Anchors:=[akLeft,akTop,akRight,akBottom];
with scrollBoxdebug do
begin
Anchors:=[akLeft,akTop,akRight,akBottom];
VertScrollBar.Smooth:=false; // ne pas mettre true sinon figeage dans W11 si on clique sur la trackbar!!
VertScrollBar.Tracking:=true;
HorzScrollBar.Visible:=false;
autoScroll:=true;
autoSize:=false;
end;
checkTrame.hint:='Affiche les trames de la centrale XpressNet'+#13+'ou les trames CDM-Rail (COM_IP)';
checkBoxTiers.hint:='Nécessite d''activer les services'+#13+'"signaux" et "position des trains"'+#13+
'dans la configuration générale';
compt_erreur:=0;
LigneErreur:=0;
if debug=1 then Affiche('Fin création fenêtre debug',clLime);
@@ -213,6 +242,13 @@ begin
couleurs_debug;
end;
procedure TFormDebug.FormActivate(Sender: TObject);
begin
if affevt then affiche('FormDebug activate',clLime);
formDebug.buttonCP.Caption:='Etat '+intToSTR(Nb_cantons_Sig)+' cantons précédents signal';
end;
procedure TFormDebug.ButtonEcrLogClick(Sender: TObject);
var s : string;
i : integer;
@@ -377,10 +413,11 @@ end;
procedure TFormDebug.ButtonSigSuivClick(Sender: TObject);
var adr,erreur,ancdebug,AdrSigSuivant : integer ;
begin
Val(EditSigSuiv.Text,adr,erreur);
if (erreur<>0) or (adr<1) then exit;
ancdebug:=NivDebug;
NivDebug:=3;
Val(EditSigSuiv.Text,adr,erreur);
if (erreur<>0) and (adr>0) then etat_signal_suivant(Adr,1,AdrSigSuivant) ;
etat_signal_suivant(Adr,1,AdrSigSuivant) ;
NivDebug:=AncDebug;
end;
@@ -393,13 +430,13 @@ begin
NivDebug:=3;
s1:=EditPrec.Text;
s2:=EditActuel.Text;
if (s1='') or (s2='') then exit;
if (s1='') or (s2='') then begin NivDebug:=AncDebug;exit;end;
if s1[1]='A' then begin type1:=aig;delete(s1,1,1);end else type1:=det;
if s2[1]='A' then begin type2:=aig;delete(s2,1,1);end else type2:=det;
Val(s1,prec,erreur);
if (erreur<>0) or (prec<1) then exit;
if (erreur<>0) or (prec<1) then begin NivDebug:=AncDebug;exit;end;
Val(s2,Actuel,erreur);
if (erreur<>0) or (actuel<1) then exit;
if (erreur<>0) or (actuel<1) then begin NivDebug:=AncDebug;exit;end;
Adr:=detecteur_suivant_El(prec,type1,actuel,type2,1);
if Adr<9996 then AfficheDebug('Le détecteur suivant aux éléments '+IntToSTR(prec)+'/'+IntToSTR(actuel)+' est '+IntToSTR(Adr),clyellow)
else AfficheDebug('Pas trouvé de détecteur suvant aux éléments '+IntToSTR(prec)+'/'+IntToSTR(actuel),clyellow);
@@ -409,10 +446,10 @@ end;
procedure TFormDebug.ButtonCanSuivSigClick(Sender: TObject);
var Adr,erreur,ancdebug : integer ;
begin
Val(EditSigSuiv.Text,Adr,erreur);
if (erreur<>0) or (adr<1) then exit;
ancdebug:=NivDebug;
NivDebug:=3;
Val(EditSigSuiv.Text,Adr,erreur);
if (erreur=0) or (adr<1) then exit;
if test_memoire_zones(Adr) then AfficheDebug('Présence train',clYellow) else
AfficheDebug('Absence train',clyellow);
NivDebug:=AncDebug;
@@ -516,13 +553,13 @@ begin
NivDebug:=3;
s1:=EditPrec.Text;
s2:=EditActuel.Text;
if (s1='') or (s2='') then exit;
if (s1='') or (s2='') then begin NivDebug:=AncDebug;exit;end;
if s1[1]='A' then begin type1:=aig;delete(s1,1,1);end else type1:=det;
if s2[1]='A' then begin type2:=aig;delete(s2,1,1);end else type2:=det;
Val(s1,prec,erreur);
if (erreur<>0) or (prec<1) then exit;
if (erreur<>0) or (prec<1) then begin NivDebug:=AncDebug;exit;end;;
Val(s2,Actuel,erreur);
if (erreur<>0) or (actuel<1) then exit;
if (erreur<>0) or (actuel<1) then begin NivDebug:=AncDebug;exit;end;;
Adr:=suivant_Alg3(prec,type1,actuel,type2,1);
if Adr<9995 then
begin
@@ -641,12 +678,6 @@ begin
if key=chr(27) then close;
end;
procedure TFormDebug.FormActivate(Sender: TObject);
begin
if affevt then affiche('FormConfig activate',clLime);
formDebug.buttonCP.Caption:='Etat '+intToSTR(Nb_cantons_Sig)+' cantons précédents signal';
end;
procedure TFormDebug.MemoEvtDetChange(Sender: TObject);
begin
SendMessage(MemoEvtDet.handle,WM_VSCROLL,SB_BOTTOM,0);
@@ -664,4 +695,24 @@ begin
end;
procedure TFormDebug.Button3Click(Sender: TObject);
begin
ScrollBoxDebug.VertScrollBar.Position:=0;
end;
procedure TFormDebug.ButtonAigDevieClick(Sender: TObject);
var Adr,erreur,ancDebug : integer;
begin
Val(EditSigSuiv.Text,Adr,erreur);
if (erreur<>0) or (Adr<1) then exit;
ancdebug:=NivDebug;
NivDebug:=3;
Aiguille_deviee(Adr);
NivDebug:=AncDebug;
end;
end.
+2
View File
@@ -289,6 +289,7 @@ end;
procedure TFormPilote.FormCreate(Sender: TObject);
begin
if affevt then affiche('FormPilote create',clLime);
position:=poMainFormCenter;
couleurs_pilote;
end;
@@ -331,6 +332,7 @@ procedure TFormPilote.FormActivate(Sender: TObject);
var n,i,d : integer;
begin
// mise à jour du champ décodeur
if affevt then affiche('FormPilote activate',clLime);
i:=Index_Signal(AdrPilote);
d:=Signaux[i].decodeur;
n:=Signaux[i].aspect;
+15 -46
View File
@@ -1,11 +1,10 @@
object FormPrinc: TFormPrinc
Left = 27
Top = 202
Left = 180
Top = 135
Width = 1148
Height = 618
Anchors = [akLeft, akTop, akRight]
BorderStyle = bsSingle
Caption = 'Signaux complexes'
ClientHeight = 648
ClientWidth = 1133
Caption = 'SIgnaux complexes'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -21,13 +20,13 @@ object FormPrinc: TFormPrinc
OnCreate = FormCreate
OnResize = FormResize
DesignSize = (
1133
648)
1132
560)
PixelsPerInch = 96
TextHeight = 13
object LabelTitre: TLabel
Left = 8
Top = 10
Top = 2
Width = 173
Height = 18
Caption = 'Signaux complexes GL'
@@ -1431,8 +1430,8 @@ object FormPrinc: TFormPrinc
end
object StatusBar1: TStatusBar
Left = 0
Top = 626
Width = 1133
Top = 538
Width = 1132
Height = 22
Panels = <
item
@@ -1458,24 +1457,14 @@ object FormPrinc: TFormPrinc
end>
OnDrawPanel = StatusBar1DrawPanel
end
object MSCommUSBInterface: TMSComm
Left = 1064
Top = 200
Width = 32
Height = 32
OnComm = MSCommUSBInterfaceComm
ControlData = {
2143341208000000ED030000ED03000001568A64000006000000010000040000
00020000802500000000080000000000000000003F00000011000000}
end
object Button1: TButton
Left = 744
Left = 751
Top = 16
Width = 75
Height = 25
Anchors = [akTop, akRight]
Caption = 'Button1'
TabOrder = 2
TabOrder = 1
Visible = False
OnClick = Button1Click
end
@@ -1484,7 +1473,7 @@ object FormPrinc: TFormPrinc
Top = 56
Width = 1057
Height = 476
TabOrder = 3
TabOrder = 2
DesignSize = (
1057
476)
@@ -1982,8 +1971,8 @@ object FormPrinc: TFormPrinc
end
end
object GroupBoxCV: TGroupBox
Left = 481
Top = -8
Left = 665
Top = -24
Width = 265
Height = 129
Anchors = [akTop, akRight]
@@ -2044,26 +2033,6 @@ object FormPrinc: TFormPrinc
end
end
end
object MSCommCde1: TMSComm
Left = 1064
Top = 280
Width = 32
Height = 32
OnComm = MSCommCde1Comm
ControlData = {
2143341208000000ED030000ED03000001568A64000006000000010000040000
00020000802500000000080000000000000000003F00000001000000}
end
object MSCommCde2: TMSComm
Left = 1064
Top = 312
Width = 32
Height = 32
OnComm = MSCommCde2Comm
ControlData = {
2143341208000000ED030000ED03000001568A64000006000000010000040000
00020000802500000000080000000000000000003F00000001000000}
end
object Timer1: TTimer
Interval = 100
OnTimer = Timer1Timer
+413 -236
View File
File diff suppressed because it is too large. Load diff
+99 -76
View File
@@ -1,9 +1,9 @@
object FormSR: TFormSR
Left = 425
Top = 73
Left = 405
Top = 89
BorderStyle = bsDialog
Caption = 'Configuration du d'#233'codeur du signal St'#233'phane Ravaut'
ClientHeight = 540
ClientHeight = 575
ClientWidth = 475
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
@@ -18,7 +18,7 @@ object FormSR: TFormSR
TextHeight = 13
object LabelAdrSR1: TLabel
Left = 24
Top = 72
Top = 64
Width = 63
Height = 13
Caption = 'LabelAdrSR1'
@@ -37,9 +37,9 @@ object FormSR: TFormSR
Height = 13
Caption = '- 1'
end
object Label3: TLabel
object Label300: TLabel
Left = 24
Top = 24
Top = 8
Width = 59
Height = 16
Caption = 'Adresse'
@@ -50,9 +50,9 @@ object FormSR: TFormSR
Font.Style = [fsBold]
ParentFont = False
end
object Label4: TLabel
object Label301: TLabel
Left = 112
Top = 24
Top = 8
Width = 28
Height = 16
Caption = 'Etat'
@@ -63,9 +63,9 @@ object FormSR: TFormSR
Font.Style = [fsBold]
ParentFont = False
end
object Label5: TLabel
object Label302: TLabel
Left = 200
Top = 24
Top = 8
Width = 49
Height = 16
Caption = 'Aspect'
@@ -78,7 +78,7 @@ object FormSR: TFormSR
end
object Shape1: TShape
Left = 16
Top = 104
Top = 97
Width = 409
Height = 1
end
@@ -89,23 +89,23 @@ object FormSR: TFormSR
Height = 13
Caption = 'LabelAdrSR2'
end
object Label7: TLabel
object Label3: TLabel
Left = 120
Top = 112
Width = 15
Height = 13
Caption = '+ 2'
end
object Label8: TLabel
object Label4: TLabel
Left = 120
Top = 136
Width = 12
Height = 13
Caption = '- 1'
end
object Label6: TLabel
object Label303: TLabel
Left = 344
Top = 24
Top = 8
Width = 21
Height = 16
Caption = 'CV'
@@ -118,14 +118,14 @@ object FormSR: TFormSR
end
object LabelCV1: TLabel
Left = 320
Top = 56
Top = 48
Width = 20
Height = 13
Caption = 'CV='
end
object LabelCV2: TLabel
Left = 384
Top = 56
Top = 48
Width = 20
Height = 13
Caption = 'CV='
@@ -146,53 +146,53 @@ object FormSR: TFormSR
end
object LabelCV5: TLabel
Left = 320
Top = 118
Top = 110
Width = 20
Height = 13
Caption = 'CV='
end
object LabelCV6: TLabel
Left = 384
Top = 118
Top = 110
Width = 20
Height = 13
Caption = 'CV='
end
object LabelCV7: TLabel
Left = 320
Top = 142
Top = 134
Width = 20
Height = 13
Caption = 'CV='
end
object LabelCV8: TLabel
Left = 384
Top = 142
Top = 134
Width = 20
Height = 13
Caption = 'CV='
end
object Shape2: TShape
Left = 16
Top = 160
Top = 150
Width = 409
Height = 1
end
object LabelAdrSR3: TLabel
Left = 24
Top = 184
Top = 176
Width = 63
Height = 13
Caption = 'LabelAdrSR2'
end
object Label10: TLabel
object Label5: TLabel
Left = 120
Top = 168
Width = 15
Height = 13
Caption = '+ 2'
end
object Label11: TLabel
object Label6: TLabel
Left = 120
Top = 192
Width = 12
@@ -201,14 +201,14 @@ object FormSR: TFormSR
end
object LabelCV9: TLabel
Left = 320
Top = 172
Top = 164
Width = 20
Height = 13
Caption = 'CV='
end
object LabelCV10: TLabel
Left = 384
Top = 172
Top = 164
Width = 20
Height = 13
Caption = 'CV='
@@ -229,7 +229,7 @@ object FormSR: TFormSR
end
object Shape3: TShape
Left = 16
Top = 216
Top = 219
Width = 409
Height = 1
end
@@ -240,16 +240,16 @@ object FormSR: TFormSR
Height = 13
Caption = 'LabelAdrSR2'
end
object Label12: TLabel
object Label7: TLabel
Left = 120
Top = 224
Top = 232
Width = 15
Height = 13
Caption = '+ 2'
end
object Label13: TLabel
object Label8: TLabel
Left = 120
Top = 248
Top = 256
Width = 12
Height = 13
Caption = '- 1'
@@ -284,7 +284,7 @@ object FormSR: TFormSR
end
object Shape4: TShape
Left = 16
Top = 272
Top = 276
Width = 409
Height = 1
end
@@ -295,16 +295,16 @@ object FormSR: TFormSR
Height = 13
Caption = 'LabelAdrSR2'
end
object Label14: TLabel
object Label9: TLabel
Left = 120
Top = 280
Top = 288
Width = 15
Height = 13
Caption = '+ 2'
end
object Label15: TLabel
object Label10: TLabel
Left = 120
Top = 304
Top = 312
Width = 12
Height = 13
Caption = '- 1'
@@ -339,27 +339,27 @@ object FormSR: TFormSR
end
object Shape5: TShape
Left = 16
Top = 328
Top = 333
Width = 409
Height = 1
end
object LabelAdrSR6: TLabel
Left = 24
Top = 352
Top = 360
Width = 63
Height = 13
Caption = 'LabelAdrSR2'
end
object Label16: TLabel
object Label11: TLabel
Left = 120
Top = 336
Top = 344
Width = 15
Height = 13
Caption = '+ 2'
end
object Label17: TLabel
object Label12: TLabel
Left = 120
Top = 360
Top = 368
Width = 12
Height = 13
Caption = '- 1'
@@ -394,7 +394,7 @@ object FormSR: TFormSR
end
object Shape6: TShape
Left = 16
Top = 384
Top = 385
Width = 409
Height = 1
end
@@ -405,16 +405,16 @@ object FormSR: TFormSR
Height = 13
Caption = 'LabelAdrSR2'
end
object Label18: TLabel
object Label13: TLabel
Left = 120
Top = 392
Top = 400
Width = 15
Height = 13
Caption = '+ 2'
end
object Label19: TLabel
object Label14: TLabel
Left = 120
Top = 416
Top = 424
Width = 12
Height = 13
Caption = '- 1'
@@ -449,7 +449,7 @@ object FormSR: TFormSR
end
object Shape7: TShape
Left = 16
Top = 440
Top = 438
Width = 409
Height = 1
end
@@ -460,16 +460,16 @@ object FormSR: TFormSR
Height = 13
Caption = 'LabelAdrSR2'
end
object Label20: TLabel
object Label15: TLabel
Left = 120
Top = 448
Width = 15
Height = 13
Caption = '+ 2'
end
object Label21: TLabel
object Label16: TLabel
Left = 120
Top = 472
Top = 480
Width = 12
Height = 13
Caption = '- 1'
@@ -490,7 +490,7 @@ object FormSR: TFormSR
end
object LabelCV31: TLabel
Left = 320
Top = 476
Top = 484
Width = 20
Height = 13
Caption = 'CV='
@@ -503,15 +503,40 @@ object FormSR: TFormSR
Caption = 'CV='
end
object LabelErreur: TLabel
Left = 224
Top = 528
Left = 152
Top = 512
Width = 3
Height = 13
Caption = ':'
end
object Label900: TLabel
Left = 212
Top = 532
Width = 205
Height = 26
Alignment = taRightJustify
Caption = 'Nombre d'#39'adresses occup'#233'es par le signal : (1 '#224' 8)'
WordWrap = True
end
object Shape8: TShape
Left = 16
Top = 502
Width = 409
Height = 1
end
object ComboBoxAdr15: TComboBox
Left = 160
Top = 448
Width = 145
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 14
OnChange = ComboBoxAdr15Change
end
object ComboBoxAdr1: TComboBox
Left = 160
Top = 56
Top = 48
Width = 145
Height = 21
Style = csDropDownList
@@ -521,7 +546,7 @@ object FormSR: TFormSR
end
object ComboBoxAdr2: TComboBox
Left = 160
Top = 80
Top = 72
Width = 145
Height = 21
Style = csDropDownList
@@ -531,7 +556,7 @@ object FormSR: TFormSR
end
object ComboBoxAdr3: TComboBox
Left = 160
Top = 112
Top = 104
Width = 145
Height = 21
Style = csDropDownList
@@ -541,7 +566,7 @@ object FormSR: TFormSR
end
object ComboBoxAdr4: TComboBox
Left = 160
Top = 136
Top = 128
Width = 145
Height = 21
Style = csDropDownList
@@ -551,7 +576,7 @@ object FormSR: TFormSR
end
object ComboBoxAdr5: TComboBox
Left = 160
Top = 168
Top = 160
Width = 145
Height = 21
Style = csDropDownList
@@ -649,16 +674,6 @@ object FormSR: TFormSR
TabOrder = 13
OnChange = ComboBoxAdr14Change
end
object ComboBoxAdr15: TComboBox
Left = 160
Top = 448
Width = 145
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 14
OnChange = ComboBoxAdr15Change
end
object ComboBoxAdr16: TComboBox
Left = 160
Top = 472
@@ -669,13 +684,21 @@ object FormSR: TFormSR
TabOrder = 15
OnChange = ComboBoxAdr16Change
end
object BitBtnok: TBitBtn
Left = 24
Top = 504
object EditNEsignal: TEdit
Left = 424
Top = 536
Width = 17
Height = 21
TabOrder = 16
OnChange = EditNEsignalChange
end
object Button1: TButton
Left = 32
Top = 536
Width = 75
Height = 25
TabOrder = 16
OnClick = BitBtnokClick
Kind = bkOK
Caption = 'Ok'
TabOrder = 17
OnClick = Button1Click
end
end
+308 -117
View File
@@ -1,8 +1,8 @@
// Unité pour la configuration du décodeur Stéphane Ravaux
// http://stephane.ravaut.free.fr/Train_miniature/Decodeurs/Decodeur_DCC_Signaux_complexes_SNCF.html
unit UnitSR;
interface
uses
@@ -17,14 +17,14 @@ type
Label1: TLabel;
Label2: TLabel;
ComboBoxAdr2: TComboBox;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label300: TLabel;
Label301: TLabel;
Label302: TLabel;
Shape1: TShape;
LabelAdrSR2: TLabel;
Label7: TLabel;
Label8: TLabel;
Label6: TLabel;
Label3: TLabel;
Label4: TLabel;
Label303: TLabel;
LabelCV1: TLabel;
LabelCV2: TLabel;
LabelCV3: TLabel;
@@ -37,8 +37,8 @@ type
LabelCV8: TLabel;
Shape2: TShape;
LabelAdrSR3: TLabel;
Label10: TLabel;
Label11: TLabel;
Label5: TLabel;
Label6: TLabel;
ComboBoxAdr5: TComboBox;
ComboBoxAdr6: TComboBox;
LabelCV9: TLabel;
@@ -47,8 +47,8 @@ type
LabelCV12: TLabel;
Shape3: TShape;
LabelAdrSR4: TLabel;
Label12: TLabel;
Label13: TLabel;
Label7: TLabel;
Label8: TLabel;
ComboBoxAdr7: TComboBox;
ComboBoxAdr8: TComboBox;
LabelCV13: TLabel;
@@ -57,8 +57,8 @@ type
LabelCV16: TLabel;
Shape4: TShape;
LabelAdrSR5: TLabel;
Label14: TLabel;
Label15: TLabel;
Label9: TLabel;
Label10: TLabel;
ComboBoxAdr9: TComboBox;
ComboBoxAdr10: TComboBox;
LabelCV17: TLabel;
@@ -67,8 +67,8 @@ type
LabelCV20: TLabel;
Shape5: TShape;
LabelAdrSR6: TLabel;
Label16: TLabel;
Label17: TLabel;
Label11: TLabel;
Label12: TLabel;
ComboBoxAdr11: TComboBox;
ComboBoxAdr12: TComboBox;
LabelCV21: TLabel;
@@ -77,8 +77,8 @@ type
LabelCV24: TLabel;
Shape6: TShape;
LabelAdrSR7: TLabel;
Label18: TLabel;
Label19: TLabel;
Label13: TLabel;
Label14: TLabel;
LabelCV25: TLabel;
LabelCV26: TLabel;
LabelCV27: TLabel;
@@ -87,8 +87,8 @@ type
ComboBoxAdr14: TComboBox;
Shape7: TShape;
LabelAdrSR8: TLabel;
Label20: TLabel;
Label21: TLabel;
Label15: TLabel;
Label16: TLabel;
LabelCV29: TLabel;
LabelCV30: TLabel;
LabelCV31: TLabel;
@@ -96,7 +96,10 @@ type
ComboBoxAdr15: TComboBox;
ComboBoxAdr16: TComboBox;
LabelErreur: TLabel;
BitBtnok: TBitBtn;
Label900: TLabel;
EditNEsignal: TEdit;
Button1: TButton;
Shape8: TShape;
procedure FormActivate(Sender: TObject);
procedure ComboBoxAdr1Change(Sender: TObject);
procedure ComboBoxAdr2Change(Sender: TObject);
@@ -115,7 +118,8 @@ type
procedure ComboBoxAdr15Change(Sender: TObject);
procedure ComboBoxAdr16Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure BitBtnokClick(Sender: TObject);
procedure EditNEsignalChange(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Déclarations privées }
public
@@ -125,7 +129,7 @@ type
var
FormSR: TFormSR;
Adr,IndexSig : integer;
//etatsDefSR : array[1..16] of integer; // états par défaut du décodeur SR
procedure couleurs_SR;
implementation
@@ -133,10 +137,47 @@ implementation
{$R *.dfm}
// efface/affiche les composants en fonction du nombre d'adresses (de 1 à 8)
procedure efface(nadr : integer);
var i : integer;
c : tComboBox;
Lb : tLabel;
s : string;
begin
for i:=1 to 16 do
begin
s:='ComboBoxAdr'+intToSTR(i);
c:=formSR.findComponent(s) as tComboBox;
c.Visible:=(i-1)<2*nadr ;
s:='Label'+intToSTR(i);
Lb:=formSR.findComponent(s) as tLabel;
Lb.Visible:=i-1<2*nadr;
s:='LabelCV'+intToSTR(i*2-1);
Lb:=formSR.findComponent(s) as tLabel;
Lb.Visible:=i-1<2*nadr;
s:='LabelCV'+intToSTR(i*2);
Lb:=formSR.findComponent(s) as tLabel;
Lb.Visible:=i-1<2*nadr;
end;
for i:=1 to 8 do
begin
s:='LabelAdrSR'+intToSTR(i);
Lb:=formSR.findComponent(s) as tLabel;
Lb.visible:=(i-1)<nadr ;
end;
end;
// valeurs des CV du décodeur SR, uniquement pour l'affichage
procedure etat_SR(etat : integer;var etat1,etat2 : integer) ;
begin
// etat1 correspond à l'allumage des leds du 1er cycle clignotant
// etat2 correspond à l'allumage des leds du 2eme cycle clignotant
etat1:=0;
etat2:=0;
case etat of
// carré
1 : begin etat1:=$81;etat2:=$81;end;
@@ -180,99 +221,6 @@ begin
end;
procedure TFormSR.FormActivate(Sender: TObject);
var erreur,etat1,etat2 : integer;
begin
Val(FormConfig.EditAdrSig.text,Adr,erreur);
indexSig:=index_Signal(Adr);
if IndexSig=0 then LabelErreur.caption:='Erreur feu inexistant'
else
begin
LabelAdrSR1.caption:=intToSTR(Adr);
LabelAdrSR2.caption:=intToSTR(Adr+1);
LabelAdrSR3.caption:=intToSTR(Adr+2);
LabelAdrSR4.caption:=intToSTR(Adr+3);
LabelAdrSR5.caption:=intToSTR(Adr+4);
LabelAdrSR6.caption:=intToSTR(Adr+5);
LabelAdrSR7.caption:=intToSTR(Adr+6);
LabelAdrSR8.caption:=intToSTR(Adr+7);
ComboBoxAdr1.ItemIndex:=Signaux[indexSig].SR[1].sortie1;
ComboBoxAdr2.ItemIndex:=Signaux[indexSig].SR[1].sortie0;
ComboBoxAdr3.ItemIndex:=Signaux[indexSig].SR[2].sortie1;
ComboBoxAdr4.ItemIndex:=Signaux[indexSig].SR[2].sortie0;
ComboBoxAdr5.ItemIndex:=Signaux[indexSig].SR[3].sortie1;
ComboBoxAdr6.ItemIndex:=Signaux[indexSig].SR[3].sortie0;
ComboBoxAdr7.ItemIndex:=Signaux[indexSig].SR[4].sortie1;
ComboBoxAdr8.ItemIndex:=Signaux[indexSig].SR[4].sortie0;
ComboBoxAdr9.ItemIndex:=Signaux[indexSig].SR[5].sortie1;
ComboBoxAdr10.ItemIndex:=Signaux[indexSig].SR[5].sortie0;
ComboBoxAdr11.ItemIndex:=Signaux[indexSig].SR[6].sortie1;
ComboBoxAdr12.ItemIndex:=Signaux[indexSig].SR[6].sortie0;
ComboBoxAdr13.ItemIndex:=Signaux[indexSig].SR[7].sortie1;
ComboBoxAdr14.ItemIndex:=Signaux[indexSig].SR[7].sortie0;
ComboBoxAdr15.ItemIndex:=Signaux[indexSig].SR[8].sortie1;
ComboBoxAdr16.ItemIndex:=Signaux[indexSig].SR[8].sortie0;
etat_SR(Signaux[indexSig].SR[1].sortie1,etat1,etat2);
labelCV1.Caption:='CV='+IntToSTR(etat1);
labelCV2.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[1].sortie0,etat1,etat2);
labelCV3.Caption:='CV='+IntToSTR(etat1);
labelCV4.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[2].sortie1,etat1,etat2);
labelCV5.Caption:='CV='+IntToSTR(etat1);
labelCV6.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[2].sortie0,etat1,etat2);
labelCV7.Caption:='CV='+IntToSTR(etat1);
labelCV8.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[3].sortie1,etat1,etat2);
labelCV9.Caption:='CV='+IntToSTR(etat1);
labelCV10.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[3].sortie0,etat1,etat2);
labelCV11.Caption:='CV='+IntToSTR(etat1);
labelCV12.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[4].sortie1,etat1,etat2);
labelCV13.Caption:='CV='+IntToSTR(etat1);
labelCV14.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[4].sortie0,etat1,etat2);
labelCV15.Caption:='CV='+IntToSTR(etat1);
labelCV16.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[5].sortie1,etat1,etat2);
labelCV17.Caption:='CV='+IntToSTR(etat1);
labelCV18.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[5].sortie0,etat1,etat2);
labelCV19.Caption:='CV='+IntToSTR(etat1);
labelCV20.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[6].sortie1,etat1,etat2);
labelCV21.Caption:='CV='+IntToSTR(etat1);
labelCV22.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[6].sortie0,etat1,etat2);
labelCV23.Caption:='CV='+IntToSTR(etat1);
labelCV24.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[7].sortie1,etat1,etat2);
labelCV25.Caption:='CV='+IntToSTR(etat1);
labelCV26.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[7].sortie0,etat1,etat2);
labelCV27.Caption:='CV='+IntToSTR(etat1);
labelCV28.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[8].sortie1,etat1,etat2);
labelCV29.Caption:='CV='+IntToSTR(etat1);
labelCV30.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[8].sortie0,etat1,etat2);
labelCV31.Caption:='CV='+IntToSTR(etat1);
labelCV32.Caption:='CV='+IntToSTR(etat2);
end;
end;
procedure Maj_DB;
var s : string;
begin
@@ -481,9 +429,100 @@ begin
end;
procedure TFormSR.FormCreate(Sender: TObject);
var i : integer;
var i,y : integer;
c : tComboBox;
sh : tShape;
Lb : tLabel;
s : string;
begin
{
// états par défaut du décodeur SR , d'après le tableau Etats[] il y a 13 états valides.
// manque états 11: ralen30 - 12: ralen 60 - 13 rappel 30 - 14 rappel 60 - 15: ralen 60 + jaune cli - 17 : rappel 30 + jaune cli ??
// sortie 0
etatsDefSR[1]:=1; // carré - sortie 1
etatsDefSR[2]:=6; // violet - sortie 2
// sortie 1
etatsDefSR[3]:=2; // sémaphore - sortie 1
etatsDefSR[4]:=3; // sémaphore cli - sortie 2
// sortie 2
etatsDefSR[5]:=9; // jaune - sortie 1
etatsDefSR[6]:=10; // jaune cli - sortie 2
// sortie 3
etatsDefSR[7]:=4; // vert - sortie 1
etatsDefSR[8]:=5; // vert cli - sortie 2
// sortie 4
etatsDefSR[9]:=7; // blanc - sortie 1
etatsDefSR[10]:=8; // blanc cli - sortie 2
// sortie 5
etatsDefSR[11]:=0; // invalide- sortie 1
etatsDefSR[12]:=0; // invalide- sortie 2
// sortie 6
etatsDefSR[13]:=16; // jaune + rappel 30 - sortie 1
etatsDefSR[14]:=18; // jaune + rappel 60 - sortie 2
// sortie 7
etatsDefSR[15]:=19; // jaune cli + rappel 60 - sortie 1
etatsDefSR[16]:=0; // invalide - sortie 2
}
// ajustement des composants
for i:=1 to 16 do
begin
y:=(i-1)*30+30;
s:='ComboBoxAdr'+intToSTR(i);
c:=findComponent(s) as tcomboBox;
c.Top:=y;
s:='Label'+intToSTR(i);
Lb:=findComponent(s) as tLabel;
Lb.top:=y+4;
s:='LabelCV'+intToSTR(i*2-1);
Lb:=findComponent(s) as tLabel;
Lb.top:=y+4;
s:='LabelCV'+intToSTR(i*2);
Lb:=findComponent(s) as tLabel;
Lb.top:=y+4;
end;
for i:=1 to 8 do
begin
y:=(i-1)*60;
s:='Shape'+intToSTR(i);
sh:=findComponent(s) as tshape;
sh.top:=y+86;
end;
for i:=1 to 8 do
begin
y:=(i-1)*60;
s:='LabelAdrSR'+intToSTR(i);
Lb:=findComponent(s) as tLabel;
Lb.top:=y+48;
Lb.Font.Style:=[fsBold];
end;
position:=poMainFormCenter;
{
for i:=1 to 16 do
begin
ComboBoxAdr1.items.add('');
ComboBoxAdr2.items.add('');
ComboBoxAdr3.items.add('');
ComboBoxAdr4.items.add('');
ComboBoxAdr5.items.add('');
ComboBoxAdr6.items.add('');
ComboBoxAdr7.items.add('');
ComboBoxAdr8.items.add('');
ComboBoxAdr9.items.add('');
ComboBoxAdr10.items.add('');
ComboBoxAdr11.items.add('');
ComboBoxAdr12.items.add('');
ComboBoxAdr13.items.add('');
ComboBoxAdr14.items.add('');
ComboBoxAdr15.items.add('');
ComboBoxAdr16.items.add('');
}
for i:=0 to 19 do
begin
ComboBoxAdr1.items.add(etats[i]);
@@ -506,7 +545,159 @@ begin
couleurs_SR;
end;
procedure TFormSR.BitBtnokClick(Sender: TObject);
procedure TFormSR.FormActivate(Sender: TObject);
var erreur,etat1,etat2,ne : integer;
begin
Val(FormConfig.EditAdrSig.text,Adr,erreur);
indexSig:=index_Signal(Adr);
if IndexSig=0 then LabelErreur.caption:='Erreur 512 : signal '+intToSTR(Adr)+' inexistant'
else
begin
LabelAdrSR1.caption:=intToSTR(Adr);
LabelAdrSR2.caption:=intToSTR(Adr+1);
LabelAdrSR3.caption:=intToSTR(Adr+2);
LabelAdrSR4.caption:=intToSTR(Adr+3);
LabelAdrSR5.caption:=intToSTR(Adr+4);
LabelAdrSR6.caption:=intToSTR(Adr+5);
LabelAdrSR7.caption:=intToSTR(Adr+6);
LabelAdrSR8.caption:=intToSTR(Adr+7);
ComboBoxAdr1.ItemIndex:=Signaux[indexSig].SR[1].sortie1;
ComboBoxAdr2.ItemIndex:=Signaux[indexSig].SR[1].sortie0;
ComboBoxAdr3.ItemIndex:=Signaux[indexSig].SR[2].sortie1;
ComboBoxAdr4.ItemIndex:=Signaux[indexSig].SR[2].sortie0;
ComboBoxAdr5.ItemIndex:=Signaux[indexSig].SR[3].sortie1;
ComboBoxAdr6.ItemIndex:=Signaux[indexSig].SR[3].sortie0;
ComboBoxAdr7.ItemIndex:=Signaux[indexSig].SR[4].sortie1;
ComboBoxAdr8.ItemIndex:=Signaux[indexSig].SR[4].sortie0;
ComboBoxAdr9.ItemIndex:=Signaux[indexSig].SR[5].sortie1;
ComboBoxAdr10.ItemIndex:=Signaux[indexSig].SR[5].sortie0;
ComboBoxAdr11.ItemIndex:=Signaux[indexSig].SR[6].sortie1;
ComboBoxAdr12.ItemIndex:=Signaux[indexSig].SR[6].sortie0;
ComboBoxAdr13.ItemIndex:=Signaux[indexSig].SR[7].sortie1;
ComboBoxAdr14.ItemIndex:=Signaux[indexSig].SR[7].sortie0;
ComboBoxAdr15.ItemIndex:=Signaux[indexSig].SR[8].sortie1;
ComboBoxAdr16.ItemIndex:=Signaux[indexSig].SR[8].sortie0;
{
for i:=1 to 16 do
begin
ComboBoxAdr1.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr2.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr3.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr4.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr5.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr6.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr7.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr8.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr9.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr10.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr11.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr12.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr13.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr14.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr15.Items[i-1]:=etats[etatsDefSR[i]];
ComboBoxAdr16.Items[i-1]:=etats[etatsDefSR[i]];
end; }
ne:=Signaux[indexSig].Na; // nombre d'états du signal (2 à 19)
EditNESignal.Text:=intToSTr(ne);
if ne=2 then
begin
ComboBoxAdr3.Enabled:=false;
ComboBoxAdr4.Enabled:=false;
ComboBoxAdr5.Enabled:=false;
ComboBoxAdr6.Enabled:=false;
ComboBoxAdr7.Enabled:=false;
ComboBoxAdr8.Enabled:=false;
ComboBoxAdr9.Enabled:=false;
ComboBoxAdr10.Enabled:=false;
ComboBoxAdr11.Enabled:=false;
ComboBoxAdr12.Enabled:=false;
ComboBoxAdr13.Enabled:=false;
ComboBoxAdr14.Enabled:=false;
ComboBoxAdr15.Enabled:=false;
ComboBoxAdr16.Enabled:=false;
end;
etat_SR(Signaux[indexSig].SR[1].sortie1,etat1,etat2);
labelCV1.Caption:='CV='+IntToSTR(etat1);
labelCV2.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[1].sortie0,etat1,etat2);
labelCV3.Caption:='CV='+IntToSTR(etat1);
labelCV4.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[2].sortie1,etat1,etat2);
labelCV5.Caption:='CV='+IntToSTR(etat1);
labelCV6.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[2].sortie0,etat1,etat2);
labelCV7.Caption:='CV='+IntToSTR(etat1);
labelCV8.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[3].sortie1,etat1,etat2);
labelCV9.Caption:='CV='+IntToSTR(etat1);
labelCV10.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[3].sortie0,etat1,etat2);
labelCV11.Caption:='CV='+IntToSTR(etat1);
labelCV12.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[4].sortie1,etat1,etat2);
labelCV13.Caption:='CV='+IntToSTR(etat1);
labelCV14.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[4].sortie0,etat1,etat2);
labelCV15.Caption:='CV='+IntToSTR(etat1);
labelCV16.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[5].sortie1,etat1,etat2);
labelCV17.Caption:='CV='+IntToSTR(etat1);
labelCV18.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[5].sortie0,etat1,etat2);
labelCV19.Caption:='CV='+IntToSTR(etat1);
labelCV20.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[6].sortie1,etat1,etat2);
labelCV21.Caption:='CV='+IntToSTR(etat1);
labelCV22.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[6].sortie0,etat1,etat2);
labelCV23.Caption:='CV='+IntToSTR(etat1);
labelCV24.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[7].sortie1,etat1,etat2);
labelCV25.Caption:='CV='+IntToSTR(etat1);
labelCV26.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[7].sortie0,etat1,etat2);
labelCV27.Caption:='CV='+IntToSTR(etat1);
labelCV28.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[8].sortie1,etat1,etat2);
labelCV29.Caption:='CV='+IntToSTR(etat1);
labelCV30.Caption:='CV='+IntToSTR(etat2);
etat_SR(Signaux[indexSig].SR[8].sortie0,etat1,etat2);
labelCV31.Caption:='CV='+IntToSTR(etat1);
labelCV32.Caption:='CV='+IntToSTR(etat2);
end;
end;
procedure TFormSR.EditNEsignalChange(Sender: TObject);
var i,erreur : integer;
begin
val(EditNESignal.Text,i,erreur);
if (erreur<>0) or (i<1) or (i>8) then exit;
Signaux[ligneClicSig+1].na:=i;
maj_db;
efface(i);
end;
procedure TFormSR.Button1Click(Sender: TObject);
begin
close;
end;
+6 -2
View File
@@ -1,6 +1,6 @@
object FormTCO: TFormTCO
Left = 114
Top = 116
Left = 113
Top = 72
Width = 1218
Height = 594
VertScrollBar.Visible = False
@@ -1322,6 +1322,10 @@ object FormTCO: TFormTCO
Top = 8
object MenuTCO: TMenuItem
Caption = 'TCO'
object RechargerleTCOdepuislefichier1: TMenuItem
Caption = 'Recharger le TCO depuis le fichier'
OnClick = RechargerleTCOdepuislefichier1Click
end
object SauvegarderleTCO1: TMenuItem
Caption = 'Sauvegarder le TCO'
OnClick = SauvegarderleTCO1Click
+303 -120
View File
@@ -150,6 +150,7 @@ type
AfficherSignauxComplexes1: TMenuItem;
Signalvertical180: TMenuItem;
RafrachirleTCO1: TMenuItem;
RechargerleTCOdepuislefichier1: TMenuItem;
//TimerTCO: TTimer;
procedure FormCreate(Sender: TObject);
procedure FormActivate(Sender: TObject);
@@ -419,6 +420,7 @@ type
procedure Mosaqueverticale1Click(Sender: TObject);
procedure AfficherSignauxComplexes1Click(Sender: TObject);
procedure Signalvertical180Click(Sender: TObject);
procedure RechargerleTCOdepuislefichier1Click(Sender: TObject);
private
{ Déclarations privées }
@@ -492,7 +494,7 @@ type
sortie : integer; // si action sortie : état
end;
// Outil graphique de sélection
// rectangle graphique de sélection
Trect_Select= record
NumTCO : integer; // affectation du rectangle à ce tco
Gd, // grand rectangle
@@ -507,9 +509,9 @@ var
TamponAffecte,TCO_modifie,clicsouris,prise_N,
clicTCO,piloteAig,BandeauMasque,eval_format,sauve_tco,prise_droit,prise_haut,
prise_bas,prise_gauche,prise_NE,prise_NO,prise_SE,prise_SO,ligneAffiche,colonneAffiche,
drag,TCOActive,TCOCree,ancienok,dbleClicTCO,auto_tcurs,EvtClicDet : boolean;
drag,TCOActive,TCOCree,ancienok,dbleClicTCO,auto_tcurs,EvtClicDet,SelecBouge : boolean;
HtImageTCO,LargImageTCO,XminiSel,YminiSel,XCoupe,Ycoupe,Temposouris,ligne_supprime,
HtImageTCO,LargImageTCO,XminiSel,YminiSel,Temposouris,ligne_supprime,
XmaxiSel,YmaxiSel,AncienXMiniSel,AncienXMaxiSel,AncienYMiniSel,AncienYMaxiSel,
Xclic,Yclic,XClicCellInserer,YClicCellInserer,RatioC,ModeCouleurCanton,
AncienXClicCell,AncienYClicCell,TCODrag,epaisseur_voies,Ax,Ay,TpsBougeSouris,
@@ -533,10 +535,13 @@ var
// pour copier coller
TamponTCO : array of array of TTco ;
TamponTCO_Org : record
numTCO,x1,y1,x2,y2,NbreCellX,NbreCellY : integer;
numTCO,
x1,y1,x2,y2, // coordoonnées rectangulaires de la sélection
NbreCellX,NbreCellY,
Xorg,Yorg : integer; // point d'origine de la sélection
end;
Rect_select : Trect_Select;
Rect_select : Trect_Select; // rectangle de sélection graphique
Sauv_rect_select : Trect;
// tracé du train dans les TCO
@@ -741,16 +746,20 @@ begin
end;
// Accroche les poignées et bouge le rectangle de sélection graphique
// ici, la souris est enfoncée et est entrain de bouger en x,y
procedure Accroche_Rectangle_selection(indexTCO,x,y : integer);
var dx,dy : integer;
var dx,dy,maxX,maxY : integer;
r : Trect;
rien : boolean;
begin
rien:=not(prise_droit) and not(prise_bas) and not(prise_gauche) and not(prise_haut) and not(prise_NE) and not(prise_NO) and not(prise_SE) and not(prise_SO);
maxX:=LargeurCell[indexTCO]*NbreCellX[indexTCO];
maxY:=HauteurCell[indexTCO]*NbreCellY[indexTCO];
// poignée haut
r:=Rect_Select.rN;
if ((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_haut then
if ( ((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_haut) and (y>0) then
begin
screen.cursor:=crSizeNS;
//if (not(prise_droit) and not(prise_bas) and not(prise_gauche) and not(prise_NE) and not(prise_NO) and not(prise_SE) and not(prise_SO)) and clicsouris then
@@ -776,7 +785,7 @@ begin
// poignée droite
r:=Rect_Select.re;
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_droit) then
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_droit) then //and (x<MaxX) then
begin
screen.cursor:=crSizeWE;
//if (not(prise_haut) and not(prise_bas) and not(prise_gauche) and not(prise_NE) and not(prise_NO) and not(prise_SE) and not(prise_SO)) and clicsouris then
@@ -802,7 +811,7 @@ begin
// poignée bas
r:=Rect_Select.rS;
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_bas) then
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_bas) then //and (y<MaxY) then
begin
screen.cursor:=crSizeNS;
if (rien and clicsouris) or prise_bas then
@@ -826,8 +835,9 @@ begin
end;
// poignée gauche
r:=Rect_Select.rO;
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_gauche) then
r:=Rect_Select.rO; // rectangle ouest=poignée gauche
// si x est dans le rectangle
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_gauche) then //and (x>0) then
begin
screen.cursor:=crSizeWE;
if (rien and clicsouris) or prise_gauche then
@@ -835,7 +845,7 @@ begin
// efface l'ancien
Affiche_Rectangle(IndexTCO,Rect_select);
prise_gauche:=true;
if x<rect_select.Gd.Right then
if (x<rect_select.Gd.Right) then
begin
rect_Select.gd.left:=x;
end
@@ -852,7 +862,7 @@ begin
// poignée NE
r:=Rect_Select.rNE;
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_NE) then
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_NE) then //and (x<MaxX) and (y>0) then
begin
screen.cursor:=crSizeNESW;
if (rien and clicsouris) or prise_NE then
@@ -870,7 +880,7 @@ begin
// poignée NO
r:=Rect_Select.rNO;
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_NO) then
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_NO) then //and (x>0) and (y>0) then
begin
screen.cursor:=crSizeNWSE;
if (rien and clicsouris) or prise_NO then
@@ -888,7 +898,7 @@ begin
// poignée SE
r:=Rect_Select.rSE;
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_SE) then
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_SE) then //and (x<MaxX) and (y<MaxY) then
begin
screen.cursor:=crSizeNWSE;
if (rien and clicsouris) or prise_SE then
@@ -906,7 +916,7 @@ begin
// poignée SO
r:=Rect_Select.rSO;
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_SO) then
if (((x>=r.left) and (x<=r.Right) and (y>=r.top) and (y<=r.bottom)) or prise_SO) then //and (x>0) and (y<MaxY) then
begin
screen.cursor:=crSizeNESW;
if (rien and clicsouris) or prise_SO then
@@ -924,7 +934,7 @@ begin
// selec rectangle : bouger en toutes directions
r:=Rect_select.Gd;
if ((y>r.top) and (y<r.bottom) and (x>r.Left) and (x<r.Right)) or prise_N then
if ((y>r.top) and (y<r.bottom) and (x>r.Left) and (x<r.Right) and (x>0) and (x<MaxX) and (y>0) and (y<maxY)) or prise_N then
begin
screen.cursor:=crSizeAll;
if not(prise_N) and clicSOuris then
@@ -1610,11 +1620,12 @@ begin;
if not(AvecGrille[indexTCO]) then exit;
Xorg:=(x-1)*LargeurCell[indexTCO];
Yorg:=(y-1)*HauteurCell[indexTCO];
if PcanvasTCO[indexTCO]<>nil then
With PcanvasTCO[indexTCO] do
begin
Pen.Color:=clGrille[IndexTCO];
Pen.mode:=PmCopy;
Pen.width:=1;
Pen.width:=3;
MoveTo(Xorg,YOrg);
LineTo(Xorg+LargeurCell[indexTCO],YOrg);
LineTo(Xorg+LargeurCell[indexTCO],YOrg+HauteurCell[indexTCO]);
@@ -1666,16 +1677,23 @@ end;
// affiche la sélection bleue des cellules
procedure affiche_selection(indexTCO : integer);
var r : Trect;
larg,haut : integer;
begin
with PImageTCO[indexTCO].Canvas do
if FormTCO[indexTCO].RadioGroupSel.ItemIndex=0 then
begin
larg:=largeurCell[indexTCO];
haut:=HauteurCell[indexTCO];
with PImageTCO[indexTCO].Canvas do
begin
Pen.Mode:=PmXor;
Pen.color:=clGrille[IndexTCO];
Brush.Color:=clblue;
//FillRect(r);
r:=Rect(xminiSel+1,YminiSel+1,XmaxiSel+LargeurCell[indexTCO],yMaxiSel+hauteurCell[indexTCO]);
r:=Rect((xminiSel-1)*Larg,(YminiSel-1)*Haut,(XmaxiSel)*larg,(yMaxiSel)*haut);
Rectangle(r);
end;
end;
end;
@@ -1857,14 +1875,14 @@ var b,x0,y0,xt,yt,repr,taillefont,tf : integer;
ss,s,nf : string;
c : Tcanvas;
begin
c:=PcanvasTCO[indextco];
if c=nil then exit;
x0:=(x-1)*LargeurCell[indexTCO];
y0:=(y-1)*hauteurCell[indexTCO];
//PCanvasTCO.Brush.Style:=bsSolid;
s:=tco[indextco,x,y].Texte;
c:=PcanvasTCO[indextco];
b:=tco[indextco,x,y].BImage;
if (b=51) then PCanvasTCO[indextco].Brush.Color:=clQuai[indexTCO] else PCanvasTCO[indextco].Brush.Color:=tco[indextco,x,y].CouleurFond;
c.Font.Color:=tco[indextco,x,y].CoulFonte;
@@ -5071,6 +5089,8 @@ var x0,y0,xf,yf,act : integer;
r : Trect;
s : string;
begin
if PcanvasTCO[indexTCO]=nil then exit;
x0:=(x-1)*LargeurCell[indexTCO]+2;
y0:=(y-1)*hauteurCell[indexTCO]+2;
xf:=x0+LargeurCell[indexTCO]-4;
@@ -5086,8 +5106,6 @@ begin
r:=rect(x0,y0,xf,yf);
rectangle(r);
if TCOActive then
begin
s:=tco[indexTCO,x,y].Fonte;
if s='' then tco[indexTCO,x,y].Fonte:='Arial';
//s:=tco[indexTCO,x,y].texte;
@@ -5129,7 +5147,6 @@ begin
tco[indexTCO,x,y].TailleFonte:=8;
tco[indexTCO,x,y].FontStyle:='G';
end;
//tf:=(tco[indexTCO,x,y].TailleFonte*LargeurCell[indexTCO]) div 40;
//tf:=(8*LargeurCell[indexTCO]) div 40;;
@@ -5138,8 +5155,6 @@ begin
//texte_reparti(s,indexTCO,x,y,tf);
affiche_texte(indextco,x,y);
end;
end;
end;
// Element 24
@@ -7548,7 +7563,6 @@ begin
end
else
PlgBlt(PImageTemp[index].Canvas.Handle,p,ImageSource.Canvas.Handle,0,0,TailleX,TailleY,0,0,0);
//PimageTemp.Visible:=true;
// copie l'image du signal retournée depuis image temporaire vers tco avec une réduction en mode transparennt
TransparentBlt(PcanvasTCO[index].Handle,x,y,round(TailleY*FrY),round(TailleX*FrX), // destination
PImageTemp[index].Canvas.Handle,0,0,TailleY,TailleX,clBlue); // source - clblue est la couleur de transparence
@@ -8657,8 +8671,8 @@ procedure Entoure_cell(indexTCO,x,y : integer);
var r : Trect;
x0,y0 : integer;
begin
x0:=(x-1)*LargeurCell[indexTCO]+1;
y0:=(y-1)*hauteurCell[indexTCO]+1;
x0:=(x-1)*LargeurCell[indexTCO];
y0:=(y-1)*hauteurCell[indexTCO];
with PcanvasTCO[indexTCO] do
begin
Pen.width:=3;
@@ -8808,7 +8822,7 @@ begin
// afficher les sélections si elles sont présentes
if entoure[indexTCO] then Entoure_cell(indexTCO,Xentoure[indexTCO],Yentoure[indexTCO]);
if rect_select.NumTCO<>0 then Affiche_Rectangle(IndexTCO,Rect_select);
if (rect_select.NumTCO<>0) and (IndexTCO=rect_select.NumTCO) then Affiche_Rectangle(IndexTCO,Rect_select); // rectangle graphique
if selectionaffichee[indexTCO] then Affiche_selection(indexTCO);
end;
@@ -8819,7 +8833,7 @@ begin
if affevt or (debug=1) then Affiche('FormTCO'+intToSTR(indexTCOCreate)+' create',clLime);
//Screen.OnActiveControlChange := ActiveControlChanged;
visible:=false; // ne s'affiche pas par défaut et évite l'effet fenetre fantome.
PCanvasTCO[indexTCOCreate]:=nil;
offsetSourisY:=-10; // permet de tenir l'icone au milieu quand on fait un glisser
offsetSourisX:=-10;
RadioGroupSel.ItemIndex:=0;
@@ -8831,7 +8845,8 @@ begin
epaisseur_voies:=5;
XclicCell[indexTCOCreate]:=1;
YclicCell[indexTCOCreate]:=1;
xCoupe:=0;yCoupe:=0;
TamponTCO_org.Xorg:=0;
TamponTCO_org.Yorg:=0;
indexTrace:=0;
KeyPreview:=true; // valide les évènements clavier
TrackBarZoom.Tabstop:=false; // permet d'avoir les evts curseurs
@@ -8839,10 +8854,11 @@ begin
ButtonConfigTCO.TabStop:=false;
ButtonRaz.TabStop:=false;
ButtonDessiner.TabStop:=false;
SelecBouge:=false;
//TrackBarZoom.position:=78;
couleurAdresse:=clCyan;
xMiniSel:=99999;yMiniSel:=99999;
xMiniSel:=99999;yMiniSel:=99999; // coordonnées cellules
xMaxiSel:=0;yMaxiSel:=0;
SelectionAffichee[indexTCOCreate]:=false;
//ImageTCO.Canvas.font.Name:='Arial'; //<--- peut générer exception out of ressource!!
@@ -8981,6 +8997,8 @@ begin
end;
for t:=1 to NbreTCO do
begin
if PcanvasTCO[t]<>nil then
begin
n:=Trace_Train[t].train[train].nombre;
if n=0 then exit;
@@ -9004,6 +9022,7 @@ begin
end;
end;
end;
end;
end;
// affiche le trajet dans le tco du train,ir =nombre d'éléments du tableau trace_train mode=couleur
@@ -9128,8 +9147,7 @@ end;
// Ne nécessite pas que les aiguillages aoient bien positionnés entre det1 et det2
// procédure récursive quand on passe par un aiguillage en pointe pour explorer les éléments opposés
procedure zone_tco(indexTCO,det1,det2,train,mode: integer);
var i,ir,adresse,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteration,indexIr,
sx,sy,position : integer;
var i,ir,adresse,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteration,indexIr : integer;
memtrouve,sortir,casok,indextrouve : boolean;
s : string;
@@ -9166,8 +9184,8 @@ var i,ir,adresse,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteratio
// récursivité suivante leur valeur, mais elles reprennent leur valeurs initiales à la remontée vers la résursivité appellante.
Procedure El_tco(x,y,train : integer; ir : integer);
var mdl : Tequipement;
i,j,index :integer;
posAig : boolean;
i,j,index,position : integer;
posAig,SortirBoucle : boolean;
begin
posAig:=true;
// répète la route depuis un aiguillage
@@ -9176,6 +9194,7 @@ var i,ir,adresse,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteratio
i:=0;
repeat
sortirBoucle:=false;
maj_route(indextco,x,y,train,ir);
adresse:=tco[indextco,x,y].Adresse ;
index:=index_aig(adresse);
@@ -9851,10 +9870,10 @@ var i,ir,adresse,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteratio
inc(i);
if (adresse=det2) and (adresse<>0) then memTrouve:=true;
if (adresse=0) and (det2=0) and (tco[indexTCO,x,y].buttoir<>0) then memTrouve:=true;
if ((Bimage=1) or (Bimage=20) or (Bimage=10) or (Bimage=11)) and ((adresse<>det2) and (adresse<>det1) and (adresse<>0)) then sortir:=true;
if ((Bimage=1) or (Bimage=20) or (Bimage=10) or (Bimage=11)) and ((adresse<>det2) and (adresse<>det1) and (adresse<>0)) then sortirBoucle:=true;
if (i>200) or (iteration>200) then sortir:=true;
Maj_coords(AncienX,AncienY,x,y);
until sortir or memtrouve;
until sortir or memtrouve or SortirBoucle;
if DebugTCO and not(memtrouve) then AfficheDebug('Fin de boucle dét '+intToSTR(det2)+' non trouvé',clOrange);
//mémoriser l'index de route si on a trouvé det2, et uniquement sur la première itération quand on l'a trouvé
@@ -9872,6 +9891,7 @@ var i,ir,adresse,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteratio
// Début de la procédure zone_tco
begin
if debugTCO then AfficheDebug('Zone_TCO'+intToSTR(indexTCO)+' det1='+intToSTR(det1)+' det2='+intToSTR(det2)+' Train'+intToSTR(Train)+' mode='+intToSTR(mode),clWhite);
if PcanvasTCO[indexTCO]=nil then exit;
trouve_det(indexTCO,det1,Xdet1,Ydet1);
if (Xdet1=0) or (Ydet1=0) then exit;
@@ -10180,7 +10200,7 @@ var indextco : integer;
begin
indextco:=index_TCO(sender);
IndexTCOCourant:=indexTCO;
if affevt then Affiche('Form TCO'+intToSTR(indexTCO)+' activate',clyellow);
if affevt or (debug=1) then Affiche('Form TCO'+intToSTR(indexTCO)+' activate',clyellow);
Caption:='TCO'+intToSTR(indexTCO)+' : '+NomFichierTCO[indexTCO];
if indexTCO=0 then exit;
{initalisation des dimensions du tco - à ne faire qu'une fois}
@@ -10196,7 +10216,6 @@ begin
LargeurCelld2[indexTCO]:=LargeurCell[indexTCO] div 2;hauteurCelld2[indexTCO]:=hauteurCell[indexTCO] div 2;
calcul_reduction(frxGlob[indexTCO],fryGlob[indexTCO],LargeurCell[indexTCO],hauteurCell[indexTCO]);
dessine_icones(indexTCO);
NbCellulesTCO[indexTCO]:=NbreCellX[indexTCO]*NbreCellY[indexTCO];
ImageTCO.Width:=LargeurCell[indexTCO]*NbreCellX[indexTCO];
@@ -10213,19 +10232,8 @@ begin
// initialiser le pointeur image temporaire du TCO
PImageTemp[indextco]:=FormTCO[indextco].ImageTemp;
// peindre l'image en bleu pour la transparence , nécessaire en cas de décalage des signaux à 180° mais correction apportée dans feu_180
with PImageTemp[indextco].Canvas do
begin
Pen.Color:=ClBlue;
Brush.Color:=CLBlue;
// FillRect(Rect(0,0,100,100));
end;
//PImageTemp[indextco].Canvas.Rectangle(0,0,PImageTemp[indextco].Width,PimageTemp[indextco].Height);
//PImageTemp[indextco].Picture.Bitmap.TransparentMode:=tmAuto;
//PImageTemp[indextco].Picture.Bitmap.TransparentColor:=clblue;
//PImageTemp[indextco].Transparent:=true;
dessine_icones(indexTCO);
//déclenche l'Affiche_tco
if ZoomInit[indexTCO]<>0 then FormTCO[indexTCO].TrackBarZoom.Position:=ZoomInit[indexTCO] else TrackBarZoom.position:=34;
@@ -10460,13 +10468,13 @@ begin
if TamponAffecte then
begin
if (xCoupe<>0) and (ycoupe<>0) then
if (TamponTCO_org.Xorg<>0) and (TamponTCO_org.Yorg<>0) then
begin
for y:=TamponTCO_Org.y1 to TamponTCO_Org.y2 do // rectangle de la sélection
for x:=TamponTCO_Org.x1 to TamponTCO_Org.x2 do
begin
xPlace:=xCoupe+x-TamponTCO_Org.x1; // destination
yPlace:=yCoupe+y-TamponTCO_Org.y1;
xPlace:=TamponTCO_org.Xorg+x-TamponTCO_Org.x1; // destination
yPlace:=TamponTCO_org.Yorg+y-TamponTCO_Org.y1;
if (xPlace<=NbreCellX[indexTCO]) and (yPlace<=NbreCellY[indexTCO]) then
begin
@@ -10542,31 +10550,69 @@ end;
procedure copier(indexTCO : integer);
var x,y : integer;
var x,y,xmax,ymax,larg,haut : integer;
begin
if SelectionAffichee[indexTCO] then
begin
if FormTCO[indexTCO].RadioGroupSel.ItemIndex=1 then
begin
larg:=largeurCell[indexTCO];
haut:=hauteurCell[indexTCO];
xMax:=larg*NbreCellX[indexTCO];
yMax:=haut*NbreCellY[indexTCO];
xMiniSel:=(Rect_select.Gd.Left div larg)+1;
yMiniSel:=(Rect_select.Gd.top div haut)+1;
xMaxiSel:=(Rect_select.Gd.right div larg)+1;
yMaxiSel:=(Rect_select.Gd.bottom div haut)+1;
if xminiSel>xMaxiSel then echange(xminiSel,xMaxiSel);
if yminiSel>yMaxiSel then echange(yminiSel,yMaxiSel);
if xMiniSel<1 then xMiniSel:=1;
if xMiniSel>xMax then xMiniSel:=xMax;
if yMiniSel<1 then yMiniSel:=1;
if yMiniSel>yMax then yMiniSel:=yMax;
if xMaxiSel>xMax then xmaxiSel:=xMax;
if yMaxiSel>yMax then ymaxiSel:=yMax;
end;
TamponTCO_org.numTCO:=indexTCO;
TamponTCO_Org.x1:=XminiSel div LargeurCell[indexTCO] +1;
TamponTCO_Org.x2:=XmaxiSel div LargeurCell[indexTCO] +1;
TamponTCO_Org.y1:=yminiSel div hauteurCell[indexTCO] +1;
TamponTCO_Org.y2:=ymaxiSel div hauteurCell[indexTCO] +1;
tamponTCO_Org.Xorg:=xMiniSel;
tamponTCO_Org.Yorg:=yMiniSel;
TamponTCO_Org.x1:=XminiSel ;
TamponTCO_Org.x2:=XmaxiSel ;
TamponTCO_Org.y1:=yminiSel ;
TamponTCO_Org.y2:=ymaxiSel ;
for y:=TamponTCO_Org.y1 to TamponTCO_Org.y2 do
for x:=TamponTCO_Org.x1 to TamponTCO_Org.x2 do
begin
//Affiche(intToSTR(x)+' '+intToSTR(y),clred);
tampontco[x,y]:=tco[indextco,x,y];
end;
TamponAffecte:=true;
end
else
// copie sans sélection : on coupe une seule cellule
begin
tampontco[XclicCell[indexTCO],YclicCell[indexTCO]]:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]]; // pour pouvoir faire annuler couper
TamponTCO_org.x1:=XclicCell[indexTCO];TamponTCO_org.y1:=YclicCell[indexTCO];
TamponTCO_org.x2:=XclicCell[indexTCO];TamponTCO_org.y2:=YclicCell[indexTCO];
TamponTCO_org.numTCO:=indexTCO;
TamponAffecte:=true;
TamponTCO_org.xOrg:=XclicCell[indexTCO];
TamponTCO_org.yOrg:=YclicCell[indexTCO];
end;
end;
procedure couper(indexTCO: integer);
var x,y,XCell1,YCell1,xCell2,yCell2 : integer;
var x,y,xMax,Ymax,XCell1,YCell1,xCell2,yCell2,haut,larg : integer;
begin
larg:=largeurCell[indexTCO];
haut:=hauteurCell[indexTCO];
if (XclicCell[indexTCO]=0) or (YclicCell[indexTCO]=0) then exit;
//Affiche(intToSTR(ancienXclic)+' '+intToSTR(XclicCell[indexTCO]),clred);
if (AncienXclic=XclicCell[indexTCO]) and (AncienYclic=YclicCell[indexTCO]) then exit;
//if (AncienXclic=XclicCell[indexTCO]) and (AncienYclic=YclicCell[indexTCO]) then exit;
AncienXclic:=XclicCell[indexTCO];
AncienYclic:=YclicCell[indexTCO];
@@ -10580,12 +10626,27 @@ begin
// couper par la fenetre graphique
if FormTCO[indexTCO].RadioGroupSel.ItemIndex=1 then
begin
xMiniSel:=Rect_select.Gd.Left;
yMiniSel:=Rect_select.Gd.top;
xMaxiSel:=Rect_select.Gd.right;
yMaxiSel:=Rect_select.Gd.bottom;
xMax:=larg*NbreCellX[indexTCO];
yMax:=haut*NbreCellY[indexTCO];
xMiniSel:=(Rect_select.Gd.Left div larg)+1;
yMiniSel:=(Rect_select.Gd.top div haut)+1;
xMaxiSel:=(Rect_select.Gd.right div larg)+1;
yMaxiSel:=(Rect_select.Gd.bottom div haut)+1;
if xminiSel>xMaxiSel then echange(xminiSel,xMaxiSel);
if yminiSel>yMaxiSel then echange(yminiSel,yMaxiSel);
if xMiniSel<1 then xMiniSel:=1;
if xMiniSel>xMax then xMiniSel:=xMax;
if yMiniSel<1 then yMiniSel:=1;
if yMiniSel>yMax then yMiniSel:=yMax;
if xMaxiSel>xMax then xmaxiSel:=xMax;
if yMaxiSel>yMax then ymaxiSel:=yMax;
TamponTCO_org.xOrg:=xminiSel;
TamponTCO_org.yOrg:=yminiSel;
//Affiche('xMiniSel='+IntToSTR(xMiniSel)+' yMiniSel='+IntToSTR(yMiniSel)+' xMaxiSel='+IntToSTR(xMaxiSel)+' yMaxiSel='+IntToSTR(yMaxiSel),clOrange);
//Affiche('xcoupe'+intToSTR(xcoupe),clyellow);
// effacer le rectangle
Affiche_Rectangle(IndexTCO,Rect_select);
Rect_select.NumTCO:=0; // indicateur de non affichage
@@ -10604,41 +10665,46 @@ begin
efface_entoure(indexTCO);
efface_cellule(indexTCO,formTCO[indexTCO].ImageTCO.Canvas,XclicCell[indexTCO],YClicCell[indexTCO],PmCopy);
TamponAffecte:=true;
xCoupe:=XclicCell[indexTCO];yCoupe:=YclicCell[indexTCO];
TamponTCO_org.xOrg:=XclicCell[indexTCO];
TamponTCO_org.yOrg:=YclicCell[indexTCO];
Affiche_tco(indexTCO);
exit;
end;
TCO_modifie:=true;
copier(indexTCO);
SelectionAffichee[indexTCO]:=false;
xCell1:=XminiSel div LargeurCell[indexTCO] +1;
xCell2:=XmaxiSel div LargeurCell[indexTCO] +1;
yCell1:=yminiSel div hauteurCell[indexTCO] +1;
yCell2:=ymaxiSel div hauteurCell[indexTCO] +1;
xCell1:=XminiSel;
xCell2:=XmaxiSel;
yCell1:=yminiSel;
yCell2:=ymaxiSel;
xCoupe:=XCell1;yCoupe:=yCell1;
for y:=yCell1 to yCell2 do
for x:=xCell1 to xCell2 do
begin
raz_cellule(indextco,x,y);
//Affiche('Efface cellules '+IntToSTR(X)+' '+intToSTR(y),clyellow);
//Affiche('Efface cellules '+IntToSTR(x)+' '+intToSTR(y),clyellow);
efface_entoure(indexTCO);
efface_cellule(indexTCO,formTCO[indexTCO].ImageTCO.Canvas,X,Y,PmCopy);
if avecGrille[indexTCO] then grille(indexTCO);
end;
end;
// coordonnées cellules
procedure selection_bleue(indexTCO,cellX,cellY : integer);
var xMiniSelP,yminiSelP,xMaxiSelP,ymaxiSelP : integer;
var xMiniSelP,yminiSelP,xMaxiSelP,ymaxiSelP,larg,haut : integer;
r : Trect;
begin
// zone de sélection bleue en coords pixels
xMiniSel:=(Xentoure[indexTCO]-1)*LargeurCell[indexTCO];;
yMiniSel:=(Yentoure[indexTCO]-1)*HauteurCell[indexTCO];;
xMaxiSel:=(cellX-1)*LargeurCell[indexTCO];
yMaxiSel:=(cellY-1)*hauteurCell[indexTCO];
larg:=largeurCell[indexTCO];
haut:=hauteurCell[indexTCO];
// zone de sélection bleue en cellules
xMiniSel:=(Xentoure[indexTCO]);
yMiniSel:=(Yentoure[indexTCO]);
xMaxiSel:=(cellX);
yMaxiSel:=(cellY);
xminiSelP:=min(xminiSel,xMaxiSel);
yminiSelP:=min(yminiSel,yMaxiSel);
@@ -10651,6 +10717,7 @@ begin
yMaxiSel:=yMaxiSelP;
//Affiche('xMiniSel='+IntToSTR(xMiniSel)+' yMiniSel='+IntToSTR(yMiniSel)+' xMaxiSel='+IntToSTR(xMaxiSel)+' yMaxiSel='+IntToSTR(yMaxiSel),clOrange);
//Affiche('xcoupe'+intToSTR(xcoupe),clyellow);
// efface l'ancien rectangle de sélection
if SelectionAffichee[indexTCO] then
@@ -10664,7 +10731,7 @@ begin
if piloteAig then begin SelectionAffichee[indexTCO]:=false;piloteAig:=false;exit;end;
r:=Rect(xminiSel+1,YminiSel+1,XmaxiSel+LargeurCell[indexTCO],yMaxiSel+hauteurCell[indexTCO]);
r:=Rect((xminiSel-1)*larg,(YminiSel-1)*haut,(XmaxiSel)*larg,(yMaxiSel*haut));
// Affiche le nouveau rectangle de sélection
Rancien:=r;
@@ -10682,11 +10749,11 @@ end;
procedure selec_tout(indexTCO : integer);
begin
if indexTCO<0 then exit;
xminiSel:=0;
yminiSel:=0;
xMaxiSel:=(NbreCellX[indexTCO]-1)*LargeurCell[indexTCO];
yMaxiSel:=(NbreCellY[indexTCO]-1)*hauteurCell[indexTCO];
rAncien:=rect(xminiSel,YminiSel,xmaxiSel+LargeurCell[indexTCO],YMaxiSel+hauteurCell[indexTCO]);
xminiSel:=1;
yminiSel:=1;
xMaxiSel:=NbreCellX[indexTCO];
yMaxiSel:=NbreCellY[indexTCO];
rAncien:=rect(xminiSel,YminiSel,xmaxiSel*LargeurCell[indexTCO],YMaxiSel*hauteurCell[indexTCO]);
SelectionAffichee[indexTCO]:=true;
with formTCO[indexTCO].imageTCO.Canvas do
@@ -10696,6 +10763,8 @@ begin
Brush.Color:=clblue;
Rectangle(rAncien);
end;
TamponTCO_org.xOrg:=1;
TamponTCO_org.yOrg:=1;
end;
@@ -11014,11 +11083,11 @@ begin
stocke_undo(indexTCO,1,XClic,YClic);
maj_undo(1);
tco[indextco,XClic,YClic].BImage:=icone;
tco[indextco,XClic,YClic].liaisons:=liaisons[icone];
tco[indextco,XClic,YClic].BImage:=icone; // Image de la cellule
tco[indextco,XClic,YClic].liaisons:=liaisons[icone]; // liaisons des voies
tco[indextco,xClic,YClic].CoulFonte:=clYellow;
tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].Repr:=2;
formTCO[indexTCO].EditAdrElement.Text:=IntToSTR( tco[indextco,XClic,YClic].Adresse);
formTCO[indexTCO].EditAdrElement.Text:=IntToSTR(tco[indextco,XClic,YClic].Adresse);
formTCO[indexTCO].EdittypeImage.Text:=IntToSTR(tco[indextco,XClic,YClic].BImage);
end;
@@ -11261,6 +11330,12 @@ begin
TCO_modifie:=true;
ligne_supprime:=0;
colonne_supprime:=0;
// efface rectangle graphique
if Rect_select.NumTCO=indexTCO then affiche_rectangle(IndexTCO,Rect_select);
Rect_select.NumTCO:=0;
selectionAffichee[indexTCO]:=false;
end;
end;
@@ -11756,7 +11831,6 @@ begin
if button=mbLeft then
begin
// zizi
//Affiche('TCO'+intToSTR(indexTCO)+' souris clicG enfoncée',clYellow);
if affEvt then Affiche('TCO'+intToSTR(i)+' souris clicG enfoncée',clYellow);
if dbleClicTCO then begin dbleClicTCO:=false;exit;end;
@@ -11932,15 +12006,36 @@ begin
exit;
end;
// si clic souris en mode fenetre graphique: initialisation
// si clic souris en mode fenetre graphique: initialisation du rectangle bleu de sélection graphique
if (RadioGroupSel.ItemIndex=1) then
begin
if rect_select.NumTCO<>indexTCO then
begin
affiche_rectangle(rect_select.NumTCO,Rect_select); // effacer sur l'autre tco
end;
if not(selectionAffichee[indexTCO]) then
begin
// si une zone de sélection est affichée annuler toutes
for n:=1 to NbreTCO do
begin
// mode cellule
if SelectionAffichee[n] then
begin
//Affiche('efface sélection',clOrange);
with formTCO[n].imageTCO.Canvas do
begin
Pen.Mode:=PmXor;
Pen.color:=clGrille[n];
Brush.Color:=clblue;
Rectangle(rAncien);
end;
end;
// mode graphique
if (n<>indexTCO) and (rect_select.NumTCO=n) then
begin
Affiche('Efface sur TCO'+intToSTR(n),clred);
affiche_rectangle(rect_select.NumTCO,Rect_select); // effacer sur l'autre tco
rect_select.NumTCO:=0;
end;
end;
// créer nouveau rectangle graphique
rect_select.NumTCO:=indexTCO; // indicateur d'affichage
with Rect_select.Gd do
begin
@@ -11956,8 +12051,9 @@ begin
end
else
begin
xMiniSel:=99999;yMiniSel:=99999;
xMaxiSel:=0;yMaxiSel:=0;
// Affiche('HAHA',clred);
// xMiniSel:=99999;yMiniSel:=99999;
// xMaxiSel:=0;yMaxiSel:=0;
// si une zone de sélection est affichée sur un des TCO, annuler toutes
for n:=1 to NbreTCO do
@@ -12068,7 +12164,7 @@ end;
procedure TFormTCO.ImageTCOMouseMove(Sender: TObject; Shift: TShiftState;X, Y: Integer);
var r : Trect;
indexTCO,xMiniSelP,yMiniSelP,xMaxiSelP,yMaxiSelP : integer;
indexTCO,xMiniSelP,yMiniSelP,xMaxiSelP,yMaxiSelP,larg,haut : integer;
ok : boolean;
begin
if affevt then Affiche('ImageTCOMouseMove',clLime);
@@ -12076,14 +12172,46 @@ begin
//Affiche(IntToSTR(tempoSouris),clred);
indexTCO:=index_tco(sender);
// exécuté uniquement si souris enfoncée et changement position souris
if (radioGroupSel.ItemIndex=1) and ((ax<>x) or (ay<>y)) and selectionAffichee[indexTCO] then
//Affiche(intToSTR(x)+','+intToSTR(y),clYellow);
// exécuté uniquement si changement position souris
if (ax<>x) or (ay<>y) then
begin
if (radioGroupSel.ItemIndex=1) then
begin
//Affiche(IntToSTR(tick),clred);
Accroche_Rectangle_selection(indexTCO,x,y);
exit;
end;
{
if (radioGroupSel.ItemIndex=0) then
begin
//if not(clicsouris) then affiche('non',clred);
if clicsouris and SelecBouge then
begin
//zizi
x0:=(xMiniSel-1)*LargeurCell[indexTCO];
y0:=(yMiniSel-1)*hauteurCell[indexTCO];
larg:=((xMaxiSel-xMiniSel)+1)*LargeurCell[indexTCO];
haut:=((yMaxiSel-yMiniSel)+1)*HauteurCell[indexTCO];
//Affiche(intToSTR(xMiniSel)+',BUBU'+intToSTR(xMaxiSel),clred);
BitBlt(formTCO[indexTCO].ImageTCO.canvas.Handle,ax,ay,larg,haut,oldbmp.canvas.handle,0,0,SRCCOPY); // restitue l'ancien
BitBlt(oldbmp.canvas.handle,0,0,larg,haut,FormTCO[IndexTCO].ImageTCO.Canvas.Handle,x,y,SRCCOPY); //copier le nouveau
formTCO[indexTCO].ImageTCO.Repaint;
//bitBlt(FormTCO[IndexTCO].ImageTemp.canvas.handle,0,0,larg,haut,FormTCO[IndexTCO].ImageTCO.Canvas.Handle,x,y,SRCCOPY);
//formTCO[indexTCO].ImageTemp.Repaint;
ax:=x;
ay:=y;
exit;
end; }
end;
ax:=x;
ay:=y;
if selecBouge then exit;
if Temposouris>0 then exit;
// Affiche('*',cllime);
//affiche(intToSTR(y),clorange);
@@ -12145,11 +12273,15 @@ begin
TpsBougeSouris:=5;
if not(clicsouris) or (temposouris>0) then exit;
// zone de sélection bleue en coordonnées souris
xMiniSel:=(XclicCell[indexTCO]-1)*LargeurCell[indexTCO];
yMiniSel:=(YclicCell[indexTCO]-1)*hauteurCell[indexTCO];
xMaxiSel:=(cellX-1)*LargeurCell[indexTCO];
yMaxiSel:=(cellY-1)*hauteurCell[indexTCO];
//Affiche('ajuste rect',clWhite);
larg:=largeurCell[indexTCO];
haut:=hauteurCell[indexTCO];
// zone de sélection bleue en coordonnées cellules
xMiniSel:=XclicCell[indexTCO];
yMiniSel:=YclicCell[indexTCO];
xMaxiSel:=cellX; // cellX = position cellule souris actuelle
yMaxiSel:=cellY;
xminiSelP:=min(xminiSel,xMaxiSel);
yminiSelP:=min(yminiSel,yMaxiSel);
@@ -12161,8 +12293,8 @@ begin
xMaxiSel:=xMaxiSelP;
yMaxiSel:=yMaxiSelP;
//Affiche('xMiniSel='+IntToSTR(xMiniSel)+' yMiniSel='+IntToSTR(yMiniSel)+' xMaxiSel='+IntToSTR(xMaxiSel)+' yMaxiSel='+IntToSTR(yMaxiSel),clOrange);
//Affiche('XclicCell='+intToSTR(XclicCell[indexTCO])+' YclicCell='+intToSTR(XclicCell[indexTCO]),clorange);
// Affiche('xMiniSel='+IntToSTR(xMiniSel)+' yMiniSel='+IntToSTR(yMiniSel)+' xMaxiSel='+IntToSTR(xMaxiSel)+' yMaxiSel='+IntToSTR(yMaxiSel),clOrange);
// Affiche('XclicCell='+intToSTR(XclicCell[indexTCO])+' YclicCell='+intToSTR(XclicCell[indexTCO]),clorange);
// efface l'ancien rectangle de sélection
if SelectionAffichee[indexTCO] then
@@ -12176,7 +12308,7 @@ begin
if piloteAig then begin SelectionAffichee[indexTCO]:=false;piloteAig:=false;exit;end;
r:=Rect(xminiSel+1,YminiSel+1,XmaxiSel+LargeurCell[indexTCO],yMaxiSel+hauteurCell[indexTCO]);
r:=Rect((xminiSel-1)*larg,(YminiSel-1)*haut,XmaxiSel*larg,yMaxiSel*haut);
Rancien:=r;
Affiche_selection(indexTCO);
@@ -12186,11 +12318,13 @@ begin
if entoure[indexTCO] then begin Entoure_cell(indexTCO,Xentoure[indexTCO],Yentoure[indexTCO]);entoure[indexTCO]:=false;end; // efface
end;
procedure TFormTCO.ImageTCOMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure TFormTCO.ImageTCOMouseUp(Sender: TObject; Button: TMouseButton;Shift: TShiftState; X, Y: Integer);
var indexTCO,lg,ht,xo,yo : integer;
begin
if affevt then Affiche('Souris clic relachée',clyellow);
clicsouris:=false;
SelecBouge:=false;
indextco:=index_TCO(sender);
prise_droit:=false;
prise_gauche:=false;
@@ -12201,6 +12335,21 @@ begin
prise_SE:=false;
prise_NO:=false;
prise_N:=false;
// on relache la souris après avoir tiré un rectange de séection
if selectionAffichee[indexTCO] and (FormTCO[indexTCO].RadioGroupSel.ItemIndex=0) then
//
begin
xo:=(xMiniSel-1)*LargeurCell[indexTCO];
yo:=(yMiniSel-1)*hauteurCell[indexTCO];
lg:=((xMaxiSel-xMiniSel)+1)*LargeurCell[indexTCO];
ht:=((yMaxiSel-yMiniSel)+1)*HauteurCell[indexTCO];
//affiche('relache carré',clWhite);
SelecBouge:=true;
// poubouge dynamique BitBlt(oldbmp.canvas.handle,0,0,lg,ht,FormTCO[IndexTCO].ImageTCO.Canvas.Handle,xo,yo,SRCCOPY);
end;
end;
procedure TFormTCO.ButtonRedessineClick(Sender: TObject);
@@ -12259,6 +12408,7 @@ end;
procedure Maj_TCO(indexTCO,Adresse : integer);
var x,y: integer;
begin
if PcanvasTCO[indexTCO]=nil then exit;
for y:=1 to NbreCellY[indexTCO] do
for x:=1 to NbreCellX[indexTCO] do
begin
@@ -12274,6 +12424,7 @@ end;
procedure Maj_Aig_TCO(indexTCO :integer);
var x,y: integer;
begin
if PcanvasTCO[indexTCO]=nil then exit;
for y:=1 to NbreCellY[indexTCO] do
for x:=1 to NbreCellX[indexTCO] do
begin
@@ -12291,6 +12442,8 @@ begin
for ntco:=1 to NbreTCO do
begin
// trouver les cellules comportant l'aiguillage adresse
if PcanvasTCO[ntco]<>nil then
begin
for y:=1 to NbreCellY[ntco] do
for x:=1 to NbreCellX[ntco] do
begin
@@ -12304,6 +12457,7 @@ begin
end;
end;
end;
end;
end;
procedure TFormTCO.Button1Click(Sender: TObject);
@@ -13340,8 +13494,8 @@ begin
TamponTCO_Org.y2:=ligne_supprime;
// case de destination
xcoupe:=1;
ycoupe:=ligne_supprime;
TamponTCO_org.xOrg:=1;
TamponTCO_org.yOrg:=ligne_supprime;
// remplir tempon de sauvegarde
for y:=TamponTCO_Org.y1 to TamponTCO_Org.y2 do
@@ -13391,8 +13545,8 @@ begin
TamponTCO_Org.y2:=NbreCellY[indexTCO];
// cellule de destination
xcoupe:=colonne_supprime;
ycoupe:=1;
TamponTCO_org.xOrg:=colonne_supprime;
TamponTCO_org.yOrg:=1;
for y:=TamponTCO_Org.y1 to TamponTCO_Org.y2 do
for x:=TamponTCO_Org.x1 to TamponTCO_Org.x2 do
@@ -13592,6 +13746,15 @@ begin
c:=c.GetParentComponent; // scrollBox
c:=c.GetParentComponent; // formTCO
indexTCO:=index_tco(c);
if indexTCO<1 then exit;
// si le rectangle de sélection graphique est affiché dans ce tco, l'effacer
if Rect_select.NumTCO=indexTCO then
begin
affiche_rectangle(IndexTCO,Rect_select);
Rect_select.NumTCO:=0;
selectionAffichee[indexTCO]:=false;
end;
RadioGroupSel.ItemIndex:=0; // repasser en mode sélection par cellules
selec_tout(indexTCO);
end;
@@ -13809,9 +13972,13 @@ begin
// sélection par cellules
if RadioGroupSel.ItemIndex=0 then
begin
// si le rectangle est affiché dans ce tco, l'effacer
if Rect_select.NumTCO=indexTCO then affiche_rectangle(IndexTCO,Rect_select);
screen.cursor:=crDefault;
// efface le rectabgle graphique du TCO courant
if Rect_select.NumTCO=indexTCO then
begin
affiche_rectangle(IndexTCO,Rect_select);
Rect_select.NumTCO:=0;
end;
selectionAffichee[indexTCO]:=false;
end;
// sélection par outil graphique
@@ -13825,12 +13992,13 @@ begin
defocusControl(RadioGroupSel,true);
end;
// renvoie le numéro de TCO à l'origine de l'evt du mainmenutco
function TformTCO.index_TCOMainMenu : integer;
var t : Tcontrol;
s : string;
begin
t:=FindControl(mainmenuTCO.WindowHandle); // on ne peut pas remonter au parent d'un mainmenu avec getparentcomponent
s:=t.name;
s:=t.name; // nom de la form TCOx
result:=extract_int(s);
end;
@@ -13843,7 +14011,7 @@ procedure TFormTCO.DessinerleTCO1Click(Sender: TObject);
var indexTCO : integer;
begin
indexTCO:=index_TCOMainMenu;
indexTCO:=index_TCOMainMenu; // renvoie le numéro du TCO qui est à l'origine de l'evt menu
dessinerTCO(indexTCO);
end;
@@ -13903,6 +14071,21 @@ begin
end;
end;
procedure TFormTCO.RechargerleTCOdepuislefichier1Click(Sender: TObject);
var indexTCO,res : integer;
begin
indexTCO:=index_TCOMainMenu;
if TCO_modifie then
begin
res:=MessageDlg('Un des TCO a été modifié. '+#13+'Voulez-vous recharger le TCO : '+nomfichierTCO[indexTCO],mtConfirmation,[mbYes,mbNo,mbCancel],0);
if res=mrYes then
begin
lire_fichier_tco(indexTCO);
Affiche_TCO(indexTCO);
end;
if res=mrCancel then abort;
end;
end;
end.
+4
View File
@@ -176,4 +176,8 @@ begin
end;
begin
end.
+2
View File
@@ -107,6 +107,7 @@ end;
procedure TFormPlace.FormActivate(Sender: TObject);
begin
if affevt then affiche('FormPlace activate',clLime);
LabelTrain1.Caption:=trains[1].nom_train;
Edit1.text:=intToSTR(placement[1].detecteur);
EditDir1.Text:=IntToSTR(placement[1].detdir);
@@ -570,6 +571,7 @@ end;
procedure TFormPlace.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;
+1 -3
View File
@@ -25,7 +25,7 @@ var
verifVersion,notificationVersion,essai : boolean;
chemin_Dest,chemin_src,date_creation,nombre_tel : string;
Const Version='8.5'; // sert à la comparaison de la version publiée
Const Version='8.51'; // 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;
@@ -590,7 +590,6 @@ begin
SHFileOperation(FileFolderOperation);
end;
// https://github.com/sx2008/Delphi-Test-Apps/blob/master/ShellZipTest/ShellZipTool.pas
function Unzip(zipfile : oleVariant): boolean;
var
shellobj,srcfldr, destfldr, shellfldritems,repertoire: Olevariant;
@@ -617,7 +616,6 @@ begin
exit;
end;
repertoire:=filtre; // mettre dans olevariant
filtre:='';
+4 -4
View File
@@ -233,14 +233,14 @@ version 8.41 : Am
version 8.42 : Création d'un onglet de paramètres avancés.
Fichier d'aide affichable depuis le menu.
version 8.43 : Correction d'un bug sur l'importation des détecteurs depuis CDM rail.
version 8.44 : Gestion de la centrale Z21 en mode autonome en Xpressnet.
version 8.5 : Gestion de la centrale Z21 en mode autonome en Xpressnet.
Amélioration des réservations des aiguillages.
Amélioration affichages des trajets dans les TCOs.
Amélioration des réceptions des trames XpressNet.
Ajout d'une action "arrêt des trains" pour les TCOs
version 8.51 : Améliorations sur l'affichage des fenêtres aux démarrage.
Création commandes des lignes DTR et RTS sur les périphériques COM/USB.
Gestion des déconnexions matérielles des ports COM/USB.