This commit is contained in:
f1iwq2
2020-03-25 17:15:08 +01:00
parent 8f0151a472
commit f81f270a23
18 changed files with 76 additions and 43 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -11,6 +11,7 @@ object FormConfigTCO: TFormConfigTCO
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
Font.Style = [] Font.Style = []
OldCreateOrder = False OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
object Label1: TLabel object Label1: TLabel
@@ -42,7 +43,7 @@ object FormConfigTCO: TFormConfigTCO
Caption = 'Nombre de cellules en vertical:' Caption = 'Nombre de cellules en vertical:'
end end
object LabelNbCellX: TLabel object LabelNbCellX: TLabel
Left = 176 Left = 192
Top = 56 Top = 56
Width = 96 Width = 96
Height = 20 Height = 20
@@ -55,7 +56,7 @@ object FormConfigTCO: TFormConfigTCO
ParentFont = False ParentFont = False
end end
object LabelNbCellY: TLabel object LabelNbCellY: TLabel
Left = 176 Left = 192
Top = 80 Top = 80
Width = 96 Width = 96
Height = 20 Height = 20
@@ -76,7 +77,7 @@ object FormConfigTCO: TFormConfigTCO
TabOrder = 0 TabOrder = 0
OnClick = ButtonOKClick OnClick = ButtonOKClick
end end
object Edit1: TEdit object EditTailleCellX: TEdit
Left = 104 Left = 104
Top = 16 Top = 16
Width = 41 Width = 41
@@ -84,7 +85,7 @@ object FormConfigTCO: TFormConfigTCO
TabOrder = 1 TabOrder = 1
Text = 'EditTailleCellX' Text = 'EditTailleCellX'
end end
object Edit2: TEdit object EditTailleCellY: TEdit
Left = 176 Left = 176
Top = 16 Top = 16
Width = 41 Width = 41

View File

@@ -10,14 +10,15 @@ type
TFormConfigTCO = class(TForm) TFormConfigTCO = class(TForm)
ButtonOK: TButton; ButtonOK: TButton;
Label1: TLabel; Label1: TLabel;
Edit1: TEdit; EditTailleCellX: TEdit;
Edit2: TEdit; EditTailleCellY: TEdit;
Label2: TLabel; Label2: TLabel;
Label3: TLabel; Label3: TLabel;
Label4: TLabel; Label4: TLabel;
LabelNbCellX: TLabel; LabelNbCellX: TLabel;
LabelNbCellY: TLabel; LabelNbCellY: TLabel;
procedure ButtonOKClick(Sender: TObject); procedure ButtonOKClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -26,14 +27,39 @@ type
var var
FormConfigTCO: TFormConfigTCO; FormConfigTCO: TFormConfigTCO;
LargeurCell,HauteurCell,NbreCellX,NbreCellY : integer ;
implementation implementation
uses UnitTCO;
{$R *.dfm} {$R *.dfm}
procedure TFormConfigTCO.ButtonOKClick(Sender: TObject); procedure TFormConfigTCO.ButtonOKClick(Sender: TObject);
var i,erreur : integer;
begin begin
Val(EditTailleCellX.Text,i,erreur);
LargeurCell:=i;
Val(EditTailleCellY.Text,i,erreur);
HauteurCell:=i;
with formTCO do
begin
ImageTCO.Width:=LargeurCell*NbreCellX;
ImageTCO.Height:=HauteurCell*NbreCellY;
Affiche_TCO;
end;
close; close;
end; end;
procedure TFormConfigTCO.FormCreate(Sender: TObject);
begin
EditTailleCellX.Text:=IntToSTR(LargeurCell);
EditTailleCellY.Text:=IntToSTR(HauteurCell);
LabelNbCellX.Caption:=IntToSTR(NbreCellX);
LabelNbCellY.Caption:=IntToSTR(NbreCellY);
end;
end. end.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1246,7 +1246,7 @@ object FormPrinc: TFormPrinc
end end
object BoutonRaf: TButton object BoutonRaf: TButton
Left = 912 Left = 912
Top = 8 Top = 16
Width = 89 Width = 89
Height = 33 Height = 33
Caption = 'Rafraichissement' Caption = 'Rafraichissement'
@@ -1345,7 +1345,7 @@ object FormPrinc: TFormPrinc
end end
object ButtonTest: TButton object ButtonTest: TButton
Left = 912 Left = 912
Top = 88 Top = 96
Width = 89 Width = 89
Height = 33 Height = 33
Caption = 'Demande '#233'tat r'#233'trosignalisation' Caption = 'Demande '#233'tat r'#233'trosignalisation'
@@ -1391,7 +1391,7 @@ object FormPrinc: TFormPrinc
end end
object ButtonAffDebug: TButton object ButtonAffDebug: TButton
Left = 912 Left = 912
Top = 48 Top = 56
Width = 89 Width = 89
Height = 33 Height = 33
Caption = 'Affiche debug' Caption = 'Affiche debug'
@@ -1411,8 +1411,8 @@ object FormPrinc: TFormPrinc
OnClick = ButtonRepriseClick OnClick = ButtonRepriseClick
end end
object Button2: TButton object Button2: TButton
Left = 1008 Left = 872
Top = 96 Top = 136
Width = 97 Width = 97
Height = 25 Height = 25
Caption = 'Simu D'#233'tecteur 513' Caption = 'Simu D'#233'tecteur 513'
@@ -1421,9 +1421,9 @@ object FormPrinc: TFormPrinc
OnClick = Button2Click OnClick = Button2Click
end end
object ButtonArretSimu: TButton object ButtonArretSimu: TButton
Left = 912 Left = 1008
Top = 128 Top = 96
Width = 89 Width = 81
Height = 33 Height = 33
Caption = 'Arret simulation' Caption = 'Arret simulation'
TabOrder = 13 TabOrder = 13
@@ -1571,8 +1571,8 @@ object FormPrinc: TFormPrinc
Left = 352 Left = 352
end end
object OpenDialog: TOpenDialog object OpenDialog: TOpenDialog
Left = 1080 Left = 1104
Top = 104 Top = 112
end end
object SaveDialog: TSaveDialog object SaveDialog: TSaveDialog
Left = 1120 Left = 1120

View File

@@ -4419,7 +4419,7 @@ end;
trouve4:=feux[i].Adr_det4=adr; trouve4:=feux[i].Adr_det4=adr;
trouve:=trouve1 or trouve2 or trouve3 or trouve4; trouve:=trouve1 or trouve2 or trouve3 or trouve4;
if not(trouve) then inc(i); if not(trouve) then inc(i);
until (trouve) or (i>=100); until (trouve) or (i>=100);
if trouve then Index_feu_det:=i else Index_feu_det:=0; if trouve then Index_feu_det:=i else Index_feu_det:=0;
end; end;
@@ -4693,7 +4693,7 @@ end;
else AfficheDebug('Le signal '+IntToSTR(adresse)+' ne doit pas être au carré',clYellow); else AfficheDebug('Le signal '+IntToSTR(adresse)+' ne doit pas être au carré',clYellow);
end; end;
carre_signal:=AdrSuiv=9998; carre_signal:=AdrSuiv=9998;
end; end;
// renvoie l'état du signal suivant // renvoie l'état du signal suivant
@@ -6474,8 +6474,8 @@ begin
// créée la fenetre debug // créée la fenetre debug
FormDebug:=TFormDebug.Create(Self); FormDebug:=TFormDebug.Create(Self);
FormDebug.Caption:=AF+' debug'; FormDebug.Caption:=AF+' debug';
N_Trains:=0; N_Trains:=0;
NivDebug:=0; NivDebug:=0;
TempoAct:=0; TempoAct:=0;
DebugOuv:=True; DebugOuv:=True;
@@ -6609,8 +6609,7 @@ begin
//signal_direction(372); //signal_direction(372);
//FormDebug.show; //FormDebug.show;
//test_memoire_zones(218); //test_memoire_zones(218);
//Det_Adj(520); //Det_Adj(520);
//Affiche(' Adj1='+intToStr(Adj1)+' Adj2='+intToStr(Adj2),clyellow);
//Affiche(' Adj1='+intToStr(Adj1)+' Adj2='+intToStr(Adj2),clyellow); //Affiche(' Adj1='+intToStr(Adj1)+' Adj2='+intToStr(Adj2),clyellow);
//trace:=true; //trace:=true;
//TraceListe:=true; //TraceListe:=true;
@@ -7340,6 +7339,7 @@ begin
Affiche('Version 1.3 : Décodeur Unisemaf fonctionnel - Lecture/écriture des CV',clLime); Affiche('Version 1.3 : Décodeur Unisemaf fonctionnel - Lecture/écriture des CV',clLime);
Affiche(' Protocoles variables de l''interface',clLime); Affiche(' Protocoles variables de l''interface',clLime);
Affiche(' Configuration statique modifiable dans menu',clLime); Affiche(' Configuration statique modifiable dans menu',clLime);
Affiche('Version 1.31 : Correction des positions aiguillages triples et TJD',clLime);
Affiche('Version 1.4 : Gestion des Fx vers les locomotives par actionneurs',clLime); Affiche('Version 1.4 : Gestion des Fx vers les locomotives par actionneurs',clLime);
Affiche('Version 1.41 : Gestion des passages à niveaux par actionneurs',clLime); Affiche('Version 1.41 : Gestion des passages à niveaux par actionneurs',clLime);
Affiche('Version 1.42 : Correction erreur lecture feux',clLime); Affiche('Version 1.42 : Correction erreur lecture feux',clLime);

Binary file not shown.

View File

@@ -111,7 +111,7 @@ begin
dec(index_simule); dec(index_simule);
closeFile(fte); closeFile(fte);
formprinc.ButtonArretSimu.Visible:=true; formprinc.ButtonArretSimu.Visible:=true;
formprinc.ButtonArretSimu.top:=120; formprinc.ButtonArretSimu.top:=88;
FormSimulation.Close; FormSimulation.Close;
end; end;

Binary file not shown.

View File

@@ -1,6 +1,6 @@
object FormTCO: TFormTCO object FormTCO: TFormTCO
Left = 205 Left = 251
Top = 235 Top = 202
Width = 928 Width = 928
Height = 681 Height = 681
VertScrollBar.Visible = False VertScrollBar.Visible = False
@@ -389,7 +389,6 @@ object FormTCO: TFormTCO
ParentFont = False ParentFont = False
ReadOnly = True ReadOnly = True
TabOrder = 0 TabOrder = 0
Text = 'EditTypeElement'
end end
object ButtonSauveTCO: TButton object ButtonSauveTCO: TButton
Left = 784 Left = 784
@@ -419,8 +418,8 @@ object FormTCO: TFormTCO
object ImageTCO: TImage object ImageTCO: TImage
Left = 0 Left = 0
Top = 0 Top = 0
Width = 857 Width = 846
Height = 425 Height = 409
PopupMenu = PopupMenu1 PopupMenu = PopupMenu1
OnClick = ImageTCOClick OnClick = ImageTCOClick
OnContextPopup = ImageTCOContextPopup OnContextPopup = ImageTCOContextPopup
@@ -442,7 +441,6 @@ object FormTCO: TFormTCO
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
TabOrder = 5 TabOrder = 5
Text = 'EditTypeImage'
OnKeyPress = EditTypeImageKeyPress OnKeyPress = EditTypeImageKeyPress
end end
object Button1: TButton object Button1: TButton
@@ -455,9 +453,9 @@ object FormTCO: TFormTCO
OnClick = Button1Click OnClick = Button1Click
end end
object Button2: TButton object Button2: TButton
Left = 792 Left = 784
Top = 592 Top = 592
Width = 75 Width = 89
Height = 25 Height = 25
Caption = 'Simu Det 0' Caption = 'Simu Det 0'
TabOrder = 7 TabOrder = 7

View File

@@ -4,7 +4,7 @@ interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids , UnitPrinc, StdCtrls, ExtCtrls, Menus; Dialogs, Grids , UnitPrinc, StdCtrls, ExtCtrls, Menus , UnitConfigTCO;
type type
TFormTCO = class(TForm) TFormTCO = class(TForm)
@@ -177,9 +177,9 @@ var
Fond,couleurAdresse : Tcolor; Fond,couleurAdresse : Tcolor;
FormTCO: TFormTCO; FormTCO: TFormTCO;
Forminit,sourisclic,SelectionAffichee,TamponAffecte : boolean; Forminit,sourisclic,SelectionAffichee,TamponAffecte : boolean;
NbreCellX,NbreCellY,HtImageTCO,LargImageTCO,XclicCell,YclicCell,XminiSel,YminiSel, HtImageTCO,LargImageTCO,XclicCell,YclicCell,XminiSel,YminiSel,
XmaxiSel,YmaxiSel,AncienXMiniSel,AncienXMaxiSel ,AncienYMiniSel,AncienYMaxiSel, XmaxiSel,YmaxiSel,AncienXMiniSel,AncienXMaxiSel ,AncienYMiniSel,AncienYMaxiSel,
LargeurCell,HauteurCell,Xclic,Yclic,XClicCellInserer,YClicCellInserer : integer; Xclic,Yclic,XClicCellInserer,YClicCellInserer : integer;
TamponTCO,tco : TTco ; TamponTCO,tco : TTco ;
TamponTCO_Org : record TamponTCO_Org : record
@@ -191,7 +191,6 @@ procedure construit_TCO;
implementation implementation
uses UnitConfigTCO;
{$R *.dfm} {$R *.dfm}
@@ -851,7 +850,6 @@ begin
EditCellX.text:=IntToSTR(LargeurCell); EditCellX.text:=IntToSTR(LargeurCell);
EditCellY.text:=IntToSTR(HauteurCell); EditCellY.text:=IntToSTR(HauteurCell);
XclicCell:=1; XclicCell:=1;
YclicCell:=1; YclicCell:=1;
KeyPreview:=false; // invalide les évènements clavier KeyPreview:=false; // invalide les évènements clavier
@@ -932,6 +930,8 @@ begin
dessin_Diag1(ImageDiag1.Canvas,1,1,Clyellow,pmCopy); dessin_Diag1(ImageDiag1.Canvas,1,1,Clyellow,pmCopy);
dessin_Diag2(ImageDiag2.Canvas,1,1,Clyellow,pmCopy); dessin_Diag2(ImageDiag2.Canvas,1,1,Clyellow,pmCopy);
lire_fichier_tco; lire_fichier_tco;
ImageTCO.Width:=LargeurCell*NbreCellX;
ImageTCO.Height:=HauteurCell*NbreCellY;
Affiche_tco; Affiche_tco;
end; end;
@@ -1527,13 +1527,22 @@ begin
begin begin
Key := #0; // prevent beeping Key := #0; // prevent beeping
Val(EditTypeImage.Text,Bimage,erreur); Val(EditTypeImage.Text,Bimage,erreur);
Affiche(IntToSTR(bimage),clyellow); // Affiche(IntToSTR(bimage),clyellow);
if (erreur<>0) or (Bimage<0) or (Bimage>9) then if (erreur<>0) or (Bimage<0) or (Bimage>11) then
begin begin
EditTypeElement.text:=intToSTR(tco[XClicCell,YClicCell].Btype); EditTypeImage.text:=intToSTR(tco[XClicCell,YClicCell].BImage);
exit; exit;
end; end;
tco[XClicCell,YClicCell].Bimage:=Bimage; tco[XClicCell,YClicCell].Bimage:=Bimage;
case Bimage of
// aiguillages
1,2,3,4 : tco[XClicCell,YClicCell].Btype:=2;
// détecteur ou voie
5 : tco[XClicCell,YClicCell].Btype:=1;
else tco[XClicCell,YClicCell].Btype:=0;
end;
EditTypeElement.text:=intToSTR(tco[XClicCell,YClicCell].Btype);
affiche_cellule(XClicCell,YClicCell,pmCopy); affiche_cellule(XClicCell,YClicCell,pmCopy);
end; end;
end; end;
@@ -1561,8 +1570,6 @@ begin
Maj_tco(513,false); Maj_tco(513,false);
end; end;
procedure TFormTCO.ImageDiag1EndDrag(Sender, Target: TObject; X, Y: Integer); procedure TFormTCO.ImageDiag1EndDrag(Sender, Target: TObject; X, Y: Integer);
begin begin
if (x=0) and (y=0) then exit; if (x=0) and (y=0) then exit;

Binary file not shown.

View File

@@ -22,7 +22,7 @@ var
FormVersion: TFormVersion; FormVersion: TFormVersion;
Lance_verif : integer; Lance_verif : integer;
Const Version='1.44'; //Version='1.2';// sert à la comparaison de la version publiée Const Version='1.45'; //Version='1.2';// sert à la comparaison de la version publiée
implementation implementation

View File

@@ -16,3 +16,4 @@ Version 1.41 : Gestion des passages
Version 1.42 : Correction erreur lecture signaux Version 1.42 : Correction erreur lecture signaux
Version 1.43 : Correction erreur gestion sémaphore Version 1.43 : Correction erreur gestion sémaphore
Version 1.44 : Gestion trains avec voitures éclairées Version 1.44 : Gestion trains avec voitures éclairées
Version 1.45 : Rejette les n° d'objets supérieurs aiguillages à la même adresse