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.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

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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

View File

@@ -4419,7 +4419,7 @@ end;
trouve4:=feux[i].Adr_det4=adr;
trouve:=trouve1 or trouve2 or trouve3 or trouve4;
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;
end;
@@ -4693,7 +4693,7 @@ end;
else AfficheDebug('Le signal '+IntToSTR(adresse)+' ne doit pas être au carré',clYellow);
end;
carre_signal:=AdrSuiv=9998;
end;
end;
// renvoie l'état du signal suivant
@@ -6474,8 +6474,8 @@ begin
// créée la fenetre debug
FormDebug:=TFormDebug.Create(Self);
FormDebug.Caption:=AF+' debug';
N_Trains:=0;
FormDebug.Caption:=AF+' debug';
N_Trains:=0;
NivDebug:=0;
TempoAct:=0;
DebugOuv:=True;
@@ -6609,8 +6609,7 @@ begin
//signal_direction(372);
//FormDebug.show;
//test_memoire_zones(218);
//Det_Adj(520);
//Affiche(' Adj1='+intToStr(Adj1)+' Adj2='+intToStr(Adj2),clyellow);
//Det_Adj(520);
//Affiche(' Adj1='+intToStr(Adj1)+' Adj2='+intToStr(Adj2),clyellow);
//trace:=true;
//TraceListe:=true;
@@ -7340,6 +7339,7 @@ begin
Affiche('Version 1.3 : Décodeur Unisemaf fonctionnel - Lecture/écriture des CV',clLime);
Affiche(' Protocoles variables de l''interface',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.41 : Gestion des passages à niveaux par actionneurs',clLime);
Affiche('Version 1.42 : Correction erreur lecture feux',clLime);

Binary file not shown.

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;

Binary file not shown.

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

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;

Binary file not shown.

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

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