diff --git a/Notice d'utilisation des signaux_complexes_GL_V8.25.pdf b/Notice d'utilisation des signaux_complexes_GL_V8.26.pdf similarity index 80% rename from Notice d'utilisation des signaux_complexes_GL_V8.25.pdf rename to Notice d'utilisation des signaux_complexes_GL_V8.26.pdf index dea2bfb..aa871ff 100644 Binary files a/Notice d'utilisation des signaux_complexes_GL_V8.25.pdf and b/Notice d'utilisation des signaux_complexes_GL_V8.26.pdf differ diff --git a/Signaux_complexes_GL.map b/Signaux_complexes_GL.map index 603b65e..7de3bd6 100644 --- a/Signaux_complexes_GL.map +++ b/Signaux_complexes_GL.map @@ -1,8 +1,8 @@ Start Length Name Class - 0001:00000000 00166354H .text CODE - 0002:00000000 00002C10H .data DATA - 0002:00002C10 041C8BF9H .bss BSS + 0001:00000000 0016718CH .text CODE + 0002:00000000 00002BE8H .data DATA + 0002:00002BE8 041CBB51H .bss BSS Detailed map of segments @@ -88,17 +88,17 @@ Detailed map of segments 0001:000B5290 00002690 C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9 0001:000B7920 000009C0 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9 0001:000B82E0 00003458 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9 - 0001:000BB738 0002CEBC C=CODE S=.text G=(none) M=UnitTCO ACBP=A9 - 0001:000E85F4 00002C18 C=CODE S=.text G=(none) M=UnitSR ACBP=A9 - 0001:000EB20C 00002404 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9 - 0001:000ED610 000015DB C=CODE S=.text G=(none) M=verif_version ACBP=A9 - 0001:000EEBEC 0000114C C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9 - 0001:000EFD38 00037300 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9 - 0001:00127038 0000290C C=CODE S=.text G=(none) M=UnitDebug ACBP=A9 - 0001:00129944 00000C00 C=CODE S=.text G=(none) M=UnitSimule ACBP=A9 - 0001:0012A544 00002390 C=CODE S=.text G=(none) M=Unitplace ACBP=A9 - 0001:0012C8D4 000395F0 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9 - 0001:00165EC4 0000048D C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9 + 0001:000BB738 0002DB7C C=CODE S=.text G=(none) M=UnitTCO ACBP=A9 + 0001:000E92B4 00002C18 C=CODE S=.text G=(none) M=UnitSR ACBP=A9 + 0001:000EBECC 00002404 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9 + 0001:000EE2D0 000015D3 C=CODE S=.text G=(none) M=verif_version ACBP=A9 + 0001:000EF8A4 0000114C C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9 + 0001:000F09F0 00037308 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9 + 0001:00127CF8 0000290C C=CODE S=.text G=(none) M=UnitDebug ACBP=A9 + 0001:0012A604 00000C00 C=CODE S=.text G=(none) M=UnitSimule ACBP=A9 + 0001:0012B204 00002390 C=CODE S=.text G=(none) M=Unitplace ACBP=A9 + 0001:0012D594 00039768 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9 + 0001:00166CFC 0000048D C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9 0002:00000000 000000CC C=DATA S=.data G=DGROUP M=System ACBP=A9 0002:000000CC 00000020 C=DATA S=.data G=DGROUP M=SysInit ACBP=A9 0002:000000EC 00000254 C=DATA S=.data G=DGROUP M=SysUtils ACBP=A9 @@ -125,12 +125,12 @@ Detailed map of segments 0002:00001234 00000030 C=DATA S=.data G=DGROUP M=ComObj ACBP=A9 0002:00001264 0000002C C=DATA S=.data G=DGROUP M=OleCtrls ACBP=A9 0002:00001290 00000908 C=DATA S=.data G=DGROUP M=jpeg ACBP=A9 - 0002:00001B98 00000080 C=DATA S=.data G=DGROUP M=MSCommLib_TLB ACBP=A9 - 0002:00001C18 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9 - 0002:00001C24 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9 - 0002:00001C28 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9 - 0002:00001C30 000000D4 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9 - 0002:00001D04 0000060D C=DATA S=.data G=DGROUP M=UnitPrinc ACBP=A9 + 0002:00001B98 00000058 C=DATA S=.data G=DGROUP M=MSCommLib_TLB ACBP=A9 + 0002:00001BF0 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9 + 0002:00001BFC 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9 + 0002:00001C00 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9 + 0002:00001C08 000000D4 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9 + 0002:00001CDC 0000060D C=DATA S=.data G=DGROUP M=UnitPrinc ACBP=A9 0002:00003000 00000664 C=BSS S=.bss G=DGROUP M=System ACBP=A9 0002:00003664 00000010 C=BSS S=.bss G=DGROUP M=SysInit ACBP=A9 0002:00003674 00000004 C=BSS S=.bss G=DGROUP M=Types ACBP=A9 @@ -212,16 +212,16 @@ Detailed map of segments 0002:00007C40 00000014 C=BSS S=.bss G=DGROUP M=UnitConfigTCO ACBP=A9 0002:00007C54 00000014 C=BSS S=.bss G=DGROUP M=Unit_Pilote_aig ACBP=A9 0002:00007C68 00000014 C=BSS S=.bss G=DGROUP M=UnitConfigCellTCO ACBP=A9 - 0002:00007C7C 00041F90 C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9 - 0002:00049C0C 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9 - 0002:00049C1C 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9 - 0002:00049C30 00000018 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9 - 0002:00049C48 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9 - 0002:00049C4C 000004F8 C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9 - 0002:0004A144 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9 - 0002:0004A170 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9 - 0002:0004A17C 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9 - 0002:0004A184 04181A74 C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9 + 0002:00007C7C 00044EE8 C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9 + 0002:0004CB64 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9 + 0002:0004CB74 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9 + 0002:0004CB88 00000018 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9 + 0002:0004CBA0 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9 + 0002:0004CBA4 000004F8 C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9 + 0002:0004D09C 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9 + 0002:0004D0C8 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9 + 0002:0004D0D4 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9 + 0002:0004D0DC 04181A74 C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9 Bound resource files @@ -247,4 +247,4 @@ Signaux_complexes_GL.res Signaux_complexes_GL.drf -Program entry point at 0001:001661D4 +Program entry point at 0001:0016700C diff --git a/UnitConfig.dfm b/UnitConfig.dfm index 65fd89e..fcb2f6e 100644 --- a/UnitConfig.dfm +++ b/UnitConfig.dfm @@ -668,7 +668,7 @@ object FormConfig: TFormConfig Top = 8 Width = 633 Height = 497 - ActivePage = TabSheetPeriph + ActivePage = TabSheetCDM Font.Charset = DEFAULT_CHARSET Font.Color = clBlack Font.Height = -11 @@ -927,7 +927,7 @@ object FormConfig: TFormConfig Top = 184 Width = 297 Height = 65 - Caption = 'Au d'#233'marrage de CDM Rail : interface LENZ' + Caption = 'Au d'#233'marrage de CDM Rail : interface LENZ / XpressNet' TabOrder = 3 object RadioButton13: TRadioButton Left = 8 diff --git a/UnitConfig.pas b/UnitConfig.pas index 7020bc0..29f3aa8 100644 --- a/UnitConfig.pas +++ b/UnitConfig.pas @@ -1153,7 +1153,7 @@ begin for j:=1 to NfeuxDir+1 do begin s:=s+'('; - for k:=1 to Length(feux[i].AigDirection[j])-1 do // boum + for k:=1 to Length(feux[i].AigDirection[j])-1 do begin s:=s+'A'+IntToSTR(feux[i].AigDirection[j][k].adresse) + feux[i].AigDirection[j][k].posaig; if k1) or traceliste then AfficheDebug('135.7- TJD '+intToSTR(adr)+' mal positionnée cas 3.1',clyellow); if (alg and 2)=2 then begin - suivant_alg3:=9998;exit; + suivant_alg3:=9998; + exit; end; end; end; @@ -5671,7 +5667,8 @@ begin begin typeGen:=rien; AdrDevie:=Adr; - suivant_alg3:=9997;exit; + suivant_alg3:=9997; + exit; end; end else @@ -5679,7 +5676,8 @@ begin if (nivdebug>1) or traceliste then AfficheDebug('135.8- TJD '+intToSTR(adr)+' mal positionnée cas 3.2',clyellow); if (alg and 2)=2 then begin - suivant_alg3:=9998;exit; + suivant_alg3:=9998; + exit; end; end; end; @@ -8608,8 +8606,9 @@ end; // le traitement d'un détecteur à 0 est temporisé car il peut électriquement rebondir à cause des mauvais contacts. +// non utilisé *************** procedure traite_det0(adresse : integer); -var i,j,k,EtatSig,det1,det2,det3,det4,det_suiv,adrSuiv,AdrTrainLoc,n : integer; +var i,j,k,EtatSig,det1,t,det2,det3,det4,det_suiv,adrSuiv,AdrTrainLoc,n : integer; suivOk,CasAig : boolean; s,train_ch : string; begin @@ -8779,10 +8778,13 @@ begin end; if TCOActive then begin - zone_TCO(1,det2,det3,0); // désactivation - // activation - if ModeCouleurCanton=0 then zone_TCO(1,det3,AdrSuiv,1) - else zone_TCO(1,det3,AdrSuiv,2); // affichage avec la couleur de index_couleur du train + for t:=1 to nbreTCO do + begin + zone_TCO(t,det2,det3,0); // désactivation + // activation + if ModeCouleurCanton=0 then zone_TCO(t,det3,AdrSuiv,1) + else zone_TCO(t,det3,AdrSuiv,2); // affichage avec la couleur de index_couleur du train + end; end; // mettre à jour si présence signal sur det3 pour le passer au rouge de suite @@ -8831,7 +8833,7 @@ end; // adresse: adresse du detecteur, front: état du détecteur procedure calcul_zones_V1(adresse: integer;etat : boolean); var m,AdrFeu,AdrDetFeu,AdrTrainLoc,Nbre,i,i2,j,k,n,det1,det2,det3,det4,AdrSuiv,AdrPrec,Prev, - id_couleur,det_suiv,nc,etatSig : integer ; + id_couleur,det_suiv,nc,etatSig,tco : integer ; traite,trouve,SuivOk,casaig,rebond : boolean; couleur : tcolor; TypeSuiv : tEquipement; @@ -8979,8 +8981,11 @@ begin if TCOActive then begin // activation - if ModeCouleurCanton=0 then zone_TCO(1,det3,AdrSuiv,1) - else zone_TCO(1,det3,adrSuiv,2); // affichage avec la couleur de index_couleur du train + for tco:=1 to nbreTCO do + begin + if ModeCouleurCanton=0 then zone_TCO(tco,det3,AdrSuiv,1) + else zone_TCO(tco,det3,adrSuiv,2); // affichage avec la couleur de index_couleur du train + end; end; exit; // sortir absolument end @@ -9040,9 +9045,12 @@ begin Affiche_Evt(s,clWhite); if TCOActive then begin - // activation - if ModeCouleurCanton=0 then zone_TCO(1,det1,det3,1) - else zone_TCO(1,det1,det3,2); // affichage avec la couleur de index_couleur du train + // activation + for tco:=1 to nbreTCO do + begin + if ModeCouleurCanton=0 then zone_TCO(tco,det1,det3,1) + else zone_TCO(tco,det1,det3,2); // affichage avec la couleur de index_couleur du train + end; end; end; end; @@ -9225,10 +9233,13 @@ begin end; if TCOActive then begin - zone_TCO(1,det2,det3,0); // désactivation - // activation - if ModeCouleurCanton=0 then zone_TCO(1,det3,AdrSuiv,1) - else zone_TCO(1,det3,AdrSuiv,2); // affichage avec la couleur de index_couleur du train + for tco:=1 to nbreTCO do + begin + zone_TCO(tco,det2,det3,0); // désactivation + // activation + if ModeCouleurCanton=0 then zone_TCO(tco,det3,AdrSuiv,1) + else zone_TCO(tco,det3,AdrSuiv,2); // affichage avec la couleur de index_couleur du train + end; end; // mettre à jour si présence signal sur det3 pour le passer au rouge de suite @@ -9343,10 +9354,12 @@ begin if AffAigDet then AfficheDebug(s,couleur); if TCOActive then begin - zone_TCO(1,det1,det2,0); // désactivation - // activation - if ModeCouleurCanton=0 then zone_TCO(1,det2,det3,1) - else zone_TCO(1,det2,det3,2); // affichage avec la couleur de index_couleur du train + for tco:=1 to nbreTCO do + begin + // activation + if ModeCouleurCanton=0 then zone_TCO(tco,det2,det3,1) + else zone_TCO(tco,det2,det3,2); // affichage avec la couleur de index_couleur du train + end; end; exit; // sortir absolument end @@ -9523,7 +9536,7 @@ end; // adresse: adresse du detecteur, front: état du détecteur procedure calcul_zones_V2(adresse: integer;etat : boolean); var m,AdrFeu,AdrDetFeu,AdrTrainLoc,Nbre,i,j,k,n,det1,det2,det3,det4,AdrSuiv,AdrPrec,Prev, - id_couleur,det_suiv,nc,etatSig : integer ; + id_couleur,det_suiv,nc,etatSig,t : integer ; traite,trouve,SuivOk,casaig,rebond : boolean; couleur : tcolor; TypeSuiv : tEquipement; @@ -9659,8 +9672,11 @@ begin if TCOActive then begin // activation - if ModeCouleurCanton=0 then zone_TCO(1,det3,AdrSuiv,1) - else zone_TCO(1,det3,adrSuiv,2); // affichage avec la couleur de index_couleur du train + for t:=1 to nbreTCO do + begin + if ModeCouleurCanton=0 then zone_TCO(t,det3,AdrSuiv,1) + else zone_TCO(t,det3,adrSuiv,2); // affichage avec la couleur de index_couleur du train + end; end; exit; // sortir absolument end @@ -9721,8 +9737,11 @@ begin if TCOActive then begin // activation - if ModeCouleurCanton=0 then zone_TCO(1,det1,det3,1) - else zone_TCO(1,det1,det3,2); // affichage avec la couleur de index_couleur du train + for t:=1 to nbreTCO do + begin + if ModeCouleurCanton=0 then zone_TCO(t,det1,det3,1) + else zone_TCO(t,det1,det3,2); // affichage avec la couleur de index_couleur du train + end; end; end; end; @@ -9890,10 +9909,13 @@ begin end; if TCOActive then begin - zone_TCO(1,det2,det3,0); // désactivation - // activation - if ModeCouleurCanton=0 then zone_TCO(1,det3,AdrSuiv,1) - else zone_TCO(1,det3,AdrSuiv,2); // affichage avec la couleur de index_couleur du train + for t:=1 to nbreTCO do + begin + //zone_TCO(tco,det2,det3,0); // désactivation + // activation + if ModeCouleurCanton=0 then zone_TCO(t,det3,AdrSuiv,1) + else zone_TCO(t,det3,AdrSuiv,2); // affichage avec la couleur de index_couleur du train + end; end; // mettre à jour si présence signal sur det3 pour le passer au rouge de suite @@ -10021,10 +10043,13 @@ begin if AffAigDet then AfficheDebug(s,couleur); if TCOActive then begin - zone_TCO(1,det1,det2,0); // désactivation - // activation - if ModeCouleurCanton=0 then zone_TCO(1,det2,det3,1) - else zone_TCO(1,det2,det3,2); // affichage avec la couleur de index_couleur du train + for t:=1 to nbreTCO do + begin + //zone_TCO(tco,det1,det2,0); // désactivation + // activation + if ModeCouleurCanton=0 then zone_TCO(t,det2,det3,1) + else zone_TCO(t,det2,det3,2); // affichage avec la couleur de index_couleur du train + end; end; exit; // sortir absolument end @@ -12767,19 +12792,19 @@ begin GroupBox2.Left:=i+12; GroupBox3.Left:=i+12; ScrollBox1.Left:=i+12; - ScrollBox1.width:=panel2.Width-i-5; + ScrollBox1.width:=GrandPanel.Width-i-5; Panel1.Left:=GroupBox1.Left+GroupBox1.Width+5; Panel1.top:=9; GroupBox1.Top:=5; Affiche_signaux; - if not(avec_Splitter) then Panel2.Width:=i; + if not(avec_Splitter) then GrandPanel.Width:=i; end; end; // démarrage principal du programme signaux_complexes procedure TFormPrinc.FormCreate(Sender: TObject); -var i,index,OrgMilieu : integer; +var t,i,index,OrgMilieu : integer; s : string; begin AF:='Client TCP-IP CDM Rail ou USB - système XpressNet DCC++ Version '+Version+sousVersion; @@ -12967,9 +12992,7 @@ begin with statusbar1 do begin SimplePanel:=false; // pour afficher plusieurs panels dans la Statusbar - Panels[0].Text:=''; - Panels[1].Text:=''; Panels[2].Text:=''; Panels[3].Text:=''; @@ -12977,16 +13000,15 @@ begin //Panels[3].Style:=psOwnerDraw; // pour déclencher l'évenement onDraw end; - with Panel2 do - begin - left:=5; - //Align:=AlLeft; // si on ne met pas AlignLeft, alors le splitter n'est pas accrochable - top:=formprinc.LabelTitre.top+formprinc.LabelTitre.Height+4;; - width:=formprinc.width-30; - height:=formprinc.Height-StatusBar1.Height-LabelTitre.Height-63; - //height:=400; - Anchors:=[akLeft,akTop,akRight,akBottom]; - end; + with GrandPanel do + begin + left:=5; + //Align:=AlLeft; // si on ne met pas AlignLeft, alors le splitter n'est pas accrochable + top:=formprinc.LabelTitre.top+formprinc.LabelTitre.Height+4;; + width:=formprinc.width-30; + height:=formprinc.Height-StatusBar1.Height-LabelTitre.Height-63; + Anchors:=[akLeft,akTop,akRight,akBottom]; + end; if avec_splitter then @@ -12996,7 +13018,7 @@ begin left:=5; Align:=AlLeft; // si on ne met pas AlignLeft, alors le splitter n'est pas accrochable top:=5; // par rapport au panel - Width:=panel2.Width-Panel1.Width-GroupBox1.Width-25; + Width:=GrandPanel.Width-Panel1.Width-GroupBox1.Width-25; //height:=formprinc.Height-StatusBar1.Height-StaticText.Height-LabelTitre.Height-90; Anchors:=[akLeft,akTop,akRight,akBottom]; end; @@ -13005,17 +13027,17 @@ begin begin Left:=FenRich.left+FenRich.Width-25; MinSize:=200; - Parent:=Panel2; + Parent:=GrandPanel; align:=fenrich.align; // dessine le splitter à droite de la fenetre Fenrich Visible:=true; end; with ScrollBox1 do begin - Parent:=Panel2; + Parent:=GrandPanel; Anchors:=[akTop,akRight,akBottom]; - width:=panel2.Width-SplitterV.Width-5; - height:=panel2.Height-groupBox3.height-groupBox3.top-25; + width:=GrandPanel.Width-SplitterV.Width-5; + height:=GrandPanel.Height-groupBox3.height-groupBox3.top-25; top:=GroupBox3.Top+GroupBox3.Height+5; end; @@ -13033,13 +13055,13 @@ begin left:=5; top:=0; - width:=panel2.Width-orgMilieu-10; - height:=panel2.Height; + width:=GrandPanel.Width-orgMilieu-10; + height:=GrandPanel.Height; //Anchors:=[akLeft,akTop,akRight,akBottom]; GroupBox1.Left:=orgMilieu+12; GroupBox3.Left:=orgMilieu+12; ScrollBox1.Left:=orgMilieu+12; - ScrollBox1.width:=panel2.Width-orgMilieu-5; + ScrollBox1.width:=GrandPanel.Width-orgMilieu-5; ScrollBox1.top:=GroupBox3.Top+GroupBox3.Height+5; ScrollBox1.Anchors:=[akTop,akRight,akBottom]; Panel1.Left:=GroupBox1.Left+GroupBox1.Width+5; @@ -13055,36 +13077,40 @@ begin for index:=1 to nbreTCO do begin - begin - tcoCree:=false; - IndexTCOCreate:=index; - formTCO[index]:=TformTCO.Create(self); - formTCO[index].Name:='FormTCO'+intToSTR(index); - formTCO[index].Caption:='TCO'+intToSTR(index); - repeat - Application.ProcessMessages; - until tcoCree; - end; - Affiche_Fenetre_TCO(index,avecTCO); - end; + tcoCree:=false; + IndexTCOCreate:=index; + formTCO[index]:=TformTCO.Create(self); + formTCO[index].Name:='FormTCO'+intToSTR(index); + formTCO[index].Caption:='TCO'+intToSTR(index); + t:=0; + repeat + Application.ProcessMessages; + inc(t); + until tcoCree or (t>10); + if t>10 then + begin + Affiche('Erreur 850 : TCO non créé',clred); + formTCO[index]:=nil; + end + else + Affiche_Fenetre_TCO(index,avecTCO); + end; - // ouvre com commandes actionneurs, car on a lu les com dans la config + + // ouvre périphériques commandes actionneurs, car on a lu les com dans la config for i:=1 to NbPeriph do begin //index:=tablo_acc_comUSB[i].NumAcc; // numéro d'accessoire index:=com_socket(i); // comusb ou socket ? if index=1 then begin - if connecte_port_usb_periph(i) then - Affiche('COM'+intToSTR(Tablo_periph[i].numcom)+' commande périphérique ouvert',clLime) + if connecte_port_usb_periph(i) then Affiche('COM'+intToSTR(Tablo_periph[i].numcom)+' commande périphérique ouvert',clLime) else Affiche('COM'+intToSTR(Tablo_periph[i].numcom)+' commande périphérique non ouvert',clOrange); end; if index=2 then begin - if connecte_socket_periph(i) then - Affiche('Socket '+Tablo_periph[i].protocole+' demande ouverture ',clLime) - else - Affiche('Socket '+Tablo_periph[i].protocole+' commande périphérique non ouvert',clOrange) + if connecte_socket_periph(i) then Affiche('Socket '+Tablo_periph[i].protocole+' demande ouverture ',clLime) + else Affiche('Socket '+Tablo_periph[i].protocole+' commande périphérique non ouvert',clOrange) end; end; @@ -13157,7 +13183,7 @@ begin begin Affiche('Positionnement des signaux',clYellow); init_aiguillages; // initialisation des aiguillages - envoi_signauxCplx; // initialisation des feux + envoi_signauxCplx; // initialisation des signaux end; if not(AvecInitAiguillages) and not(ferme) and (parSocketLenz or portCommOuvert) and AvecDemandeAiguillages then @@ -13171,31 +13197,52 @@ begin //DoubleBuffered:=true; - { + { aiguillage[index_aig(1)].position:=const_droit; + aiguillage[index_aig(2)].position:=const_droit; aiguillage[index_aig(3)].position:=const_devie; aiguillage[index_aig(4)].position:=const_devie; aiguillage[index_aig(5)].position:=const_droit; aiguillage[index_aig(6)].position:=const_devie; - aiguillage[index_aig(7)].position:=const_devie; - aiguillage[index_aig(8)].position:=const_devie; + aiguillage[index_aig(7)].position:=const_droit; + aiguillage[index_aig(8)].position:=const_droit; aiguillage[index_aig(10)].position:=const_devie; - aiguillage[index_aig(11)].position:=const_devie; - aiguillage[index_aig(12)].position:=const_droit; + aiguillage[index_aig(11)].position:=const_droit; + aiguillage[index_aig(12)].position:=const_devie; aiguillage[index_aig(18)].position:=const_devie; aiguillage[index_aig(19)].position:=const_devie; - aiguillage[index_aig(20)].position:=const_droit; + aiguillage[index_aig(20)].position:=const_devie; aiguillage[index_aig(21)].position:=const_droit; aiguillage[index_aig(26)].position:=const_droit; aiguillage[index_aig(27)].position:=const_droit; aiguillage[index_aig(28)].position:=const_devie; aiguillage[index_aig(29)].position:=const_droit; + aiguillage[index_aig(30)].position:=const_droit; aiguillage[index_aig(31)].position:=const_devie; aiguillage[index_aig(25)].position:=const_droit; aiguillage[index_aig(9)].position:=const_droit; + {zone_tco(1,519,527,1); + zone_tco(1,521,527,2); + + Event_Detecteur(524,true,'A'); + Event_Detecteur(524,false,'A'); + + Event_Detecteur(521,true,'A'); + Event_Detecteur(521,false,'A'); + + Event_Detecteur(527,true,'A'); + Event_Detecteur(527,false,'A'); + + Event_Detecteur(524,true,'B'); + Event_Detecteur(524,false,'B'); + + Event_Detecteur(521,true,'B'); + Event_Detecteur(521,false,'B'); + + } + + // roulage:=true; - det_contigu(526,515,i,teq); - Affiche(intToSTR(i),clred); } { formatY:=2; ‹y 00001010000101000111010000> format 0 // ‹y 0A0147405801CE..40› format 1 quartets renversés @@ -13217,15 +13264,6 @@ begin end else Affiche_fenetre_CDM.Enabled:=false; - { With FenRich do - begin - ReadOnly:=false; - clear; - Affiche('',clYellow); - PasteFromClipboard; - SetFocus; - ReadOnly:=true; - end; } //Affiche(GetMACAddress,clred); formPrinc.left:=-1000; ConfCellTCO:=false; @@ -13430,8 +13468,8 @@ begin testBit(a,vert_cli) or testbit(a,blanc_cli) else begin - combine:=a and $fc00; - faire:=testBit(combine,clignote); + // signal belge + faire:=testBit(a,clignote); end; if faire then begin @@ -13935,6 +13973,7 @@ begin model:=aiguillage[i].modele ; if (model<>rien) then begin + if model<>crois then begin s:='Aiguillage '+IntToSTR(aiguillage[i].Adresse)+' : '; @@ -13955,6 +13994,7 @@ begin end; if (model=Crois) then s:='Croisement '+IntToSTR(aiguillage[i].Adresse); + r:=aiguillage[i].AdrTrain; if r<>0 then s:=s+': réservé par train @'+intToSTR(r); if s<>'' then Affiche(s,clWhite); @@ -15111,7 +15151,7 @@ end; procedure TFormPrinc.Codificationdesactionneurs1Click(Sender: TObject); var i,typ,adract,etatAct,fonction,v,acc,sortie : integer; - loc,act,son : boolean; + loc,act,son,periph : boolean; s,s2 : string; begin if (maxTablo_act=0) and (NbrePN=0) then @@ -15133,6 +15173,7 @@ begin loc:=Tablo_actionneur[i].loco; act:=Tablo_actionneur[i].act; son:=Tablo_actionneur[i].son; + periph:=Tablo_actionneur[i].periph; typ:=Tablo_actionneur[i].typdeclenche; if typ=3 then s:='Mem '+intToSTR(adrAct)+' '+inttostr(Tablo_actionneur[i].Adresse2); @@ -15146,9 +15187,12 @@ begin s:='Accessoire Déclencheur='+s+' :'+intToSTR(etatAct)+' TrainDécl='+s2+' Adresse='+IntToSTR(acc)+ ' sortie='+intToSTR(sortie); if son then - s:='Son Déclencheur='+s+' :'+intToSTR(etatAct)+' TrainDécl='+s2+ + s:='Son Déclencheur='+s+' :'+intToSTR(etatAct)+' TrainDécl='+s2+ ' Fichier:'+Tablo_actionneur[i].FichierSon; + if periph then + s:='Périphérique Déclencheur='+s; + Affiche(s,clYellow); end; @@ -16824,7 +16868,7 @@ end; procedure TFormPrinc.Affichagenormal1Click(Sender: TObject); begin //FenRich.Width:=panel2.Width div 2; - FenRich.Width:=panel2.Width-Panel1.Width-GroupBox1.Width-25; + FenRich.Width:=GrandPanel.Width-Panel1.Width-GroupBox1.Width-25; splitterV.Left:=FenRich.left+FenRich.Width-5; positionne_elements(splitterV.Left); end; @@ -16852,9 +16896,7 @@ begin end; procedure TFormPrinc.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); -var - RectForText: TRect; - i : integer; +var RectForText: TRect; begin if (Panel = StatusBar.Panels[3]) then begin diff --git a/UnitTCO.dfm b/UnitTCO.dfm index 69b91e4..892c892 100644 --- a/UnitTCO.dfm +++ b/UnitTCO.dfm @@ -1,6 +1,6 @@ object FormTCO: TFormTCO - Left = 108 - Top = 119 + Left = 14 + Top = 171 Width = 1212 Height = 580 VertScrollBar.Visible = False diff --git a/UnitTCO.pas b/UnitTCO.pas index affd358..251c2c7 100644 --- a/UnitTCO.pas +++ b/UnitTCO.pas @@ -454,6 +454,8 @@ const Graphisme_ch='Graphisme'; Ecran_ch='Ecran'; Epaisseur_voies_ch='EpVoies'; + ZoomInit_ch='ZoomInit'; + XYInit_ch='XYInit'; Id_signal=50; Id_Quai=51; Id_action=52; @@ -469,7 +471,8 @@ type TTCO = record Adresse : integer; // adresse du détecteur ou de l'aiguillage ou du feu BImage : integer; // icone: 0=rien 1=voie 2=aiguillage gauche ... 50=feu - mode : integer; // couleur de voie 0=éteint 1=ClVoies 2=couleur en fonction du train + mode : integer; // couleur de voie 0=éteint 1=ClVoies 2=couleur dans le champ train + train : integer; // numéro du train trajet : integer; // décrit le trajet ouvert sur la voie (cas d'un croisement ou d'une tjd/S) inverse : boolean; // aiguillage piloté inversé repr : integer; // position de la représentation texte 0 = rien 1=centrale 2=Haut 3=Bas 4=réparti @@ -550,7 +553,7 @@ var // liste des variables par tco largeurCelld2,HauteurCelld2,NbCellulesTCO,NbreCellX,NbreCellY,LargeurCell,HauteurCell, Xentoure,Yentoure,XclicCell,YclicCell,EcranTCO,clGrille,clFond,ClAllume,ClVoies, - ClCanton,clPiedSignal,ClQuai,ClBarriere : array[1..10] of integer; + ClCanton,clPiedSignal,ClQuai,ClBarriere,ZoomInit,Xinit,Yinit : array[1..10] of integer; PcanvasTCO : array[1..10] of Tcanvas; PBitMapTCO : array[1..10] of TbitMap; PImageTCO,PImageTemp : array[1..10] of Timage; @@ -940,15 +943,12 @@ begin end; exit; end; - screen.cursor:=crDefault; - end; procedure Init_TCO(indexTCO : integer); var x,y : integer; begin - sauve_tco:=true; Affiche('Nouveau tco '+intToSTr(indexTCO),clyellow); NbreCellX[indexTCO]:=35;NbreCellY[indexTCO]:=20;LargeurCell[indexTCO]:=35;HauteurCell[indexTCO]:=35; @@ -1069,6 +1069,29 @@ begin clVoies[indexTCO]:=i; end; + sa:=uppercase(ZoomInit_ch)+'='; + i:=pos(sa,s); + if i<>0 then + begin + inc(nv); + delete(s,i,length(sa)); + val(s,i,erreur); + ZoomInit[indexTCO]:=i; + end; + + sa:=uppercase(XYInit_ch)+'='; + i:=pos(sa,s); + if i<>0 then + begin + inc(nv); + delete(s,i,length(sa)); + val(s,i,erreur); + XInit[indexTCO]:=i; + delete(s,1,erreur); + val(s,i,erreur); + YInit[indexTCO]:=i; + end; + sa:=uppercase(clAllume_ch)+'='; i:=pos(sa,s); if i<>0 then @@ -1475,6 +1498,8 @@ begin AssignFile(fichier,nomfichierTCO[i]); rewrite(fichier); Writeln(fichier,'/ Définitions TCO version '+version+sousversion); + writeln(fichier,ZoomInit_ch+'=',ZoomInit[i]); + writeln(fichier,XYInit_ch+'=',XInit[i],',',Yinit[i]); Writeln(fichier,clFond_ch+'='+IntToHex(clfond[i],6)); Writeln(fichier,clVoies_ch+'='+IntToHex(ClVoies[i],6)); Writeln(fichier,clAllume_ch+'='+IntToHex(ClAllume[i],6)); @@ -1540,7 +1565,9 @@ procedure calcul_cellules(indexTCO : integer); var pos : integer; begin if affevt then affiche('Calcul_cellules',clyellow); - pos:=ZoomMax-FormTCO[indexTCO].TrackBarZoom.Position+ZoomMin; + + + pos:=ZoomMax-ZoomInit[indexTCO]+ZoomMin; //Affiche('Position TrackBar°'+intToSTR(indexTCO)+'='+intToSTR(pos),clyellow); LargeurCell[indexTCO]:=pos; @@ -1675,10 +1702,11 @@ begin if but<>0 then begin + case mode of 0 : couleur:=clVoies[indexTCO]; 1 : couleur:=clAllume[indexTCO]; - 2 : couleur:=couleurtrain[index_couleur]; + 2 : couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; pen.color:=couleur; if testbit(ep,7) or testbit(ep,3) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; @@ -1725,9 +1753,9 @@ begin jy1:=y0+(HauteurCell[indexTCO] div 2); case mode of - 0 : couleur:=clVoies[indexTCO]; - 1 : couleur:=clAllume[indexTCO]; - 2 : couleur:=couleurtrain[index_couleur]; + 0 : couleur:=clVoies[indexTCO]; + 1 : couleur:=clAllume[indexTCO]; + 2 : couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; pen.color:=couleur; if testbit(ep,7) or testbit(ep,3) then pen.Width:=epaisseur div 2 else @@ -1917,7 +1945,7 @@ var i,j,x0,y0,xc,yc,jy2,xf,yf,position,jy1,connect1,connect2,connect3,connect4 : if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -1946,7 +1974,7 @@ var i,j,x0,y0,xc,yc,jy2,xf,yf,position,jy1,connect1,connect2,connect3,connect4 : if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2070,7 +2098,7 @@ var x0,y0,xc,yc,jy2,xf,yf,position,jy1,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2092,7 +2120,7 @@ var x0,y0,xc,yc,jy2,xf,yf,position,jy1,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2188,7 +2216,7 @@ var x0,y0,xc,yc,jy2,xf,yf,position,x1,y1,x2,y2,x3,y3,x4,y4,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2210,7 +2238,7 @@ var x0,y0,xc,yc,jy2,xf,yf,position,x1,y1,x2,y2,x3,y3,x4,y4,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2317,7 +2345,7 @@ var x0,y0,xc,yc,jy1,xf,yf,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2339,7 +2367,7 @@ var x0,y0,xc,yc,jy1,xf,yf,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2430,7 +2458,7 @@ var x0,y0,xc,yc,jy1,xf,yf,position,x1,y1,x2,y2,x3,y3,x4,y4,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2452,7 +2480,7 @@ var x0,y0,xc,yc,jy1,xf,yf,position,x1,y1,x2,y2,x3,y3,x4,y4,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2569,7 +2597,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2591,7 +2619,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2653,10 +2681,10 @@ begin pen.color:=fond; Brush.Color:=fond; pen.width:=1; - x1:=xc+(epaisseur div 2);y1:=yc-(epaisseur div 2)-1; - x2:=x1+8;y2:=y1; - x3:=x2+6;y3:=y2+7; - x4:=x1+6;y4:=y3; + x1:=xc+round(0.3*epaisseur);y1:=yc-(epaisseur div 2)-1; + x2:=x1+epaisseur;y2:=y1; + x3:=x2+epaisseur;y3:=y2+epaisseur; + x4:=x1+epaisseur;y4:=y3; Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]); end; @@ -2668,7 +2696,7 @@ begin pen.Width:=1; // efface le morceau x1:=xc-epaisseur-1;y1:=yc+(epaisseur div 2)+1; - x2:=x1+21;y2:=y1+5; + x2:=x1+25;y2:=y1+5; r:=rect(x1,y1,x2,y2); rectangle(r); end; @@ -2688,7 +2716,7 @@ var x0,y0,xc,yc,xf,yf,x1,y1,x2,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2710,7 +2738,7 @@ var x0,y0,xc,yc,xf,yf,x1,y1,x2,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2780,9 +2808,9 @@ begin pen.width:=1; x1:=xc-12;y1:=yc-(epaisseur div 2)-1; x2:=x1+15;y2:=y1; - x3:=x2+6;y3:=y2+7; + x3:=x2+6;y3:=y2+8; x4:=x1+12;y4:=y3; - Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]); + Polygon([point(xc-round(2.1*epaisseur),yc-epaisseur-1),point(xc,yc-epaisseur-1),point(xc+3*epaisseur,yc+epaisseur),point(xc+round(2.0*epaisseur),yc+epaisseur)]); end; if position=const_droit then @@ -2792,7 +2820,7 @@ begin Brush.Color:=fond; pen.Width:=1; // efface le morceau - x1:=xc-2*epaisseur;y1:=yc+(epaisseur div 2)+1; + x1:=xc-3*epaisseur;y1:=yc+(epaisseur div 2)+1; x2:=xc+2*epaisseur+2;y2:=y1+5; r:=rect(x1,y1,x2,y2); rectangle(r); @@ -2820,7 +2848,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2842,7 +2870,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2939,7 +2967,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -2961,7 +2989,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -3074,7 +3102,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Pen.Width:=epaisseur; Brush.Color:=Couleur; @@ -3111,9 +3139,9 @@ begin Pen.Width:=1; case mode of - 0: couleur:=clVoies[indexTCO]; - 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 0: couleur:=clVoies[indexTCO]; + 1: couleur:=ClCanton[indexTCO]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; if testbit(ep,0) or testbit(ep,3) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; @@ -3150,17 +3178,17 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; pen.color:=couleur; Pen.Mode:=pmCopy; - + if testbit(ep,7) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; moveto(x0,yc);lineto(xc,yc); if testbit(ep,2) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; lineto(x0+LargeurCell[indexTCO],y0); - + end; end; @@ -3190,7 +3218,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; pen.color:=couleur; @@ -3226,7 +3254,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; Pen.Mode:=pmCopy; @@ -3266,7 +3294,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; Pen.Mode:=pmCopy; @@ -3302,7 +3330,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; pen.color:=Couleur; @@ -3345,7 +3373,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; pen.color:=Couleur; @@ -3388,7 +3416,7 @@ begin case mode of 0 : couleur:=clVoies[indexTCO]; 1 : couleur:=clAllume[indexTCO]; - 2 : couleur:=couleurtrain[index_couleur]; + 2 : couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; pen.color:=couleur; if testbit(ep,2) or testbit(ep,6) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; @@ -3431,7 +3459,7 @@ begin case mode of 0 : couleur:=clVoies[indexTCO]; 1 : couleur:=clAllume[indexTCO]; - 2 : couleur:=couleurtrain[index_couleur]; + 2 : couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; pen.color:=couleur; @@ -3463,7 +3491,7 @@ begin case mode of 0 : couleur:=clVoies[indexTCO]; 1 : couleur:=clAllume[indexTCO]; - 2 : couleur:=couleurtrain[index_couleur]; + 2 : couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; pen.color:=couleur; if testbit(ep,0) or testbit(ep,4) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; @@ -3508,7 +3536,7 @@ begin case mode of 0 : couleur:=clVoies[indexTCO]; 1 : couleur:=clAllume[indexTCO]; - 2 : couleur:=couleurtrain[index_couleur]; + 2 : couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; pen.color:=couleur; @@ -3531,7 +3559,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -3553,7 +3581,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -3565,11 +3593,9 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; moveto(x0,y0);lineto(xc,yc); if testbit(ep,3) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; lineto(xf,yc); - end; end; - begin x0:=(x-1)*LargeurCell[indexTCO]; // x origine y0:=(y-1)*hauteurCell[indexTCO]; // y origine @@ -3643,7 +3669,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -3666,7 +3692,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -3678,8 +3704,6 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; end; end; - - begin x0:=(x-1)*LargeurCell[indexTCO]; // x origine y0:=(y-1)*hauteurCell[indexTCO]; // y origine @@ -3720,14 +3744,12 @@ begin trajet_droit; end; end - else begin trajet_devie; trajet_droit; end; - if (position=const_Devie) then begin // effacement du morceau @@ -3764,7 +3786,7 @@ begin end; -// Elément 13 fait +// Elément 13 procedure dessin_13L(indexTCO : integer;Canvas : Tcanvas;x,y : integer;Mode : integer); var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,position,ep : integer; r : Trect; @@ -3778,7 +3800,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -3800,7 +3822,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -3875,7 +3897,6 @@ begin end; end; -// fait procedure dessin_13C(indexTCO : integer;Canvas : Tcanvas;x,y : integer;Mode : integer); var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; fond : tcolor; @@ -3888,7 +3909,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -3911,7 +3932,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -3923,8 +3944,6 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; end; end; - - begin x0:=(x-1)*LargeurCell[indexTCO]; // x origine y0:=(y-1)*hauteurCell[indexTCO]; // y origine @@ -4022,7 +4041,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -4044,7 +4063,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -4141,7 +4160,7 @@ procedure trajet_droit; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -4160,7 +4179,7 @@ procedure trajet_droit; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -4272,7 +4291,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -4294,7 +4313,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -4389,7 +4408,7 @@ procedure trajet_droit; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -4412,7 +4431,7 @@ procedure trajet_droit; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -4424,7 +4443,6 @@ procedure trajet_droit; end; end; - begin x0:=(x-1)*LargeurCell[indexTCO]; // x origine y0:=(y-1)*hauteurCell[indexTCO]; // y origine @@ -4506,7 +4524,7 @@ begin end; -// Element 16 fait +// Element 16 procedure dessin_16L(indexTCO : integer;Canvas : Tcanvas;x,y,mode: integer); var x0,y0,xc,yc,ep : integer; begin @@ -4526,7 +4544,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; pen.color:=Couleur; @@ -4536,7 +4554,6 @@ begin end; end; -// fait procedure dessin_16C(indexTCO : integer;Canvas : Tcanvas;x,y,mode: integer); var x0,y0,xc,yc,x1,y1,x2,y2,x3,y3,x4,y4,xf,yf,ep : integer; begin @@ -4560,7 +4577,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; pen.color:=Couleur; @@ -4578,7 +4595,7 @@ begin end; -// Element 17 fait +// Element 17 procedure dessin_17l(indexTCO : integer;Canvas : Tcanvas;x,y,mode: integer); var x0,y0,xc,yc,ep : integer; begin @@ -4595,7 +4612,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=couleur; pen.color:=couleur; @@ -4628,7 +4645,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=couleur; pen.color:=couleur; @@ -4661,7 +4678,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; pen.color:=Couleur; @@ -4693,7 +4710,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=clfond[indexTCO]; pen.color:=Couleur; @@ -4710,7 +4727,6 @@ begin end; // Element 19 -// fait procedure dessin_19l(indexTCO : integer;Canvas : Tcanvas;x,y,mode: integer); var x0,y0,xc,yc,ep : integer; begin @@ -4727,7 +4743,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; pen.color:=Couleur; @@ -4737,7 +4753,6 @@ begin end; end; -// fait procedure dessin_19c(indexTCO : integer;Canvas : Tcanvas;x,y,mode: integer); var x0,y0,xc,yc,x1,y1,x2,y2,x3,y3,x4,y4,xf,yf,ep : integer; begin @@ -4761,7 +4776,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=Couleur; pen.color:=Couleur; @@ -4777,8 +4792,7 @@ begin if graphisme=2 then dessin_19C(indexTco,Canvas,x,y,Mode); end; - -// Element 20 fait +// Element 20 procedure dessin_20(indexTCO : integer;Canvas : Tcanvas;x,y,mode: integer); var jx1,jx2,x0,y0,xc,xf,yf,yc,adr,ep,but : integer; r : Trect; @@ -4803,7 +4817,7 @@ begin case mode of 0 : couleur:=clVoies[indexTCO]; 1 : couleur:=clAllume[indexTCO]; - 2 : couleur:=couleurtrain[index_couleur]; + 2 : couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; pen.color:=couleur; if testbit(ep,1) or testbit(ep,5) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; @@ -4853,7 +4867,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=couleur; pen.color:=couleur; @@ -4978,7 +4992,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=couleur; pen.color:=couleur; @@ -5119,7 +5133,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=couleur; pen.color:=couleur; @@ -5244,7 +5258,7 @@ var x0,y0,xc,yc,jx1,jy1,xf,yf,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -5266,7 +5280,7 @@ var x0,y0,xc,yc,jx1,jy1,xf,yf,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -5361,7 +5375,7 @@ procedure trajet_droit; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -5383,7 +5397,7 @@ procedure trajet_droit; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -5587,7 +5601,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=couleur; pen.color:=couleur; @@ -5728,7 +5742,6 @@ begin moveto(x1,y1);lineTo(x2,y2); end; - // regarder d'ou on vient de la route du tco if mode>0 then begin @@ -5736,7 +5749,7 @@ begin case mode of 0: couleur:=clVoies[indexTCO]; 1: couleur:=ClCanton[indexTCO]; - 2: couleur:=couleurtrain[index_couleur]; + 2: couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; Brush.Color:=couleur; @@ -5761,7 +5774,7 @@ begin end; end; -// Element 26 fait +// Element 26 procedure dessin_26L(indexTCO : integer;Canvas : Tcanvas;x,y,mode: integer); var x0,y0,xc,yc,jx1,jy1,xf,yf,position,ep : integer; r : Trect; @@ -5775,7 +5788,7 @@ var x0,y0,xc,yc,jx1,jy1,xf,yf,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -5797,7 +5810,7 @@ var x0,y0,xc,yc,jx1,jy1,xf,yf,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -5896,7 +5909,7 @@ procedure trajet_droit; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -5918,7 +5931,7 @@ procedure trajet_droit; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6022,7 +6035,7 @@ var x0,y0,jx2,jy2,jx3,jy3,xc,yc,jx1,jy1,xf,yf,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6044,7 +6057,7 @@ var x0,y0,jx2,jy2,jx3,jy3,xc,yc,jx1,jy1,xf,yf,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6144,7 +6157,7 @@ procedure trajet_droit; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6166,7 +6179,7 @@ procedure trajet_droit; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6273,7 +6286,7 @@ var x0,y0,jx2,jy2,jx3,jy3,xc,yc,jx1,jy1,xf,yf,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6295,7 +6308,7 @@ var x0,y0,jx2,jy2,jx3,jy3,xc,yc,jx1,jy1,xf,yf,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6385,7 +6398,7 @@ procedure trajet_droit; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6407,7 +6420,7 @@ procedure trajet_droit; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6512,7 +6525,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6534,7 +6547,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6622,7 +6635,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6644,7 +6657,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6751,7 +6764,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6773,7 +6786,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6871,7 +6884,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -6893,7 +6906,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -7004,7 +7017,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -7026,7 +7039,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -7126,7 +7139,7 @@ procedure trajet_droit; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -7148,7 +7161,7 @@ procedure trajet_droit; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -7260,7 +7273,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -7282,7 +7295,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -7356,7 +7369,6 @@ begin end; end; -//fait procedure dessin_34C(indexTCO : integer;Canvas : Tcanvas;x,y : integer;Mode : integer); var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; fond : Tcolor; @@ -7369,7 +7381,7 @@ procedure trajet_droit; if position=const_droit then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -7391,7 +7403,7 @@ procedure trajet_droit; if position=const_devie then begin if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurtrain[index_couleur]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; end; end; @@ -8127,7 +8139,7 @@ begin //pcanvasTCO.Brush.Style:=BsClear; adresse:=tco[indextco,x,y].Adresse; BImage:=tco[indextco,x,y].BImage; - mode:=tco[indextco,x,y].mode; + mode:=tco[indextco,x,y].mode; // mode pour la couleur repr:=tco[indextco,x,y].repr; Xorg:=(x-1)*LargeurCell[indexTCO]; @@ -8434,7 +8446,7 @@ begin if AvecGrille[indexTCO] then begin y1:=HauteurCell[IndexTCO]*NbreCellY[indexTCO]; - PcanvasTCO[indexTCO].pen.color:=clGrille[IndexTCO]; + with PcanvasTCO[indexTCO] do pen.color:=clGrille[IndexTCO]; //Affiche(intToSTr(clGrille[IndexTCO]),clred); with PcanvasTCO[indexTCO] do @@ -8509,7 +8521,7 @@ begin Buttonmasquer.TabStop:=false; ButtonRaz.TabStop:=false; ButtonDessiner.TabStop:=false; - TrackBarZoom.position:=78; + //TrackBarZoom.position:=78; couleurAdresse:=Cyan; xMiniSel:=99999;yMiniSel:=99999; @@ -8586,16 +8598,13 @@ begin tcoCree:=true; if debug=1 then Affiche('Fin création fenêtre TCO',clLime); - - - end; // trouve le détecteur det dans le TCO et renvoie x et y // si on le trouve pas, renvoie x=0,y=0 procedure trouve_det(indexTCO,det : integer;var x,y : integer); -var xc,yc : integer; +var xc,yc,b : integer; trouve : boolean; begin yc:=1; @@ -8603,7 +8612,9 @@ begin xc:=0; repeat inc(xc); - trouve:=tco[indextco,xc,yc].Adresse=det; + b:=tco[indextco,xc,yc].Bimage; + trouve:=(tco[indextco,xc,yc].Adresse=det) and + ( (b=1) or (b=10) or (b=11) or (b=20) ); // trouvé détecteur- obligé de regarder le type d'objet car un détecteur et un signal peuvent avoir la même adresse! until (xc=NbreCellX[indexTCO]) or trouve; inc(yc); until (yc=NbreCellY[indexTCO]) or trouve; @@ -8624,7 +8635,7 @@ procedure Erreur_TCO(indexTCO,x,y : integer); var s : string; i,adresse : integer; begin - s:='Erreur 92 TCO : cellule '+intToSTR(x)+','+intToSTR(y)+' '; + s:='Erreur 92 TCO - Cellule '+intToSTR(x)+','+intToSTR(y)+' '; adresse:=tco[indextco,x,y].Adresse; i:=index_aig(adresse); if i=0 then s:=s+'aiguillage '+intToSTR(adresse)+' inconnu'; @@ -8646,7 +8657,7 @@ var direction,i,j,x,y,xn,yn,ancienY,ancienX,Xdet1,Ydet1,Xdet2,Ydet2,Bimage,adres s : string; begin // trouver le détecteur det1 - if debugTCO then AfficheDebug('Zone_TCO det1='+intToSTR(det1)+' det2='+intToSTR(det2)+' mode='+intToSTR(mode)+' couleur='+intToSTR(index_couleur),clyellow); + if debugTCO then AfficheDebug('Zone_TCO det1='+intToSTR(det1)+' det2='+intToSTR(det2)+' mode='+intToSTR(mode),clyellow); trouve_det(indexTCO,det1,Xdet1,Ydet1); if (Xdet1=0) or (Ydet1=0) then exit; @@ -8733,7 +8744,7 @@ begin if (ancienXx) and (ancienY=Y) then begin xn:=x-1;if pos=const_devie then yn:=y+1;end; if (ancienXy) then begin xn:=x+1; end; - if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);exit;end; + if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);sortir:=true;end; end; 3 : begin //if debugTCO then AfficheDebug('El 3',clyellow); @@ -8741,7 +8752,7 @@ begin if (ancienXx) and (ancienY=Y) then begin xn:=x-1;end; if (ancienX>x) and (ancienYx) and (ancienY=Y) then begin xn:=x-1;end; if (ancienX>x) and (ancienY>y) then begin xn:=x-1;end; - if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);exit;end; + if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);sortir:=true;end; end; 5 : begin //if debugTCO then AfficheDebug('El 5',clyellow); @@ -8757,7 +8768,7 @@ begin if (ancienXx) and (ancienY=Y) then begin xn:=x-1;if pos=const_devie then yn:=y-1;end; if (ancienXx) and (ancienY=Y) then begin xn:=x-1;yn:=y-1;end; if (ancienX>x) and (ancienY>y) then begin xn:=x-1;yn:=y-1;end; - if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);exit;end; + if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);sortir:=true;end; end; 13 : begin //if debugTCO then AfficheDebug('El 13',clyellow); @@ -8789,7 +8800,7 @@ begin if (ancienXx) and (ancienYy) then begin xn:=x+1;yn:=y-1;end; - if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);exit;end; + if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);sortir:=true;end; end; 14 : begin //if debugTCO then AfficheDebug('El 14',clyellow); @@ -8797,7 +8808,7 @@ begin if (ancienXx) and (ancienY>y) then begin xn:=x-1;if pos=const_droit then yn:=y-1;end; - if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);exit;end; + if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);sortir:=true;end; end; 15 : begin //if debugTCO then AfficheDebug('El 15',clyellow); @@ -8805,7 +8816,7 @@ begin if (ancienXY) then begin xn:=x+1;if pos=const_droit then yn:=y-1;end; if (ancienX>x) and (ancienYx) and (ancienY=y) then begin xn:=x-1;yn:=y+1;end; - if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);exit;end; + if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);sortir:=true;end; end; 16 : if ancienXx) and (ancienY>Y) then begin xn:=x-1;yn:=y-1;end; // on vient de bas if (ancienX=x) and (ancienY>y) then begin xn:=x-1;yn:=y-1;end; - if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);exit;end; + if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);sortir:=true;end; end; 32 : begin if debugTCO then AfficheDebug('El 32',clyellow); @@ -9206,7 +9217,7 @@ begin if (ancienX=x) and (ancienY>Y) then begin xn:=x+1;yn:=y-1;end; // on vient d'en haut à droite if (ancienX>x) and (ancienYx) and (ancienY>y) then begin yn:=y-1;if pos=const_droit then xn:=x-1 else xn:=x;end; - if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);exit;end; + if (pos=const_inconnu) then begin Erreur_TCO(indexTCO,x,y);sortir:=true;end; end; 34 : begin pos:=positionTCO(indexTCO,x,y); @@ -9227,7 +9238,7 @@ begin if (ancienX=x) and (ancienYx) and (ancienYdet2) and (adresse<>det1) and (adresse<>0)) then sortir:=true; ancienX:=x; ancienY:=y; x:=xn; @@ -9277,7 +9289,8 @@ begin begin x:=routetco[i].x; y:=routetco[i].y; - tco[indextco,x,y].mode:=mode; + tco[Indextco,x,y].mode:=mode;//zizi //mode; // pour la couleur + TCO[IndexTCO,x,y].train:=index_couleur; //Affiche(intToSTR(x)+' '+intToSTR(y),clorange); bimage:=tco[indextco,x,y].BImage; @@ -9293,6 +9306,7 @@ begin ay:=routetco[i-1].y; sx:=routetco[i+1].x; // suivant sy:=routetco[i+1].y; + tco[indextco,x,y].trajet:=0; if (ax-x=-1) and (ay-y=0) and (sx-x=1) and (sy-y=0) then tco[indextco,x,y].trajet:=1; // de gauche à droite if (ax-x=1) and (ay-y=0) and (sx-x=-1) and (sy-y=0) then tco[indextco,x,y].trajet:=1; // de droite à gauche if (ax-x=-1) and (ay-y=1) and (sx-x=1) and (sy-y=-1) then tco[indextco,x,y].trajet:=2; // de bas gauche vers haut droit @@ -9301,7 +9315,7 @@ begin if (ax-x=1) and (ay-y=-1) and (sx-x=-1) and (sy-y=0) then tco[indextco,x,y].trajet:=4; // de haut droite vers gauche if (ax-x=-1) and (ay-y=1) and (sx-x=1) and (sy-y=0) then tco[indextco,x,y].trajet:=3; // de bas gauche vers droite if (ax-x=1) and (ay-y=0) and (sx-x=-1) and (sy-y=1) then tco[indextco,x,y].trajet:=3; // de gauche vers haut droite - if tco[indextco,x,y].trajet=0 then affiche('Erreur 50 TCO',clred); + if tco[indextco,x,y].trajet=0 then affiche('Erreur 70 TCO - Cellule '+intToSTR(x)+','+intToSTR(y),clred); end; // croisement @@ -9313,6 +9327,7 @@ begin ay:=routetco[i-1].y; sx:=routetco[i+1].x; // suivant sy:=routetco[i+1].y; + tco[indextco,x,y].trajet:=0; if (ax-x=-1) and (ay-y=0) and (sx-x=1) and (sy-y=0) then tco[indextco,x,y].trajet:=1; // de gauche à droite if (ax-x=1) and (ay-y=0) and (sx-x=-1) and (sy-y=0) then tco[indextco,x,y].trajet:=1; // de droite à gauche if (ax-x=-1) and (ay-y=-1) and (sx-x=1) and (sy-y=1) then tco[indextco,x,y].trajet:=2; // de haut gauche vers bas droit @@ -9321,7 +9336,7 @@ begin if (ax-x=-1) and (ay-y=-1) and (sx-x=1) and (sy-y=0) then tco[indextco,x,y].trajet:=3; // de haut à gauche vers droit if (ax-x=1) and (ay-y=1) and (sx-x=-1) and (sy-y=0) then tco[indextco,x,y].trajet:=4; // de bas à droite vers gauche if (ax-x=-1) and (ay-y=0) and (sx-x=1) and (sy-y=1) then tco[indextco,x,y].trajet:=4; // de gauche vers en bas a droite - if tco[indextco,x,y].trajet=0 then affiche('Erreur 51 TCO',clred); + if tco[indextco,x,y].trajet=0 then affiche('Erreur 71 TCO - Cellule '+intToSTR(x)+','+intToSTR(y),clred); end; // croisement @@ -9333,6 +9348,7 @@ begin ay:=routetco[i-1].y; sx:=routetco[i+1].x; // suivant sy:=routetco[i+1].y; + tco[indextco,x,y].trajet:=0; if (ax-x=0) and (ay-y=-1) and (sx-x=0) and (sy-y=1) then tco[indextco,x,y].trajet:=1; // de haut à bas if (ax-x=0) and (ay-y=1) and (sx-x=0) and (sy-y=-1) then tco[indextco,x,y].trajet:=1; // de bas à haut if (ax-x=1) and (ay-y=-1) and (sx-x=-1) and (sy-y=1) then tco[indextco,x,y].trajet:=2; // de haut droit vers bas gauche @@ -9341,7 +9357,7 @@ begin if (ax-x=0) and (ay-y=1) and (sx-x=1) and (sy-y=-1) then tco[indextco,x,y].trajet:=3; // de bas vers haut droit if (ax-x=0) and (ay-y=-1) and (sx-x=-1) and (sy-y=1) then tco[indextco,x,y].trajet:=4; // de haut vers bas gauche if (ax-x=-1) and (ay-y=1) and (sx-x=0) and (sy-y=-1) then tco[indextco,x,y].trajet:=4; // de bas gauche vers haut - if tco[indextco,x,y].trajet=0 then affiche('Erreur 52 TCO',clred); + if tco[indextco,x,y].trajet=0 then affiche('Erreur 72 TCO - Cellule '+intToSTR(x)+','+intToSTR(y),clred); end; // croisement @@ -9353,6 +9369,7 @@ begin ay:=routetco[i-1].y; sx:=routetco[i+1].x; // suivant sy:=routetco[i+1].y; + tco[indextco,x,y].trajet:=0; if (ax-x=0) and (ay-y=-1) and (sx-x=0) and (sy-y=1) then tco[indextco,x,y].trajet:=1; // de haut à bas if (ax-x=0) and (ay-y=1) and (sx-x=0) and (sy-y=-1) then tco[indextco,x,y].trajet:=1; // de bas à haut if (ax-x=-1) and (ay-y=-1) and (sx-x=1) and (sy-y=1) then tco[indextco,x,y].trajet:=2; // de haut gauche vers bas droit @@ -9361,7 +9378,7 @@ begin if (ax-x=0) and (ay-y=1) and (sx-x=-1) and (sy-y=-1) then tco[indextco,x,y].trajet:=3; // de bas vers haut gauche if (ax-x=0) and (ay-y=-1) and (sx-x=1) and (sy-y=1) then tco[indextco,x,y].trajet:=4; // de haut vers bas droite if (ax-x=-1) and (ay-y=1) and (sx-x=0) and (sy-y=-1) then tco[indextco,x,y].trajet:=4; // de bas droit vers haut - if tco[indextco,x,y].trajet=0 then affiche('Erreur 53 TCO',clred); + if tco[indextco,x,y].trajet=0 then affiche('Erreur 73 TCO - Cellule '+intToSTR(x)+','+intToSTR(y),clred); end; Affiche_cellule(indexTCO,x,y); end; @@ -9450,7 +9467,7 @@ end; // dessine les icones du tco et les aligne procedure dessine_icones(indexTCO : integer); -var ancH,ancW,i,lf,hf: integer; +var ancH,ancW,i,lf,hf,sauv_ep: integer; ip : TImage; lbl : Tlabel; begin @@ -9502,6 +9519,7 @@ begin end; // et puis on les dessine + sauv_ep:=epaisseur; epaisseur:=4; ancw:=LargeurCell[indexTCO]; AncH:=hauteurCell[indexTCO]; @@ -9563,6 +9581,7 @@ begin end; LargeurCell[indexTCO]:=ancW; hauteurCell[indexTCO]:=ancH; + epaisseur:=sauv_ep; end; procedure positionne(indexTCO : integer); @@ -9642,9 +9661,9 @@ begin //déclenche l'Affiche_tco + if ZoomInit[indexTCO]<>0 then FormTCO[indexTCO].TrackBarZoom.Position:=ZoomInit[indexTCO] else TrackBarZoom.position:=34; TrackBarZoom.Max:=ZoomMax; TrackBarZoom.Min:=ZoomMin; - TrackBarZoom.position:=34; positionne(indexTCO); @@ -9982,7 +10001,7 @@ begin end; procedure selection_bleue(indexTCO,cellX,cellY : integer); -var XSel1,YSel1,XSel2,YSel2,xMiniSelP,yminiSelP,xMaxiSelP,ymaxiSelP : integer; +var xMiniSelP,yminiSelP,xMaxiSelP,ymaxiSelP : integer; r : Trect; begin // zone de sélection bleue en coords pixels @@ -10017,12 +10036,6 @@ begin r:=Rect(xminiSel+1,YminiSel+1,XmaxiSel+LargeurCell[indexTCO],yMaxiSel+hauteurCell[indexTCO]); - XSel1:=Xminisel div LargeurCell[indexTCO] + 1; - YSel1:=Yminisel div hauteurCell[indexTCO] + 1; - XSel2:=Xmaxisel div LargeurCell[indexTCO] + 1; - YSel2:=Ymaxisel div hauteurCell[indexTCO] + 1; - - //Affiche(intToSTR(Xsel1)+' '+intToStr(Ysel1)+' '+intToSTR(Xsel2)+' '+intToStr(Ysel2),clYellow); // Affiche le nouveau rectangle de sélection Rancien:=r; with formTCO[indexTCO].ImageTCO.canvas do @@ -10390,7 +10403,7 @@ begin tco[indextco,XClic,YClic].liaisons:=liaisons[icone]; tco[indextco,xClic,YClic].CoulFonte:=clYellow; formTCO[indexTCO].EditAdrElement.Text:=IntToSTR( tco[indextco,XClic,YClic].Adresse); - formTCO[indexTCO].EdittypeImage.Text:=IntToSTR(tco[indextco,XClic,YClic].BImage); + formTCO[indexTCO].EdittypeImage.Text:=IntToSTR(tco[indextco,XClic,YClic].BImage); end; procedure TFormTCO.ImagePalette5EndDrag(Sender, Target: TObject; X,Y: Integer); @@ -11373,9 +11386,8 @@ begin end; end; end - else - s:='Croisement '+intToSTR(adresse); - end; + end + else s:='Croisement '+intToSTR(adresse); end; ImageTCO.Hint:=s; end @@ -11415,7 +11427,7 @@ end; procedure TFormTCO.ImageTCOMouseMove(Sender: TObject; Shift: TShiftState;X, Y: Integer); var r : Trect; - indexTCO,XSel1,YSel1,XSel2,YSel2,Bimage,xMiniSelP,yMiniSelP,xMaxiSelP,yMaxiSelP : integer; + indexTCO,xMiniSelP,yMiniSelP,xMaxiSelP,yMaxiSelP : integer; ok : boolean; begin if affevt then Affiche('ImageTCOMouseMove',clLime); @@ -11449,7 +11461,6 @@ begin if CellX>NbreCellX[indexTCO] then exit; if CellY>NbreCellY[indexTCO] then exit; - Bimage:=tco[indextco,cellX,cellY].BImage; if modeTrace[indexTCO] then begin @@ -11528,17 +11539,9 @@ begin r:=Rect(xminiSel+1,YminiSel+1,XmaxiSel+LargeurCell[indexTCO],yMaxiSel+hauteurCell[indexTCO]); - XSel1:=Xminisel div LargeurCell[indexTCO] + 1; - YSel1:=Yminisel div hauteurCell[indexTCO] + 1; - XSel2:=Xmaxisel div LargeurCell[indexTCO] + 1; - YSel2:=Ymaxisel div hauteurCell[indexTCO] + 1; - - //Affiche(intToSTR(Xsel1)+' '+intToStr(Ysel1)+' '+intToSTR(Xsel2)+' '+intToStr(Ysel2),clYellow); - // Affiche le nouveau rectangle de sélection Rancien:=r; Affiche_selection(indexTCO); - SelectionAffichee[indexTCO]:=true; //Affiche('Sélection affichée',clLime); if entoure[indexTCO] then begin Entoure_cell(indexTCO,Xentoure[indexTCO],Yentoure[indexTCO]);entoure[indexTCO]:=false;end; // efface @@ -11889,7 +11892,8 @@ var indextco : integer; begin if affevt then Affiche('TrackBarZoomChange',clyellow); indexTCO:=index_tco(sender); -// Affiche(intToSTR(TrackBarZoom.position),clred); + ZoomInit[indexTCO]:=TrackBarZoom.Position; + //Affiche(intToSTR(TrackBarZoom.position),clred); calcul_cellules(indexTCO); Affiche_TCO(indexTCO); SelectionAffichee[indexTCO]:=false; @@ -12487,9 +12491,8 @@ begin init_tampon_copiercoller; for y:=NbreCellY[indexTCO]-1 downto YClicCell[indexTCO] do - begin for x:=1 to NbreCellX[indexTCO] do tco[indextco,x,y+1]:=tco[indextco,x,y]; - end; + for x:=1 to NbreCellX[indexTCO] do begin tco[indextco,x,YClicCell[indexTCO]].Adresse:=0; @@ -12812,9 +12815,7 @@ begin selectionaffichee[indexTCO]:=false; for y:=Ymini to Ymaxi do for x:=Xmini to Xmaxi do - begin tco[indextco,x,y].CouleurFond:=ColorDialog1.Color; - end; end else tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].CouleurFond:=ColorDialog1.Color; diff --git a/verif_version.pas b/verif_version.pas index 0d856de..4ef6aff 100644 --- a/verif_version.pas +++ b/verif_version.pas @@ -25,7 +25,7 @@ var verifVersion,notificationVersion : boolean; date_creation,nombre_tel : string; -Const Version='8.25'; // sert à la comparaison de la version publiée +Const Version='8.26'; // 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; @@ -228,12 +228,12 @@ begin //description:=utf8Decode(description); i:=1 ; j:=1; // couper en chaînes - while j<>0 do - begin + repeat j:=pos('\r',description); if j<>0 then begin comm[i]:=copy(description,1,j-1); + inc(i); delete(description,1,j+1); end; @@ -244,10 +244,11 @@ begin delete(description,j,2); end; - end; + until j=0; + // + ncomm:=i; comm[i]:=supprime_anti(description); - ncomm:=i-1; - + end; end; diff --git a/versions.txt b/versions.txt index f32ae5b..38091c0 100644 --- a/versions.txt +++ b/versions.txt @@ -199,7 +199,7 @@ version 8.23 : Correction bug si changement aspect du signal. version 8.24 : Traitement de cas particuliers de l'importation de réseaux CDM rail. version 8.25 : Intégration d'un outil graphique de sélection dans le TCO. Intégration d'un menu dans la fenêtre du TCO. - - +version 8.26 : Amélioration de l'affichage du suivi des trains dans les TCOs. + Restitution du Zoom du TCO lors de sa sauvegarde.