This commit is contained in:
f1iwq2 committed 2020-03-25 17:15:08 +01:00
1 parent 8f0151a472
commit f81f270a23
18 files changed
+75 -42

No files matched your search

Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+5 -4
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
+28 -2
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.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+10 -10
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
+6 -6
View File
@@ -4419,7 +4419,7 @@ end;
// renvoie l'adresse du détecteur suivant des deux éléments contigus // renvoie l'adresse du détecteur suivant des deux éléments contigus
// TypeElprex/actuel: 1= détecteur 2= aiguillage 3=bis 4=Buttoir // TypeElprec/actuel: 1= détecteur 2= aiguillage 3=bis 4=Buttoir
function detecteur_suivant(prec : integer;TypeElPrec : integer;actuel : integer;TypeElActuel : integer) : integer ; function detecteur_suivant(prec : integer;TypeElPrec : integer;actuel : integer;TypeElActuel : integer) : integer ;
var actuelCalc,PrecCalc,etat,i,j,AdrSuiv : integer; var actuelCalc,PrecCalc,etat,i,j,AdrSuiv : integer;
BisprecCalc,BisActuelCalc : integer; BisprecCalc,BisActuelCalc : integer;
@@ -4693,7 +4693,7 @@ end;
// renvoie l'état du signal suivant // renvoie l'état du signal suivant
// si renvoie 0, pas trouvé le signal suivant. // si renvoie 0, pas trouvé le signal suivant.
// rang=1 pour feu suivant, 2 pour feu suivant le 1, etc // rang=1 pour feu suivant, 2 pour feu suivant le 1, etc
// Dans AdresseFeuSuivant : adreses du feu suivant (variable globale) // Dans AdresseFeuSuivant : adresse du feu suivant (variable globale)
function etat_signal_suivant(adresse,rang : integer) : integer ; function etat_signal_suivant(adresse,rang : integer) : integer ;
var num_feu,AdrDet,etat,AdrFeu,i,j,prec,AdrSuiv : integer; var num_feu,AdrDet,etat,AdrFeu,i,j,prec,AdrSuiv : integer;
TypePrec,TypeActuel : integer; TypePrec,TypeActuel : integer;
@@ -6474,8 +6474,8 @@ begin
TempoAct:=0; TempoAct:=0;
DebugOuv:=True; DebugOuv:=True;
AvecInit:=true; //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& AvecInit:=false; //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
AvecTCO:=false; AvecTCO:=true;
// créée la fenetre vérification de version // créée la fenetre vérification de version
FormVersion:=TformVersion.Create(Self); FormVersion:=TformVersion.Create(Self);
@@ -6609,8 +6609,7 @@ begin
//TraceListe:=true; //TraceListe:=true;
//interprete_reponse(#$FF+#$FD+#$46+#$43+#$40+#$41+#$40+#$40+#$49+#$4D); //interprete_reponse(#$FF+#$FD+#$46+#$43+#$40+#$41+#$40+#$40+#$49+#$4D);
Affiche('Fin des initialisations',clyellow); Affiche('Fin des initialisations',clyellow);
Affiche('Cette version test rejette les numéros d''objets supérieurs',clLime);
Affiche('des aiguillages en bretelle à la même adresse',clLime);
//Menu_interface(valide); //Menu_interface(valide);
//s:=#$f0; //s:=#$f0;
//s:=checksum(s); //s:=checksum(s);
@@ -7340,6 +7339,7 @@ begin
Affiche('Version 1.42 : Correction erreur lecture feux',clLime); Affiche('Version 1.42 : Correction erreur lecture feux',clLime);
Affiche('Version 1.43 : Correction erreur gestion sémaphore',clLime); Affiche('Version 1.43 : Correction erreur gestion sémaphore',clLime);
Affiche('Version 1.44 : Gestion trains avec voitures éclairées',clLime); Affiche('Version 1.44 : Gestion trains avec voitures éclairées',clLime);
Affiche('Version 1.45 : Rejette les n° d''objets supérieurs aiguillages à la même adresse',clLime);
end; end;
procedure TFormPrinc.ClientSocketLenzDisconnect(Sender: TObject; procedure TFormPrinc.ClientSocketLenzDisconnect(Sender: TObject;
BIN
View File
Binary file not shown.
+1 -1
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;
BIN
View File
Binary file not shown.
+6 -8
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
+17 -10
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;
BIN
View File
Binary file not shown.
+1 -1
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
+1
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