This commit is contained in:
f1iwq2
2023-07-22 21:07:52 +02:00
parent 9957edb6c9
commit de401c95d7
13 changed files with 1618 additions and 270 deletions
+2 -2
View File
@@ -14,8 +14,8 @@
-$N+
-$O-
-$P+
-$Q-
-$R-
-$Q+
-$R+
-$S-
-$T-
-$U-
+2 -2
View File
@@ -17,8 +17,8 @@ M=0
N=1
O=0
P=1
Q=0
R=0
Q=1
R=1
S=0
T=0
U=0
+67 -19
View File
@@ -1571,7 +1571,7 @@ object FormConfig: TFormConfig
Top = 8
Width = 633
Height = 505
ActivePage = TabSheetDccpp
ActivePage = TabSheetSig
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
@@ -2419,7 +2419,7 @@ object FormConfig: TFormConfig
Caption = 'Vitesse de franchissement d'#233'vi'#233' :'
TabOrder = 0
object RadioButtonsans: TRadioButton
Left = 24
Left = 8
Top = 16
Width = 57
Height = 17
@@ -2433,7 +2433,7 @@ object FormConfig: TFormConfig
OnClick = RadioButtonsansClick
end
object RadioButton30kmh: TRadioButton
Left = 24
Left = 8
Top = 32
Width = 73
Height = 17
@@ -2447,7 +2447,7 @@ object FormConfig: TFormConfig
OnClick = RadioButton30kmhClick
end
object RadioButton60kmh: TRadioButton
Left = 24
Left = 8
Top = 48
Width = 73
Height = 17
@@ -2460,6 +2460,29 @@ object FormConfig: TFormConfig
TabOrder = 2
OnClick = RadioButton60kmhClick
end
object RadioButtonSpecifique: TRadioButton
Left = 88
Top = 24
Width = 81
Height = 17
Hint =
'Pour signaux belges. Permet d'#39'afficher le chiffre de r'#233'duction d' +
'e vitesse sur le signal pr'#233'c'#233'dent l'#39'aiguillage'
Caption = 'Sp'#233'cifique :'
ParentShowHint = False
ShowHint = True
TabOrder = 3
OnClick = RadioButtonSpecifiqueClick
end
object EditSpecifique: TEdit
Left = 112
Top = 40
Width = 33
Height = 21
TabOrder = 4
Text = '40'
OnChange = EditSpecifiqueChange
end
end
object CheckInverse: TCheckBox
Left = 16
@@ -2986,7 +3009,7 @@ object FormConfig: TFormConfig
Left = 336
Top = 32
Width = 281
Height = 425
Height = 441
Caption = 'Description du signal'
TabOrder = 0
object ImageSignal: TImage
@@ -3016,14 +3039,14 @@ object FormConfig: TFormConfig
Caption = 'D'#233'codeur: '
end
object LabelDetAss: TLabel
Left = 88
Left = 96
Top = 104
Width = 86
Height = 13
Caption = 'D'#233'tecteur associ'#233
end
object LabelElSuiv: TLabel
Left = 184
Left = 192
Top = 104
Width = 75
Height = 13
@@ -3031,7 +3054,7 @@ object FormConfig: TFormConfig
end
object Label17: TLabel
Left = 8
Top = 288
Top = 315
Width = 228
Height = 26
Caption =
@@ -3121,7 +3144,7 @@ object FormConfig: TFormConfig
end
object MemoCarre: TMemo
Left = 8
Top = 320
Top = 344
Width = 265
Height = 89
ScrollBars = ssBoth
@@ -3135,12 +3158,12 @@ object FormConfig: TFormConfig
Width = 129
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 1
OnChange = ComboBoxDecChange
end
object EditDet1: TEdit
Left = 120
Left = 136
Top = 120
Width = 41
Height = 21
@@ -3148,7 +3171,7 @@ object FormConfig: TFormConfig
OnChange = EditDet1Change
end
object EditSuiv1: TEdit
Left = 184
Left = 200
Top = 120
Width = 41
Height = 21
@@ -3158,7 +3181,7 @@ object FormConfig: TFormConfig
OnChange = EditSuiv1Change
end
object EditDet2: TEdit
Left = 120
Left = 136
Top = 144
Width = 41
Height = 21
@@ -3166,7 +3189,7 @@ object FormConfig: TFormConfig
OnChange = EditDet2Change
end
object EditSuiv2: TEdit
Left = 184
Left = 200
Top = 144
Width = 41
Height = 21
@@ -3176,7 +3199,7 @@ object FormConfig: TFormConfig
OnChange = EditSuiv2Change
end
object EditDet3: TEdit
Left = 120
Left = 136
Top = 168
Width = 41
Height = 21
@@ -3184,7 +3207,7 @@ object FormConfig: TFormConfig
OnChange = EditDet3Change
end
object EditSuiv3: TEdit
Left = 184
Left = 200
Top = 168
Width = 41
Height = 21
@@ -3194,7 +3217,7 @@ object FormConfig: TFormConfig
OnChange = EditSuiv3Change
end
object EditDet4: TEdit
Left = 120
Left = 136
Top = 192
Width = 41
Height = 21
@@ -3202,7 +3225,7 @@ object FormConfig: TFormConfig
OnChange = EditDet4Change
end
object EditSuiv4: TEdit
Left = 184
Left = 200
Top = 192
Width = 41
Height = 21
@@ -3253,7 +3276,8 @@ object FormConfig: TFormConfig
'Directionnel 3 feux'
'Directionnel 4 feux'
'Directionnel 5 feux'
'Directionnel 6 feux')
'Directionnel 6 feux'
'Signal belge type 1')
end
object EditSpecUni: TEdit
Left = 8
@@ -3319,6 +3343,30 @@ object FormConfig: TFormConfig
TabOrder = 18
OnClick = CheckFRCClick
end
object CheckBoxVersContrevoie: TCheckBox
Left = 120
Top = 280
Width = 137
Height = 17
Hint = 'Permet d'#39'afficher le chevron si l'#39'aiguillage du signal est devi'#233
Caption = 'Signal vers contrevoie'
ParentShowHint = False
ShowHint = True
TabOrder = 19
OnClick = CheckBoxVersContrevoieClick
end
object CheckBoxContreVoie: TCheckBox
Left = 120
Top = 294
Width = 137
Height = 25
Hint = 'Signal clignotant'
Caption = 'Signal de contrevoie'
ParentShowHint = False
ShowHint = True
TabOrder = 20
OnClick = CheckBoxContreVoieClick
end
end
object RichSig: TRichEdit
Left = 0
+262 -68
View File
@@ -336,6 +336,10 @@ type
PopupMenuConfig: TPopupMenu;
Copier1: TMenuItem;
Coller1: TMenuItem;
CheckBoxVersContrevoie: TCheckBox;
CheckBoxContreVoie: TCheckBox;
RadioButtonSpecifique: TRadioButton;
EditSpecifique: TEdit;
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
@@ -498,6 +502,10 @@ type
Shift: TShiftState; X, Y: Integer);
procedure RichCdeDccppKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure RadioButtonSpecifiqueClick(Sender: TObject);
procedure CheckBoxVersContrevoieClick(Sender: TObject);
procedure CheckBoxContreVoieClick(Sender: TObject);
procedure EditSpecifiqueChange(Sender: TObject);
private
{ Déclarations privées }
public
@@ -591,7 +599,7 @@ function decodeDCC(s : string) : string;
implementation
uses UnitDebug,UnitTCO, UnitSR, UnitCDF,UnitAnalyseSegCDM;
uses UnitDebug,UnitTCO, UnitSR, UnitCDF,UnitAnalyseSegCDM, unitPilote;
{$R *.dfm}
@@ -897,9 +905,15 @@ begin
// vitesse de franchissement et inversion
if not(croi) then
begin
if aiguillage[index].vitesse=0 then s:=s+',V0';
if aiguillage[index].vitesse=30 then s:=s+',V30';
if aiguillage[index].vitesse=60 then s:=s+',V60';
case aiguillage[index].vitesse of
0 : s:=s+',V0';
30 : s:=s+',V30';
60 : s:=s+',V60';
else begin
s:=s+',V'+formconfig.EditSpecifique.Text;
end;
end;
if aiguillage[index].inversionCDM=1 then s:=s+',I1' else s:=s+',I0';
end;
@@ -958,16 +972,16 @@ begin
s:=IntToSTR(adresse)+',';
// forme - D=directionnel ajouter 10
aspect:=feux[i].aspect;
if aspect<10 then s:=s+IntToSTR(aspect)+',' else s:=s+'D'+intToSTR(aspect-10)+',';
if (aspect<10) or (aspect>=20) then s:=s+IntToSTR(aspect)+',' else s:=s+'D'+intToSTR(aspect-10)+',';
// bouton feu blanc, n'existe pas pour un feu directionnel (aspect>10)
if aspect<10 then begin if feux[i].feublanc then s:=s+'1,' else s:=s+'0,';end;
if (aspect<10) or (aspect>=20) then begin if feux[i].feublanc then s:=s+'1,' else s:=s+'0,';end;
// décodeur
s:=s+IntToSTR(feux[i].decodeur)+',';
// detecteur et élement suivant (4 maxi)
if aspect<10 then
if (aspect<10) or (aspect>=20) then
begin
s:=s+'('+IntToSTR(feux[i].Adr_det1)+','+TypeEl_To_char(feux[i].Btype_suiv1)+IntToSTR(feux[i].Adr_el_suiv1);
j:=feux[i].Adr_det2;
@@ -1029,12 +1043,20 @@ begin
s:=s+',NA'+intToSTR(feux[i].na);
end;
// signal belge
if (feux[i].aspect=20) then
begin
s:=s+',NA'+intToSTR(feux[i].na)+',VCV';
if feux[i].verscontrevoie then s:=s+'1' else s:=s+'0';
s:=s+',CV';
if feux[i].contrevoie then s:=s+'1' else s:=s+'0';
end;
end
else
// feux directionnels
begin
NfeuxDir:=aspect-10;
for j:=1 to NfeuxDir+1 do
for j:=1 to NfeuxDir+1 do
begin
s:=s+'(';
for k:=1 to Length(feux[i].AigDirection[j])-1 do
@@ -1045,7 +1067,7 @@ begin
s:=s+')';
end;
end;
encode_sig_feux:=s;
end;
@@ -1138,7 +1160,7 @@ begin
// feu de signalisation---------------------------------
begin
val(sa,asp,erreur); //aspect
if (asp<2) or (asp=6) or (asp=8) or (asp>9) then
if (asp<2) or (asp=6) or (asp=8) or (asp>20) then
begin
Affiche('Erreur 676: configuration aspect ('+intToSTR(asp)+') signal incorrect à la ligne '+chaine_signal,clRed);
asp:=2;
@@ -1234,8 +1256,55 @@ begin
if length(s)>0 then begin feux[i].checkFR:=s[1]='1';delete(s,1,1);end;
end;
if length(s)>0 then if s[1]=',' then delete(s,1,1);
if length(s)>0 then
begin
if copy(s,1,2)='NA' then
begin
delete(s,1,2);
val(s,j,erreur);
delete(s,1,1);
if (j<2) or (j>5) then
begin
j:=5;affiche('Paramètre NA incorrect dans ligne '+chaine_signal,clred)
end;
feux[i].na:=j;
end;
end;
if length(s)>0 then if s[1]=',' then delete(s,1,1);
if length(s)>0 then
begin
if copy(s,1,3)='VCV' then
begin
delete(s,1,3);
val(s,j,erreur);
delete(s,1,1);
if (j<0) or (j>1) then
begin
j:=0;affiche('Paramètre VCV incorrect dans ligne '+chaine_signal,clred)
end;
feux[i].verscontrevoie:=j=1;
end;
end;
if length(s)>0 then if s[1]=',' then delete(s,1,1);
if length(s)>0 then
begin
if copy(s,1,2)='CV' then
begin
delete(s,1,2);
val(s,j,erreur);
delete(s,1,1);
if (j<0) or (j>1) then
begin
j:=0;affiche('Paramètre CV incorrect dans ligne '+chaine_signal,clred)
end;
feux[i].contrevoie:=j=1;
end;
end;
if length(s)>0 then if s[1]='U' then delete(s,1,1);
// si décodeur UniSemaf (6) champ supplémentaire U
@@ -3739,9 +3808,10 @@ begin
CheckInverse.checked:=aiguillage[Index_Aig(adresse)].inversionCDM=1;
if aiguillage[Index_Aig(adresse)].vitesse=0 then begin RadioButtonSans.checked:=true;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=false;end;
if aiguillage[Index_Aig(adresse)].vitesse=30 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=true;RadioButton60kmh.checked:=false;end;
if aiguillage[Index_Aig(adresse)].vitesse=60 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=true;end;
if aiguillage[Index_Aig(adresse)].vitesse=0 then begin RadioButtonSans.checked:=true; RadioButton30kmh.checked:=false;RadioButtonSpecifique.checked:=false;RadioButton60kmh.checked:=false;end;
if aiguillage[Index_Aig(adresse)].vitesse=30 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=true; RadioButtonSpecifique.checked:=false;RadioButton60kmh.checked:=false;end;
if aiguillage[Index_Aig(adresse)].vitesse=40 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButtonSpecifique.checked:=true ;RadioButton60kmh.checked:=false;end;
if aiguillage[Index_Aig(adresse)].vitesse=60 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButtonSpecifique.checked:=false;RadioButton60kmh.checked:=true;end;
end;
if croi then
@@ -3787,9 +3857,14 @@ begin
Label18.Visible:=false;
CheckInverse.checked:=aiguillage[Index_Aig(adresse)].inversionCDM=1;
if aiguillage[Index].vitesse=0 then begin RadioButtonSans.checked:=true;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=false;end;
if aiguillage[Index].vitesse=30 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=true;RadioButton60kmh.checked:=false;end;
if aiguillage[Index].vitesse=60 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=true;end;
if aiguillage[Index].vitesse=0 then begin RadioButtonSans.checked:=true;RadioButton30kmh.checked:=false;RadioButtonSpecifique.checked:=false;RadioButton60kmh.checked:=false;end
else
if aiguillage[Index].vitesse=30 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=true;RadioButtonSpecifique.checked:=false;RadioButton60kmh.checked:=false;end
else
if aiguillage[Index].vitesse=60 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButtonSpecifique.checked:=false;RadioButton60kmh.checked:=true;end
else
begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButtonSpecifique.checked:=true;RadioButton60kmh.checked:=false;end ;
EditPointe_BG.Text:=intToSTR(aiguillage[index].Apointe)+aiguillage[index].ApointeB;
EditPointe_BG.Hint:=TypeElAIg_to_char(aiguillage[index].Apointe,aiguillage[index].ApointeB);
@@ -4034,6 +4109,8 @@ begin
picture.Bitmap:=Select_dessin_feu(feux[i].aspect);
end;
if feux[i].contrevoie then inverse_image(formCOnfig.ImageSignal,Formprinc.ImageSignal20);
with formconfig do
begin
MemoCarre.Lines.Clear;
@@ -4044,25 +4121,35 @@ begin
decodeur:=feux[i].decodeur;
ButtonConfigSR.Visible:=false;
//SR
if (decodeur=7) or (decodeur=2) then ButtonConfigSR.Visible:=true;
// unisemaf
if (decodeur=6) then
begin
EditSpecUni.Visible:=true;
LabelUni.Caption:='Spec Unisemaf';
LabelUni.Visible:=true;
EditSpecUni.Text:=IntToSTR(feux[i].Unisemaf);
editSpecUni.Hint:='Paramètre de description supplémentaire du décodeur Unisemaf';
editSpecUni.ShowHint:=true;
end;
// digikeijs
if (decodeur=5) then
begin
ButtonConfigSR.Visible:=true ;
end;
if (decodeur<>6) then
case decodeur of
2,7 : ButtonConfigSR.Visible:=true;
5 : ButtonConfigSR.Visible:=true ; // digikeijs
6 : begin
EditSpecUni.Visible:=true;
LabelUni.Caption:='Spec Unisemaf';
LabelUni.Visible:=true;
EditSpecUni.Text:=IntToSTR(feux[i].Unisemaf);
editSpecUni.Hint:='Paramètre de description supplémentaire du décodeur Unisemaf';
editSpecUni.ShowHint:=true;
end;
9 : begin
s:='Décodeur pour signaux belges SNCB - 4 aspects uniquement: ';
labelInfo.Caption:=s+'vert - rouge - double jaune - rouge blanc';
end;
10 : begin
s:='Décodeur pour signaux belges SNCB - 6 aspects + chiffre + V ';
labelInfo.Caption:=s;
labelUni.Caption:='Nombre d''adresses';LabelUni.Visible:=true;
editSpecUni.Hint:='Nombre d''adresses occupées par le signal';
editSpecUni.ShowHint:=true;
EditSpecUni.Visible:=true;
EditSpecUni.Text:=IntToSTR(feux[i].Na);
end
else labelInfo.Caption:='';
end;
if (decodeur<>6) and (decodeur<>10) then
begin EditSpecUni.Visible:=false;LabelUni.Visible:=false;end;
@@ -4074,11 +4161,13 @@ begin
5 : ComboBoxAsp.ItemIndex:=3;
7 : ComboBoxAsp.ItemIndex:=4;
9 : ComboBoxAsp.ItemIndex:=5;
20 : ComboBoxAsp.ItemIndex:=11;
else
ComboBoxAsp.ItemIndex:=d-10+4;
end;
if ((d=2) or (d>=5)) and (d<10) then checkBoxFB.Visible:=true else checkBoxFB.Visible:=false;
// affiche ou non les checkbox en fonction de l'aspect
if (((d=2) or (d>=5)) and (d<10)) or (d=20) then checkBoxFB.Visible:=true else checkBoxFB.Visible:=false;
if d>2 then
begin
checkFVC.Visible:=true;
@@ -4090,10 +4179,34 @@ begin
checkFRC.Visible:=false;
end;
if (d>3) and (d<10) then CheckVerrouCarre.Visible:=true else CheckVerrouCarre.Visible:=false;
if ((d>3) and (d<10)) or (d=20) then CheckVerrouCarre.Visible:=true else CheckVerrouCarre.Visible:=false;
if d=20 then
begin
CheckBoxVersContrevoie.Visible:=true;
CheckBoxContrevoie.Visible:=true;
CheckBoxContrevoie.Checked:=feux[i].contrevoie;
CheckBoxVersContrevoie.Checked:=feux[i].Verscontrevoie;
if Feux[i].Btype_suiv1=Aig then s:='Permet d''afficher le chevron sur le signal si l''aiguillage '+intToSTR(Feux[i].Adr_el_suiv1)+' est dévié'
else s:='Permet d''afficher le chevron sur le signal si son aiguillage est dévié;'+char(13)+'mais ce signal n''est pas suivi d''un aiguillage';
CheckBoxversContrevoie.Hint:=s;
CheckBoxFB.caption:='Avec demande Blanc rouge';
checkVerrouCarre.Caption:='verrouillable au rouge';
checkVerrouCarre.Hint:='Positionne le feu au rouge si aucun train n''est présent 3 cantons avant le signal';
checkFVC.visible:=false;
checkFRC.visible:=false;
end
else
begin
CheckBoxVersContrevoie.Visible:=false;
CheckBoxContrevoie.Visible:=false;
CheckBoxFB.caption:='Avec demande feu blanc';
checkVerrouCarre.Caption:='verrouillable au carré';
checkVerrouCarre.Hint:='Positionne le feu au carré si aucun train n''est présent 3 cantons avant le signal';
end;
// signal normal
if d<10 then
if (d<10) or (d>=20) then
begin
Label17.Caption:='Conditions supplémentaires d''affichage du carré par les aiguillages :';
Label17.Width:=228;
@@ -4982,11 +5095,45 @@ begin
begin
aiguillage[index].vitesse:=30;
aiguillage[index].modifie:=true;
end;
end;
s:=encode_aig(index);
formconfig.RichAig.Lines[ligneclicAig]:=s;
end;
procedure vitesse_spec;
var s : string;
AdrAig,erreur,index,v : integer;
begin
if clicliste then exit;
s:=formconfig.RichAig.Lines[ligneclicAig];
Val(s,adrAig,erreur);
if AdrAig=0 then exit;
index:=Index_Aig(AdrAig);
if index<>0 then
begin
val(formconfig.editSpecifique.Text,v,erreur);
if (v>=99) or (v<1) or (erreur<>0) then begin FormConfig.labelInfo.Caption:='Erreur vitesse';exit;end;
FormConfig.labelInfo.Caption:='';
aiguillage[index].vitesse:=v;
aiguillage[index].modifie:=true;
end;
s:=encode_aig(index);
formconfig.RichAig.Lines[ligneclicAig]:=s;
end;
procedure TFormConfig.EditSpecifiqueChange(Sender: TObject);
begin
if affevt then affiche('Evt edit vitesse spec',clyellow);
vitesse_spec;
end;
procedure TFormConfig.RadioButtonSpecifiqueClick(Sender: TObject);
begin
if affevt then affiche('Evt RadioBouton vitesse spec',clyellow);
vitesse_spec;
end;
procedure TFormConfig.RadioButton60kmhClick(Sender: TObject);
var AdrAig,erreur,index : integer;
s : string;
@@ -5020,6 +5167,23 @@ begin
feux[i].decodeur:=decodeur;
Maj_Hint_Signal(i);
case decodeur of
6 : begin
labelUni.Caption:='Spec Unisemaf';LabelUni.Visible:=true;
EditSpecUni.Visible:=true;
end;
9 : begin
s:='Décodeur pour signaux belges SNCB - 4 aspects uniquement: ';
labelInfo.Caption:=s+'vert - rouge - double jaune - rouge blanc';
end;
10 : begin
s:='Décodeur pour signaux belges SNCB - 6 aspects + chiffre + V ';
labelInfo.Caption:=s;
labelUni.Caption:='Nombre d''adresses';LabelUni.Visible:=true;
EditSpecUni.Visible:=true;
end
else labelInfo.Caption:='';
end;
s:=encode_sig_feux(i);
formconfig.RichSig.Lines[ligneclicSig]:=s;
aff_champs_sig_feux(i);
@@ -5172,7 +5336,7 @@ var s : string;
begin
if clicliste or (ligneClicSig<0) then exit;
if affevt then Affiche('Evt FB',clOrange);
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
begin
feux[ligneClicSig+1].FeuBlanc:=checkBoxFB.Checked;
@@ -5814,6 +5978,7 @@ end;
procedure TFormConfig.ComboBoxAspChange(Sender: TObject);
var x,y,i,index,aspect,adresseFeu : integer;
s : string;
bm :tbitmap;
begin
if clicListe then exit;
if affevt then Affiche('Evt aspect',clOrange);
@@ -5826,36 +5991,13 @@ begin
3 : aspect:=5;
4 : aspect:=7;
5 : aspect:=9;
11 : aspect:=20;
else aspect:=i+6;
end;
index:=ligneClicSig+1; // index du feu
if index<1 then exit;
if NbreFeux<index then exit;
//Affiche('Ligne cliquée='+IntToSTR(index),clyellow);
if ((aspect=2) or (aspect>=5)) and (aspect<10) then
checkBoxFB.Visible:=true else
begin
checkBoxFB.Visible:=false;
checkBoxFB.Checked:=false;
end;
if (aspect>3) and (aspect<10) then
begin
CheckVerrouCarre.Visible:=true
end
else
begin
CheckVerrouCarre.Visible:=false;
end;
if (aspect>2) and (aspect<10) then
begin
checkFVC.visible:=true;
checkFRC.visible:=true;
end
else
begin
checkFVC.visible:=false;
checkFRC.visible:=false;
end;
feux[index].aspect:=aspect;
s:=encode_sig_feux(index);
@@ -5863,7 +6005,9 @@ begin
aff_champs_sig_feux(index); // redessine les champs et le feu
// change l'image du feu dans la feuille graphique principale
Feux[index].Img.picture.Bitmap:=Select_dessin_feu(feux[index].aspect);
bm:=Select_dessin_feu(feux[index].aspect);
if bm=nil then exit;
Feux[index].Img.picture.Bitmap:=bm;
dessine_feu_mx(Feux[index].Img.Canvas,0,0,1,1,feux[index].adresse,1); // dessine les feux du signal
// et dans le TCO
if formTCO.Showing then
@@ -5902,9 +6046,10 @@ begin
erreur:=verif_unisemaf(Adr,i);
if erreur=1 then begin LabelInfo.caption:='Erreur code Unisemaf';exit;end;
if erreur=2 then begin LabelInfo.caption:='Erreur cohérence aspect signal';exit;end;
LabelInfo.caption:=' ';
feux[ligneClicSig+1].Unisemaf:=i;
end;
LabelInfo.caption:=' ';
feux[ligneClicSig+1].Unisemaf:=i;
if decodeur=10 then feux[ligneClicSig+1].Na:=i;
s:=encode_sig_feux(ligneClicSig+1);
RichSig.Lines[ligneClicSig]:=s;
end;
@@ -6845,6 +6990,8 @@ begin
9 : nc:=5;
end;
end;
if dec=9 then nc:=2;
if dec=10 then nc:=feux[i].Na;
nombre_adresses_signal:=nc;
end;
@@ -10333,8 +10480,6 @@ procedure TFormConfig.Coller1Click(Sender: TObject);
end;
end;
procedure TFormConfig.RichCdeDccppMouseDown(Sender: TObject;Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var i : integer;
begin
@@ -10362,6 +10507,55 @@ begin
end;
end;
procedure TFormConfig.CheckBoxVersContrevoieClick(Sender: TObject);
var s : string;
begin
if clicliste or (ligneClicSig<0) then exit;
if affevt then Affiche('Evt VersContrevoie',clOrange);
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
begin
feux[ligneClicSig+1].verscontrevoie:=checkBoxVersContreVoie.Checked;
s:=encode_sig_feux(ligneClicSig+1);
RichSig.Lines[ligneClicSig]:=s;
feux[ligneClicSig+1].modifie:=true;
end;
end;
procedure TFormConfig.CheckBoxContreVoieClick(Sender: TObject);
var s : string;
bm : Tbitmap;
adr : integer;
begin
if clicliste or (ligneClicSig<0) then exit;
if affevt then Affiche('Evt Contrevoie',clOrange);
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
begin
feux[ligneClicSig+1].contrevoie:=checkBoxContreVoie.Checked;
s:=encode_sig_feux(ligneClicSig+1);
RichSig.Lines[ligneClicSig]:=s;
feux[ligneClicSig+1].modifie:=true;
aff_champs_sig_feux(ligneClicSig+1); // redessine les champs et le feu - contient l'inversion de l'image
// maj le signal dans la fenetre principale
Feux[ligneClicSig+1].Img.picture.Bitmap:=ImageSIgnal.Picture.Bitmap; // et recopie le feu
adr:=feux[ligneClicSig+1].adresse;
if feux[ligneClicSig+1].contrevoie then Maj_Etat_Signal(adr,clign) else Maj_Etat_Signal(adr,clign or setRaz_F);
dessine_feu_mx(Feux[ligneClicSig+1].Img.Canvas,0,0,1,1,feux[ligneClicSig+1].adresse,1); // dessine les feux du signal
end;
end;
end.
+38 -3
View File
@@ -1,6 +1,6 @@
object FormPilote: TFormPilote
Left = 330
Top = 195
Left = 479
Top = 202
BorderStyle = bsDialog
Caption = 'Pilotage'
ClientHeight = 350
@@ -50,7 +50,7 @@ object FormPilote: TFormPilote
Caption = 'Nombre de feux '#224' allumer'
end
object LabelDec: TLabel
Left = 224
Left = 208
Top = 192
Width = 72
Height = 19
@@ -238,4 +238,39 @@ object FormPilote: TFormPilote
TabOrder = 4
OnClick = CheckVerrouCarreClick
end
object GroupBox3: TGroupBox
Left = 8
Top = 224
Width = 193
Height = 73
Caption = 'Signalisation combin'#233'e'
TabOrder = 5
object CheckChiffre: TCheckBox
Left = 16
Top = 16
Width = 97
Height = 17
Caption = 'Chiffre'
TabOrder = 0
OnClick = CheckChiffreClick
end
object CheckChevron: TCheckBox
Left = 16
Top = 32
Width = 97
Height = 17
Caption = 'Chevron'
TabOrder = 1
OnClick = CheckChevronClick
end
object CheckClignote: TCheckBox
Left = 16
Top = 48
Width = 97
Height = 17
Caption = 'Clignotants'
TabOrder = 2
OnClick = CheckClignoteClick
end
end
end
+128 -19
View File
@@ -34,6 +34,10 @@ type
LabelDec: TLabel;
Label1: TLabel;
CheckVerrouCarre: TCheckBox;
GroupBox3: TGroupBox;
CheckChiffre: TCheckBox;
CheckChevron: TCheckBox;
CheckClignote: TCheckBox;
procedure RadioVertClick(Sender: TObject);
procedure RadioVertCliClick(Sender: TObject);
procedure RadioJauneClick(Sender: TObject);
@@ -55,6 +59,9 @@ type
procedure FormActivate(Sender: TObject);
procedure CheckVerrouCarreClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure CheckChiffreClick(Sender: TObject);
procedure CheckChevronClick(Sender: TObject);
procedure CheckClignoteClick(Sender: TObject);
private
{ Déclarations privées }
public
@@ -64,23 +71,43 @@ type
// code des aspects des signaux
const
carre =0 ; carre_F=1;
semaphore =1 ; semaphore_F=2;
semaphore_cli =2 ; semaphore_cli_F=4;
vert =3 ; vert_F=8;
vert_cli =4 ; vert_cli_F=16;
violet =5 ; violet_F=32;
blanc =6 ; blanc_F=64;
blanc_cli =7 ; blanc_cli_F=128;
jaune =8 ; jaune_F=256;
jaune_cli =9 ; jaune_cli_F=512;
ral_30 =10; ral_30_F=1024;
ral_60 =11; ral_60_F=2048;
rappel_30 =12; rappel_30_F=4096;
rappel_60 =13; rappel_60_F=8192;
Disque_D =14; // pour décodeur LDT
ral_60_jaune_cli =15;ral_60_jaune_cli_F=16384; // pour décodeur LDT
aspect8 =16 ;
carre =0 ; carre_F=1;
vert_jaune_H =0 ; vert_jaune_H_F=1; // signal belge
semaphore =1 ; semaphore_F=2;
semaphore_cli =2 ; semaphore_cli_F=4;
vert =3 ; vert_F=8;
vert_cli =4 ; vert_cli_F=16;
violet =5 ; violet_F=32;
vert_jaune_V =5 ; vert_jaune_V_F=32;
blanc =6 ; blanc_F=64;
rouge_blanc =6 ; rouge_blanc_F=64; // signal belge
blanc_cli =7 ; blanc_cli_F=128;
jaune =8 ; jaune_F=256;
deux_jaunes =8 ; deux_jaunes_F=256; // signal belge
jaune_cli =9 ; jaune_cli_F=512;
ral_30 =10; ral_30_F=1024;
chiffre =10; chiffre_F=1024;
ral_60 =11; ral_60_F=2048;
chevron =11; chevron_F=2048;
rappel_30 =12; rappel_30_F=4096;
clign =12 ; clign_F=4096;
rappel_60 =13; rappel_60_F=8192;
Disque_D =14; // pour décodeur LDT
ral_60_jaune_cli =15;ral_60_jaune_cli_F=32768; // pour décodeur LDT
SetRaz =15;SetRaz_F=32768; // pour belge
aspect8 =16 ;
var
@@ -113,6 +140,7 @@ begin
5 : dessine_feu5(VCanvas,0,0,1,1,EtatFeupilote,1);
7 : dessine_feu7(VCanvas,0,0,1,1,EtatFeupilote,1);
9 : dessine_feu9(VCanvas,0,0,1,1,EtatFeupilote,1);
20 : dessine_feu20(VCanvas,0,0,1,1,EtatFeupilote,1,feux[i].adresse);
// indicateurs de direction
12 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,2);
13 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,3);
@@ -190,7 +218,7 @@ end;
procedure TFormPilote.RadioRalen30Click(Sender: TObject);
begin
Maj_Etat_Signal(0,ral_30);
Maj_Etat_Signal(0,chevron);
dessine_feu_pilote;
end;
@@ -224,7 +252,7 @@ procedure TFormPilote.ButtonPiloteClick(Sender: TObject);
var i,index,e : integer;
begin
index:=index_feu(AdrPilote);
if feux[index].aspect>10 then
if (feux[index].aspect>10) and (feux[index].aspect<20 )then
begin
val(EditNbreFeux.Text,i,e);
feux[0].EtatSignal:=i;
@@ -262,6 +290,44 @@ begin
d:=feux[i].decodeur;
n:=feux[i].aspect;
LabelDec.Caption:=decodeur[d];
feux[0].decodeur:=d;
feux[0].aspect:=n;
// signal belge
if (n=20) then
begin
Radiocarre.Caption:='Vert jaune horizontal';
Radioviolet.Caption:='Vert jaune vertical';
RadioJaune.Caption:='Deux jaunes';
RadioJauneCli.Caption:='Deux jaunes clignotants';
RadioBlanc.caption:='Rouge Blanc';
RadioBlancCli.caption:='Rouge Blanc clignotants';
radiovertcli.visible:=false;
radioJaunecli.visible:=false;
radioRougecli.visible:=false;
radioBlanccli.visible:=false;
groupBox3.Top:=GroupBox2.Top;
groupBox3.Left:=GroupBox2.Left;
groupBox2.Visible:=false;
groupBox3.Visible:=true;
end;
if n<>20 then
begin
Radiocarre.Caption:='Carré';
Radioviolet.Caption:='Violet';
RadioJauneCli.Caption:='Avertissement clignotant';
RadioJaune.Caption:='Avertissement';
RadioBlanc.caption:='Blanc';
RadioBlancCli.caption:='Blanc clignotant';
radiovertcli.visible:=true;
radioJaunecli.visible:=true;
radioRougecli.visible:=true;
radioBlanccli.visible:=true;
end;
// checkcarré
if (n<4) or (n>10) then checkVerrouCarre.Visible:=false else
begin
@@ -269,6 +335,31 @@ begin
checkVerrouCarre.Checked:=feux[i].VerrouilleCarre;
end;
ImagePilote.Parent:=FormPilote;
ImagePilote.Picture.Bitmap.TransparentMode:=tmAuto;
ImagePilote.Picture.Bitmap.TransparentColor:=clblue;
ImagePilote.Transparent:=true;
ImagePilote.Picture.BitMap:=Feux[i].Img.Picture.Bitmap;
LabelTitrePilote.Caption:='Pilotage du signal '+intToSTR(AdrPilote);
feux[0].EtatSignal:=feux[i].EtatSignal;
if (feux[i].aspect>10) and (feux[i].aspect<20) then
begin
// signaux directionnels
GroupBox1.Visible:=false;
GroupBox2.Visible:=false;
LabelNbFeux.Visible:=true;
EditNbreFeux.Visible:=true;
EditNbreFeux.Text:='1';
end
else
begin
LabelNbFeux.Visible:=False;
EditNbreFeux.Visible:=false;
GroupBox1.Visible:=true;
if (feux[i].aspect<10) then GroupBox2.Visible:=true else GroupBox2.Visible:=false;
end;
end;
procedure TFormPilote.CheckVerrouCarreClick(Sender: TObject);
@@ -290,5 +381,23 @@ begin
if key=chr(27) then close;
end;
procedure TFormPilote.CheckChiffreClick(Sender: TObject);
begin
if checkChiffre.Checked then Maj_Etat_Signal(0,chiffre) else Maj_Etat_Signal(0,chiffre or SetRaz_F);
dessine_feu_pilote;
end;
procedure TFormPilote.CheckChevronClick(Sender: TObject);
begin
if checkChevron.Checked then Maj_Etat_Signal(0,chevron) else Maj_Etat_Signal(0,chevron or setRaz_F);
dessine_feu_pilote;
end;
procedure TFormPilote.CheckClignoteClick(Sender: TObject);
begin
if checkclignote.Checked then Maj_Etat_Signal(0,clign) else Maj_Etat_Signal(0,clign or setRaz_F);
dessine_feu_pilote;
end;
begin
end.
+246 -7
View File
@@ -35,8 +35,8 @@ object FormPrinc: TFormPrinc
ParentFont = False
end
object Image9feux: TImage
Left = 416
Top = 0
Left = 528
Top = 8
Width = 57
Height = 105
Picture.Data = {
@@ -1205,6 +1205,245 @@ object FormPrinc: TFormPrinc
Top = 0
Height = 598
end
object ImageSignal20: TImage
Left = 384
Top = 8
Width = 57
Height = 105
Picture.Data = {
07544269746D6170D21C0000424DD21C00000000000036040000280000003900
00006900000001000800000000009C1800000000000000000000000100000000
000000000000000080000080000000808000800000008000800080800000C0C0
C000C0DCC000F0CAA6000020400000206000002080000020A0000020C0000020
E00000400000004020000040400000406000004080000040A0000040C0000040
E00000600000006020000060400000606000006080000060A0000060C0000060
E00000800000008020000080400000806000008080000080A0000080C0000080
E00000A0000000A0200000A0400000A0600000A0800000A0A00000A0C00000A0
E00000C0000000C0200000C0400000C0600000C0800000C0A00000C0C00000C0
E00000E0000000E0200000E0400000E0600000E0800000E0A00000E0C00000E0
E00040000000400020004000400040006000400080004000A0004000C0004000
E00040200000402020004020400040206000402080004020A0004020C0004020
E00040400000404020004040400040406000404080004040A0004040C0004040
E00040600000406020004060400040606000406080004060A0004060C0004060
E00040800000408020004080400040806000408080004080A0004080C0004080
E00040A0000040A0200040A0400040A0600040A0800040A0A00040A0C00040A0
E00040C0000040C0200040C0400040C0600040C0800040C0A00040C0C00040C0
E00040E0000040E0200040E0400040E0600040E0800040E0A00040E0C00040E0
E00080000000800020008000400080006000800080008000A0008000C0008000
E00080200000802020008020400080206000802080008020A0008020C0008020
E00080400000804020008040400080406000804080008040A0008040C0008040
E00080600000806020008060400080606000806080008060A0008060C0008060
E00080800000808020008080400080806000808080008080A0008080C0008080
E00080A0000080A0200080A0400080A0600080A0800080A0A00080A0C00080A0
E00080C0000080C0200080C0400080C0600080C0800080C0A00080C0C00080C0
E00080E0000080E0200080E0400080E0600080E0800080E0A00080E0C00080E0
E000C0000000C0002000C0004000C0006000C0008000C000A000C000C000C000
E000C0200000C0202000C0204000C0206000C0208000C020A000C020C000C020
E000C0400000C0402000C0404000C0406000C0408000C040A000C040C000C040
E000C0600000C0602000C0604000C0606000C0608000C060A000C060C000C060
E000C0800000C0802000C0804000C0806000C0808000C080A000C080C000C080
E000C0A00000C0A02000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0
E000C0C00000C0C02000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0
A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF
FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFC
FCFCFCFCA4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4FCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFC
A400000000000000000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA4000000
00000000000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA400000000000000
000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA40000000000000000000000
0000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFCFCFCFCFCFCFCFCA4000000000000000000000000000000
00A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFCFCFCFCFCFCFCFCA400000000000000000000000000000000A4FCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FCFCFCFCFCFCFCFCA400000000000000000000000000000000A4FCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFC
FCFCFCFCA400000000000000000000000000000000A4FCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFC
A400000000000000000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA4000000
00000000000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA400000000000000
000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA40000000000000000000000
0000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFCFCFCFCFCFCFCFCA4000000000000000000000000000000
00A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFCFCFCFCFCFCFCFCA400000000000000000000000000000000A4FCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FCFCFCFCFCFCFCFCA400000000000000000000000000000000A4FCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFC
FCFCFCFCA400000000000000000000000000000000A4FCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFC
A400000000000000000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA4000000
00000000000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA400000000000000
000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA40000000000000000000000
0000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFCFCFCFCFCFCFCFCA4000000000000000000000000000000
00A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFCFCFCFCFCFCFCFCA400000000000000000000000000000000A4FCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FCFCFCFCFCFCFCFCA400000000000000000000000000000000A4FCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFC
FCFCFCFCA400000000000000000000000000000000A4FCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFC
A400000000000000000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCA4A4A4A4
A4A4A4A4A4A4A4A4A4A4A4A4A4A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFC0000000000000000
0000000000000000000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFC0000FFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFF000000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFCFCFCFCFCFC00FFFF000000000000000000000000000000
0000FFFF0000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFCFCFCFCFC00FF000000000000000000000000000000000000000000
FF0000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FCFCFCFC00FF0000000000000000000000000000000000000000000000FF0000
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFCFC00
FF00000000000000000000000000000000000000000000000000FF00FCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCFC00FF00000000
00000000000000000000000000000000000000000000FF0000FCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF000000000000000000
00000000000000000000000000000000000000FF00FCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF00000000000000000000000000
000000000000000000000000000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFC00FF0000000000000000A4A4A4A40000000000
000000000000000000000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFC00FF00000000000000A4A4A4A4A4A40000000000000000
0000000000000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFC00FF000000000000A4A4A4A4A4A4A4A40000000000000000000000
00000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FC00FF000000000000A4A4A4A4A4A4A4A4000000000000000000000000000000
FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF00
0000000000A4A4A4A4A4A4A4A4000000000000000000000000000000FF00FCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF0000000000
00A4A4A4A4A4A4A4A4000000000000000000000000000000FF00FCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF00000000000000A4A4
A4A4A4A400000000000000000000000000000000FF00FCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF0000000000000000A4A4A4A400
00000000000000000000000000000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFC00FF0000000000000000000000000000000000
000000000000000000000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFC00FF000000000000000000000000000000000000000000
0000000000000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFC00FF00000000000000000000000000000000000000000000000000
00000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FC00FF0000000000000000000000000000000000000000000000000000000000
FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF00
00000000000000000000000000000000000000000000000000000000FF00FCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF0000000000
000000A4A4A4A40000000000000000000000000000000000FF00FCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF00000000000000A4A4
A4A4A4A400000000000000000000000000000000FF00FCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF000000000000A4A4A4A4A4A4A4
A4000000000000000000000000000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFC00FF000000000000A4A4A4A4A4A4A4A4000000
000000000000000000000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFC00FF000000000000A4A4A4A4A4A4A4A400000000000000
0000000000000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFC00FF000000000000A4A4A4A4A4A4A4A40000000000000000000000
00000000FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FC00FF00000000000000A4A4A4A4A4A400000000000000000000000000000000
FF00FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF00
00000000000000A4A4A4A40000000000000000000000000000000000FF0000FC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF0000000000
00000000000000000000000000000000000000000000000000FF0000FCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF000000000000000000
00000000000000000000000000000000000000000000FF0000FCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF00000000000000000000000000
00000000000000000000000000000000000000FF0000FCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFC00FF0000000000000000000000000000000000
00000000000000000000000000000000FF0000FCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFC00FF000000000000000000000000000000000000000000
00000000000000000000000000FF0000FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFC00FF0000000000000000A4A4A4A400000000000000000000000000
00000000000000000000FF0000FCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FC00FF00000000000000A4A4A4A4A4A400000000000000000000000000000000
00000000000000FF0000FCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF00
0000000000A4A4A4A4A4A4A4A400000000000000000000000000000000000000
00000000FF0000FCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF0000000000
00A4A4A4A4A4A4A4A40000000000000000000000000000000000000000000000
00FF0000FCFCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF000000000000A4A4A4
A4A4A4A4A400000000000000000000000000000000000000000000000000FF00
00FCFCFCFCFCFCFCFCFCFC000000FCFCFC00FF000000000000A4A4A4A4A4A4A4
A40000000000000000000000000000000000000000000000000000FF0000FCFC
FCFCFCFCFCFCFC000000FCFCFC00FF00000000000000A4A4A4A4A4A400000000
000000000000000000000000000000000000000000000000FF0000FCFCFCFCFC
FCFCFC000000FCFCFC00FF0000000000000000A4A4A4A4000000000000000000
000000000000000000000000000000000000000000FF0000FCFCFCFCFCFCFC00
0000FCFCFC00FF00000000000000000000000000000000000000000000000000
000000000000000000000000000000000000FF0000FCFCFCFCFCFC000000FCFC
FC00FF0000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000FF0000FCFCFCFCFC000000FCFCFC00FF00
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000FF0000FCFCFCFC000000FCFCFC00FF0000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FF00FCFCFCFC000000FCFCFC00FF000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000FF00FCFCFCFC000000FCFCFC00FF0000000000000000A4A4A4A400
000000000000000000000000000000000000000000A4A4A4A400000000000000
00FF00FCFCFCFC000000FCFCFC00FF00000000000000A4A4A4A4A4A400000000
00000000000000000000000000000000A4A4A4A4A4A400000000000000FF00FC
FCFCFC000000FCFCFC00FF000000000000A4A4A4A4A4A4A4A400000000000000
0000000000000000000000A4A4A4A4A4A4A4A4000000000000FF00FCFCFCFC00
0000FCFCFC00FF000000000000A4A4A4A4A4A4A4A40000000000000000000000
00000000000000A4A4A4A4A4A4A4A4000000000000FF00FCFCFCFC000000FCFC
FC00FF000000000000A4A4A4A4A4A4A4A4000000000000000000000000000000
000000A4A4A4A4A4A4A4A4000000000000FF00FCFCFCFC000000FCFCFC00FF00
0000000000A4A4A4A4A4A4A4A4000000000000000000000000000000000000A4
A4A4A4A4A4A4A4000000000000FF00FCFCFCFC000000FCFCFC00FF0000000000
0000A4A4A4A4A4A40000000000000000000000000000000000000000A4A4A4A4
A4A400000000000000FF00FCFCFCFC000000FCFCFC00FF0000000000000000A4
A4A4A400000000000000000000000000000000000000000000A4A4A4A4000000
0000000000FF00FCFCFCFC000000FCFCFC0000FF000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
FF0000FCFCFCFC000000FCFCFCFC00FF00000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000FF00FCFC
FCFCFC000000FCFCFCFC0000FF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000FF0000FCFCFCFCFC00
0000FCFCFCFCFC0000FF00000000000000000000000000000000000000000000
000000000000000000000000000000000000FF0000FCFCFCFCFCFC000000FCFC
FCFCFCFC0000FFFF000000000000000000000000000000000000000000000000
00000000000000000000000000FF0000FCFCFCFCFCFCFC000000FCFCFCFCFCFC
FC0000FFFFFF0000000000000000000000000000000000000000000000000000
00000000000000FFFF0000FCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFC0000
0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFF000000FCFCFCFCFCFCFCFCFC000000FCFCFCFCFCFCFCFCFCFCFC000000
0000000000000000000000000000000000000000000000000000000000000000
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFCA4A4A4A4A4A4A4A4A4A4A4A4A4A4A4
A4A4A4A4A4A4A4A4A4A4A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFCA4000000000000000000000000000000000000
000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFCA400000000000000000000000000000000000000000000
0000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFCA4000000000000000000000000000000000000000000000000A4FC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFC
FCA4000000000000000000000000000000000000000000000000A4FCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCA40000
00000000000000000000000000000000000000000000A4FCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCA4000000000000
000000000000000000000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000FCFCFCA400000000000000000000
0000000000000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFCFCFCFCFC000000FCFCFCA40000000000000000000000000000
00000000000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFCFCFCFCFC000000FCFCFCA4000000000000000000000000000000000000
000000000000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC
FCFCFC000000FCFCFCA400000000000000000000000000000000000000000000
0000A4FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC00
0000FCFCFCA4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4FC
FCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFC000000}
Visible = False
end
object ScrollBox1: TScrollBox
Left = 630
Top = 200
@@ -1728,23 +1967,23 @@ object FormPrinc: TFormPrinc
end
object Panel2: TPanel
Left = 8
Top = 32
Top = 80
Width = 609
Height = 497
Height = 449
TabOrder = 11
object SplitterV: TSplitter
Left = 1
Top = 1
Width = 8
Height = 495
Height = 447
Beveled = True
OnMoved = SplitterVMoved
end
object FenRich: TRichEdit
Left = 8
Top = 16
Top = 56
Width = 593
Height = 505
Height = 465
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clYellow
+782 -114
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -1,6 +1,6 @@
object FormTCO: TFormTCO
Left = 195
Top = 62
Left = 4
Top = 99
Width = 1141
Height = 678
VertScrollBar.Visible = False
@@ -81,16 +81,16 @@ object FormTCO: TFormTCO
ParentFont = False
end
object ImageTemp: TImage
Left = 888
Top = 96
Width = 97
Height = 97
Left = 952
Top = 64
Width = 121
Height = 121
end
object ImageTemp2: TImage
Left = 888
Top = 208
Width = 97
Height = 97
Left = 952
Top = 200
Width = 121
Height = 121
end
object ScrollBox: TScrollBox
Left = 8
+79 -25
View File
@@ -450,6 +450,7 @@ procedure grise_ligne_tco;
procedure change_couleur_fond;
function verif_cellule(x,y,Bim : integer) : boolean;
procedure dessine_icones;
procedure echange(var a,b : integer);
implementation
@@ -478,6 +479,7 @@ var fichier : textfile;
end;
begin
//Affiche(GetCurrentDir,clYellow);
{$I+}
try
assign(fichier,'tco.cfg');
@@ -4309,7 +4311,7 @@ end;
// Affiche dans le TCO en x,y un signal à 90° d'après l'image transmise
// x y en coordonnées pixels
procedure Feu_90G(ImageSource : TImage;x,y : integer;FrX,FrY : real);
procedure Feu_90G(ImageSource : TImage;x,y : integer;FrX,FrY : real;inverse : boolean);
var p : array[0..2] of TPoint;
TailleY,TailleX : integer;
begin
@@ -4323,9 +4325,17 @@ begin
p[1].Y:=TailleX; //49;
p[2].X:=0; //0;
p[2].Y:=0; //0;
// copie l'image du signal depuis imagesource vers image temporaire à la même échelle mais retournée à 90°
PlgBlt(PImageTemp.Canvas.Handle,p,ImageSource.Canvas.Handle,0,0,TailleX,TailleY,0,0,0);
if inverse then
begin
inverse_image(FormTCO.ImageTemp2,ImageSource);
// copie l'image du signal depuis imagesource vers image temporaire à la même échelle mais retournée à 90°
PlgBlt(PImageTemp.Canvas.Handle,p,FormTCO.ImageTemp2.Canvas.Handle,0,0,TailleX,TailleY,0,0,0);
end
else
PlgBlt(PImageTemp.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.Handle,x,y,round(TailleY*FrY),round(TailleX*FrX), // destination
PImageTemp.Canvas.Handle,0,0,TailleY,TailleX,clBlue); // source - clblue est la couleur de transparence
@@ -4333,7 +4343,7 @@ begin
end;
// copie de l'image du signal à 90° dans le canvas source et le tourne de 90° et le met dans l'image temporaire
procedure Feu_90D(ImageSource : TImage;x,y : integer ; FrX,FrY : real);
procedure Feu_90D(ImageSource : TImage;x,y : integer ; FrX,FrY : real;inverse : boolean);
var p : array[0..2] of TPoint;
TailleY,TailleX : integer;
begin
@@ -4347,8 +4357,15 @@ begin
p[1].Y:=0;
p[2].X:=TailleY; //90;
p[2].Y:=TailleX; //49;
// copie l'image du signal depuis imagesource vers image temporaire à la même échelle mais retournée à 90°
PlgBlt(PImageTemp.Canvas.Handle,p,ImageSource.Canvas.Handle,0,0,TailleX,TailleY,0,0,0);
if inverse then
begin
inverse_image(FormTCO.ImageTemp2,ImageSource);
// copie l'image du signal depuis imagesource vers image temporaire à la même échelle mais retournée à 90°
PlgBlt(PImageTemp.Canvas.Handle,p,FormTCO.ImageTemp2.Canvas.Handle,0,0,TailleX,TailleY,0,0,0);
end
else
PlgBlt(PImageTemp.Canvas.Handle,p,ImageSource.Canvas.Handle,0,0,TailleX,TailleY,0,0,0);
// et copier l'image avec mise à l'échelle tournée sur le TCO
TransparentBlt(PcanvasTCO.Handle,x,y,round(tailleY*FrY),round(tailleX*FrX),
@@ -4682,6 +4699,7 @@ begin
// if (tco[x-1,y].BImage=12) and (tco[x-1,y].FeuOriente=3) then exit;
end;
}
if (x>NbreCellX) or (y>NbreCellY) or (x<1) or (y<1) then exit;
x0:=(x-1)*LargeurCell;
y0:=(y-1)*HauteurCell;
@@ -4700,12 +4718,13 @@ begin
end;
// Dessine un signal dans le canvasDest en x,y , dont l'adresse se trouve à la cellule x,y
procedure dessin_feu(CanvasDest : Tcanvas;x,y : integer );
var x0,y0,xp,yp,orientation,adresse,aspect,PiedFeu,TailleX,TailleY : integer;
procedure dessin_Signal(CanvasDest : Tcanvas;x,y : integer );
var index,x0,y0,xp,yp,orientation,adresse,aspect,PiedFeu,TailleX,TailleY : integer;
ImageFeu : Timage;
frX,frY : real;
begin
//Efface_Cellule(CanvasDest,x,y,pmCopy);
if (x>NbreCellX) or (y>NbreCellY) or (x<1) or (y<1) then exit;
xp:=(x-1)*LargeurCell;
yp:=(y-1)*HauteurCell;
@@ -4714,7 +4733,8 @@ begin
Orientation:=TCO[x,y].FeuOriente;
if Orientation=0 then Orientation:=1; // cas d'un signal non encore renseigné
aspect:=feux[index_feu(adresse)].aspect;
index:=index_feu(adresse);
aspect:=feux[index].aspect;
if aspect=0 then aspect:=9;
//if aspect>9 then exit;
//Affiche(IntToSTR(i)+' '+intToSTR(aspect),clred);
@@ -4731,6 +4751,7 @@ begin
14 : ImageFeu:=Formprinc.Image4Dir;
15 : ImageFeu:=Formprinc.Image5Dir;
16 : ImageFeu:=Formprinc.Image6Dir;
20 : ImageFeu:=formprinc.ImageSignal20;
else ImageFeu:=Formprinc.Image9feux;
end;
@@ -4745,6 +4766,7 @@ begin
x0:=0;y0:=0; // pour les signaux directionnels
if orientation=3 then //D
begin
if aspect=20 then begin x0:=round(10*frX); y0:=HauteurCell-round(tailleX*frY);end;
if aspect=9 then begin x0:=round(10*frX); y0:=HauteurCell-round(tailleX*frY);end;
if aspect=7 then begin x0:=round(10*frX); y0:=HauteurCell-round(tailleX*frY);end;
if aspect=5 then begin x0:=0; y0:=round((tailleX/2)*frY);end;
@@ -4756,6 +4778,7 @@ begin
// décalage en X pour mettre la tete du signal alignée sur le bord droit de la cellule pour les signaux tournés à 90G
if orientation=2 then
begin
if aspect=20 then begin x0:=0; y0:=0;end;
if aspect=9 then begin x0:=round(10*frX); y0:=HauteurCell-round(tailleX*frY);end;
if aspect=7 then begin x0:=round(10*frX); y0:=HauteurCell-round(tailleX*frY);end;
if aspect=5 then begin x0:=round(10*frX); y0:=round((tailleX/2)*frY);end;
@@ -4767,6 +4790,7 @@ begin
// décalage en X pour rapprocher le signal du le bord droit de la cellule pour les feux verticaux
if orientation=1 then
begin
if aspect=20 then begin x0:=0; y0:=0; end;
if aspect=9 then begin x0:=0; y0:=0; end;
if aspect=7 then begin x0:=0; y0:=0; end;
if aspect=5 then begin x0:=round(13*frx); y0:=0;end;
@@ -4782,11 +4806,22 @@ begin
// affichage du signal et du pied - orientation verticale
if (Orientation=1) then
begin
// copie avec mise à l'échelle de l'image du signal
TransparentBlt(canvasDest.Handle,x0,y0,round(TailleX*frX),round(TailleY*frY),
// si inversion
if feux[index].contrevoie then
begin
inverse_image(FormTCO.ImageTemp,ImageFeu);
// copie avec mise à l'échelle de l'image du signal
TransparentBlt(canvasDest.Handle,x0,y0,round(TailleX*frX),round(TailleY*frY),
FormTCO.ImageTemp.Canvas.Handle,0,0,TailleX,TailleY,clBlue);
end
else
// copie avec mise à l'échelle de l'image du signal
TransparentBlt(canvasDest.Handle,x0,y0,round(TailleX*frX),round(TailleY*frY),
ImageFeu.Canvas.Handle,0,0,TailleX,TailleY,clBlue);
PImageTCO.Picture.Bitmap.Modified:=True; // rafraichit l'affichage sinon le stretchblt n'apparaît pas.
case aspect of
20 : affiche_pied_Vertical5G(x0+round(10*frx),y0+hauteurCell-round(10*fry),frX,frY,piedFeu);
9 : affiche_pied_Vertical9G(x0,y0,frX,frY,piedFeu);
7 : affiche_pied_Vertical7G(x0,y0,frX,frY,piedFeu);
5 : affiche_pied_Vertical5G(x0,y0,frX,frY,piedFeu);
@@ -4799,9 +4834,10 @@ begin
// affichage du feu et du pieds - orientation 90°G
if Orientation=2 then
begin
Feu_90G(ImageFeu,x0,y0,frX,frY); // ici on passe l'origine du signal
Feu_90G(ImageFeu,x0,y0,frX,frY,feux[index].contrevoie); // ici on passe l'origine du signal
// dessiner le pied
case aspect of
20 : affiche_pied5G_90G(x0+2,y0+round(fry*5),frX,frY,piedFeu);
9 : affiche_pied9G_90G(x0,y0,frX,frY,piedFeu);
7 : affiche_pied7G_90G(x0,y0,frX,frY,piedFeu);
5 : affiche_pied5G_90G(x0,y0,frX,frY,piedFeu);
@@ -4814,9 +4850,10 @@ begin
// affichage du signal et du pied - orientation 90°D
if Orientation=3 then
begin
Feu_90D(ImageFeu,x0,y0,frX,frY);
Feu_90D(ImageFeu,x0,y0,frX,frY,feux[index].contrevoie);
// dessiner le pied
case aspect of
20 : affiche_pied5G_90D(x0+(largeurCell div 2)+round(frx*12),y0+(hauteurCell div 2),frX,frY,piedFeu);
9 : affiche_pied9G_90D(x0,y0,frX,frY,piedFeu);
7 : affiche_pied7G_90D(x0,y0,frX,frY,piedFeu);
5 : affiche_pied5G_90D(x0,y0,frX,frY,piedFeu);
@@ -4845,7 +4882,8 @@ end;
// affiche la cellule x et y en cases
// index est utilisé pour accéder au tableau du tracé de la fonction zone_tco
procedure affiche_cellule(x,y : integer);
var i,repr,Xorg,Yorg,xt,yt,mode,adresse,Bimage,aspect,oriente,pied : integer;
var i,index,repr,Xorg,Yorg,xt,yt,mode,adresse,Bimage,aspect,oriente,pied : integer;
inverse : boolean;
s : string;
begin
//if tco[x,y].BImage=0 then exit;
@@ -4891,7 +4929,7 @@ begin
23,31 : dessin_31(PCanvasTCO,X,Y,mode);
24 : dessin_24(PCanvasTCO,X,Y,mode);
25 : dessin_25(PCanvasTCO,X,Y,mode);
30 : dessin_feu(PCanvasTCO,X,Y);
30 : dessin_Signal(PCanvasTCO,X,Y);
end;
PCanvasTCO.font.Size:=(LargeurCell div 10)+4 ;
@@ -5004,10 +5042,29 @@ begin
// adresse des signaux
if (BImage=30) and (adresse<>0) then
begin
aspect:=feux[index_feu(adresse)].Aspect;
index:=index_feu(adresse);
aspect:=feux[index].Aspect;
oriente:=TCO[x,y].FeuOriente;
pied:=TCO[x,y].PiedFeu;
inverse:=feux[index].contrevoie;
xt:=0;yt:=0;
if (aspect=20) and (Oriente=1) then
begin
if inverse then begin xt:=2;yt:=2*HauteurCell-round(16*fryGlob);end
else
begin xt:=(largeurCell div 2)+round(5*frXglob);yt:=2*HauteurCell-round(20*fryGlob); end;
end;
if (aspect=20) and (Oriente=2) then
begin
if inverse then begin xt:=round(20*frxGlob);yt:=round(3*fryGlob);end
else
begin xt:=round(10*frxGlob);yt:=HauteurCell-round(16*fryGlob);end;
end;
if (aspect=20) and (Oriente=3) then
begin
if inverse then begin xt:=largeurCell+round(10*frxGlob);yt:=HauteurCell-round(16*fryGlob);end
else begin xt:=largeurCell+round(10*frxGlob);yt:=round(1*fryGlob);end;
end;
if (aspect=9) and (Oriente=1) then begin xt:=LargeurCell-round(25*frXGlob);yt:=2*HauteurCell-round(25*fryGlob);end;
if (aspect=9) and (Oriente=2) then begin xt:=round(10*frXGlob);yt:=HauteurCell-round(17*frYGlob);end; // orientation G
if (aspect=9) and (Oriente=3) then begin xt:=LargeurCell+round(25*frXglob);yt:=1;end;
@@ -5028,9 +5085,9 @@ begin
if (aspect=2) and (Oriente=1) and (pied=1) then begin xt:=round(45*frXglob);yt:=1;end; // signal à gauche
if (aspect=2) and (Oriente=2) then begin xt:=round(10*frXGlob);yt:=HauteurCell;end; // orientation G
if (aspect=2) and (Oriente=3) then begin xt:=round(10*frXGlob);yt:=HauteurCell;end; // orientation D
if (aspect>10) and (oriente=1) then begin xt:=1;yt:=HauteurCell-round(14*frYGlob);end;
if (aspect>10) and (oriente=2) then begin xt:=LargeurCell-round(15*frXGlob);yt:=0;end;
if (aspect>10) and (oriente=3) then begin xt:=LargeurCell-round(15*frXGlob);yt:=0;end;
if (aspect>10) and (aspect<20) and(oriente=1) then begin xt:=1;yt:=HauteurCell-round(14*frYGlob);end;
if (aspect>10) and (aspect<20) and (oriente=2) then begin xt:=LargeurCell-round(15*frXGlob);yt:=0;end;
if (aspect>10) and (aspect<20) and (oriente=3) then begin xt:=LargeurCell-round(15*frXGlob);yt:=0;end;
with PCanvasTCO do
begin
@@ -6104,7 +6161,6 @@ begin
trackBarZoom.Position:=(ZoomMax+Zoommin) div 2;
ScrollBox.Width:=clientWidth-80;
//ScrollBox.Width:=clientWidth-200;
if MasqueBandeauTCO then
begin
ButtonAfficheBandeau.visible:=true;
@@ -8032,7 +8088,7 @@ begin
tco[XClicCell,YClicCell].y:=0;
// ne pas convertir l'adresse sinon evt changement du composant et on écrase l'aspect EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
Dessin_feu(ImageTCO.Canvas,XClicCell,YClicCell);
Dessin_Signal(ImageTCO.Canvas,XClicCell,YClicCell);
end;
@@ -8136,7 +8192,6 @@ begin
end;
tco[XClicCell,YClicCell].FeuOriente:=3; // feu orienté à 90° droit
//dessin_feu(PCanvasTCO,XclicCell,YClicCell);
Affiche_TCO;
actualise; // met à jour la fenetre de config de la cellule
end;
@@ -8185,7 +8240,6 @@ begin
end;
tco[XClicCell,YClicCell].FeuOriente:=1; // signal orienté à 180°
//dessin_feu(PCanvasTCO,XclicCell,YClicCell);
affiche_tco;
actualise; // met à jour la fenetre de config de la cellule
end;
@@ -8368,7 +8422,7 @@ begin
efface_entoure;
SelectionAffichee:=false;
if feux[i].aspect>10 then
if (feux[i].aspect>10) and (feux[i].aspect<20) then
begin
GroupBox1.Visible:=false;
GroupBox2.Visible:=false;
@@ -8381,7 +8435,7 @@ begin
LabelNbFeux.Visible:=False;
EditNbreFeux.Visible:=false;
GroupBox1.Visible:=true;
GroupBox2.Visible:=true;
if (feux[i].aspect<20) then GroupBox2.Visible:=true else GroupBox2.Visible:=false;
end;
end;
end;
+1 -1
View File
@@ -24,7 +24,7 @@ var
Lance_verif : integer;
verifVersion,notificationVersion : boolean;
Const Version='6.3'; // sert à la comparaison de la version publiée
Const Version='7.0'; // 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;
+1
View File
@@ -170,6 +170,7 @@ version 6.1 : Am
version 6.2 : Déplacement du curseur du TCO avec les touches curseur.
Dessin du TCO à la souris.
version 6.3 : Choix du graphisme du TCO en lignes brisées ou courbes.
version 7.0 : Gestion des signaux belges (avec chevron et réduction de vitesse).