V3.2
This commit is contained in:
Binary file not shown.
+26
-16
@@ -1,6 +1,6 @@
|
||||
object FormConfig: TFormConfig
|
||||
Left = 277
|
||||
Top = 203
|
||||
Left = 291
|
||||
Top = 218
|
||||
Hint =
|
||||
'Modifie les fichiers de configuration selon les s'#233'lections chois' +
|
||||
'ies'
|
||||
@@ -958,8 +958,8 @@ object FormConfig: TFormConfig
|
||||
ParentFont = False
|
||||
end
|
||||
object ImageAig: TImage
|
||||
Left = 648
|
||||
Top = 312
|
||||
Left = 736
|
||||
Top = 432
|
||||
Width = 137
|
||||
Height = 57
|
||||
Picture.Data = {
|
||||
@@ -1230,8 +1230,8 @@ object FormConfig: TFormConfig
|
||||
Visible = False
|
||||
end
|
||||
object ImageTJD: TImage
|
||||
Left = 760
|
||||
Top = 320
|
||||
Left = 744
|
||||
Top = 416
|
||||
Width = 137
|
||||
Height = 57
|
||||
Picture.Data = {
|
||||
@@ -1366,8 +1366,8 @@ object FormConfig: TFormConfig
|
||||
Visible = False
|
||||
end
|
||||
object ImageTri: TImage
|
||||
Left = 648
|
||||
Top = 336
|
||||
Left = 744
|
||||
Top = 432
|
||||
Width = 145
|
||||
Height = 65
|
||||
Picture.Data = {
|
||||
@@ -1537,8 +1537,8 @@ object FormConfig: TFormConfig
|
||||
Caption = 'Verrouillable au carr'#233' :'
|
||||
end
|
||||
object Image2: TImage
|
||||
Left = 760
|
||||
Top = 352
|
||||
Left = 768
|
||||
Top = 440
|
||||
Width = 129
|
||||
Height = 41
|
||||
Picture.Data = {
|
||||
@@ -1745,6 +1745,16 @@ object FormConfig: TFormConfig
|
||||
Height = 13
|
||||
Caption = #224
|
||||
end
|
||||
object Label20: TLabel
|
||||
Left = 648
|
||||
Top = 312
|
||||
Width = 208
|
||||
Height = 39
|
||||
Caption =
|
||||
'Tous les param'#232'tres doivent '#234'tre valid'#233's en appuyant sur la touc' +
|
||||
'he ENTREE apr'#232's leur introduction/modification'
|
||||
WordWrap = True
|
||||
end
|
||||
object ButtonAppliquerEtFermer: TButton
|
||||
Left = 384
|
||||
Top = 472
|
||||
@@ -1770,7 +1780,7 @@ object FormConfig: TFormConfig
|
||||
Top = 8
|
||||
Width = 633
|
||||
Height = 457
|
||||
ActivePage = TabSheetSig
|
||||
ActivePage = TabSheetAutonome
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -11
|
||||
@@ -2425,7 +2435,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object GroupBox10: TGroupBox
|
||||
Left = 8
|
||||
Top = 88
|
||||
Top = 80
|
||||
Width = 273
|
||||
Height = 73
|
||||
Caption = 'Vitesse de franchissement d'#233'vi'#233' :'
|
||||
@@ -2460,7 +2470,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object CheckInverse: TCheckBox
|
||||
Left = 16
|
||||
Top = 269
|
||||
Top = 261
|
||||
Width = 137
|
||||
Height = 17
|
||||
Hint = 'Cocher si l'#39'aiguillage est invers'#233' dans CDM rail'
|
||||
@@ -2480,7 +2490,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object ComboBoxAig: TComboBox
|
||||
Left = 8
|
||||
Top = 64
|
||||
Top = 48
|
||||
Width = 145
|
||||
Height = 21
|
||||
ItemHeight = 13
|
||||
@@ -2495,7 +2505,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object GroupBox16: TGroupBox
|
||||
Left = 8
|
||||
Top = 168
|
||||
Top = 160
|
||||
Width = 273
|
||||
Height = 97
|
||||
Caption = 'Repr'#233'sentation'
|
||||
@@ -2683,7 +2693,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object ButtonRestaureAig: TButton
|
||||
Left = 200
|
||||
Top = 56
|
||||
Top = 48
|
||||
Width = 75
|
||||
Height = 25
|
||||
Hint =
|
||||
|
||||
+228
-188
@@ -4,7 +4,7 @@ interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg, ComCtrls ,StrUtils ;
|
||||
Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg, ComCtrls ,StrUtils, Unitprinc ;
|
||||
|
||||
type
|
||||
TFormConfig = class(TForm)
|
||||
@@ -230,6 +230,7 @@ type
|
||||
LabelL: TLabel;
|
||||
EditL: TEdit;
|
||||
CheckBoxFB: TCheckBox;
|
||||
Label20: TLabel;
|
||||
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
@@ -372,7 +373,7 @@ function compile_branche(s : string;i : integer) : boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses UnitDebug,UnitPrinc, UnitTCO;
|
||||
uses UnitDebug, UnitTCO;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
@@ -413,7 +414,7 @@ var s : string;
|
||||
begin
|
||||
s:='@='+inttostr(feux[i].Adresse)+' Decodeur='+intToSTR(feux[i].Decodeur)+' Adresse détecteur associé='+intToSTR(feux[i].Adr_det1)+
|
||||
' Adresse élement suivant='+intToSTR(feux[i].Adr_el_suiv1);
|
||||
if feux[i].Btype_suiv1=2 then s:=s+' (aig)';
|
||||
if feux[i].Btype_suiv1=aig then s:=s+' (aig)';
|
||||
feux[i].Img.Hint:=s;
|
||||
end;
|
||||
|
||||
@@ -578,19 +579,19 @@ end;
|
||||
function encode_aig(index : integer): string;
|
||||
var s : string;
|
||||
c : char;
|
||||
tjd,tjs,tri : boolean;
|
||||
tjdC,tjsC,triC : boolean;
|
||||
begin
|
||||
if index=0 then exit;
|
||||
s:=IntToSTR(aiguillage[index].Adresse);
|
||||
tjd:=aiguillage[index].modele=2;
|
||||
tjs:=aiguillage[index].modele=3;
|
||||
tri:=aiguillage[index].modele=4;
|
||||
if tjd then s:=s+'TJD';
|
||||
if tjs then s:=s+'TJS';
|
||||
if tri then begin s:=s+'TRI,';s:=s+intToSTR(aiguillage[index].AdrTriple);end;
|
||||
tjdC:=aiguillage[index].modele=tjd;
|
||||
tjsC:=aiguillage[index].modele=tjs;
|
||||
triC:=aiguillage[index].modele=triple;
|
||||
if tjdC then s:=s+'TJD';
|
||||
if tjsC then s:=s+'TJS';
|
||||
if triC then begin s:=s+'TRI,';s:=s+intToSTR(aiguillage[index].AdrTriple);end;
|
||||
s:=s+',';
|
||||
// aiguillage normal ou triple
|
||||
if not(tjd) and not(tjs) then
|
||||
if not(tjdC) and not(tjsC) then
|
||||
begin
|
||||
// P
|
||||
s:=s+'P';s:=s+intToSTR(aiguillage[index].Apointe);
|
||||
@@ -608,7 +609,7 @@ begin
|
||||
if (c<>'Z') and (c<>#0) then s:=s+c;
|
||||
//if c=#0 then s:=s+'Z';
|
||||
// S2 aiguillage triple
|
||||
if tri then
|
||||
if triC then
|
||||
begin
|
||||
s:=s+',S2-';
|
||||
s:=s+intToSTR(aiguillage[index].Adevie2);
|
||||
@@ -619,7 +620,7 @@ begin
|
||||
end;
|
||||
|
||||
// tjd / s
|
||||
if tjd or tjs then
|
||||
if tjdC or tjsC then
|
||||
begin
|
||||
s:=s+'D('+intToSTR(aiguillage[index].Adroit);
|
||||
c:=aiguillage[index].AdroitB;if c<>'Z' then s:=s+c;
|
||||
@@ -629,7 +630,7 @@ begin
|
||||
s:=s+','+intToSTR(aiguillage[index].DDevie)+aiguillage[index].DDevieB+')';
|
||||
end;
|
||||
|
||||
if tjs then
|
||||
if tjsC then
|
||||
begin
|
||||
s:=s+',L'+intToSTR(aiguillage[index].Tjsint)+aiguillage[index].TjsintB;
|
||||
end;
|
||||
@@ -746,11 +747,12 @@ begin
|
||||
encode_aig_gfx:=s;
|
||||
end;
|
||||
|
||||
function TypeEl_to_char(i : integer) : string;
|
||||
// renvoie un A si BT est un aiguillage
|
||||
function TypeEl_to_char(BT : TEquipement) : string;
|
||||
begin
|
||||
case i of // 1=détecteur 2=aig ou TJD ou TJS 4=tri
|
||||
1 : TypeEl_to_char:='';
|
||||
2,3,4 : TypeEl_to_char:='A';
|
||||
case BT of // 1=détecteur 2=aig ou TJD ou TJS 4=tri
|
||||
det : TypeEl_to_char:='';
|
||||
aig,tjd,tjs,triple : TypeEl_to_char:='A';
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -913,7 +915,7 @@ begin
|
||||
val(s,Feux[i].decodeur,erreur);
|
||||
if j<>0 then delete(s,1,j);
|
||||
feux[i].Adr_el_suiv1:=0;feux[i].Adr_el_suiv2:=0;feux[i].Adr_el_suiv3:=0;feux[i].Adr_el_suiv4:=0;
|
||||
feux[i].Btype_Suiv1:=0;feux[i].Btype_Suiv2:=0;feux[i].Btype_Suiv3:=0;feux[i].Btype_Suiv4:=0;
|
||||
feux[i].Btype_Suiv1:=rien;feux[i].Btype_Suiv2:=rien;feux[i].Btype_Suiv3:=rien;feux[i].Btype_Suiv4:=rien;
|
||||
feux[i].Adr_det1:=0;feux[i].Adr_det2:=0;feux[i].Adr_det3:=0;feux[i].Adr_det4:=0;
|
||||
// éléments optionnels des voies supplémentaires
|
||||
if j<>0 then
|
||||
@@ -940,35 +942,20 @@ begin
|
||||
if (j=3) then feux[i].Adr_det3:=adr;
|
||||
if (j=4) then feux[i].Adr_det4:=adr;
|
||||
//type de l'élément suivant (1=détecteur 2=aig ou TJD ou TJS 4=tri
|
||||
t:=0;
|
||||
if s[1]='A' then
|
||||
begin
|
||||
t:=2;
|
||||
//Affiche('détecté aiguillage',clyellow);
|
||||
if (j=1) then feux[i].Btype_Suiv1:=2;
|
||||
if (j=2) then feux[i].Btype_Suiv2:=2;
|
||||
if (j=3) then feux[i].Btype_Suiv3:=2;
|
||||
if (j=4) then feux[i].Btype_Suiv4:=2;
|
||||
if (j=1) then feux[i].Btype_Suiv1:=aig;
|
||||
if (j=2) then feux[i].Btype_Suiv2:=aig;
|
||||
if (j=3) then feux[i].Btype_Suiv3:=aig;
|
||||
if (j=4) then feux[i].Btype_Suiv4:=aig;
|
||||
delete(s,1,1);
|
||||
end;
|
||||
l:=pos('TRI',s);
|
||||
if l<>0 then
|
||||
begin
|
||||
t:=4;
|
||||
delete(s,l,3);
|
||||
//Affiche('détecté aiguillage tri',clyellow);
|
||||
if (j=1) then feux[i].Btype_Suiv1:=4;
|
||||
if (j=2) then feux[i].Btype_Suiv2:=4;
|
||||
if (j=3) then feux[i].Btype_Suiv3:=4;
|
||||
if (j=4) then feux[i].Btype_Suiv4:=4;
|
||||
end;
|
||||
|
||||
if t=0 then //détecteur
|
||||
begin
|
||||
if (j=1) then feux[i].Btype_Suiv1:=1;
|
||||
if (j=2) then feux[i].Btype_Suiv2:=1;
|
||||
if (j=3) then feux[i].Btype_Suiv3:=1;
|
||||
if (j=4) then feux[i].Btype_Suiv4:=1;
|
||||
end
|
||||
else
|
||||
begin // détecteur
|
||||
if (j=1) then feux[i].Btype_Suiv1:=det;
|
||||
if (j=2) then feux[i].Btype_Suiv2:=det;
|
||||
if (j=3) then feux[i].Btype_Suiv3:=det;
|
||||
if (j=4) then feux[i].Btype_Suiv4:=det;
|
||||
end;
|
||||
Val(s,adr,erreur);
|
||||
//Affiche('Adr='+IntToSTR(Adr),clyellow);
|
||||
@@ -1001,7 +988,7 @@ begin
|
||||
Delete(S,1,k);
|
||||
Val(s,k,erreur);
|
||||
Feux[i].UniSemaf:=k;
|
||||
erreur:=verif_UniSemaf(i,k);
|
||||
erreur:=verif_UniSemaf(adresse,k);
|
||||
if erreur=1 then begin Affiche('Ligne '+chaine_signal,clred);Affiche('Erreur code Unisemaf',clred);end;
|
||||
if erreur=2 then
|
||||
begin
|
||||
@@ -2277,8 +2264,9 @@ end;
|
||||
|
||||
// on change la valeur de la description de la déviation de l'aiguillage
|
||||
procedure TFormConfig.EditDevie_HDKeyPress(Sender: TObject; var Key: Char);
|
||||
var AdrAig,adr,adr2,erreur,index,modele : integer;
|
||||
var AdrAig,adr,adr2,erreur,index : integer;
|
||||
b : char;
|
||||
modele:Tequipement;
|
||||
s : string;
|
||||
begin
|
||||
// cliqué sur le edit dévié aiguillage
|
||||
@@ -2298,7 +2286,7 @@ begin
|
||||
if index=0 then exit;
|
||||
modele:=aiguillage[index].modele;
|
||||
|
||||
if (modele=1) or (modele=4) then
|
||||
if (modele=aig) or (modele=triple) then
|
||||
begin
|
||||
if ((B='S') or (B='P') or (B='D') or (B=#0) or (b='Z')) and (s<>'') then
|
||||
begin
|
||||
@@ -2320,7 +2308,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
if (modele=2) or (modele=3) then
|
||||
if (modele=tjd) or (modele=tjs) then
|
||||
begin
|
||||
// TJD/TJS
|
||||
adr2:=aiguillage[index].DDroit; // adresse homologue
|
||||
@@ -2338,8 +2326,9 @@ end;
|
||||
|
||||
// on change la valeur de la description du droit de l'aiguillage
|
||||
procedure TFormConfig.EditDroit_BDKeyPress(Sender: TObject; var Key: Char);
|
||||
var AdrAig,adr,erreur,index,modele,adr2 : integer;
|
||||
var AdrAig,adr,erreur,index,adr2 : integer;
|
||||
b : char;
|
||||
modele: TEquipement;
|
||||
s : string;
|
||||
begin
|
||||
// cliqué sur le edit droit aiguillage
|
||||
@@ -2358,7 +2347,7 @@ begin
|
||||
Index:=Index_Aig(AdrAig);
|
||||
if index=0 then exit;
|
||||
modele:=aiguillage[index].modele;
|
||||
if (modele=1) or (modele=4) then
|
||||
if (modele=aig) or (modele=triple) then
|
||||
begin
|
||||
if ((B='S') or (B='P') or (B='D') or (B=#0) or (b='Z')) and (s<>'') then
|
||||
begin
|
||||
@@ -2378,7 +2367,7 @@ begin
|
||||
LabelInfo.caption:='Erreur droit aiguillage '+intToSTR(AdrAig);
|
||||
end;
|
||||
end;
|
||||
if (modele=2) or (modele=3) then
|
||||
if (modele=tjd) or (modele=tjs) then
|
||||
begin
|
||||
// TJD/TJS
|
||||
adr2:=aiguillage[index].DDroit; // adresse homologue
|
||||
@@ -2398,7 +2387,7 @@ procedure TFormConfig.EditPointe_BGKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
var AdrAig,adr,erreur,index : integer;
|
||||
b : char;
|
||||
normal,tjd,tjs,tri : boolean;
|
||||
normal,tjdC,tjsC,triC : boolean;
|
||||
s : string;
|
||||
begin
|
||||
// cliqué sur le edit pointe aiguillage
|
||||
@@ -2419,17 +2408,17 @@ begin
|
||||
begin
|
||||
RE_ColorLine(RichAig,ligneclicAig,ClWhite);
|
||||
Index:=Index_Aig(AdrAig);
|
||||
normal:=aiguillage[index].modele=1;
|
||||
tjd:=aiguillage[index].modele=2;
|
||||
tjs:=aiguillage[index].modele=3;
|
||||
tri:=aiguillage[index].modele=4;
|
||||
normal:=aiguillage[index].modele=aig;
|
||||
tjdC:=aiguillage[index].modele=tjd;
|
||||
tjsC:=aiguillage[index].modele=tjs;
|
||||
triC:=aiguillage[index].modele=triple;
|
||||
|
||||
Aiguillage[index].modifie:=true;
|
||||
LabelInfo.caption:='';
|
||||
// modifier la base de données de l'aiguillage
|
||||
if b=#0 then b:='Z';
|
||||
|
||||
if normal or tri then
|
||||
if normal or triC then
|
||||
begin
|
||||
Aiguillage[index].APointe:=adr;
|
||||
Aiguillage[index].APointeB:=B;
|
||||
@@ -2437,7 +2426,7 @@ begin
|
||||
s:=encode_aig(index);
|
||||
formconfig.RichAig.Lines[ligneclicAig]:=s;
|
||||
end;
|
||||
if tjd or tjs then
|
||||
if tjdC or tjsC then
|
||||
begin
|
||||
Aiguillage[index].ADevie:=adr;
|
||||
Aiguillage[index].ADevieB:=B;
|
||||
@@ -2621,15 +2610,14 @@ var s : string;
|
||||
i,erreur : integer;
|
||||
begin
|
||||
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||
s:=RichSig.Lines[ligneClicSig];
|
||||
if affevt then Affiche('Evt Détecteur 1',clOrange);
|
||||
if affevt then Affiche('Evt detecteur 1',clOrange);
|
||||
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
with Formconfig do
|
||||
begin
|
||||
s:=EditDet1.Text;
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then begin LabelInfo.caption:='Erreur détecteur1 ';exit;end;
|
||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur1 ';exit;end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_det1:=i;
|
||||
maj_hint_feu(ligneClicSig+1);
|
||||
@@ -2642,32 +2630,40 @@ end;
|
||||
procedure TFormConfig.EditSuiv1KeyPress(Sender: TObject; var Key: Char);
|
||||
var s : string;
|
||||
i,erreur : integer;
|
||||
bt : Tequipement;
|
||||
begin
|
||||
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||
if affevt then Affiche('Evt suivant1',clOrange);
|
||||
if affevt then Affiche('Evt Element suivant1',clOrange);
|
||||
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
with Formconfig do
|
||||
begin
|
||||
s:=EditSuiv1.Text;
|
||||
if s='' then begin LabelInfo.caption:='Erreur élément suivant 1';exit;end;
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then
|
||||
if s<>'' then
|
||||
begin
|
||||
if (s[erreur]='A') and (erreur=1) then
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then
|
||||
begin
|
||||
feux[ligneClicSig+1].Btype_suiv1:=2; // type de l'élément suivant (1=détecteur 2=aig ou TJD ou TJS 4=tri
|
||||
delete(s,erreur,1);
|
||||
Val(s,i,erreur);
|
||||
if (s[erreur]='A') and (erreur=1) then
|
||||
begin
|
||||
bt:=aig;
|
||||
delete(s,erreur,1);
|
||||
Val(s,i,erreur);
|
||||
end
|
||||
else begin LabelInfo.caption:='Erreur élément suivant 1';exit;end;
|
||||
end
|
||||
else begin LabelInfo.caption:='Erreur élément suivant 1';exit;end;
|
||||
else bt:=det;
|
||||
end
|
||||
else feux[ligneClicSig+1].Btype_suiv1:=1;
|
||||
|
||||
else
|
||||
begin
|
||||
i:=0;
|
||||
bt:=rien;
|
||||
end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_el_suiv1:=i;
|
||||
feux[ligneClicSig+1].Btype_suiv1:=bt;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
RichSig.Lines[ligneClicSig]:=s;
|
||||
maj_hint_feu(ligneClicSig+1);
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -2682,9 +2678,8 @@ begin
|
||||
with Formconfig do
|
||||
begin
|
||||
s:=EditDet2.Text;
|
||||
if s='' then exit;
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then begin LabelInfo.caption:='Erreur détecteur2 ';exit;end;
|
||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur2 ';exit;end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_det2:=i;
|
||||
maj_hint_feu(ligneClicSig+1);
|
||||
@@ -2727,6 +2722,7 @@ end;
|
||||
procedure TFormConfig.EditSuiv2KeyPress(Sender: TObject; var Key: Char);
|
||||
var s : string;
|
||||
erreur,i: integer;
|
||||
bt : Tequipement;
|
||||
begin
|
||||
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||
if affevt then Affiche('Evt Element suivant2',clOrange);
|
||||
@@ -2735,22 +2731,29 @@ begin
|
||||
with Formconfig do
|
||||
begin
|
||||
s:=EditSuiv2.Text;
|
||||
if s='' then begin LabelInfo.caption:='Erreur élément suivant 2';exit;end;
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then
|
||||
if s<>'' then
|
||||
begin
|
||||
if (s[erreur]='A') and (erreur=1) then
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then
|
||||
begin
|
||||
feux[ligneClicSig+1].Btype_suiv2:=2; // type de l'élément suivant (1=détecteur 2=aig ou TJD ou TJS 4=tri
|
||||
delete(s,erreur,1);
|
||||
Val(s,i,erreur);
|
||||
if (s[erreur]='A') and (erreur=1) then
|
||||
begin
|
||||
bt:=aig;
|
||||
delete(s,erreur,1);
|
||||
Val(s,i,erreur);
|
||||
end
|
||||
else begin LabelInfo.caption:='Erreur élément suivant 2';exit;end;
|
||||
end
|
||||
else begin LabelInfo.caption:='Erreur élément suivant 2';exit;end;
|
||||
else bt:=det;
|
||||
end
|
||||
else feux[ligneClicSig+1].Btype_suiv2:=1;
|
||||
|
||||
else
|
||||
begin
|
||||
i:=0;
|
||||
bt:=rien;
|
||||
end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_el_suiv2:=i;
|
||||
feux[ligneClicSig+1].Btype_suiv2:=bt;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
RichSig.Lines[ligneClicSig]:=s;
|
||||
end;
|
||||
@@ -2760,15 +2763,16 @@ end;
|
||||
procedure TFormConfig.EditDet3KeyPress(Sender: TObject; var Key: Char);
|
||||
var s : string;
|
||||
i,erreur : integer;
|
||||
begin
|
||||
begin
|
||||
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||
if affevt then Affiche('Evt Detecteur 3',clOrange);
|
||||
if affevt then Affiche('Evt detecteur 3',clOrange);
|
||||
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
with Formconfig do
|
||||
begin
|
||||
s:=EditDet3.Text;
|
||||
if s='' then exit;
|
||||
Val(s,i,erreur);if erreur<>0 then begin LabelInfo.caption:='Erreur détecteur3 ';exit;end;
|
||||
Val(s,i,erreur);
|
||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur3 ';exit;end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_det3:=i;
|
||||
maj_hint_feu(ligneClicSig+1);
|
||||
@@ -2781,29 +2785,38 @@ end;
|
||||
procedure TFormConfig.EditSuiv3KeyPress(Sender: TObject; var Key: Char);
|
||||
var s : string;
|
||||
erreur,i : integer;
|
||||
bt : Tequipement;
|
||||
begin
|
||||
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||
|
||||
if affevt then Affiche('Evt Element suivant3',clOrange);
|
||||
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
with Formconfig do
|
||||
begin
|
||||
s:=EditSuiv3.Text;
|
||||
if s='' then begin LabelInfo.caption:='Erreur élément suivant 3';exit;end;
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then
|
||||
if s<>'' then
|
||||
begin
|
||||
if (s[erreur]='A') and (erreur=1) then
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then
|
||||
begin
|
||||
feux[ligneClicSig+1].Btype_suiv3:=2; // type de l'élément suivant (1=détecteur 2=aig ou TJD ou TJS 4=tri
|
||||
delete(s,erreur,1);
|
||||
Val(s,i,erreur);
|
||||
if (s[erreur]='A') and (erreur=1) then
|
||||
begin
|
||||
bt:=aig;
|
||||
delete(s,erreur,1);
|
||||
Val(s,i,erreur);
|
||||
end
|
||||
else begin LabelInfo.caption:='Erreur élément suivant 3';exit;end;
|
||||
end
|
||||
else begin LabelInfo.caption:='Erreur élément suivant 3';exit;end;
|
||||
else bt:=det;
|
||||
end
|
||||
else feux[ligneClicSig+1].Btype_suiv3:=1;
|
||||
|
||||
else
|
||||
begin
|
||||
i:=0;
|
||||
bt:=rien;
|
||||
end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_el_suiv3:=i;
|
||||
feux[ligneClicSig+1].Btype_suiv3:=bt;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
RichSig.Lines[ligneClicSig]:=s;
|
||||
end;
|
||||
@@ -2814,13 +2827,14 @@ var s : string;
|
||||
i,erreur : integer;
|
||||
begin
|
||||
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||
|
||||
if affevt then Affiche('Evt detecteur 4',clOrange);
|
||||
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
with Formconfig do
|
||||
begin
|
||||
s:=EditDet4.Text;
|
||||
if s='' then exit;
|
||||
Val(s,i,erreur);if erreur<>0 then begin LabelInfo.caption:='Erreur détecteur4 ';exit;end;
|
||||
Val(s,i,erreur);
|
||||
if (s<>'') and (erreur<>0) then begin LabelInfo.caption:='Erreur détecteur4 ';exit;end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_det4:=i;
|
||||
maj_hint_feu(ligneClicSig+1);
|
||||
@@ -2833,29 +2847,38 @@ end;
|
||||
procedure TFormConfig.EditSuiv4KeyPress(Sender: TObject; var Key: Char);
|
||||
var s : string;
|
||||
erreur,i : integer;
|
||||
bt : Tequipement;
|
||||
begin
|
||||
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||
|
||||
if affevt then Affiche('Evt Element suivant4',clOrange);
|
||||
|
||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||
with Formconfig do
|
||||
begin
|
||||
s:=EditSuiv4.Text;
|
||||
if s='' then begin LabelInfo.caption:='Erreur élément suivant 4';exit;end;
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then
|
||||
if s<>'' then
|
||||
begin
|
||||
if (s[erreur]='A') and (erreur=1) then
|
||||
Val(s,i,erreur);
|
||||
if erreur<>0 then
|
||||
begin
|
||||
feux[ligneClicSig+1].Btype_suiv4:=2; // type de l'élément suivant (1=détecteur 2=aig ou TJD ou TJS 4=tri
|
||||
delete(s,erreur,1);
|
||||
Val(s,i,erreur);
|
||||
if (s[erreur]='A') and (erreur=1) then
|
||||
begin
|
||||
bt:=aig;
|
||||
delete(s,erreur,1);
|
||||
Val(s,i,erreur);
|
||||
end
|
||||
else begin LabelInfo.caption:='Erreur élément suivant 4';exit;end;
|
||||
end
|
||||
else begin LabelInfo.caption:='Erreur élément suivant 4';exit;end;
|
||||
else bt:=det;
|
||||
end
|
||||
else feux[ligneClicSig+1].Btype_suiv1:=1;
|
||||
|
||||
else
|
||||
begin
|
||||
i:=0;
|
||||
bt:=rien;
|
||||
end;
|
||||
LabelInfo.caption:=' ';
|
||||
feux[ligneClicSig+1].Adr_el_suiv4:=i;
|
||||
feux[ligneClicSig+1].Btype_suiv4:=bt;
|
||||
s:=encode_sig_feux(ligneClicSig+1);
|
||||
RichSig.Lines[ligneClicSig]:=s;
|
||||
end;
|
||||
@@ -3090,7 +3113,8 @@ end;
|
||||
|
||||
procedure TFormConfig.EditAdrAigKeyPress(Sender: TObject; var Key: Char);
|
||||
var s : string;
|
||||
i,vide,erreur,index,adr2,modele : integer;
|
||||
i,vide,erreur,index,adr2 : integer;
|
||||
modele: TEquipement;
|
||||
c : char;
|
||||
begin
|
||||
if clicliste or (ord(Key)<>VK_RETURN) then exit;
|
||||
@@ -3110,11 +3134,11 @@ begin
|
||||
|
||||
modele:=aiguillage[index].modele;
|
||||
// si normal ou triple
|
||||
if (modele=1) or (modele=4) then
|
||||
if (modele=aig) or (modele=triple) then
|
||||
begin
|
||||
if (erreur<>0) or (i>MaxAcc) then begin LabelInfo.caption:='Erreur adresse aiguillage ';exit;end;
|
||||
// vérifier si l'adresse de l'aiguillage existe déja
|
||||
if (aiguillage[Index_Aig(i)].modele<>0) then
|
||||
if (aiguillage[Index_Aig(i)].modele<>rien) then
|
||||
begin
|
||||
EditAdrAig.Color:=clred;
|
||||
LabelInfo.caption:='aiguillage '+IntToSTR(i)+' existe déja - ne sera pas écrasé' ;
|
||||
@@ -3128,7 +3152,7 @@ begin
|
||||
aiguillage[index].modifie:=true;
|
||||
formconfig.RichAig.Lines[ligneclicAig]:=s;
|
||||
end;
|
||||
if (modele=2) or (modele=3) then
|
||||
if (modele=tjd) or (modele=tjs) then
|
||||
begin
|
||||
clicListe:=true;
|
||||
// modifier les champs P1 et P2 avec la nouvelle adresse
|
||||
@@ -3854,7 +3878,8 @@ end;
|
||||
|
||||
|
||||
function verif_coherence : boolean;
|
||||
var i,j,k,l,aig,adr,adr2,detect,modele,condcarre,nc : integer;
|
||||
var i,j,k,l,Indexaig,adr,adr2,detect,condcarre,nc : integer;
|
||||
modAig,model,km: TEquipement;
|
||||
ok : boolean;
|
||||
begin
|
||||
// vérification de la cohérence1
|
||||
@@ -3865,91 +3890,91 @@ begin
|
||||
j:=1;
|
||||
repeat
|
||||
detect:=BrancheN[i][j].Adresse;
|
||||
modele:=BrancheN[i][j].BType; // 1= détecteur 2= aiguillage 4=Buttoir
|
||||
if (modele=2) then
|
||||
model:=BrancheN[i][j].BType; // 1= détecteur 2= aiguillage 4=Buttoir
|
||||
if (model=aig) then
|
||||
begin
|
||||
//affiche('trouvé aig '+intToSTR(detect),clyellow);
|
||||
modele:=aiguillage[Index_Aig(detect)].modele;
|
||||
if (modele=0) then
|
||||
modAig:=aiguillage[Index_Aig(detect)].modele;
|
||||
if (model=rien) then
|
||||
begin
|
||||
Affiche('Erreur 1: Aiguillage '+intToStr(detect)+' non décrit mais présent en branche '+intToStr(i)+' pos. '+intToSTR(j),clred);
|
||||
ok:=false;
|
||||
end;
|
||||
end;
|
||||
j:=j+1;
|
||||
until((modele=0) and (detect=0));
|
||||
until((model=rien) and (detect=0));
|
||||
end;
|
||||
|
||||
// vérification de la cohérence2
|
||||
// parcoure les aiguillages pour voir si les détecteurs sont en branches des détecteurs
|
||||
// et les tjd pour voir si pb de cohérence
|
||||
for aig:=1 to maxaiguillage do
|
||||
for Indexaig:=1 to maxaiguillage do
|
||||
begin
|
||||
// tjd ou tjs
|
||||
if (aiguillage[aig].modele=2) or (aiguillage[aig].modele=3) then
|
||||
if (aiguillage[Indexaig].modele=tjd) or (aiguillage[Indexaig].modele=tjs) then
|
||||
begin
|
||||
if aiguillage[aig].Ddroit<>aiguillage[aig].Ddevie then
|
||||
if aiguillage[Indexaig].Ddroit<>aiguillage[Indexaig].Ddevie then
|
||||
begin
|
||||
Affiche('Erreur 7: la TJD/S '+IntToStr(aig)+' a des adresses de destination différentes ('+intToSTR(aiguillage[aig].Ddroit)+' et '+intToSTR(aiguillage[aig].Ddevie)+')',clred);
|
||||
Affiche('Erreur 7: la TJD/S '+IntToStr(Indexaig)+' a des adresses de destination différentes ('+intToSTR(aiguillage[Indexaig].Ddroit)+' et '+intToSTR(aiguillage[Indexaig].Ddevie)+')',clred);
|
||||
ok:=false;
|
||||
end;
|
||||
// vérifier si son homologue est une tjd
|
||||
adr2:=aiguillage[aig].Ddroit;
|
||||
if (aiguillage[Index_Aig(adr2)].modele<>2) and (aiguillage[Index_Aig(adr2)].modele<>3) then
|
||||
adr2:=aiguillage[Indexaig].Ddroit;
|
||||
if (aiguillage[Index_Aig(adr2)].modele<>tjd) and (aiguillage[Index_Aig(adr2)].modele<>tjs) then
|
||||
begin
|
||||
Affiche('Erreur 8: l''aiguillage '+intToStr(Adr2)+' n''est pas une TJD/S ou n''existe pas, mais apparait dans la TJD/S '+IntToSTR(aiguillage[aig].Adresse),clred);
|
||||
Affiche('Erreur 8: l''aiguillage '+intToStr(Adr2)+' n''est pas une TJD/S ou n''existe pas, mais apparait dans la TJD/S '+IntToSTR(aiguillage[Indexaig].Adresse),clred);
|
||||
ok:=false;
|
||||
end;
|
||||
end;
|
||||
// vérifier si l'aiguillage est dans les branches
|
||||
if aiguillage[aig].modele<>0 then
|
||||
if aiguillage[Indexaig].modele<>rien then
|
||||
begin
|
||||
trouve_aiguillage(aiguillage[aig].adresse); // passe l'adresse de l'aiguillage à trouver
|
||||
trouve_aiguillage(aiguillage[Indexaig].adresse); // passe l'adresse de l'aiguillage à trouver
|
||||
if (IndexBranche_trouve=0) then
|
||||
begin
|
||||
Affiche('Avertissement 6: aiguillage '+intToSTR(aiguillage[aig].adresse)+' décrit dans les aiguillages ; absent dans la description des branches',clOrange);
|
||||
Affiche('Avertissement 6: aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' décrit dans les aiguillages ; absent dans la description des branches',clOrange);
|
||||
ok:=false;
|
||||
end;
|
||||
end;
|
||||
adr:=aiguillage[aig].Adroit;
|
||||
if (aiguillage[aig].AdroitB='Z') then
|
||||
adr:=aiguillage[Indexaig].Adroit;
|
||||
if (aiguillage[Indexaig].AdroitB='Z') then
|
||||
begin
|
||||
trouve_detecteur(adr);
|
||||
if IndexBranche_trouve=0 then
|
||||
begin
|
||||
Affiche('Erreur 2: détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[aig].adresse)+' mais absent dans la description des branches',clred);
|
||||
Affiche('Erreur 2: détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' mais absent dans la description des branches',clred);
|
||||
ok:=false;
|
||||
end;
|
||||
end;
|
||||
adr:=aiguillage[aig].Adevie;
|
||||
if (aiguillage[aig].AdevieB='Z') then
|
||||
adr:=aiguillage[Indexaig].Adevie;
|
||||
if (aiguillage[Indexaig].AdevieB='Z') then
|
||||
begin
|
||||
trouve_detecteur(adr);
|
||||
if IndexBranche_trouve=0 then
|
||||
begin
|
||||
Affiche('Erreur 3: détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[aig].adresse)+' mais absent dans la description des branches',clRed);
|
||||
Affiche('Erreur 3: détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' mais absent dans la description des branches',clRed);
|
||||
ok:=false;
|
||||
end;
|
||||
end;
|
||||
adr:=aiguillage[aig].Apointe;
|
||||
if ((aiguillage[aig].ApointeB='Z') and (aiguillage[aig].modele=1)) then
|
||||
adr:=aiguillage[Indexaig].Apointe;
|
||||
if ((aiguillage[Indexaig].ApointeB='Z') and (aiguillage[Indexaig].modele=aig)) then
|
||||
begin
|
||||
trouve_detecteur(adr);
|
||||
if IndexBranche_trouve=0 then
|
||||
begin
|
||||
Affiche('Erreur 4 : détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[aig].adresse)+' mais absent dans la description des branches',clRed);
|
||||
Affiche('Erreur 4 : détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' mais absent dans la description des branches',clRed);
|
||||
ok:=false;
|
||||
end;
|
||||
end;
|
||||
if (aiguillage[aig].modele=4) then // aiguillage triple
|
||||
if (aiguillage[Indexaig].modele=triple) then // aiguillage triple
|
||||
begin
|
||||
if (aiguillage[aig].Adevie2B='Z') then
|
||||
if (aiguillage[Indexaig].Adevie2B='Z') then
|
||||
begin
|
||||
adr:=aiguillage[aig].Adevie2;
|
||||
adr:=aiguillage[Indexaig].Adevie2;
|
||||
trouve_detecteur(adr);
|
||||
if IndexBranche_trouve=0 then
|
||||
begin
|
||||
Affiche('Erreur 5 : détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[aig].adresse)+' mais absent dans la description des branches',clRed);
|
||||
Affiche('Erreur 5 : détecteur '+intToSTR(adr)+' décrit dans l''aiguillage '+intToSTR(aiguillage[Indexaig].adresse)+' mais absent dans la description des branches',clRed);
|
||||
ok:=false;
|
||||
end;
|
||||
end;
|
||||
@@ -3957,18 +3982,18 @@ begin
|
||||
end;
|
||||
|
||||
// cohérence 3 : vérifie si aiguillage triple ok et si doublon aiguillage
|
||||
for aig:=1 to maxaiguillage do
|
||||
for Indexaig:=1 to maxaiguillage do
|
||||
begin
|
||||
adr:=aiguillage[aig].Adresse;
|
||||
if aiguillage[aig].modele=4 then
|
||||
adr:=aiguillage[Indexaig].Adresse;
|
||||
if aiguillage[Indexaig].modele=triple then
|
||||
begin
|
||||
if aiguillage[aig].AdrTriple=0 then
|
||||
if aiguillage[Indexaig].AdrTriple=0 then
|
||||
begin
|
||||
Affiche('Erreur 6.1 : 2ème adresse de l''aiguillage triple '+intToSTR(adr)+' non définie',clred);
|
||||
ok:=false;
|
||||
end;
|
||||
end;
|
||||
for i:=aig+1 to maxaiguillage do
|
||||
for i:=Indexaig+1 to maxaiguillage do
|
||||
begin
|
||||
if adr=aiguillage[i].Adresse then
|
||||
begin
|
||||
@@ -4060,10 +4085,10 @@ begin
|
||||
|
||||
// élement suivant 1
|
||||
i:=feux[j].Adr_el_suiv1;
|
||||
k:=feux[j].Btype_suiv1;
|
||||
km:=feux[j].Btype_suiv1;
|
||||
if i<>0 then
|
||||
begin
|
||||
if k=1 then // détecteur
|
||||
if km=det then // détecteur
|
||||
begin
|
||||
trouve_detecteur(i);
|
||||
if IndexBranche_trouve=0 then
|
||||
@@ -4072,7 +4097,7 @@ begin
|
||||
Affiche('Erreur : Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred);
|
||||
end;
|
||||
end;
|
||||
if (k>=2) then
|
||||
if ((km=aig) or (km=tjs) or (km=tjd) or (km=triple)) then
|
||||
begin
|
||||
// aiguillage
|
||||
if index_aig(i)=0 then
|
||||
@@ -4085,10 +4110,10 @@ begin
|
||||
|
||||
// élement suivant 2
|
||||
i:=feux[j].Adr_el_suiv2;
|
||||
k:=feux[j].Btype_suiv2;
|
||||
km:=feux[j].Btype_suiv2;
|
||||
if i<>0 then
|
||||
begin
|
||||
if k=1 then // détecteur
|
||||
if km=det then // détecteur
|
||||
begin
|
||||
trouve_detecteur(i);
|
||||
if IndexBranche_trouve=0 then
|
||||
@@ -4097,7 +4122,7 @@ begin
|
||||
Affiche('Erreur : Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred);
|
||||
end;
|
||||
end;
|
||||
if (k>=2) then
|
||||
if ((km=aig) or (km=tjs) or (km=tjd) or (km=triple)) then
|
||||
begin
|
||||
// aiguillage
|
||||
if index_aig(i)=0 then
|
||||
@@ -4110,10 +4135,10 @@ begin
|
||||
|
||||
// élement suivant 3
|
||||
i:=feux[j].Adr_el_suiv3;
|
||||
k:=feux[j].Btype_suiv3;
|
||||
km:=feux[j].Btype_suiv3;
|
||||
if i<>0 then
|
||||
begin
|
||||
if k=1 then // détecteur
|
||||
if km=det then // détecteur
|
||||
begin
|
||||
trouve_detecteur(i);
|
||||
if IndexBranche_trouve=0 then
|
||||
@@ -4122,7 +4147,7 @@ begin
|
||||
Affiche('Erreur : Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred);
|
||||
end;
|
||||
end;
|
||||
if (k>=2) then
|
||||
if ((km=aig) or (km=tjs) or (km=tjd) or (km=triple)) then
|
||||
begin
|
||||
// aiguillage
|
||||
if index_aig(i)=0 then
|
||||
@@ -4135,10 +4160,10 @@ begin
|
||||
|
||||
// élement suivant 4
|
||||
i:=feux[j].Adr_el_suiv4;
|
||||
k:=feux[j].Btype_suiv4;
|
||||
km:=feux[j].Btype_suiv4;
|
||||
if i<>0 then
|
||||
begin
|
||||
if k=1 then // détecteur
|
||||
if km=det then // détecteur
|
||||
begin
|
||||
trouve_detecteur(i);
|
||||
if IndexBranche_trouve=0 then
|
||||
@@ -4147,7 +4172,7 @@ begin
|
||||
Affiche('Erreur : Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred);
|
||||
end;
|
||||
end;
|
||||
if (k>=2) then
|
||||
if ((km=aig) or (km=tjs) or (km=tjd) or (km=triple)) then
|
||||
begin
|
||||
// aiguillage
|
||||
if index_aig(i)=0 then
|
||||
@@ -4169,8 +4194,7 @@ begin
|
||||
inc(MaxAiguillage);
|
||||
i:=MaxAiguillage;
|
||||
aiguillage[i].Adresse:=999;
|
||||
aiguillage[i].modele:=1;
|
||||
aiguillage[i].modele:=1;
|
||||
aiguillage[i].modele:=aig;
|
||||
aiguillage[i].AdroitB:='Z'; aiguillage[i].AdevieB:='Z';
|
||||
aiguillage[i].DdroitB:='D'; aiguillage[i].DdevieB:='S'; // préparation pour TJD/S
|
||||
aiguillage[i].ApointeB:='Z';
|
||||
@@ -4219,7 +4243,7 @@ begin
|
||||
|
||||
// efface les attributs de l'aiguillage supprimé
|
||||
aiguillage[index].Adresse:=0;
|
||||
aiguillage[index].Modele:=0;
|
||||
aiguillage[index].Modele:=rien;
|
||||
aiguillage[index].Adroit:=0;
|
||||
aiguillage[index].Adevie:=0;
|
||||
aiguillage[index].Ddroit:=0;
|
||||
@@ -4297,7 +4321,7 @@ begin
|
||||
LabelInfo.caption:='Changement de l''adresse de la TJD de '+IntToSTR(adr2)+' à '+intToSTR(adr) ;
|
||||
|
||||
id2:=Index_Aig(Adr);
|
||||
if (aiguillage[id2].modele<>0) then
|
||||
if (aiguillage[id2].modele<>rien) then
|
||||
begin
|
||||
LabelInfo.caption:='aiguillage '+IntToSTR(adr)+' existe déja - ne sera pas écrasé' ;
|
||||
exit;
|
||||
@@ -4369,7 +4393,7 @@ begin
|
||||
LabelInfo.caption:='Changement de l''adresse de la TJD de '+IntToSTR(adr2)+' à '+intToSTR(adr) ;
|
||||
|
||||
id2:=Index_Aig(Adr);
|
||||
if (aiguillage[id2].modele<>0) then
|
||||
if (aiguillage[id2].modele<>rien) then
|
||||
begin
|
||||
LabelInfo.caption:='aiguillage '+IntToSTR(adr)+' existe déja - ne sera pas écrasé' ;
|
||||
exit;
|
||||
@@ -4394,7 +4418,8 @@ begin
|
||||
end;
|
||||
|
||||
procedure TFormConfig.EditP3KeyPress(Sender: TObject; var Key: Char);
|
||||
var AdrAig,adr,adr2,erreur,index,modele : integer;
|
||||
var AdrAig,adr,adr2,erreur,index : integer;
|
||||
model: Tequipement;
|
||||
b,c : char;
|
||||
s : string;
|
||||
begin
|
||||
@@ -4422,9 +4447,9 @@ begin
|
||||
LabelInfo.caption:='';
|
||||
RE_ColorLine(RichAig,ligneClicAig,ClWhite);
|
||||
Index:=Index_Aig(AdrAig);
|
||||
modele:=aiguillage[Index].modele;
|
||||
model:=aiguillage[Index].modele;
|
||||
|
||||
if modele=3 then // TJS
|
||||
if model=tjs then // TJS
|
||||
begin
|
||||
LabelL.caption:=IntToSTR(adr);
|
||||
aiguillage[index].tjsint:=adr;
|
||||
@@ -4458,13 +4483,13 @@ begin
|
||||
if index=0 then // si elle n'existe pas la créer
|
||||
begin
|
||||
// créer homologue
|
||||
if modele=2 then labelInfo.Caption:='Création de la TJD homologue '+IntToSTR(adr);
|
||||
if modele=3 then labelInfo.Caption:='Création de la TJS homologue '+IntToSTR(adr);
|
||||
if model=tjd then labelInfo.Caption:='Création de la TJD homologue '+IntToSTR(adr);
|
||||
if model=tjs then labelInfo.Caption:='Création de la TJS homologue '+IntToSTR(adr);
|
||||
|
||||
inc(MaxAiguillage);
|
||||
index:=MaxAiguillage;
|
||||
aiguillage[index].Adresse:=Adr;
|
||||
aiguillage[Index].modele:=modele;
|
||||
aiguillage[Index].modele:=model;
|
||||
aiguillage[Index].Adroit:=0;
|
||||
aiguillage[Index].AdroitB:='D';
|
||||
aiguillage[Index].Adevie:=0;
|
||||
@@ -4491,8 +4516,8 @@ begin
|
||||
else
|
||||
begin
|
||||
// existe, vérifier si c'est bien une TJD/S
|
||||
modele:=aiguillage[Index].modele;
|
||||
if (modele=2) or (modele=3) then
|
||||
model:=aiguillage[Index].modele;
|
||||
if (model=tjd) or (model=tjs) then
|
||||
begin
|
||||
aiguillage[index].adresse:=adr;
|
||||
s:=encode_aig(index);
|
||||
@@ -4580,7 +4605,7 @@ begin
|
||||
inc(MaxAiguillage);
|
||||
aiguillage[MaxAiguillage]:=Aig_supprime;
|
||||
Aig_Supprime.adresse:=0; // dévalider l'aiguillage sauvegardé
|
||||
Aig_Supprime.modele:=0;
|
||||
Aig_Supprime.modele:=rien;
|
||||
clicListe:=true;
|
||||
config_modifie:=true;
|
||||
|
||||
@@ -4625,7 +4650,17 @@ begin
|
||||
if MaxAiguillage<ligneclicAig+1 then exit;
|
||||
if affevt then Affiche('Evt ComboBox Aiguillage',clOrange);
|
||||
i:=ligneclicAig+1;
|
||||
aiguillage[i].modele:=ComboBoxAig.ItemIndex+1;
|
||||
case ComboBoxAig.ItemIndex of
|
||||
0 : aiguillage[i].modele:=aig;
|
||||
1 : aiguillage[i].modele:=tjd;
|
||||
2 : aiguillage[i].modele:=tjs;
|
||||
3 : aiguillage[i].modele:=triple;
|
||||
else aiguillage[i].modele:=rien;
|
||||
end;
|
||||
|
||||
|
||||
;
|
||||
|
||||
s:=encode_aig(i);
|
||||
formconfig.RichAig.Lines[ligneclicAig]:=s;
|
||||
clicliste:=true;
|
||||
@@ -4738,7 +4773,7 @@ begin
|
||||
code:=false;
|
||||
end;
|
||||
BrancheN[i,j].adresse:=adresse;
|
||||
BrancheN[i,j].btype:=2; // ident aiguillage
|
||||
BrancheN[i,j].btype:=aig; // ident aiguillage
|
||||
end
|
||||
else
|
||||
begin
|
||||
@@ -4751,8 +4786,8 @@ begin
|
||||
if erreur=0 then
|
||||
begin
|
||||
BrancheN[i,j].adresse:=detect; // adresse
|
||||
BrancheN[i,j].btype:=1;// ident détecteur
|
||||
if detect=0 then begin BrancheN[i,j].btype:=4;end; // buttoir
|
||||
BrancheN[i,j].btype:=det;// ident détecteur
|
||||
if detect=0 then begin BrancheN[i,j].btype:=buttoir;end; // buttoir
|
||||
// vérifier si le détecteur est déja stocké
|
||||
bd:=0;
|
||||
repeat
|
||||
@@ -4767,7 +4802,7 @@ begin
|
||||
end;
|
||||
inc(j);
|
||||
BrancheN[i,j].adresse:=0; // préparer le suivant à 0
|
||||
BrancheN[i,j].BType:=0;
|
||||
BrancheN[i,j].BType:=rien;
|
||||
//Affiche('branche '+intToSTR(i)+' index='+intToStr(j),clGreen);
|
||||
until (offset=0);
|
||||
compile_branche:=code;
|
||||
@@ -4911,7 +4946,8 @@ end;
|
||||
|
||||
procedure TFormConfig.EditAigTripleKeyPress(Sender: TObject; var Key: Char);
|
||||
var s : string;
|
||||
i,modele,erreur,index : integer;
|
||||
i,erreur,index : integer;
|
||||
model: TEquipement;
|
||||
begin
|
||||
if clicliste then exit;
|
||||
|
||||
@@ -4923,12 +4959,12 @@ begin
|
||||
index:=ligneclicAig+1;
|
||||
if index=0 then exit;
|
||||
|
||||
modele:=aiguillage[index].modele;
|
||||
if (modele=4) then
|
||||
model:=aiguillage[index].modele;
|
||||
if (model=triple) then
|
||||
begin
|
||||
if (erreur<>0) then begin LabelInfo.caption:='Erreur adresse aiguillage ';exit;end;
|
||||
// vérifier si l'adresse de l'aiguillage existe déja
|
||||
if (aiguillage[Index_Aig(i)].modele<>0) then
|
||||
if (aiguillage[Index_Aig(i)].modele<>rien) then
|
||||
begin
|
||||
LabelInfo.caption:='aiguillage '+IntToSTR(i)+' existe déja - ne sera pas écrasé' ;
|
||||
EditAigTriple.Color:=clred;
|
||||
@@ -5122,6 +5158,10 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
+36
-16
@@ -67,9 +67,9 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object MemoEvtDet: TMemo
|
||||
Left = 591
|
||||
Top = 320
|
||||
Top = 336
|
||||
Width = 239
|
||||
Height = 225
|
||||
Height = 209
|
||||
Anchors = [akTop, akRight]
|
||||
Color = clBlack
|
||||
Font.Charset = ANSI_CHARSET
|
||||
@@ -88,7 +88,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object ButtonEcrLog: TButton
|
||||
Left = 487
|
||||
Top = 312
|
||||
Top = 328
|
||||
Width = 97
|
||||
Height = 29
|
||||
Anchors = [akTop, akRight]
|
||||
@@ -98,7 +98,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object ButtonRazTampon: TButton
|
||||
Left = 487
|
||||
Top = 344
|
||||
Top = 360
|
||||
Width = 97
|
||||
Height = 33
|
||||
Anchors = [akTop, akRight]
|
||||
@@ -109,7 +109,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object ButtonCherche: TButton
|
||||
Left = 487
|
||||
Top = 280
|
||||
Top = 296
|
||||
Width = 97
|
||||
Height = 25
|
||||
Anchors = [akTop, akRight]
|
||||
@@ -119,7 +119,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object ButtonAffEvtChrono: TButton
|
||||
Left = 487
|
||||
Top = 240
|
||||
Top = 256
|
||||
Width = 97
|
||||
Height = 33
|
||||
Anchors = [akTop, akRight]
|
||||
@@ -130,7 +130,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object ButtonCop: TButton
|
||||
Left = 487
|
||||
Top = 192
|
||||
Top = 208
|
||||
Width = 97
|
||||
Height = 41
|
||||
Anchors = [akTop, akRight]
|
||||
@@ -147,7 +147,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object RichEdit: TRichEdit
|
||||
Left = 591
|
||||
Top = 160
|
||||
Top = 176
|
||||
Width = 239
|
||||
Height = 153
|
||||
Anchors = [akTop, akRight]
|
||||
@@ -166,7 +166,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object ButtonRazLog: TButton
|
||||
Left = 487
|
||||
Top = 384
|
||||
Top = 400
|
||||
Width = 97
|
||||
Height = 33
|
||||
Anchors = [akTop, akRight]
|
||||
@@ -315,7 +315,7 @@ object FormDebug: TFormDebug
|
||||
Left = 485
|
||||
Top = 20
|
||||
Width = 345
|
||||
Height = 137
|
||||
Height = 149
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'S'#233'lections d'#39'affichage'
|
||||
Color = cl3DLight
|
||||
@@ -359,7 +359,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object CheckBoxTraceLIste: TCheckBox
|
||||
Left = 8
|
||||
Top = 112
|
||||
Top = 128
|
||||
Width = 185
|
||||
Height = 17
|
||||
Caption = 'Evaluations des routes des trains'
|
||||
@@ -374,7 +374,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object CheckTrame: TCheckBox
|
||||
Left = 8
|
||||
Top = 80
|
||||
Top = 96
|
||||
Width = 233
|
||||
Height = 17
|
||||
Caption = 'Trames '#233'chang'#233'es avec l'#39'interface ou CDM'
|
||||
@@ -404,7 +404,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object CheckBoxAffFD: TCheckBox
|
||||
Left = 8
|
||||
Top = 96
|
||||
Top = 112
|
||||
Width = 193
|
||||
Height = 17
|
||||
Caption = 'Fronts descendants des d'#233'tecteurs'
|
||||
@@ -421,7 +421,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object CheckBoxAffDebDecSig: TCheckBox
|
||||
Left = 8
|
||||
Top = 64
|
||||
Top = 80
|
||||
Width = 193
|
||||
Height = 17
|
||||
Caption = 'Pilotage des d'#233'codeurs de signaux'
|
||||
@@ -438,7 +438,7 @@ object FormDebug: TFormDebug
|
||||
Left = 168
|
||||
Top = 12
|
||||
Width = 33
|
||||
Height = 18
|
||||
Height = 21
|
||||
Hint =
|
||||
'Adresse du signal seul '#224' surveiller ou si 0 surveille tous les s' +
|
||||
'ignaux'
|
||||
@@ -447,6 +447,26 @@ object FormDebug: TFormDebug
|
||||
TabOrder = 7
|
||||
OnChange = EditDebugSignalChange
|
||||
end
|
||||
object CheckBoxTiers: TCheckBox
|
||||
Left = 8
|
||||
Top = 64
|
||||
Width = 273
|
||||
Height = 17
|
||||
Hint =
|
||||
'N'#233'cessite d'#39'activer les services "signaux" et "position des trai' +
|
||||
'ns" dans la configuration g'#233'n'#233'rale'
|
||||
Caption = 'Ev'#232'vements tiers (signaux et position des trains)'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 8
|
||||
OnClick = CheckBoxTiersClick
|
||||
end
|
||||
end
|
||||
object RichDebug: TRichEdit
|
||||
Left = 8
|
||||
@@ -509,7 +529,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object ButtonRazTout: TButton
|
||||
Left = 488
|
||||
Top = 160
|
||||
Top = 176
|
||||
Width = 97
|
||||
Height = 25
|
||||
Anchors = [akTop, akRight]
|
||||
|
||||
+12
-3
@@ -51,6 +51,7 @@ type
|
||||
EditSimuDet: TEdit;
|
||||
ButtonRazTout: TButton;
|
||||
EditDebugSignal: TEdit;
|
||||
CheckBoxTiers: TCheckBox;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ButtonEcrLogClick(Sender: TObject);
|
||||
procedure EditNivDebugKeyPress(Sender: TObject; var Key: Char);
|
||||
@@ -80,6 +81,7 @@ type
|
||||
procedure RichEditChange(Sender: TObject);
|
||||
procedure MemoEvtDetChange(Sender: TObject);
|
||||
procedure EditDebugSignalChange(Sender: TObject);
|
||||
procedure CheckBoxTiersClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
@@ -91,6 +93,7 @@ Max_Event_det_tick=30000;
|
||||
Max_event_det=400;
|
||||
Max_Trains=50;
|
||||
|
||||
|
||||
var
|
||||
FormDebug: TFormDebug;
|
||||
NivDebug,signalDebug : integer;
|
||||
@@ -352,7 +355,8 @@ begin
|
||||
end;
|
||||
|
||||
procedure TFormDebug.ButtonDetSuivClick(Sender: TObject);
|
||||
var Adr,type1,type2,Prec,Actuel,erreur,ancdebug : integer ;
|
||||
var Adr,Prec,Actuel,erreur,ancdebug : integer ;
|
||||
type1,type2 : tequipement;
|
||||
s1,s2 : string;
|
||||
begin
|
||||
ancdebug:=NivDebug;
|
||||
@@ -360,8 +364,8 @@ begin
|
||||
s1:=EditPrec.Text;
|
||||
s2:=EditActuel.Text;
|
||||
if (s1='') or (s2='') then exit;
|
||||
if s1[1]='A' then begin type1:=2;delete(s1,1,1);end else type1:=1;
|
||||
if s2[1]='A' then begin type2:=2;delete(s2,1,1);end else type2:=1;
|
||||
if s1[1]='A' then begin type1:=aig;delete(s1,1,1);end else type1:=det;
|
||||
if s2[1]='A' then begin type2:=aig;delete(s2,1,1);end else type2:=det;
|
||||
Val(s1,prec,erreur); if erreur<>0 then exit;
|
||||
Val(s2,Actuel,erreur); if erreur<>0 then exit;
|
||||
Adr:=detecteur_suivant_El(prec,type1,actuel,type2,1);
|
||||
@@ -458,4 +462,9 @@ begin
|
||||
val(EditDebugSignal.text,signalDebug,erreur);
|
||||
end;
|
||||
|
||||
procedure TFormDebug.CheckBoxTiersClick(Sender: TObject);
|
||||
begin
|
||||
AffTiers:=checkBoxTiers.checked;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+4
-3
@@ -1,6 +1,6 @@
|
||||
object FormPrinc: TFormPrinc
|
||||
Left = 1294
|
||||
Top = 168
|
||||
Left = 13
|
||||
Top = 175
|
||||
Width = 1212
|
||||
Height = 664
|
||||
Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ'
|
||||
@@ -1305,8 +1305,9 @@ object FormPrinc: TFormPrinc
|
||||
Width = 83
|
||||
Height = 33
|
||||
Hint = 'Demande la version XpressNet '#224' la centrale'
|
||||
Caption = 'Dem version'
|
||||
Caption = 'Dem version centrale'
|
||||
TabOrder = 1
|
||||
WordWrap = True
|
||||
OnClick = BoutVersionClick
|
||||
end
|
||||
object loco: TButton
|
||||
|
||||
+394
-394
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
+83
-82
@@ -266,7 +266,7 @@ const
|
||||
type
|
||||
// structure du TCO
|
||||
TTCO = array[1..MaxCellX] of array[1..MaxCellY] of record
|
||||
BType : integer ; // 1= détecteur 2= aiguillage 3=bis 4=Buttoir
|
||||
BType : TEquipement ;
|
||||
Adresse : integer ; // adresse du détecteur ou de l'aiguillage ou du feu
|
||||
BImage : integer ; // 0=rien 1=voie 2=aiguillage gauche gauche ... 30=feu
|
||||
mode : integer; // 0=éteint 1=allumé
|
||||
@@ -321,7 +321,7 @@ procedure lire_fichier_tco;
|
||||
var fichier : textfile;
|
||||
s : string;
|
||||
x,y,i,j,adresse,Aspect,valeur,erreur,FeuOriente,PiedFeu : integer;
|
||||
|
||||
BT : TEquipement;
|
||||
function lit_ligne : string ;
|
||||
var c : char;
|
||||
begin
|
||||
@@ -384,7 +384,11 @@ begin
|
||||
i:=pos(',',s);
|
||||
if i=0 then begin closefile(fichier);exit;end;
|
||||
val(copy(s,1,i-1),valeur,erreur);if erreur<>0 then begin closefile(fichier);exit;end;
|
||||
tco[x,y].BType:=valeur;
|
||||
if valeur=1 then BT:=det;
|
||||
if valeur=2 then BT:=aig;
|
||||
if valeur=4 then BT:=buttoir;
|
||||
|
||||
tco[x,y].BType:=BT;
|
||||
delete(s,1,i);
|
||||
|
||||
// Adresse
|
||||
@@ -487,8 +491,9 @@ begin
|
||||
s:='';
|
||||
for x:=1 to NbreCellX do
|
||||
begin
|
||||
s:=s+'('+IntToSTR(TCO[x,y].BType)+','+Format('%.*d',[3,TCO[x,y].Adresse])+','+
|
||||
s:=s+'('+IntToSTR(BTypeToNum(TCO[x,y].BType))+','+Format('%.*d',[3,TCO[x,y].Adresse])+','+
|
||||
IntToSTR(TCO[x,y].BImage)+',';
|
||||
|
||||
if TCO[x,y].inverse then s:=s+'1,' else s:=s+'0,';
|
||||
|
||||
if TCO[x,y].BImage=30 then
|
||||
@@ -2288,14 +2293,15 @@ end;
|
||||
// transforme les branches en TCO
|
||||
// trop compliqué. Il faudra dessiner son TCO soit meme !
|
||||
procedure construit_TCO;
|
||||
var x,y,i,j,Max,indexMax,Btype,Adresse,ligne,AdrSuiv,Bimage,index : integer;
|
||||
var x,y,i,j,Max,indexMax,Adresse,ligne,AdrSuiv,Bimage,index : integer;
|
||||
BT: Tequipement;
|
||||
begin
|
||||
// étape 0 Raz du TCO
|
||||
for y:=1 to NbreCellY do
|
||||
for x:=1 to NbreCellX do
|
||||
begin
|
||||
TCO[x,y].Adresse:=0;
|
||||
TCO[x,y].Btype:=0;
|
||||
TCO[x,y].Btype:=rien;
|
||||
end;
|
||||
|
||||
//étape 1 trouver la branche la plus longue
|
||||
@@ -2315,12 +2321,12 @@ begin
|
||||
for i:=1 to Max do
|
||||
begin
|
||||
Adresse:=BrancheN[IndexMax,i].Adresse;
|
||||
Btype:=BrancheN[IndexMax,i].Btype;
|
||||
BT:=BrancheN[IndexMax,i].Btype;
|
||||
TCO[i,ligne].Adresse:=Adresse;
|
||||
TCO[i,ligne].Btype:=Btype;
|
||||
TCO[i,ligne].Btype:=BT;
|
||||
// Btype 1= détecteur 2= aiguillage 3=bis 4=Buttoir
|
||||
if Btype=1 then TCO[i,ligne].BImage:=1;
|
||||
if Btype=2 then
|
||||
if Bt=det then TCO[i,ligne].BImage:=1;
|
||||
if Bt=aig then
|
||||
begin
|
||||
// A20,547,561,A22,A24,A26,515,518,A31,A29,A28,A30,539,522,A3,A1,A2,A4,A6B,545,A5B,A3
|
||||
//20,P8P,D547,S548 // 22,P24P,S561,D25S
|
||||
@@ -2342,17 +2348,18 @@ end;
|
||||
|
||||
// affiche la cellule x et y en cases
|
||||
procedure TformTCO.affiche_cellule(x,y : integer);
|
||||
var Xorg,Yorg,mode,adresse,btype,Bimage,aspect,oriente,pos : integer;
|
||||
var Xorg,Yorg,mode,adresse,Bimage,aspect,oriente,pos : integer;
|
||||
Bt : TEquipement;
|
||||
s : string;
|
||||
begin
|
||||
PcanvasTCO.pen.Mode:=PmCopy;
|
||||
adresse:=tco[x,y].Adresse;
|
||||
btype:=tco[x,y].Btype;
|
||||
bt:=tco[x,y].Btype;
|
||||
BImage:=tco[x,y].BImage;
|
||||
mode:=tco[x,y].mode;
|
||||
|
||||
// récupérer la position de l'aiguillage
|
||||
if (bImage>=2) and (btype<=15) then
|
||||
if (bImage>=2) then //????? and (btype<=15)
|
||||
begin
|
||||
if Adresse<>0 then pos:=Aiguillage[Index_Aig(adresse)].position
|
||||
|
||||
@@ -2398,7 +2405,7 @@ begin
|
||||
// affiche le texte des aiguillages
|
||||
if ((BImage=2) or (BImage=3) or (BImage=4) or (BImage=5) or (BImage=12) or (BImage=13) or (BImage=14) or (BImage=15) or (BImage=21) or (BImage=22)) and (adresse<>0) then
|
||||
begin
|
||||
if Btype<>3 then s:='A'+s else s:='A'+s+'B';
|
||||
if Bt<>tjs then s:='A'+s else s:='A'+s+'B';
|
||||
with PCanvasTCO do
|
||||
begin
|
||||
Brush.Color:=fond;
|
||||
@@ -2674,7 +2681,7 @@ begin
|
||||
YclicCellInserer:=YClicCell;
|
||||
|
||||
EditAdrElement.Text:=IntToSTR(tco[XClicCellInserer,YClicCellInserer].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR(tco[XClicCellInserer,YClicCellInserer].BType);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCellInserer,YClicCellInserer].BType));
|
||||
EdittypeImage.Text:=IntToSTR(BImage);
|
||||
|
||||
if not(selectionaffichee) then _entoure_cell_clic;
|
||||
@@ -3031,7 +3038,7 @@ begin
|
||||
LabelY.caption:=IntToSTR(YClicCell);
|
||||
//Entoure_cell(XclicCell,YclicCell);
|
||||
EditAdrElement.Text:=IntToSTR(tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR(tco[XClicCell,YClicCell].BType);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].BType));
|
||||
end;
|
||||
|
||||
procedure TFormTCO.Elmentdroit1Click(Sender: TObject);
|
||||
@@ -3044,7 +3051,7 @@ begin
|
||||
//Entoure_cell(XclicCell,YclicCell);
|
||||
|
||||
EditAdrElement.Text:=IntToSTR(tco[XClicCellInserer,YClicCellInserer].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR(tco[XClicCellInserer,YClicCellInserer].BType);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCellInserer,YClicCellInserer].BType));
|
||||
end;
|
||||
|
||||
procedure TFormTCO.Courbegaucheversdroite1Click(Sender: TObject);
|
||||
@@ -3127,11 +3134,11 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_AigPD_AD(ImageTCO.Canvas,XClicCell,YClicCell,0,9);
|
||||
tco[XClicCell,YClicCell].BType:=2; // aiguillage
|
||||
tco[XClicCell,YClicCell].BType:=aig; // aiguillage
|
||||
tco[XClicCell,YClicCell].BImage:=5; // image 5
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3143,12 +3150,12 @@ begin
|
||||
Xclic:=X;YClic:=Y;
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
tco[XClicCell,YClicCell].BType:=2; // aiguillage
|
||||
tco[XClicCell,YClicCell].BType:=aig; // aiguillage
|
||||
tco[XClicCell,YClicCell].BImage:=2; // image 2
|
||||
dessin_AigG_PD(ImageTCO.Canvas,XClicCell,YClicCell,0,9);
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3167,11 +3174,11 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_AigPG_AG(ImageTCO.Canvas,XClicCell,YClicCell,0,9);
|
||||
tco[XClicCell,YClicCell].BType:=2; // aiguillage
|
||||
tco[XClicCell,YClicCell].BType:=aig; // aiguillage
|
||||
tco[XClicCell,YClicCell].BImage:=3; // image 3
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3190,11 +3197,11 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_AigD_PG(ImageTCO.Canvas,XClicCell,YClicCell,0,9);
|
||||
tco[XClicCell,YClicCell].BType:=2; // aiguillage
|
||||
tco[XClicCell,YClicCell].BType:=aig; // aiguillage
|
||||
tco[XClicCell,YClicCell].BImage:=4; // image 4
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3214,12 +3221,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_voie(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=1; // voie
|
||||
tco[XClicCell,YClicCell].BType:=voie; // voie (3)
|
||||
tco[XClicCell,YClicCell].BImage:=1; // image 1
|
||||
tco[XClicCell,YClicCell].Adresse:=0;
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3238,12 +3245,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_SupG(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=6; // image 6
|
||||
tco[XClicCell,YClicCell].Adresse:=0;
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3262,12 +3269,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_SupD(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=7; // image 7
|
||||
tco[XClicCell,YClicCell].Adresse:=0;
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3287,12 +3294,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_infD(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=8; // image 8
|
||||
tco[XClicCell,YClicCell].Adresse:=0;
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3388,12 +3395,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_infG(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=9; // image 9
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3407,12 +3414,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_Aig45PG_AG(ImageTCO.Canvas,XClicCell,YClicCell,0,9);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=12; // image 12
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3427,12 +3434,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_Aig45PD_AD(ImageTCO.Canvas,XClicCell,YClicCell,0,9);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=13; // image 13
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3446,16 +3453,15 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_Aig45PD_AG(ImageTCO.Canvas,XClicCell,YClicCell,0,9);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=14; // image 14
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormTCO.ImageAig45PG_ADEndDrag(Sender, Target: TObject; X,
|
||||
Y: Integer);
|
||||
begin
|
||||
@@ -3466,16 +3472,15 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
Dessin_Aig45PG_AD(ImageTCO.Canvas,XClicCell,YClicCell,0,9);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=15; // image 15
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TFormTCO.ImagePalette16EndDrag(Sender, Target: TObject; X, Y: Integer);
|
||||
begin
|
||||
if (x=0) and (y=0) then exit;
|
||||
@@ -3485,12 +3490,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
Dessin_16(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=16; // image 16
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3504,16 +3509,15 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
Dessin_17(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=17; // image 17
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TFormTCO.ImagePalette18EndDrag(Sender, Target: TObject; X,
|
||||
Y: Integer);
|
||||
begin
|
||||
@@ -3524,12 +3528,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
Dessin_18(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=18; // image 18
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3543,12 +3547,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
Dessin_19(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=19; // image 19
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3562,12 +3566,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
Dessin_20(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=20; // image 20
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3581,12 +3585,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
Dessin_21(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=21;
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3600,12 +3604,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
Dessin_22(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=22;
|
||||
tco[XClicCell,YClicCell].Adresse:=0; // rien
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -3655,8 +3659,7 @@ end;
|
||||
|
||||
// supprimer la sélection
|
||||
procedure TFormTCO.MenuCouperClick(Sender: TObject);
|
||||
var
|
||||
x,y,XCell1,YCell1,xCell2,yCell2 : integer;
|
||||
var x,y,XCell1,YCell1,xCell2,yCell2 : integer;
|
||||
begin
|
||||
// couper sans sélection : on coupe une seule cellule
|
||||
if not(SelectionAffichee) then
|
||||
@@ -3702,7 +3705,7 @@ begin
|
||||
TamponTCO_org.x1:=XclicCell;TamponTCO_org.y1:=YclicCell;
|
||||
TamponTCO_org.x2:=XclicCell;TamponTCO_org.y2:=YclicCell;
|
||||
|
||||
tco[XclicCell,YClicCell].BType:=0;
|
||||
tco[XclicCell,YClicCell].BType:=rien;
|
||||
tco[XclicCell,YClicCell].Adresse:=0;
|
||||
tco[XclicCell,YClicCell].Bimage:=0;
|
||||
efface_entoure;
|
||||
@@ -3727,7 +3730,7 @@ begin
|
||||
for y:=yCell1 to yCell2 do
|
||||
for x:=xCell1 to xCell2 do
|
||||
begin
|
||||
tco[x,y].BType:=0;
|
||||
tco[x,y].BType:=rien;
|
||||
tco[x,y].Adresse:=0;
|
||||
tco[x,y].BImage:=0;
|
||||
//Affiche('Efface cellules '+IntToSTR(X)+' '+intToSTR(y),clyellow);
|
||||
@@ -3759,7 +3762,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
Affiche_TCO;
|
||||
@@ -3768,8 +3770,7 @@ end;
|
||||
|
||||
// évènement qui se produit quand on clique gauche ou droit
|
||||
procedure TFormTCO.ImageTCOMouseDown(Sender: TObject; Button: TMouseButton;Shift: TShiftState; X, Y: Integer);
|
||||
var position : Tpoint;
|
||||
|
||||
var position : Tpoint;
|
||||
begin
|
||||
// ImageTCO.BeginDrag(true);
|
||||
if button=mbLeft then
|
||||
@@ -3809,7 +3810,7 @@ begin
|
||||
//Entoure_cell(XclicCellInserer,YclicCellInserer);
|
||||
|
||||
EditAdrElement.Text:=IntToSTR(tco[XClicCellInserer,YClicCellInserer].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR(tco[XClicCellInserer,YClicCellInserer].BType);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCellInserer,YClicCellInserer].BType));
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -3961,13 +3962,13 @@ begin
|
||||
tco[XClicCell,YClicCell].Bimage:=Bimage;
|
||||
case Bimage of
|
||||
// aiguillages
|
||||
2,3,4,5,12,13,14,15 : tco[XClicCell,YClicCell].Btype:=2;
|
||||
2,3,4,5,12,13,14,15 : tco[XClicCell,YClicCell].Btype:=aig;
|
||||
// détecteur ou voie
|
||||
1,10,11,20 : tco[XClicCell,YClicCell].Btype:=1;
|
||||
else tco[XClicCell,YClicCell].Btype:=0;
|
||||
1,10,11,20 : tco[XClicCell,YClicCell].Btype:=voie;
|
||||
else tco[XClicCell,YClicCell].Btype:=rien;
|
||||
end;
|
||||
|
||||
EditTypeElement.text:=intToSTR(tco[XClicCell,YClicCell].Btype);
|
||||
EditTypeElement.text:=intToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
affiche_cellule(XClicCell,YClicCell);
|
||||
end;
|
||||
end;
|
||||
@@ -4006,7 +4007,7 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_Diag1(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=10; // image 10
|
||||
tco[XClicCell,YClicCell].Adresse:=0;
|
||||
tco[XClicCell,YClicCell].FeuOriente:=1;
|
||||
@@ -4015,7 +4016,7 @@ begin
|
||||
tco[XClicCell,YClicCell].y:=0; // YClicCell; //??
|
||||
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -4034,12 +4035,12 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
dessin_Diag2(ImageTCO.Canvas,XClicCell,YClicCell,0);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=11;
|
||||
tco[XClicCell,YClicCell].Adresse:=0;
|
||||
_entoure_cell_clic;
|
||||
EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
end;
|
||||
|
||||
@@ -4065,7 +4066,7 @@ begin
|
||||
XclicCell:=Xclic div largeurCell +1;
|
||||
YclicCell:=Yclic div hauteurCell +1;
|
||||
//PCanvasTCO.Draw((xClicCell-1)*LargeurCell,(yClicCell-1)*HauteurCell,ImageFeu.Picture.Bitmap);
|
||||
tco[XClicCell,YClicCell].BType:=0; // rien
|
||||
tco[XClicCell,YClicCell].BType:=rien; // rien
|
||||
tco[XClicCell,YClicCell].BImage:=30;
|
||||
tco[XClicCell,YClicCell].Adresse:=0;
|
||||
tco[XClicCell,YClicCell].FeuOriente:=1;
|
||||
@@ -4075,7 +4076,7 @@ begin
|
||||
|
||||
|
||||
// ne pas convertir l'adresse sinon evt changement du composant et on écrase l'aspect EditAdrElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Adresse);
|
||||
EdittypeElement.Text:=IntToSTR( tco[XClicCell,YClicCell].Btype);
|
||||
EdittypeElement.Text:=IntToSTR(BtypeToNum(tco[XClicCell,YClicCell].Btype));
|
||||
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
|
||||
|
||||
dessin_feu(PCanvasTCO,XclicCell,YClicCell);
|
||||
@@ -4297,8 +4298,8 @@ begin
|
||||
( FindComponent('No') as TButton).Caption:='dévié';
|
||||
end;
|
||||
Result:=Msgdlg.ShowModal;
|
||||
if Result=MrYes then begin efface_entoure;SelectionAffichee:=false;pilote_acc(adresse,2,aig);end; // droit
|
||||
if Result=MrNo then begin efface_entoure;SelectionAffichee:=false;pilote_acc(adresse,1,aig);end; // dévié
|
||||
if Result=MrYes then begin efface_entoure;SelectionAffichee:=false;pilote_acc(adresse,2,aigP);end; // droit
|
||||
if Result=MrNo then begin efface_entoure;SelectionAffichee:=false;pilote_acc(adresse,1,aigP);end; // dévié
|
||||
|
||||
sourisclic:=false; // évite de générer un cadre de sélection:=false;
|
||||
piloteAig:=true;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+30
-10
@@ -23,7 +23,8 @@ var
|
||||
Lance_verif : integer;
|
||||
verifVersion,notificationVersion : boolean;
|
||||
|
||||
Const Version='3.1'; // sert à la comparaison de la version publiée
|
||||
Const Version='3.2'; // sert à la comparaison de la version publiée
|
||||
SousVersion=' '; // en cas d'absence de sous version mettre un espace
|
||||
|
||||
implementation
|
||||
|
||||
@@ -102,8 +103,9 @@ procedure verifie_version;
|
||||
var s,s2,s3,Version_p,Url,LocalFile : string;
|
||||
trouve_version,trouve_zip,zone_comm : boolean;
|
||||
fichier : text;
|
||||
i,j,erreur,Ncomm,i2,i3 : integer;
|
||||
i,j,erreur,Ncomm,i2,i3,l : integer;
|
||||
V_publie,V_utile : real;
|
||||
SV_publie : char;
|
||||
comm : array[1..10] of string;
|
||||
begin
|
||||
//Affiche('vérifie version',clLime);
|
||||
@@ -122,18 +124,28 @@ begin
|
||||
while not(eof(fichier)) and (not(trouve_version) or not(trouve_zip)) do
|
||||
begin
|
||||
readln(fichier,s);
|
||||
//Affiche(s,clyellow);
|
||||
s:=LowerCase(s);
|
||||
if not(trouve_version) then
|
||||
begin
|
||||
i:=pos('version ',s);
|
||||
trouve_version:=i<>0;
|
||||
if trouve_version then begin s2:=s;zone_comm:=true;end;
|
||||
if trouve_version then
|
||||
begin
|
||||
s2:=s;zone_comm:=true;
|
||||
//Affiche('trouvé version',clOrange);
|
||||
end;
|
||||
end;
|
||||
if not(trouve_zip) then
|
||||
begin
|
||||
i:=pos('.zip',s);
|
||||
trouve_zip:=i<>0;
|
||||
if trouve_zip then begin s3:=s;zone_comm:=false;end;
|
||||
//if trouve_zip then Affiche(s,clyellow);
|
||||
if trouve_zip then
|
||||
begin
|
||||
s3:=s;
|
||||
//zone_comm:=false;
|
||||
end;
|
||||
end;
|
||||
// commentaire en gras
|
||||
if zone_comm then
|
||||
@@ -141,6 +153,7 @@ begin
|
||||
i:=pos('bold">',s)+6;i2:=posEx('<br />',s,i+1);
|
||||
if i<>6 then
|
||||
begin
|
||||
//Affiche(s,clred);
|
||||
inc(ncomm);
|
||||
comm[ncomm]:=UTF8Decode(copy(s,i,i2-i));
|
||||
Delete(s,1,i2-1);
|
||||
@@ -186,19 +199,26 @@ begin
|
||||
s2:=version;
|
||||
// i:=pos('.',s2);if i<>0 then s2[i]:=',';
|
||||
|
||||
val(s,V_publie,erreur); if erreur<>0 then exit;
|
||||
val(s2,V_utile,erreur); if erreur<>0 then exit;
|
||||
l:=length(s);
|
||||
SV_publie:=s[l];
|
||||
if Sv_publie in ['0'..'9'] then Sv_Publie:=' ' else s:=copy(s,1,l-1);
|
||||
|
||||
val(s,V_publie,erreur);
|
||||
if erreur<>0 then exit;
|
||||
val(s2,V_utile,erreur);
|
||||
if erreur<>0 then exit;
|
||||
|
||||
if V_utile<V_publie then
|
||||
if (V_utile<V_publie) or
|
||||
((V_utile=V_publie) and (SousVersion<SV_publie)) then
|
||||
begin
|
||||
FormVersion.Top:=1;
|
||||
FormVersion.Left:=1;
|
||||
FormVersion.show;
|
||||
//aff(s3); // url dans s3
|
||||
s:='Vous utilisez la version '+version+' mais il existe la version '+Version_p;
|
||||
s:='Vous utilisez la version '+version+SousVersion+' mais il existe la version '+Version_p+SV_publie;
|
||||
if ncomm>0 then
|
||||
begin
|
||||
Aff('Nouveautés de la V'+version_p+' de Signaux_Complexes_GL :');
|
||||
Aff('Nouveautés de la V'+version_p+SV_publie+' de Signaux_Complexes_GL :');
|
||||
Aff(' ');
|
||||
for i:=1 to ncomm do aff(comm[i]);
|
||||
end;
|
||||
@@ -220,7 +240,7 @@ begin
|
||||
else formVersion.Free;
|
||||
end;
|
||||
|
||||
if (V_utile=V_publie) and notificationVersion then Affiche('Votre version '+Version_p+' est à jour',clLime);
|
||||
if (V_utile=V_publie) and notificationVersion then Affiche('Votre version '+Version_p+SousVersion+' est à jour',clLime);
|
||||
|
||||
end;
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user