V8.37
This commit is contained in:
+4
-1
@@ -4,7 +4,7 @@ interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls;
|
||||
Dialogs, StdCtrls, ExtCtrls, unitConfig, UnitPrinc;
|
||||
|
||||
type
|
||||
TFormImportation = class(TForm)
|
||||
@@ -47,10 +47,13 @@ end;
|
||||
|
||||
procedure TFormImportation.FormCreate(Sender: TObject);
|
||||
begin
|
||||
if debug=1 then Affiche('Création fenetre compilation réseau CDM',clLime);
|
||||
radioCroisBase.Checked:=true;
|
||||
radioCroisSuite.checked:=false;
|
||||
BaseCroisement:=100;
|
||||
EditBaseCrois.Text:=IntToSTR(BaseCroisement);
|
||||
if debug=1 then Affiche('Fin création fenetre compilation réseau CDM',clLime);
|
||||
formprinc.SetFocus; // fin d'init de signaux complexes, on active la form principale
|
||||
end;
|
||||
|
||||
procedure TFormImportation.CheckDebugAnalyseClick(Sender: TObject);
|
||||
|
||||
@@ -18,7 +18,6 @@ uses
|
||||
UnitPareFeu in 'UnitPareFeu.pas',
|
||||
UnitAnalyseSegCDM in 'UnitAnalyseSegCDM.pas' {FormAnalyseCDM},
|
||||
Importation in 'Importation.pas' {FormImportation};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
|
||||
+22
-22
@@ -1,6 +1,6 @@
|
||||
|
||||
Start Length Name Class
|
||||
0001:00000000 001A20F8H .text CODE
|
||||
0001:00000000 001A254CH .text CODE
|
||||
0002:00000000 00002C7CH .data DATA
|
||||
0002:00002C7C 045DE035H .bss BSS
|
||||
|
||||
@@ -83,22 +83,22 @@ Detailed map of segments
|
||||
0001:0009A6E4 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9
|
||||
0001:0009C7EC 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9
|
||||
0001:000A5A38 00001980 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9
|
||||
0001:000A73B8 000004D0 C=CODE S=.text G=(none) M=Importation ACBP=A9
|
||||
0001:000A7888 00013ACC C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
|
||||
0001:000BB354 00002CA4 C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
|
||||
0001:000BDFF8 00000D10 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
|
||||
0001:000BED08 00004DD8 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
|
||||
0001:000C3AE0 00045748 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
|
||||
0001:00109228 00003160 C=CODE S=.text G=(none) M=UnitSR ACBP=A9
|
||||
0001:0010C388 00002880 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
|
||||
0001:0010EC08 000431B4 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
|
||||
0001:00151DBC 00001833 C=CODE S=.text G=(none) M=verif_version ACBP=A9
|
||||
0001:001535F0 000011D0 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
|
||||
0001:001547C0 00002BC8 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
|
||||
0001:00157388 00000D2C C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
|
||||
0001:001580B4 00002604 C=CODE S=.text G=(none) M=Unitplace ACBP=A9
|
||||
0001:0015A6B8 000475B0 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9
|
||||
0001:001A1C68 0000048D C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9
|
||||
0001:000A73B8 00000574 C=CODE S=.text G=(none) M=Importation ACBP=A9
|
||||
0001:000A792C 00013B38 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9
|
||||
0001:000BB464 00002D20 C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9
|
||||
0001:000BE184 00000D10 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9
|
||||
0001:000BEE94 00004DD8 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9
|
||||
0001:000C3C6C 00045748 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9
|
||||
0001:001093B4 00003160 C=CODE S=.text G=(none) M=UnitSR ACBP=A9
|
||||
0001:0010C514 000028D4 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9
|
||||
0001:0010EDE8 00001833 C=CODE S=.text G=(none) M=verif_version ACBP=A9
|
||||
0001:0011061C 000011D0 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9
|
||||
0001:001117EC 00043384 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9
|
||||
0001:00154B70 00002BC8 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9
|
||||
0001:00157738 00000D2C C=CODE S=.text G=(none) M=UnitSimule ACBP=A9
|
||||
0001:00158464 00002678 C=CODE S=.text G=(none) M=Unitplace ACBP=A9
|
||||
0001:0015AADC 000475E0 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9
|
||||
0001:001A20BC 0000048D 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
|
||||
@@ -215,9 +215,9 @@ Detailed map of segments
|
||||
0002:00015760 00418704 C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9
|
||||
0002:0042DE64 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9
|
||||
0002:0042DE74 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9
|
||||
0002:0042DE88 000004FC C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
|
||||
0002:0042E384 00000018 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9
|
||||
0002:0042E39C 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9
|
||||
0002:0042DE88 00000018 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9
|
||||
0002:0042DEA0 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9
|
||||
0002:0042DEA4 000004FC C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9
|
||||
0002:0042E3A0 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9
|
||||
0002:0042E3CC 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9
|
||||
0002:0042E3D8 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9
|
||||
@@ -237,8 +237,8 @@ UnitConfigCellTCO.dfm
|
||||
UnitTCO.dfm
|
||||
UnitSR.dfm
|
||||
UnitCDF.dfm
|
||||
UnitConfig.dfm
|
||||
verif_version.dfm
|
||||
UnitConfig.dfm
|
||||
UnitDebug.dfm
|
||||
UnitSimule.dfm
|
||||
Unitplace.dfm
|
||||
@@ -247,4 +247,4 @@ Signaux_complexes_GL.res
|
||||
Signaux_complexes_GL.drf
|
||||
|
||||
|
||||
Program entry point at 0001:001A1F78
|
||||
Program entry point at 0001:001A23CC
|
||||
|
||||
+14
-8
@@ -1577,8 +1577,13 @@ begin
|
||||
y1:=segment[i].port[j].y;
|
||||
begin
|
||||
coords(x1,y1);
|
||||
if formAnalyseCDM.CheckConnexions.checked then
|
||||
begin
|
||||
if formAnalyseCDM.CheckConnexions.checked then
|
||||
begin
|
||||
with canvas do
|
||||
begin
|
||||
pen.Color:=clOrange;
|
||||
pen.width:=1;
|
||||
Ellipse(x1-5,y1-5,x1+5,y1+5);
|
||||
canvas.pen.Color:=clWhite;
|
||||
end;
|
||||
end;
|
||||
@@ -1767,7 +1772,7 @@ begin
|
||||
Affiche('Le port '+intToSTR(NumPort)+' est connecté au port '+intToSTR(connecteAuPort)+' segment '+intToSTR(ConnecteAuSeg),clyellow);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// renvoie si le segment est de type aiguillage
|
||||
function segment_aig(s : string) : boolean;
|
||||
@@ -1817,7 +1822,7 @@ begin
|
||||
trouve_IdSegment_Aig:=false;
|
||||
end
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// trouve les index Segment et port contenant le détecteur est detecteur
|
||||
function trouve_IndexSegPortDetecteur(detecteur : integer;var indexSeg,indexPeriph : integer) : boolean;
|
||||
@@ -2630,7 +2635,7 @@ begin
|
||||
end;
|
||||
|
||||
//else
|
||||
|
||||
|
||||
begin
|
||||
// y a t-il un détecteur?
|
||||
NombrePeriph:=segment[indexSegSuivant].nperiph;
|
||||
@@ -3316,10 +3321,11 @@ begin
|
||||
|
||||
MaxAiguillage:=0;
|
||||
|
||||
Affiche('Importation des aiguillages et des branches',clWhite);
|
||||
Affiche('Importation des aiguillages et des branches',clWhite);
|
||||
|
||||
// recopier les aiguillages CDM dans signaux_complexes
|
||||
for i:=1 to NAig_CDM do
|
||||
begin
|
||||
Aiguillage[i].adresse:=Aig_CDM[i].adresse;
|
||||
tablo_index_aiguillage[aiguillage[i].Adresse]:=i;
|
||||
Aiguillage[i].adrtriple:=Aig_CDM[i].adrtriple;
|
||||
@@ -3504,7 +3510,7 @@ end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormAnalyseCDM.FormCreate(Sender: TObject);
|
||||
procedure TFormAnalyseCDM.FormCreate(Sender: TObject);
|
||||
begin
|
||||
if debug=1 then Affiche('Création fenêtre réseau CDM',clLime);
|
||||
IndexClic:=0;
|
||||
@@ -3534,7 +3540,7 @@ begin
|
||||
|
||||
with FwicImage do
|
||||
begin
|
||||
largeurTrain:=Width; // largeur de l'icone du train
|
||||
largeurTrain:=Width; // largeur de l'icone du train
|
||||
hauteurTrain:=Height;
|
||||
end;
|
||||
ArcTanHautLargTrain:=ArcTan(HauteurTrain/LargeurTrain);
|
||||
|
||||
+25
-23
@@ -95,7 +95,7 @@ var
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure dessine_feu_CDF;
|
||||
procedure dessine_signal_CDF;
|
||||
procedure couleurs_cdf;
|
||||
|
||||
implementation
|
||||
@@ -191,7 +191,7 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure dessine_feu_CDF;
|
||||
procedure dessine_signal_CDF;
|
||||
var i,ancienEtat : integer;
|
||||
Vcanvas : Tcanvas;
|
||||
begin
|
||||
@@ -223,10 +223,10 @@ end;
|
||||
procedure Maj_DB;
|
||||
var s : string;
|
||||
begin
|
||||
s:=encode_sig_feux(index);
|
||||
s:=encode_signal(index);
|
||||
formconfig.ListBoxSig.items[index-1]:=s;
|
||||
formconfig.ListBoxSig.selected[ligneClicSig]:=true;
|
||||
aff_champs_sig_feux(index);
|
||||
aff_champs_signaux(index);
|
||||
end;
|
||||
|
||||
procedure TFormCDF.Edit1Change(Sender: TObject);
|
||||
@@ -237,7 +237,7 @@ begin
|
||||
val(Edit1.Text,Signaux[index].SR[1].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label1.Caption=etats[1] then Maj_Etat_Signal(0,carre);
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -249,7 +249,7 @@ begin
|
||||
val(Edit2.Text,Signaux[index].SR[2].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label2.Caption=etats[2] then Maj_Etat_Signal(0,semaphore);
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -261,7 +261,7 @@ begin
|
||||
val(Edit3.Text,Signaux[index].SR[3].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label3.Caption=etats[3] then Maj_Etat_Signal(0,semaphore_cli);
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -273,7 +273,7 @@ begin
|
||||
val(Edit4.Text,Signaux[index].SR[4].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label4.Caption=etats[4] then Maj_Etat_Signal(0,vert);
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -285,7 +285,7 @@ begin
|
||||
val(Edit5.Text,Signaux[index].SR[5].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label5.Caption=etats[5] then Maj_Etat_Signal(0,vert_cli);
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -297,7 +297,7 @@ begin
|
||||
val(Edit6.Text,Signaux[index].SR[6].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label6.Caption=etats[6] then Maj_Etat_Signal(0,violet);
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -309,7 +309,7 @@ begin
|
||||
val(Edit7.Text,Signaux[index].SR[7].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label7.Caption=etats[7] then Maj_Etat_Signal(0,blanc);
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -321,7 +321,7 @@ begin
|
||||
val(Edit8.Text,Signaux[index].SR[8].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label8.Caption=etats[8] then Maj_Etat_Signal(0,blanc_cli);
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -333,7 +333,7 @@ begin
|
||||
val(Edit9.Text,Signaux[index].SR[9].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label9.Caption=etats[9] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,jaune);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -349,7 +349,7 @@ begin
|
||||
Maj_Etat_Signal(0,semaphore);
|
||||
Maj_Etat_Signal(0,jaune_cli);
|
||||
end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -361,7 +361,7 @@ begin
|
||||
val(Edit11.Text,Signaux[index].SR[11].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label11.Caption=etats[11] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,ral_30);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -373,7 +373,7 @@ begin
|
||||
val(Edit12.Text,Signaux[index].SR[12].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label12.Caption=etats[12] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,ral_60);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -385,7 +385,7 @@ begin
|
||||
val(Edit13.Text,Signaux[index].SR[13].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label13.Caption=etats[13] then begin Maj_Etat_Signal(0,ral_60);Maj_Etat_Signal(0,jaune_cli);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -397,7 +397,7 @@ begin
|
||||
val(Edit14.Text,Signaux[index].SR[14].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label14.Caption=etats[14] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,rappel_30);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -409,7 +409,7 @@ begin
|
||||
val(Edit15.Text,Signaux[index].SR[15].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label15.Caption=etats[15] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,rappel_60);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -421,7 +421,7 @@ begin
|
||||
val(Edit16.Text,Signaux[index].SR[16].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label16.Caption=etats[16] then begin Maj_Etat_Signal(0,rappel_30); Maj_Etat_Signal(0,jaune);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -433,7 +433,7 @@ begin
|
||||
val(Edit17.Text,Signaux[index].SR[17].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label17.Caption=etats[17] then begin Maj_Etat_Signal(0,rappel_30); Maj_Etat_Signal(0,jaune_cli);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -445,7 +445,7 @@ begin
|
||||
val(Edit18.Text,Signaux[index].SR[18].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label18.Caption=etats[18] then begin Maj_Etat_Signal(0,rappel_60); Maj_Etat_Signal(0,jaune);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -457,7 +457,7 @@ begin
|
||||
val(Edit19.Text,Signaux[index].SR[19].sortie1,erreur);
|
||||
Maj_DB;
|
||||
if label19.Caption=etats[19] then begin Maj_Etat_Signal(0,rappel_60); Maj_Etat_Signal(0,jaune_cli);end;
|
||||
dessine_feu_CDF;
|
||||
dessine_signal_CDF;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -487,7 +487,9 @@ end;
|
||||
|
||||
procedure TFormCDF.FormCreate(Sender: TObject);
|
||||
begin
|
||||
if debug=1 then Affiche('Fin création fenetre CDF',clLime);
|
||||
couleurs_cdf;
|
||||
if debug=1 then Affiche('Fin création fenetre CDF',clLime);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
+6
-6
@@ -668,7 +668,7 @@ object FormConfig: TFormConfig
|
||||
Top = 8
|
||||
Width = 633
|
||||
Height = 505
|
||||
ActivePage = TabSheetPeriph
|
||||
ActivePage = TabSheetCDM
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -11
|
||||
@@ -2805,7 +2805,7 @@ object FormConfig: TFormConfig
|
||||
Top = 56
|
||||
Width = 193
|
||||
Height = 21
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
TabOrder = 0
|
||||
OnChange = ComboBoxDecodeurPersoChange
|
||||
end
|
||||
@@ -2824,7 +2824,7 @@ object FormConfig: TFormConfig
|
||||
Width = 145
|
||||
Height = 21
|
||||
Style = csDropDownList
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
TabOrder = 2
|
||||
OnChange = ComboBoxNationChange
|
||||
end
|
||||
@@ -2870,7 +2870,7 @@ object FormConfig: TFormConfig
|
||||
Width = 193
|
||||
Height = 21
|
||||
Style = csDropDownList
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
TabOrder = 6
|
||||
OnChange = ComboBoxDecCdeChange
|
||||
end
|
||||
@@ -3255,7 +3255,7 @@ object FormConfig: TFormConfig
|
||||
Height = 21
|
||||
Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
|
||||
Style = csDropDownList
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 6
|
||||
@@ -3436,7 +3436,7 @@ object FormConfig: TFormConfig
|
||||
Height = 21
|
||||
Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
|
||||
Style = csDropDownList
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 10
|
||||
|
||||
+174
-132
@@ -572,7 +572,6 @@ retro_ch='retro';
|
||||
Z21_ch='Z21';
|
||||
Init_aig_ch='Init_Aig';
|
||||
LAY_ch='Lay';
|
||||
Maxcom_ch='MaxCom';
|
||||
Init_dem_aig_ch='Init_Dem_Aig';
|
||||
Init_dem_interfaceUSBCOM_ch='Init_demUSBCOM';
|
||||
Init_dem_interfaceEth_ch='Init_demETH';
|
||||
@@ -590,7 +589,7 @@ fenetre_ch='Fenetre';
|
||||
AffMemoFenetre_ch='AffMemoFenetre';
|
||||
Tempo_aig_ch='Tempo_Aig';
|
||||
Nb_cantons_Sig_ch='Nb_cantons_Sig';
|
||||
Tempo_Feu_ch='Tempo_Feu';
|
||||
Tempo_Signal_ch='Tempo_Feu';
|
||||
Algo_Unisemaf_ch='Alg_Unisemaf';
|
||||
NOTIF_VERSION_ch='notif_version';
|
||||
verif_version_ch='verif_version';
|
||||
@@ -633,7 +632,7 @@ var
|
||||
portCDM,TempoOctet,TimoutMaxInterface,Valeur_entete,PortInterface,prot_serie,NumPort,debug,
|
||||
LigneCliqueePN,AncLigneCliqueePN,clicMemo,Nb_cantons_Sig,protocole,Port,PortServeur,
|
||||
ligneclicAig,AncLigneClicAig,ligneClicSig,AncligneClicSig,EnvAigDccpp,AdrBaseDetDccpp,
|
||||
ligneClicBr,AncligneClicBr,ligneClicAct,AncLigneClicAct,Indexfeuclic,NumTrameCDM,
|
||||
ligneClicBr,AncligneClicBr,ligneClicAct,AncLigneClicAct,IndexSignalclic,NumTrameCDM,
|
||||
Algo_localisation,Verif_AdrXpressNet,ligneclicTrain,AncligneclicTrain,AntiTimeoutEthLenz,
|
||||
ligneDCC,decCourant,AffMemoFenetre,ligneClicAccPeriph,AncligneClicAccPeriph,ligneCherche,compt_Ligne : integer;
|
||||
|
||||
@@ -678,10 +677,10 @@ function place_id(s : string) : string;
|
||||
procedure decodeAig(s : string;var adr : integer;var B : char);
|
||||
function sauve_config : boolean;
|
||||
procedure lit_config;
|
||||
Procedure aff_champs_sig_feux(index : integer);
|
||||
Procedure aff_champs_signaux(index : integer);
|
||||
function verif_coherence : boolean;
|
||||
function compile_branche(s : string;i : integer) : boolean;
|
||||
function encode_sig_feux(i : integer): string;
|
||||
function encode_signal(i : integer): string;
|
||||
procedure valide_branches;
|
||||
procedure trier_aig;
|
||||
procedure trier_detecteurs;
|
||||
@@ -727,16 +726,16 @@ begin
|
||||
place_id:=s;
|
||||
end;
|
||||
|
||||
procedure Maj_Hint_Signal(indexFeu : integer);
|
||||
procedure Maj_Hint_Signal(indexSignal : integer);
|
||||
var s : string;
|
||||
begin
|
||||
// ne pas supprimer le @= qui sert de marqueur pour identifier le feu
|
||||
s:='Index='+IntToSTR(IndexFeu)+' @='+inttostr(Signaux[IndexFeu].Adresse)+' Décodeur='+decodeur[Signaux[IndexFeu].Decodeur]+
|
||||
' Adresse détecteur associé='+intToSTR(Signaux[IndexFeu].Adr_det1)+
|
||||
' Adresse élement suivant='+intToSTR(Signaux[IndexFeu].Adr_el_suiv1);
|
||||
if Signaux[IndexFeu].Btype_suiv1=aig then s:=s+' (aig)';
|
||||
s:='Index='+IntToSTR(indexSignal)+' @='+inttostr(Signaux[indexSignal].Adresse)+' Décodeur='+decodeur[Signaux[indexSignal].Decodeur]+
|
||||
' Adresse détecteur associé='+intToSTR(Signaux[indexSignal].Adr_det1)+
|
||||
' Adresse élement suivant='+intToSTR(Signaux[indexSignal].Adr_el_suiv1);
|
||||
if Signaux[indexSignal].Btype_suiv1=aig then s:=s+' (aig)';
|
||||
|
||||
Signaux[indexFeu].Img.Hint:=s;
|
||||
Signaux[indexSignal].Img.Hint:=s;
|
||||
end;
|
||||
|
||||
// demande les services Com-IP à CDM
|
||||
@@ -1071,7 +1070,7 @@ begin
|
||||
end;
|
||||
|
||||
// transforme le signal du tableau Signaux[] en texte
|
||||
function encode_sig_feux(i : integer): string;
|
||||
function encode_signal(i : integer): string;
|
||||
var s : string;
|
||||
adresse,aspect,j,k,NfeuxDir,CondCarre,CondFeuBlanc,nc : integer;
|
||||
begin
|
||||
@@ -1079,7 +1078,7 @@ begin
|
||||
adresse:=Signaux[i].adresse;
|
||||
if affevt then Affiche('Encode_sig_feux('+IntToSTR(i)+') : adresse='+IntToSTR(adresse),clyellow);
|
||||
|
||||
if adresse=0 then begin encode_sig_feux:='';exit;end;
|
||||
if adresse=0 then begin encode_signal:='';exit;end;
|
||||
|
||||
s:=IntToSTR(adresse)+',';
|
||||
// forme - D=directionnel ajouter 10
|
||||
@@ -1183,7 +1182,7 @@ begin
|
||||
end;
|
||||
end
|
||||
else
|
||||
// feux directionnels
|
||||
// signaux directionnels
|
||||
begin
|
||||
NfeuxDir:=aspect-10;
|
||||
for j:=1 to NfeuxDir+1 do
|
||||
@@ -1198,10 +1197,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
encode_sig_feux:=s;
|
||||
encode_signal:=s;
|
||||
end;
|
||||
|
||||
// décode la ligne de signal et la stocke dans l'index i du tableau feux
|
||||
// décode la ligne de signal et la stocke dans l'index i du tableau signaux
|
||||
// sortie vrai si le signal a été stocké - faux si doublon
|
||||
function decode_ligne_signal(chaine_signal : string;i : integer) : boolean;
|
||||
var s,chaine,sa : string;
|
||||
@@ -1246,7 +1245,7 @@ begin
|
||||
begin
|
||||
sa:=copy(s,1,j-1);
|
||||
if sa[1]='D' then
|
||||
// feu directionnel ------------------------------------------
|
||||
// signal directionnel ------------------------------------------
|
||||
begin
|
||||
delete(sa,1,1);
|
||||
j:=pos(',',s);
|
||||
@@ -1263,11 +1262,11 @@ begin
|
||||
if (adr>NbDecodeur-1) then Affiche('Erreur 673 ligne '+chaine_signal+' : erreur décodeur inconnu',clred);
|
||||
j:=pos(',',s);Delete(s,1,j);
|
||||
// liste des aiguillages
|
||||
k:=1; // numéro de feu directionnel
|
||||
k:=1; // numéro de feux directionnels
|
||||
repeat
|
||||
// boucle de direction
|
||||
delete(s,1,1); // supprimer ( ou le ,
|
||||
j:=1; // Nombre de descriptions d'aiguillages dans le feu
|
||||
j:=1; // Nombre de descriptions d'aiguillages dans le signal
|
||||
repeat
|
||||
if s[1]<>'A' then begin Affiche('Erreur 674 ligne '+chaine_signal,clred);exit;end;
|
||||
delete(s,1,1);
|
||||
@@ -1472,7 +1471,7 @@ begin
|
||||
t:=pos('(',s);
|
||||
if t=1 then
|
||||
begin
|
||||
//Affiche('Conditions supplémentaires pour le feu '+IntToSTR(adresse)+' parenthèse '+intToSTR(l),clyellow);
|
||||
//Affiche('Conditions supplémentaires pour le signal '+IntToSTR(adresse)+' parenthèse '+intToSTR(l),clyellow);
|
||||
k:=pos(')',s);
|
||||
sa:=copy(s,t+1,k-t); // contient l'intérieur des parenthèses sans les parenthèses
|
||||
delete(s,1,k+1);//Affiche(s,clYellow);
|
||||
@@ -1504,7 +1503,7 @@ begin
|
||||
t:=pos('CFB(',s);
|
||||
if t=1 then
|
||||
begin
|
||||
//Affiche('Conditions supplémentaires pour le feu '+IntToSTR(adresse)+' parenthèse '+intToSTR(l),clyellow);
|
||||
//Affiche('Conditions supplémentaires pour le signal '+IntToSTR(adresse)+' parenthèse '+intToSTR(l),clyellow);
|
||||
k:=pos(')',s);
|
||||
sa:=copy(s,t+4,k-4); // contient l'intérieur des parenthèses sans les parenthèses
|
||||
delete(s,1,k+1);//Affiche(s,clYellow);
|
||||
@@ -1736,9 +1735,6 @@ begin
|
||||
// adresse ip interface XpressNet
|
||||
writeln(fichierN,IPV4_Interface_ch+'=',adresseIP+':'+intToSTR(portInterface));
|
||||
|
||||
// max com
|
||||
writeln(fichierN,Maxcom_ch+'=',MaxPortCom);
|
||||
|
||||
// port com
|
||||
writeln(fichierN,Protocole_serie_ch+'=',portcom);
|
||||
|
||||
@@ -1827,8 +1823,8 @@ begin
|
||||
if Raz_Acc_signaux then s:='1' else s:='0';
|
||||
writeln(fichierN,Raz_signaux_ch+'='+s);
|
||||
|
||||
// temporisation entre 2 commandes décodeurs feu
|
||||
writeln(fichierN,Tempo_feu_ch+'=',IntToSTR(Tempo_feu));
|
||||
// temporisation entre 2 commandes décodeurs signaux
|
||||
writeln(fichierN,Tempo_signal_ch+'=',IntToSTR(Tempo_Signal));
|
||||
|
||||
// Nombre de cantons avant signal
|
||||
writeln(fichierN,Nb_cantons_Sig_ch+'=',intToSTR(Nb_cantons_Sig));
|
||||
@@ -1913,11 +1909,11 @@ begin
|
||||
|
||||
writeln(fichierN,'/------------');
|
||||
writeln(fichierN,section_sig_ch);
|
||||
// feux
|
||||
// signaux
|
||||
for i:=1 to NbreSignaux do
|
||||
begin
|
||||
s:=encode_sig_feux(i);
|
||||
// transformer le tableau feux en ligne
|
||||
s:=encode_signal(i);
|
||||
// transformer le tableau signal en ligne
|
||||
//Affiche(s,clLime);
|
||||
if s='' then Affiche('Erreur 700 - Encodage du signal index='+IntToSTR(i),clRed);
|
||||
Signaux[i].modifie:=false; // sauvegarde en cours, on démarque
|
||||
@@ -2014,6 +2010,7 @@ end;
|
||||
procedure trier_aig;
|
||||
var i,j : integer;
|
||||
temp : TAiguillage;
|
||||
s : string;
|
||||
begin
|
||||
for i:=1 to MaxAiguillage-1 do
|
||||
begin
|
||||
@@ -2030,11 +2027,25 @@ begin
|
||||
|
||||
for i:=1 to MaxAiguillage do
|
||||
tablo_index_aiguillage[aiguillage[i].adresse]:=i;
|
||||
|
||||
// réaffecte la listebox aiguillages
|
||||
if formconfig<>nil then
|
||||
begin
|
||||
formconfig.ListBoxAig.Clear;
|
||||
for i:=1 to MaxAiguillage do
|
||||
begin
|
||||
s:=encode_aig(i);
|
||||
formConfig.ListBoxAig.Items.AddObject(s, Pointer(clRed));
|
||||
Aiguillage[i].modifie:=false;
|
||||
end;
|
||||
formconfig.ListBoxAig.itemindex:=0;
|
||||
end;
|
||||
end;
|
||||
|
||||
// trie les signaux
|
||||
procedure trier_sig;
|
||||
var i,j : integer;
|
||||
var i,j,l,longestLength,pixelLength : integer;
|
||||
s,LongestString : string;
|
||||
temp : TSignal;
|
||||
begin
|
||||
for i:=1 to NbreSignaux-1 do
|
||||
@@ -2049,10 +2060,40 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// calcule les index
|
||||
for i:=1 to NbreSignaux do
|
||||
begin
|
||||
tablo_index_signal[Signaux[i].adresse]:=i;
|
||||
end;
|
||||
|
||||
if formconfig<>nil then
|
||||
begin
|
||||
formconfig.ListBoxSig.Clear;
|
||||
longestLength:=0;
|
||||
for i:=1 to NbreSignaux do
|
||||
begin
|
||||
s:=encode_signal(i); // encode la ligne depuis le tableau feux
|
||||
//Affiche(s,clwhite);
|
||||
if s<>'' then
|
||||
begin
|
||||
formconfig.ListBoxSig.Items.Add(s);
|
||||
// trouver la chaine la plus longue pour la future scrollbar
|
||||
l:=Length(s);
|
||||
if l>LongestLength then
|
||||
begin
|
||||
LongestString:=s;
|
||||
LongestLength:=l;
|
||||
end;
|
||||
Signaux[i].modifie:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
PixelLength:=formconfig.ListboxSig.Canvas.TextWidth(LongestString);
|
||||
// positionne une scrollbar dans la listbox - pour l'enlever, envoyer 0 dans pixelLength
|
||||
SendMessage(formconfig.ListBoxSig.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
@@ -2063,7 +2104,7 @@ var s,sa,SOrigine: string;
|
||||
trouve_sec_init,trouve_init_aig,trouve_lay,trouve_IPV4_INTERFACE,trouve_PROTOCOLE_SERIE,trouve_INTER_CAR,
|
||||
trouve_Tempo_maxi,trouve_Entete,trouve_tco,trouve_cdm,trouve_Serveur_interface,trouve_fenetre,trouve_MasqueTCO,
|
||||
trouve_NOTIF_VERSION,trouve_verif_version,trouve_fonte,trouve_tempo_aig,trouve_raz,trouve_section_aig,
|
||||
trouve_section_branche,trouve_section_sig,trouve_section_act,trouve_tempo_feu,
|
||||
trouve_section_branche,trouve_section_sig,trouve_section_act,trouve_tempo_signal,
|
||||
trouve_algo_uni,croi,trouve_Nb_cantons_Sig,trouve_dem_aig,trouve_demcnxCOMUSB,trouve_demcnxEth : boolean;
|
||||
virgule,i_detect,i,erreur,aig2,detect,offset,j,position,
|
||||
ComptEl,Compt_IT,Num_Element,adr,Nligne,postriple,itl,
|
||||
@@ -2106,7 +2147,7 @@ var s,sa,SOrigine: string;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if decode_ligne_signal(s,i) then // décode la chaine et stocke en tableau feux
|
||||
if decode_ligne_signal(s,i) then // décode la chaine et stocke en tableau signal
|
||||
begin
|
||||
inc(i);
|
||||
end
|
||||
@@ -2460,6 +2501,7 @@ var s,sa,SOrigine: string;
|
||||
if erreur<>0 then Affiche('Erreur aiguillage '+intToSTR(adraig)+' ; caractère '+enregistrement[erreur]+' inconnu',clred);
|
||||
if debugConfig then Affiche('Adresse='+IntToSTR(adraig)+' enregistrement='+Enregistrement,clyellow);
|
||||
aiguillage[maxaiguillage].Adresse:=adraig;
|
||||
tablo_index_aiguillage[adrAig]:=maxaiguillage; // stockage index avant tri
|
||||
aiguillage[maxaiguillage].AdroitB:='Z'; aiguillage[maxaiguillage].AdevieB:='Z';
|
||||
aiguillage[maxaiguillage].DdroitB:='Z'; aiguillage[maxaiguillage].DdevieB:='Z';
|
||||
|
||||
@@ -3196,20 +3238,6 @@ var s,sa,SOrigine: string;
|
||||
else begin adresseIP:='0';parSocketLenz:=false;end;
|
||||
end;
|
||||
|
||||
// nombre max de port série à explorer
|
||||
// configuration du port com
|
||||
sa:=uppercase(MaxCom_ch)+'=';
|
||||
i:=pos(sa,s);
|
||||
if i=1 then
|
||||
begin
|
||||
inc(nv);
|
||||
delete(s,i,length(sa));
|
||||
trouve_MaxPort:=true;
|
||||
val(s,MaxPortCom,erreur);
|
||||
if erreur<>0 then Affiche('Erreur MaxCom: '+sOrigine,clred);
|
||||
if (MaxPortCom<1) or (MaxPortCom>255) then MaxPortCom:=30;
|
||||
end;
|
||||
|
||||
// configuration du port com interface
|
||||
sa:=uppercase(PROTOCOLE_SERIE_ch)+'=';
|
||||
i:=pos(sa,s);
|
||||
@@ -3350,16 +3378,16 @@ var s,sa,SOrigine: string;
|
||||
val(s,Tempo_Aig,erreur);
|
||||
end;
|
||||
|
||||
// temporisation décodeurs de feux
|
||||
sa:=uppercase(Tempo_Feu_ch)+'=';
|
||||
// temporisation décodeurs de signal
|
||||
sa:=uppercase(Tempo_Signal_ch)+'=';
|
||||
i:=pos(sa,s);
|
||||
if i=1 then
|
||||
begin
|
||||
inc(nv);
|
||||
trouve_Tempo_feu:=true;
|
||||
trouve_Tempo_signal:=true;
|
||||
delete(s,i,length(sa));
|
||||
val(s,Tempo_Feu,erreur);
|
||||
if tempo_Feu=0 then Tempo_feu:=100;
|
||||
val(s,Tempo_Signal,erreur);
|
||||
if Tempo_Signal=0 then Tempo_Signal:=100;
|
||||
end;
|
||||
|
||||
// algo unisemaf
|
||||
@@ -3660,7 +3688,7 @@ begin
|
||||
trouve_init_aig:=false;
|
||||
trouve_dem_aig:=false;
|
||||
trouve_tempo_aig:=false;
|
||||
trouve_tempo_feu:=false;
|
||||
trouve_tempo_signal:=false;
|
||||
trouve_INTER_CAR:=false;
|
||||
trouve_entete:=false;
|
||||
trouve_IPV4_INTERFACE:=false;
|
||||
@@ -3689,10 +3717,10 @@ begin
|
||||
|
||||
//trouve_FVR:=false;
|
||||
|
||||
if not(trouve_tempo_feu) then
|
||||
if not(trouve_tempo_signal) then
|
||||
begin
|
||||
s:=tempo_feu_ch;
|
||||
tempo_feu:=100;
|
||||
s:=tempo_signal_ch;
|
||||
Tempo_Signal:=100;
|
||||
s:='';
|
||||
end;
|
||||
if not(trouve_NOTIF_VERSION) then s:=NOTIF_VERSION_ch;
|
||||
@@ -3746,7 +3774,7 @@ begin
|
||||
AvecDemandeInterfaceEth:=true;
|
||||
lay:='';
|
||||
Tempo_Aig:=100;
|
||||
Tempo_feu:=100;
|
||||
Tempo_Signal:=100;
|
||||
ServeurInterfaceCDM:=1;
|
||||
Nb_cantons_Sig:=3;
|
||||
ServeurRetroCDM:=1;
|
||||
@@ -3784,10 +3812,10 @@ begin
|
||||
if not(trouve_demcnxEth) then s:=Init_dem_interfaceEth_ch;
|
||||
if not(trouveAvecVerifIconesTCO) then confasauver:=true;
|
||||
|
||||
if not(trouve_tempo_feu) then
|
||||
if not(trouve_tempo_signal) then
|
||||
begin
|
||||
s:=tempo_feu_ch;
|
||||
tempo_feu:=100;
|
||||
s:=tempo_signal_ch;
|
||||
Tempo_Signal:=100;
|
||||
s:='';
|
||||
end;
|
||||
if not(trouve_NOTIF_VERSION) then s:=NOTIF_VERSION_ch;
|
||||
@@ -4043,7 +4071,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
|
||||
Feu_Sauve:=Signaux[index]; // sauvegarde
|
||||
Signal_Sauve:=Signaux[index]; // sauvegarde
|
||||
|
||||
AncLigneClicSig:=ligneclicSig;
|
||||
ligneClicSig:=index-1;
|
||||
@@ -4059,12 +4087,14 @@ begin
|
||||
|
||||
if sombre then Formconfig.editAdrSig.Color:=couleurfond else FormConfig.EditAdrSig.Color:=clWindow;
|
||||
|
||||
aff_champs_sig_feux(index); // affiche les champs du feu
|
||||
aff_champs_signaux(index); // affiche les champs du feu
|
||||
clicliste:=false;
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormConfig.FormActivate(Sender: TObject);
|
||||
var i : integer;
|
||||
s : string;
|
||||
begin
|
||||
if affevt then affiche('FormConfig activate',clLime);
|
||||
activ:=true;
|
||||
@@ -4093,7 +4123,7 @@ begin
|
||||
|
||||
CheckBoxAffMemo.Checked:=AffMemoFenetre=1;
|
||||
EditNbCantons.text:=intToSTR(Nb_cantons_Sig);
|
||||
EditTempoFeu.Text:=IntToSTR(Tempo_feu);
|
||||
EditTempoFeu.Text:=IntToSTR(Tempo_Signal);
|
||||
EditNbDetDist.text:=IntToSTR(Nb_Det_dist);
|
||||
EditAdrIPCDM.text:=adresseIPCDM;
|
||||
EditPortCDM.Text:=IntToSTR(portCDM);
|
||||
@@ -4174,9 +4204,20 @@ begin
|
||||
clicListe:=false;
|
||||
activ:=false;
|
||||
|
||||
if clicproprietes then clicListeSignal(Indexfeuclic);
|
||||
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;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
procedure champs_dec_centrale;
|
||||
@@ -4649,8 +4690,8 @@ begin
|
||||
if affevt then affiche('FormConfig create',clLime);
|
||||
PageControl.ActivePage:=Formconfig.TabSheetCDM; // force le premier onglet sur la page
|
||||
Aig_supprime.Adresse:=0;
|
||||
Feu_Supprime.Adresse:=0;
|
||||
Feu_sauve.adresse:=0;
|
||||
Signal_Supprime.Adresse:=0;
|
||||
Signal_sauve.adresse:=0;
|
||||
clicListe:=false;
|
||||
ligneCherche:=0;
|
||||
Compt_ligne:=0;
|
||||
@@ -5277,18 +5318,6 @@ begin
|
||||
else formconfig.ComboBoxDecodeurPerso.ItemIndex:=-1;
|
||||
maj_decodeurs;
|
||||
|
||||
|
||||
// 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;
|
||||
|
||||
|
||||
// branches
|
||||
clicListe:=true;
|
||||
RichBranche.clear;
|
||||
@@ -5307,7 +5336,6 @@ begin
|
||||
// signaux
|
||||
ListBoxSig.Items.clear;
|
||||
ComboBoxDec.items.Clear;
|
||||
|
||||
for i:=0 to 11 do
|
||||
begin
|
||||
ComboBoxAsp.items.add(Aspects[i]);
|
||||
@@ -5317,6 +5345,7 @@ begin
|
||||
begin
|
||||
ComboBoxDec.items.add(decodeur[i-1]);
|
||||
end;
|
||||
|
||||
// décodeurs personalisés
|
||||
for i:=1 to NbreDecPers do
|
||||
begin
|
||||
@@ -5327,7 +5356,7 @@ begin
|
||||
longestLength:=0;
|
||||
for i:=1 to NbreSignaux do
|
||||
begin
|
||||
s:=encode_sig_feux(i); // encode la ligne depuis le tableau feux
|
||||
s:=encode_signal(i); // encode la ligne depuis le tableau feux
|
||||
//Affiche(s,clwhite);
|
||||
if s<>'' then
|
||||
begin
|
||||
@@ -5342,6 +5371,7 @@ begin
|
||||
Signaux[i].modifie:=false;
|
||||
end;
|
||||
end;
|
||||
|
||||
PixelLength:=ListboxSig.Canvas.TextWidth(LongestString);
|
||||
// positionne une scrollbar dans la listbox - pour l'enlever, envoyer 0 dans pixelLength
|
||||
SendMessage(ListBoxSig.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0);
|
||||
@@ -5395,7 +5425,7 @@ begin
|
||||
GroupBoxAct.Visible:=false;
|
||||
GroupBoxPN.Visible:=false;
|
||||
|
||||
if clicproprietes then clicListeSignal(Indexfeuclic);
|
||||
if clicproprietes then clicListeSignal(IndexSignalClic);
|
||||
clicproprietes:=false;
|
||||
|
||||
i:=1;
|
||||
@@ -6209,7 +6239,7 @@ begin
|
||||
end;
|
||||
|
||||
// mise à jour des champs du signal d'après le tableau feux
|
||||
Procedure aff_champs_sig_feux(index : integer);
|
||||
Procedure aff_champs_signaux(index : integer);
|
||||
var i,j,l,d,p,k,nc,decodeur : integer;
|
||||
s : string;
|
||||
begin
|
||||
@@ -6224,7 +6254,7 @@ begin
|
||||
Picture.Bitmap.TransparentMode:=tmAuto;
|
||||
Picture.Bitmap.TransparentColor:=clblue;
|
||||
Transparent:=true;
|
||||
picture.Bitmap:=Select_dessin_feu(Signaux[i].aspect);
|
||||
picture.Bitmap:=Select_dessin_Signal(Signaux[i].aspect);
|
||||
end;
|
||||
|
||||
if Signaux[i].contrevoie then inverse_image(formCOnfig.ImageSignal,Formprinc.ImageSignal20);
|
||||
@@ -7493,10 +7523,10 @@ begin
|
||||
end
|
||||
else labelInfo.Caption:='';
|
||||
end;
|
||||
s:=encode_sig_feux(i);
|
||||
s:=encode_signal(i);
|
||||
formconfig.ListBoxSig.Items[ligneclicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
aff_champs_sig_feux(i);
|
||||
aff_champs_signaux(i);
|
||||
if not(verif_dec_sig(false)) then FormConfig.labelInfo.Caption:='Combinaison décodeur / aspect incompatible';
|
||||
|
||||
if affevt then Affiche('Evt ComboBox Decodeur',clOrange);
|
||||
@@ -7519,7 +7549,7 @@ begin
|
||||
LabelInfo.caption:=' ';
|
||||
Signaux[ligneClicSig+1].Adr_det1:=i;
|
||||
maj_hint_Signal(ligneClicSig+1);
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
@@ -7534,7 +7564,7 @@ begin
|
||||
Val(s,i,erreur);
|
||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur temporisation décodeurs ';exit;end;
|
||||
LabelInfo.caption:=' ';
|
||||
tempo_feu:=i;
|
||||
Tempo_Signal:=i;
|
||||
end;
|
||||
|
||||
|
||||
@@ -7573,7 +7603,7 @@ begin
|
||||
LabelInfo.caption:=' ';
|
||||
Signaux[ligneClicSig+1].Adr_el_suiv1:=i;
|
||||
Signaux[ligneClicSig+1].Btype_suiv1:=bt;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
end;
|
||||
@@ -7601,7 +7631,7 @@ begin
|
||||
LabelInfo.caption:=' ';
|
||||
Signaux[ligneClicSig+1].Adr_det2:=i;
|
||||
maj_hint_Signal(ligneClicSig+1);
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
@@ -7623,7 +7653,7 @@ begin
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
begin
|
||||
Signaux[ligneClicSig+1].VerrouCarre:=checkVerrouCarre.Checked;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
@@ -7639,7 +7669,7 @@ begin
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
begin
|
||||
Signaux[ligneClicSig+1].FeuBlanc:=checkBoxFB.Checked;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
@@ -7680,7 +7710,7 @@ begin
|
||||
LabelInfo.caption:=' ';
|
||||
Signaux[ligneClicSig+1].Adr_el_suiv2:=i;
|
||||
Signaux[ligneClicSig+1].Btype_suiv2:=bt;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
end;
|
||||
@@ -7708,7 +7738,7 @@ begin
|
||||
LabelInfo.caption:=' ';
|
||||
Signaux[ligneClicSig+1].Adr_det3:=i;
|
||||
maj_hint_Signal(ligneClicSig+1);
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
@@ -7756,7 +7786,7 @@ begin
|
||||
LabelInfo.caption:=' ';
|
||||
Signaux[ligneClicSig+1].Adr_el_suiv3:=i;
|
||||
Signaux[ligneClicSig+1].Btype_suiv3:=bt;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
end;
|
||||
@@ -7784,7 +7814,7 @@ begin
|
||||
LabelInfo.caption:=' ';
|
||||
Signaux[ligneClicSig+1].Adr_det4:=i;
|
||||
maj_hint_Signal(ligneClicSig+1);
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
@@ -7832,7 +7862,7 @@ begin
|
||||
LabelInfo.caption:=' ';
|
||||
Signaux[ligneClicSig+1].Adr_el_suiv4:=i;
|
||||
Signaux[ligneClicSig+1].Btype_suiv4:=bt;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
end;
|
||||
@@ -8296,16 +8326,16 @@ begin
|
||||
|
||||
Signaux[index].aspect:=aspect;
|
||||
|
||||
s:=encode_sig_feux(index);
|
||||
s:=encode_signal(index);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
aff_champs_sig_feux(index); // redessine les champs et le feu
|
||||
aff_champs_signaux(index); // redessine les champs et le feu
|
||||
|
||||
if not(verif_dec_sig(false)) then labelInfo.Caption:='Combinaison décodeur / aspect incompatible';
|
||||
|
||||
ListBoxSig.Selected[ligneClicSig]:=true;
|
||||
|
||||
// change l'image du feu dans la feuille graphique principale
|
||||
bm:=Select_dessin_feu(Signaux[index].aspect);
|
||||
bm:=Select_dessin_Signal(Signaux[index].aspect);
|
||||
if bm=nil then exit;
|
||||
Signaux[index].Img.picture.Bitmap:=bm;
|
||||
dessine_signal_mx(Signaux[index].Img.Canvas,0,0,1,1,Signaux[index].adresse,1); // dessine les feux du signal
|
||||
@@ -8354,7 +8384,7 @@ begin
|
||||
Signaux[ligneClicSig+1].Unisemaf:=i;
|
||||
end;
|
||||
if decodeur=10 then Signaux[ligneClicSig+1].Na:=i;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
end;
|
||||
@@ -8363,17 +8393,17 @@ end;
|
||||
procedure TFormConfig.ButtonrestaureClick(Sender: TObject);
|
||||
var index : integer;
|
||||
begin
|
||||
if (Feu_sauve.adresse<>0) and (ligneClicSig>=0) then
|
||||
if (Signal_sauve.adresse<>0) and (ligneClicSig>=0) then
|
||||
begin
|
||||
clicListe:=true;
|
||||
index:=ligneClicSig+1;
|
||||
Signaux[index]:=Feu_sauve;
|
||||
ListBoxSig.Items[ligneClicSig]:=encode_sig_feux(index);
|
||||
Signaux[index]:=Signal_sauve;
|
||||
ListBoxSig.Items[ligneClicSig]:=encode_signal(index);
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
aff_champs_sig_feux(index); // réaffiche les champs
|
||||
aff_champs_signaux(index); // réaffiche les champs
|
||||
Maj_Hint_Signal(index);
|
||||
// change l'image du feu dans la feuille graphique principale
|
||||
Signaux[index].Img.picture.Bitmap:=Select_dessin_feu(Signaux[index].aspect);
|
||||
Signaux[index].Img.picture.Bitmap:=Select_dessin_Signal(Signaux[index].aspect);
|
||||
dessine_signal_mx(Signaux[index].Img.Canvas,0,0,1,1,Signaux[index].adresse,1); // dessine les feux du signal
|
||||
clicListe:=false;
|
||||
end;
|
||||
@@ -8925,8 +8955,7 @@ begin
|
||||
Signaux[i].verrouCarre:=false;
|
||||
|
||||
cree_image(i);
|
||||
//Affiche('Feu 999 créé',clyellow);
|
||||
s:=encode_sig_feux(i);
|
||||
s:=encode_signal(i);
|
||||
|
||||
// scroller à la fin et sélectionner
|
||||
with formConfig.ListBoxSig do
|
||||
@@ -8940,9 +8969,9 @@ begin
|
||||
formCOnfig.LabelInfo.caption:='';
|
||||
ligneClicSig:=i-1;
|
||||
AncligneClicSig:=ligneClicSig;
|
||||
Aff_champs_Sig_feux(i);
|
||||
aff_champs_signaux(i);
|
||||
clicliste:=false;
|
||||
Feu_sauve.Adresse:=0;
|
||||
Signal_sauve.Adresse:=0;
|
||||
config_modifie:=true;
|
||||
|
||||
// encoder l'index
|
||||
@@ -8985,8 +9014,9 @@ begin
|
||||
repeat
|
||||
if formconfig.ListBoxSig.selected[i-1] then
|
||||
begin
|
||||
Feu_supprime:=Signaux[i]; // sauvegarde le signal supprimé
|
||||
feu_sauve.adresse:=0; // dévalider sa définition
|
||||
Signal_supprime:=Signaux[i]; // sauvegarde le signal supprimé
|
||||
Signal_sauve.adresse:=0; // dévalider sa définition
|
||||
|
||||
FormConfig.ButtonInsFeu.Caption:='Ajouter le signal '+intToSTR(Signaux[i].adresse)+' supprimé';
|
||||
|
||||
// supprimer le signal i
|
||||
@@ -8997,7 +9027,11 @@ begin
|
||||
|
||||
Signaux[i].Img.free; // supprime l'image, ce qui efface le feu du tableau graphique
|
||||
Signaux[i].Lbl.free; // supprime le label
|
||||
if Signaux[i].checkFB<>nil then begin Signaux[i].checkFB.Free;Signaux[i].CheckFB:=nil;end; // supprime le check du feu blanc s'il existait
|
||||
Tablo_Index_Signal[Signaux[i].adresse]:=0;
|
||||
if Signaux[i].checkFB<>nil then
|
||||
begin
|
||||
Signaux[i].checkFB.Free;Signaux[i].CheckFB:=nil;
|
||||
end; // supprime le check du feu blanc s'il existait
|
||||
|
||||
for j:=i to NbreSignaux-1 do
|
||||
begin
|
||||
@@ -9041,7 +9075,7 @@ begin
|
||||
// réafficher la liste
|
||||
for i:=1 to NbreSignaux do
|
||||
begin
|
||||
s:=encode_sig_feux(i);
|
||||
s:=encode_signal(i);
|
||||
if s<>'' then
|
||||
begin
|
||||
FormConfig.ListBoxSig.items.Add(s);
|
||||
@@ -9049,7 +9083,13 @@ begin
|
||||
end;
|
||||
ligneClicSig:=-1;
|
||||
AncligneClicSig:=-1;
|
||||
trier_sig; // recalcule les index
|
||||
|
||||
// calcule les index - ne pas trier les signaux, il faudrait trier la fenetre graphique
|
||||
for i:=1 to NbreSignaux do
|
||||
begin
|
||||
tablo_index_signal[Signaux[i].adresse]:=i;
|
||||
end;
|
||||
|
||||
clicliste:=false;
|
||||
|
||||
end;
|
||||
@@ -9064,17 +9104,18 @@ end;
|
||||
procedure TFormConfig.ButtonInsFeuClick(Sender: TObject);
|
||||
var s : string;
|
||||
begin
|
||||
if feu_supprime.adresse<>0 then
|
||||
if Signal_supprime.adresse<>0 then
|
||||
begin
|
||||
clicliste:=true;
|
||||
inc(NbreSignaux);
|
||||
Signaux[NbreSignaux]:=Feu_supprime;
|
||||
Feu_Supprime.adresse:=0; // dévalider le feu sauvegardé
|
||||
Feu_supprime.aspect:=0;
|
||||
Signaux[NbreSignaux]:=Signal_supprime;
|
||||
Tablo_Index_Signal[Signaux[NbreSignaux].adresse]:=NbreSignaux; // index
|
||||
Signal_supprime.adresse:=0; // dévalider le feu sauvegardé
|
||||
Signal_supprime.aspect:=0;
|
||||
cree_image(NbreSignaux);
|
||||
config_modifie:=true;
|
||||
// réafficher le rechedit
|
||||
s:=encode_Sig_Feux(NbreSignaux);
|
||||
s:=encode_signal(NbreSignaux);
|
||||
if s<>'' then
|
||||
begin
|
||||
with ListBoxSig.Items do
|
||||
@@ -9085,7 +9126,7 @@ begin
|
||||
AncligneClicSig:=-1;
|
||||
SetFocus;
|
||||
end;
|
||||
Aff_champs_sig_feux(NbreSignaux);
|
||||
aff_champs_signaux(NbreSignaux);
|
||||
end;
|
||||
clicListe:=false;
|
||||
end;
|
||||
@@ -10737,6 +10778,7 @@ begin
|
||||
begin
|
||||
inc(MaxAiguillage);
|
||||
aiguillage[MaxAiguillage]:=Aig_supprime;
|
||||
Tablo_Index_aiguillage[aiguillage[maxAiguillage].adresse]:=maxAiguillage; // index
|
||||
Aig_Supprime.adresse:=0; // dévalider l'aiguillage sauvegardé
|
||||
Aig_Supprime.modele:=rien;
|
||||
clicListe:=true;
|
||||
@@ -11114,7 +11156,7 @@ begin
|
||||
else
|
||||
setlength(Signaux[ligneClicSig+1].AigDirection[ligne],0);
|
||||
end;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
end
|
||||
@@ -11152,7 +11194,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
LabelInfo.Caption:='';
|
||||
clicListe:=false;
|
||||
@@ -11716,7 +11758,7 @@ begin
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
begin
|
||||
Signaux[ligneClicSig+1].checkFV:=checkFVC.Checked;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
@@ -11732,7 +11774,7 @@ begin
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
begin
|
||||
Signaux[ligneClicSig+1].checkFR:=checkFRC.Checked;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
@@ -12285,7 +12327,7 @@ procedure TFormConfig.CheckBoxVersContrevoieClick(Sender: TObject);
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
begin
|
||||
Signaux[ligneClicSig+1].verscontrevoie:=checkBoxVersContreVoie.Checked;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
@@ -12302,12 +12344,12 @@ begin
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
begin
|
||||
Signaux[ligneClicSig+1].contrevoie:=checkBoxContreVoie.Checked;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Signaux[ligneClicSig+1].modifie:=true;
|
||||
|
||||
aff_champs_sig_feux(ligneClicSig+1); // redessine les champs et le feu - contient l'inversion de l'image
|
||||
aff_champs_signaux(ligneClicSig+1); // redessine les champs et le feu - contient l'inversion de l'image
|
||||
|
||||
// maj le signal dans la fenetre principale
|
||||
Signaux[ligneClicSig+1].Img.picture.Bitmap:=ImageSIgnal.Picture.Bitmap; // et recopie le feu
|
||||
@@ -12709,7 +12751,7 @@ begin
|
||||
begin
|
||||
Affiche('Le décodeur du signal '+intToSTR(Signaux[i].adresse)+' a été réaffacté à rien',clOrange);
|
||||
Signaux[i].decodeur:=0;
|
||||
if i=ligneClicSig+1 then aff_champs_sig_feux(ligneClicSig+1);
|
||||
if i=ligneClicSig+1 then aff_champs_signaux(ligneClicSig+1);
|
||||
aff:=true;
|
||||
end;
|
||||
if deco>supp then
|
||||
@@ -12725,7 +12767,7 @@ begin
|
||||
ListBoxSig.Items.Clear;
|
||||
for i:=1 to NbreSignaux do
|
||||
begin
|
||||
s:=encode_sig_feux(i); // encode la ligne depuis le tableau feux
|
||||
s:=encode_signal(i); // encode la ligne depuis le tableau feux
|
||||
if s<>'' then
|
||||
begin
|
||||
ListBoxSig.Items.Add(s);
|
||||
@@ -12796,7 +12838,7 @@ begin
|
||||
setlength(Signaux[ligneClicSig+1].condFeuBlanc[ligne],0);
|
||||
end;
|
||||
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
LabelInfo.Caption:='';
|
||||
@@ -12850,7 +12892,7 @@ begin
|
||||
if AncligneClicSig<>ligneClicSig then
|
||||
begin
|
||||
AncligneClicSig:=ligneClicSig;
|
||||
aff_champs_sig_feux(ligneClicSig+1);
|
||||
aff_champs_signaux(ligneClicSig+1);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -12869,7 +12911,7 @@ begin
|
||||
if AncligneClicSig<>ligneClicSig then
|
||||
begin
|
||||
AncligneClicSig:=ligneClicSig;
|
||||
aff_champs_sig_feux(ligneClicSig+1);
|
||||
aff_champs_signaux(ligneClicSig+1);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -13560,7 +13602,7 @@ begin
|
||||
tablo_index_signal[i]:=ligneClicSig+1;
|
||||
|
||||
Signaux[ligneClicSig+1].Lbl.caption:='@'+IntToSTR(i);
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
s:=encode_signal(ligneClicSig+1);
|
||||
ListBoxSig.Items[ligneClicSig]:=s;
|
||||
ListBoxSig.selected[ligneClicSig]:=true;
|
||||
Maj_Hint_Signal(ligneClicSig+1);
|
||||
|
||||
@@ -549,6 +549,7 @@ procedure TFormConfigTCO.FormCreate(Sender: TObject);
|
||||
var i : integer;
|
||||
c : tcomponent;
|
||||
begin
|
||||
if debug=1 then Affiche('Création fenetre configTCO',clLime);
|
||||
for i:=0 to stringGridTCO.RowCount - 1 do
|
||||
with stringGridTCO do
|
||||
begin
|
||||
@@ -577,6 +578,7 @@ begin
|
||||
composant(c,couleurFond,couleurTexte);
|
||||
end;
|
||||
end;
|
||||
if debug=1 then Affiche('Fin création fenetre configTCO',clLime);
|
||||
end;
|
||||
|
||||
procedure TFormConfigTCO.TrackBarEpaisseurChange(Sender: TObject);
|
||||
|
||||
+21
-21
@@ -110,14 +110,14 @@ var
|
||||
EtatFeuPilote : word;
|
||||
AdrPilote : integer;
|
||||
|
||||
procedure dessine_feu_pilote;
|
||||
procedure dessine_signal_pilote;
|
||||
procedure couleurs_pilote;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure dessine_feu_pilote;
|
||||
procedure dessine_signal_pilote;
|
||||
var i,ancienEtat : integer;
|
||||
Vcanvas : Tcanvas;
|
||||
begin
|
||||
@@ -168,70 +168,70 @@ procedure TFormPilote.RadioVertClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
if nation=1 then Maj_Etat_Signal(0,vert) else Maj_Etat_Signal(0,vertB) ;
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioVertCliClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
Maj_Etat_Signal(0,vert_cli);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioJauneClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
if nation=1 then Maj_Etat_Signal(0,jaune) else Maj_Etat_Signal(0,deux_jaunes);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioJaunecliClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
Maj_Etat_Signal(0,jaune_cli);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioRougeClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
Maj_Etat_Signal(0,semaphore);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioRougeCliClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
Maj_Etat_Signal(0,semaphore_cli);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioCarreClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
if nation=1 then Maj_Etat_Signal(0,carre) else Maj_Etat_Signal(0,vert_jaune_H);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioBlancClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
if nation=1 then Maj_Etat_Signal(0,blanc) else Maj_Etat_Signal(0,rouge_blanc);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioVioletClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
if nation=1 then Maj_Etat_Signal(0,violet) else Maj_Etat_Signal(0,vert_jaune_V);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioBlancCliClick(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
Maj_Etat_Signal(0,blanc_cli);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
@@ -244,7 +244,7 @@ procedure TFormPilote.RadioRalen30Click(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
Maj_Etat_Signal(0,ral_30);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ procedure TFormPilote.RadioRappel60Click(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
Maj_Etat_Signal(0,rappel_60);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
|
||||
@@ -260,14 +260,14 @@ procedure TFormPilote.RadioRalen60Click(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
Maj_Etat_Signal(0,ral_60);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.RadioRappel30Click(Sender: TObject);
|
||||
begin
|
||||
Signaux[0].AncienEtat:=Signaux[0].EtatSignal;
|
||||
Maj_Etat_Signal(0,rappel_30);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure couleurs_pilote;
|
||||
@@ -316,7 +316,7 @@ if ord(Key) = VK_RETURN then
|
||||
if (i>=0) and (i<=6) then
|
||||
begin
|
||||
Signaux[0].EtatSignal:=i;
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
if (i<0) and (i>6) then EditNbreFeux.text:='1';
|
||||
end
|
||||
@@ -446,7 +446,7 @@ begin
|
||||
Maj_Etat_Signal(AdrPilote,carre);
|
||||
envoi_signal(Adrpilote);
|
||||
Maj_Etat_Signal(0,carre);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -458,19 +458,19 @@ end;
|
||||
procedure TFormPilote.CheckChiffreClick(Sender: TObject);
|
||||
begin
|
||||
if checkChiffre.Checked then Maj_Etat_Signal_belge(0,chiffre_F or bita1_F) else Maj_Etat_Signal_belge(0,chiffre_F);
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.CheckChevronClick(Sender: TObject);
|
||||
begin
|
||||
if checkChevron.Checked then Maj_Etat_Signal(0,chevron_F or bita1_F) else Maj_Etat_Signal(0,chevron_F );
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
procedure TFormPilote.CheckClignoteClick(Sender: TObject);
|
||||
begin
|
||||
if checkclignote.Checked then Maj_Etat_Signal(0,clignote_F or bita1_F) else Maj_Etat_Signal(0,clignote_F );
|
||||
dessine_feu_pilote;
|
||||
dessine_signal_pilote;
|
||||
end;
|
||||
|
||||
begin
|
||||
|
||||
+6
-6
@@ -19,8 +19,8 @@ object FormPrinc: TFormPrinc
|
||||
OnCreate = FormCreate
|
||||
OnResize = FormResize
|
||||
DesignSize = (
|
||||
1141
|
||||
638)
|
||||
1133
|
||||
630)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelTitre: TLabel
|
||||
@@ -1429,8 +1429,8 @@ object FormPrinc: TFormPrinc
|
||||
end
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Top = 616
|
||||
Width = 1141
|
||||
Top = 608
|
||||
Width = 1133
|
||||
Height = 22
|
||||
Panels = <
|
||||
item
|
||||
@@ -2466,8 +2466,8 @@ object FormPrinc: TFormPrinc
|
||||
OnClick = Coller1Click
|
||||
end
|
||||
end
|
||||
object PopupMenuFeu: TPopupMenu
|
||||
OnPopup = PopupMenuFeuPopup
|
||||
object PopupMenuSignal: TPopupMenu
|
||||
OnPopup = PopupMenuSignalPopup
|
||||
Left = 896
|
||||
object Proprits1: TMenuItem
|
||||
Caption = 'Propri'#233't'#233's du signal'
|
||||
|
||||
+391
-397
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -276,10 +276,10 @@ end;
|
||||
procedure Maj_DB;
|
||||
var s : string;
|
||||
begin
|
||||
s:=encode_sig_feux(indexSig);
|
||||
s:=encode_signal(indexSig);
|
||||
formconfig.ListBoxSig.items[indexSig-1]:=s;
|
||||
formconfig.ListBoxSig.selected[ligneClicSig]:=true;
|
||||
aff_champs_sig_feux(indexSig);
|
||||
aff_champs_signaux(indexSig);
|
||||
end;
|
||||
|
||||
procedure TFormSR.ComboBoxAdr1Change(Sender: TObject);
|
||||
|
||||
+4
-4
@@ -8791,7 +8791,7 @@ end;
|
||||
procedure TFormTCO.FormCreate(Sender: TObject);
|
||||
var s : string;
|
||||
begin
|
||||
if affevt or (debug=1) then Affiche('FormTCO'+intToSTR(indexTCOCreate)+' create',clyellow);
|
||||
if affevt or (debug=1) then Affiche('FormTCO'+intToSTR(indexTCOCreate)+' create',clLime);
|
||||
//Screen.OnActiveControlChange := ActiveControlChanged;
|
||||
offsetSourisY:=-10; // permet de tenir l'icone au milieu quand on fait un glisser
|
||||
offsetSourisX:=-10;
|
||||
@@ -13772,7 +13772,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure TFormTCO.LigneDessousClick(Sender: TObject);
|
||||
var x,y,indexTCO : integer;
|
||||
var indexTCO : integer;
|
||||
c : tcomponent;
|
||||
begin
|
||||
c:=popupmenu1.PopupComponent ; // imageTCO
|
||||
@@ -13824,8 +13824,8 @@ begin
|
||||
end;
|
||||
|
||||
procedure TFormTCO.Colonnedroite1Click(Sender: TObject);
|
||||
var x,y,indexTCO : integer;
|
||||
c : tcomponent;
|
||||
var indexTCO : integer;
|
||||
c : tcomponent;
|
||||
begin
|
||||
c:=popupmenu1.PopupComponent ; // imageTCO
|
||||
c:=c.GetParentComponent; // scrollBox
|
||||
|
||||
+11
-10
@@ -230,9 +230,8 @@ begin
|
||||
begin
|
||||
affiche_tco(1);
|
||||
end;
|
||||
maj_feux(true);
|
||||
maj_feux(true);
|
||||
maj_feux(true);
|
||||
Maj_Signaux(true);
|
||||
Maj_Signaux(true);
|
||||
end;
|
||||
|
||||
procedure TFormPlace.Edit1Change(Sender: TObject);
|
||||
@@ -343,7 +342,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure TFormPlace.ButtonLanceRoutageClick(Sender: TObject);
|
||||
var a,i,j,id,adrDet,AdrTrain,AdrFeu : integer;
|
||||
var a,i,j,id,adrDet,AdrTrain,AdrSignal : integer;
|
||||
trouve,rouge : boolean;
|
||||
var s: string;
|
||||
begin
|
||||
@@ -365,12 +364,12 @@ begin
|
||||
roulage:=true;
|
||||
avecResa:=false; // pour adrTrain ou NumTrain
|
||||
AdrTrain:=detecteur[AdrDet].AdrTrain;
|
||||
AdrFeu:=signal_detecteur(AdrDet); // trouve l'adresse du signal correspondant au détecteur
|
||||
AdrSignal:=signal_detecteur(AdrDet); // trouve l'adresse du signal correspondant au détecteur
|
||||
|
||||
// si il y a un signal sur le détecteur de démarrage du train est il au rouge?
|
||||
if adrFeu<>0 then
|
||||
if AdrSignal<>0 then
|
||||
begin
|
||||
id:=index_Signal(AdrFeu);
|
||||
id:=index_Signal(AdrSignal);
|
||||
a:=Signaux[id].EtatSignal;
|
||||
if ((a=semaphore_F) or (a=carre_F) or (a=violet_F)) then rouge:=true;
|
||||
end;
|
||||
@@ -380,21 +379,21 @@ begin
|
||||
j:=index_train_adresse(AdrTrain);
|
||||
vitesse_loco('',adrTrain,j,trains[j].VitNominale,not(placement[j].inverse),true);
|
||||
|
||||
maj_feux(true); // avec détecteurs
|
||||
Maj_Signaux(true); // avec détecteurs
|
||||
s:='Lancement du train '+detecteur[adrDet].train+' depuis détecteur '+intToSTR(adrDet);
|
||||
Affiche(s,clYellow);
|
||||
if traceListe then AfficheDebug(s,clyellow);
|
||||
reserve_canton(AdrDet,placement[j].detdir,adrtrain,0,2);
|
||||
|
||||
end
|
||||
Else Affiche('Le signal '+intToSTR(AdrFeu)+' étant rouge, le train '+detecteur[adrDet].train+' @'+intToSTR(AdrTrain)+' ne démarre pas',clyellow);
|
||||
Else Affiche('Le signal '+intToSTR(AdrSignal)+' étant rouge, le train '+detecteur[adrDet].train+' @'+intToSTR(AdrTrain)+' ne démarre pas',clyellow);
|
||||
end;
|
||||
end;
|
||||
|
||||
// au moins un train démarre
|
||||
if trouve then
|
||||
begin
|
||||
Maj_feux(true);
|
||||
Maj_Signaux(true);
|
||||
Formprinc.LabelTitre.caption:=titre+' - Mode roulage en cours';
|
||||
with Formprinc.SBMarcheArretLoco do
|
||||
begin
|
||||
@@ -550,8 +549,10 @@ procedure TFormPlace.FormCreate(Sender: TObject);
|
||||
var c : tcomponent;
|
||||
i : integer;
|
||||
begin
|
||||
if debug=1 then Affiche('Début création fenetre Place',clLime);
|
||||
PlaceAffiche:=true;
|
||||
couleurs_place;
|
||||
if debug=1 then Affiche('Fin création fenetre Place',clLime);
|
||||
end;
|
||||
|
||||
procedure TFormPlace.BitBtn1Click(Sender: TObject);
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ var
|
||||
verifVersion,notificationVersion : boolean;
|
||||
date_creation,nombre_tel : string;
|
||||
|
||||
Const Version='8.36'; // sert à la comparaison de la version publiée
|
||||
Const Version='8.37'; // sert à la comparaison de la version publiée
|
||||
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
|
||||
|
||||
function GetCurrentProcessEnvVar(const VariableName: string): string;
|
||||
|
||||
+2
-1
@@ -221,4 +221,5 @@ version 8.35 : Correction ajout de signaux et d'aiguillages.
|
||||
Amélioration de l'édition des TJD.
|
||||
version 8.36 : Création d'un mode de fond sombre modifiable pour l'affichage.
|
||||
Amélioration édition des lignes et colonnes du TCO.
|
||||
|
||||
version 8.37 : Correction des calculs des index des aiguillages et des signaux lors de leur suppression.
|
||||
Correction présence trains avant signal.
|
||||
Reference in New Issue
Block a user