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

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.Style = []
OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
@@ -42,7 +43,7 @@ object FormConfigTCO: TFormConfigTCO
Caption = 'Nombre de cellules en vertical:'
end
object LabelNbCellX: TLabel
Left = 176
Left = 192
Top = 56
Width = 96
Height = 20
@@ -55,7 +56,7 @@ object FormConfigTCO: TFormConfigTCO
ParentFont = False
end
object LabelNbCellY: TLabel
Left = 176
Left = 192
Top = 80
Width = 96
Height = 20
@@ -76,7 +77,7 @@ object FormConfigTCO: TFormConfigTCO
TabOrder = 0
OnClick = ButtonOKClick
end
object Edit1: TEdit
object EditTailleCellX: TEdit
Left = 104
Top = 16
Width = 41
@@ -84,7 +85,7 @@ object FormConfigTCO: TFormConfigTCO
TabOrder = 1
Text = 'EditTailleCellX'
end
object Edit2: TEdit
object EditTailleCellY: TEdit
Left = 176
Top = 16
Width = 41
+28 -2
View File
@@ -10,14 +10,15 @@ type
TFormConfigTCO = class(TForm)
ButtonOK: TButton;
Label1: TLabel;
Edit1: TEdit;
Edit2: TEdit;
EditTailleCellX: TEdit;
EditTailleCellY: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
LabelNbCellX: TLabel;
LabelNbCellY: TLabel;
procedure ButtonOKClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Déclarations privées }
public
@@ -26,14 +27,39 @@ type
var
FormConfigTCO: TFormConfigTCO;
LargeurCell,HauteurCell,NbreCellX,NbreCellY : integer ;
implementation
uses UnitTCO;
{$R *.dfm}
procedure TFormConfigTCO.ButtonOKClick(Sender: TObject);
var i,erreur : integer;
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;
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.
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
object BoutonRaf: TButton
Left = 912
Top = 8
Top = 16
Width = 89
Height = 33
Caption = 'Rafraichissement'
@@ -1345,7 +1345,7 @@ object FormPrinc: TFormPrinc
end
object ButtonTest: TButton
Left = 912
Top = 88
Top = 96
Width = 89
Height = 33
Caption = 'Demande '#233'tat r'#233'trosignalisation'
@@ -1391,7 +1391,7 @@ object FormPrinc: TFormPrinc
end
object ButtonAffDebug: TButton
Left = 912
Top = 48
Top = 56
Width = 89
Height = 33
Caption = 'Affiche debug'
@@ -1411,8 +1411,8 @@ object FormPrinc: TFormPrinc
OnClick = ButtonRepriseClick
end
object Button2: TButton
Left = 1008
Top = 96
Left = 872
Top = 136
Width = 97
Height = 25
Caption = 'Simu D'#233'tecteur 513'
@@ -1421,9 +1421,9 @@ object FormPrinc: TFormPrinc
OnClick = Button2Click
end
object ButtonArretSimu: TButton
Left = 912
Top = 128
Width = 89
Left = 1008
Top = 96
Width = 81
Height = 33
Caption = 'Arret simulation'
TabOrder = 13
@@ -1571,8 +1571,8 @@ object FormPrinc: TFormPrinc
Left = 352
end
object OpenDialog: TOpenDialog
Left = 1080
Top = 104
Left = 1104
Top = 112
end
object SaveDialog: TSaveDialog
Left = 1120
+6 -6
View File
@@ -4419,7 +4419,7 @@ end;
// 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 ;
var actuelCalc,PrecCalc,etat,i,j,AdrSuiv : integer;
BisprecCalc,BisActuelCalc : integer;
@@ -4693,7 +4693,7 @@ end;
// renvoie l'état du signal suivant
// si renvoie 0, pas trouvé le signal suivant.
// 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 ;
var num_feu,AdrDet,etat,AdrFeu,i,j,prec,AdrSuiv : integer;
TypePrec,TypeActuel : integer;
@@ -6474,8 +6474,8 @@ begin
TempoAct:=0;
DebugOuv:=True;
AvecInit:=true; //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
AvecTCO:=false;
AvecInit:=false; //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
AvecTCO:=true;
// créée la fenetre vérification de version
FormVersion:=TformVersion.Create(Self);
@@ -6609,8 +6609,7 @@ begin
//TraceListe:=true;
//interprete_reponse(#$FF+#$FD+#$46+#$43+#$40+#$41+#$40+#$40+#$49+#$4D);
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);
//s:=#$f0;
//s:=checksum(s);
@@ -7340,6 +7339,7 @@ begin
Affiche('Version 1.42 : Correction erreur lecture feux',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.45 : Rejette les n° d''objets supérieurs aiguillages à la même adresse',clLime);
end;
procedure TFormPrinc.ClientSocketLenzDisconnect(Sender: TObject;
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -111,7 +111,7 @@ begin
dec(index_simule);
closeFile(fte);
formprinc.ButtonArretSimu.Visible:=true;
formprinc.ButtonArretSimu.top:=120;
formprinc.ButtonArretSimu.top:=88;
FormSimulation.Close;
end;
BIN
View File
Binary file not shown.
+6 -8
View File
@@ -1,6 +1,6 @@
object FormTCO: TFormTCO
Left = 205
Top = 235
Left = 251
Top = 202
Width = 928
Height = 681
VertScrollBar.Visible = False
@@ -389,7 +389,6 @@ object FormTCO: TFormTCO
ParentFont = False
ReadOnly = True
TabOrder = 0
Text = 'EditTypeElement'
end
object ButtonSauveTCO: TButton
Left = 784
@@ -419,8 +418,8 @@ object FormTCO: TFormTCO
object ImageTCO: TImage
Left = 0
Top = 0
Width = 857
Height = 425
Width = 846
Height = 409
PopupMenu = PopupMenu1
OnClick = ImageTCOClick
OnContextPopup = ImageTCOContextPopup
@@ -442,7 +441,6 @@ object FormTCO: TFormTCO
Font.Style = []
ParentFont = False
TabOrder = 5
Text = 'EditTypeImage'
OnKeyPress = EditTypeImageKeyPress
end
object Button1: TButton
@@ -455,9 +453,9 @@ object FormTCO: TFormTCO
OnClick = Button1Click
end
object Button2: TButton
Left = 792
Left = 784
Top = 592
Width = 75
Width = 89
Height = 25
Caption = 'Simu Det 0'
TabOrder = 7
+18 -11
View File
@@ -4,7 +4,7 @@ interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids , UnitPrinc, StdCtrls, ExtCtrls, Menus;
Dialogs, Grids , UnitPrinc, StdCtrls, ExtCtrls, Menus , UnitConfigTCO;
type
TFormTCO = class(TForm)
@@ -177,9 +177,9 @@ var
Fond,couleurAdresse : Tcolor;
FormTCO: TFormTCO;
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,
LargeurCell,HauteurCell,Xclic,Yclic,XClicCellInserer,YClicCellInserer : integer;
Xclic,Yclic,XClicCellInserer,YClicCellInserer : integer;
TamponTCO,tco : TTco ;
TamponTCO_Org : record
@@ -191,7 +191,6 @@ procedure construit_TCO;
implementation
uses UnitConfigTCO;
{$R *.dfm}
@@ -850,8 +849,7 @@ begin
HauteurCell:=25;
EditCellX.text:=IntToSTR(LargeurCell);
EditCellY.text:=IntToSTR(HauteurCell);
XclicCell:=1;
YclicCell:=1;
KeyPreview:=false; // invalide les évènements clavier
@@ -932,6 +930,8 @@ begin
dessin_Diag1(ImageDiag1.Canvas,1,1,Clyellow,pmCopy);
dessin_Diag2(ImageDiag2.Canvas,1,1,Clyellow,pmCopy);
lire_fichier_tco;
ImageTCO.Width:=LargeurCell*NbreCellX;
ImageTCO.Height:=HauteurCell*NbreCellY;
Affiche_tco;
end;
@@ -1527,13 +1527,22 @@ begin
begin
Key := #0; // prevent beeping
Val(EditTypeImage.Text,Bimage,erreur);
Affiche(IntToSTR(bimage),clyellow);
if (erreur<>0) or (Bimage<0) or (Bimage>9) then
// Affiche(IntToSTR(bimage),clyellow);
if (erreur<>0) or (Bimage<0) or (Bimage>11) then
begin
EditTypeElement.text:=intToSTR(tco[XClicCell,YClicCell].Btype);
EditTypeImage.text:=intToSTR(tco[XClicCell,YClicCell].BImage);
exit;
end;
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);
end;
end;
@@ -1561,8 +1570,6 @@ begin
Maj_tco(513,false);
end;
procedure TFormTCO.ImageDiag1EndDrag(Sender, Target: TObject; X, Y: Integer);
begin
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;
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
+1
View File
@@ -16,3 +16,4 @@ Version 1.41 : Gestion des passages
Version 1.42 : Correction erreur lecture signaux
Version 1.43 : Correction erreur gestion sémaphore
Version 1.44 : Gestion trains avec voitures éclairées
Version 1.45 : Rejette les n° d'objets supérieurs aiguillages à la même adresse