This commit is contained in:
f1iwq2
2025-07-26 18:43:57 +02:00
parent 3bb957abfd
commit 037e56f666
18 changed files with 675 additions and 512 deletions
+8 -7
View File
@@ -55,10 +55,10 @@ type
end;
type
typ=(Trien,fen,gb,im); // un compteur peut être de la fenetre 'formCompteur' (fen), des groupBox de la fenetre principale (gb) ou d'une image (onglet compteurs formConfig)
typ=(Trien,fen,gb,im); // indique où se situe le compteur : dans la fenetre 'formCompteur' (fen), un des groupBox de la fenetre principale (gb) ou d'une image (onglet compteurs formConfig)
TTcompteur=array[1..1] of record
FcBitMap : Tbitmap;
paramcompt : TparamCompt;
FcBitMap : Tbitmap;
paramcompt : TparamCompt;
end;
var
@@ -293,7 +293,7 @@ begin
with param do
begin
AngleFin:=170; // 170 angle fin des graduations
r:=redx; // réduction
r:=redx; // facteur réduction de la fenetre du compteur
rg:=round(AigCX/1.05); // rayon des graduations
rayon2:=Rg-round(10*r); // rayon de fin des graduations
rayon3:=Rg-round(20*r);
@@ -313,8 +313,8 @@ begin
font.Name:='Arial';;
font.color:=ParamCompteur[2].CoulNum;
font.size:=round(r*20);
font.style:=[fsbold];
font.size:=round(r*15*RedFonte);
{$IF CompilerVersion >= 28.0}
font.orientation:=0;
{$IFEND}
@@ -418,7 +418,7 @@ begin
brush.color:=clBlack;
pen.color:=ParamCompteur[3].coulgrad;
font.color:=ParamCompteur[3].CoulNum;
font.size:=round(r*20);
font.size:=round(r*20*RedFonte); // taille de la fonte constante même si changement % affichage windows
//Affiche(intToSTR(font.size),clred);
font.style:=[];
end;
@@ -516,10 +516,10 @@ begin
Brush.Style:=bsSolid;
Brush.Color:=$1F1A17;
font.color:=ParamCompteur[1].CoulNum;
font.size:=round(redx*10);
{$IF CompilerVersion >= 28.0}
font.orientation:=0;
{$IFEND}
font.size:=round(redx*10*RedFonte);
TextOut(round(50*redX),round(128*redY),'0');
TextOut(round(36*redX),round(90*redY),'20');
TextOut(round(50*redX),round(54*redY),'40');
@@ -926,6 +926,7 @@ begin
Width:=400;
canvas.fillrect(rect(0,0,400,30));
end;
LabelTrain.Font.Size:=round(14*RedFonte);
end;
procedure TFormCompteur.TrackBarCChange(Sender: TObject);
+29 -16
View File
@@ -670,7 +670,7 @@ object FormConfig: TFormConfig
Top = 8
Width = 633
Height = 505
ActivePage = TabSheetTrains
ActivePage = TabSheetPN
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
@@ -1189,7 +1189,7 @@ object FormConfig: TFormConfig
'S'#233'lection du style d'#39#39'affichage - Le style sera chang'#233' '#224' la ferm' +
'eture de la fen'#234'tre'#39
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
ParentShowHint = False
ShowHint = True
TabOrder = 0
@@ -2425,7 +2425,7 @@ object FormConfig: TFormConfig
Width = 137
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 1
OnChange = ComboBoxDecChange
end
@@ -2556,7 +2556,7 @@ object FormConfig: TFormConfig
Width = 137
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 2
OnChange = ComboBoxAspChange
end
@@ -2864,7 +2864,7 @@ object FormConfig: TFormConfig
Top = 56
Width = 193
Height = 21
ItemHeight = 0
ItemHeight = 13
TabOrder = 0
OnChange = ComboBoxDecodeurPersoChange
end
@@ -2883,7 +2883,7 @@ object FormConfig: TFormConfig
Width = 145
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 2
OnChange = ComboBoxNationChange
end
@@ -2929,7 +2929,7 @@ object FormConfig: TFormConfig
Width = 193
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 6
OnChange = ComboBoxDecCdeChange
end
@@ -3142,7 +3142,7 @@ object FormConfig: TFormConfig
Top = 96
Width = 137
Height = 21
ItemHeight = 0
ItemHeight = 13
TabOrder = 2
OnChange = ComboBoxOperateurChange
OnDrawItem = ComboBoxOperateurDrawItem
@@ -3162,7 +3162,7 @@ object FormConfig: TFormConfig
Top = 96
Width = 161
Height = 21
ItemHeight = 0
ItemHeight = 13
ParentShowHint = False
ShowHint = True
TabOrder = 4
@@ -3263,7 +3263,7 @@ object FormConfig: TFormConfig
Width = 145
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 7
OnChange = ComboBoxFLChange
end
@@ -3645,7 +3645,7 @@ object FormConfig: TFormConfig
Font.Style = [fsBold]
ParentFont = False
end
object GroupBox13: TGroupBox
object GroupBoxGPN: TGroupBox
Left = 336
Top = 24
Width = 281
@@ -3807,13 +3807,13 @@ object FormConfig: TFormConfig
OnClick = RadioGroupActPNClick
end
object ComboBoxPNCom: TComboBox
Left = 8
Left = 16
Top = 152
Width = 145
Height = 21
Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
ParentShowHint = False
ShowHint = True
TabOrder = 10
@@ -4114,10 +4114,23 @@ object FormConfig: TFormConfig
end
object ImageTrain: TImage
Left = 16
Top = 392
Top = 384
Width = 257
Height = 49
end
object LabelTitreTrain: TLabel
Left = 16
Top = 448
Width = 4
Height = 19
Caption = ' '
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -16
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentFont = False
end
object ButtonNT: TButton
Left = 0
Top = 32
@@ -4160,7 +4173,7 @@ object FormConfig: TFormConfig
Top = 16
Width = 337
Height = 457
ActivePage = TabSheetTrGen
ActivePage = TabSheet1
TabOrder = 3
object TabSheetTrGen: TTabSheet
Caption = 'G'#233'n'#233'ral'
@@ -5524,7 +5537,7 @@ object FormConfig: TFormConfig
Width = 153
Height = 21
Style = csDropDownList
ItemHeight = 0
ItemHeight = 13
TabOrder = 0
OnChange = ComboBoxUSBTrChange
end
+58 -42
View File
@@ -92,7 +92,7 @@ type
GroupBox12: TGroupBox;
ImageSignal: TImage;
LabelAdrSig: TLabel;
GroupBox13: TGroupBox;
GroupBoxGPN: TGroupBox;
LabelDec: TLabel;
LabelDetAss: TLabel;
LabelElSuiv: TLabel;
@@ -509,6 +509,7 @@ type
LabelV3Cons: TLabel;
Label83: TLabel;
Label84: TLabel;
LabelTitreTrain: TLabel;
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ListBoxAigMouseDown(Sender: TObject; Button: TMouseButton;
@@ -7054,6 +7055,11 @@ procedure champs_pn_act;
begin
with formConfig do
begin
EditAdrFerme.text:=IntToSTR(Tablo_PN[lignecliqueePN+1].AdresseFerme);
EditAdrOuvre.text:=IntToSTR(Tablo_PN[lignecliqueePN+1].AdresseOuvre);
EditCdeFerme.text:=intToSTR(Tablo_PN[lignecliqueePN+1].CommandeFerme);
EditCdeOuvre.text:=intToSTR(Tablo_PN[lignecliqueePN+1].CommandeOuvre);
comboBoxPNCom.Visible:=false;
EditCdeOuvre.width:=25;
editCdeFerme.Width:=25;
@@ -7063,8 +7069,8 @@ begin
ButtonTestFerme.Top:=EditAdrFerme.Top;
ButtonTestOuvre.Top:=EditAdrOuvre.Top;
editCdeFerme.Left:=168;
editCdeOuvre.Left:=168;
EditCdeFerme.Left:=EditAdrFerme.Left+EditAdrFerme.width+10;
EditCdeOuvre.Left:=EditAdrOuvre.Left+EditAdrOuvre.width+10;
EditCdeOuvre.Hint:='Commande d''ouverture (0 à 2)';
EditCdeFerme.Hint:='Commande de fermeture (0 à 2)';
@@ -7076,12 +7082,10 @@ begin
EditAdrFerme.Visible:=true;
Label22.visible:=true;
CheckPnPulse.Visible:=true;
CheckPnPulse.top:=140;
CheckPnPulse.top:=EditCdeOuvre.Top+EditCdeOuvre.Height+10;
Label21.Caption:='Adresse de fermeture';
EditAdrFerme.text:=IntToSTR(Tablo_PN[lignecliqueePN+1].AdresseFerme);
EditAdrOuvre.text:=IntToSTR(Tablo_PN[lignecliqueePN+1].AdresseOuvre);
EditCdeFerme.text:=intToSTR(Tablo_PN[lignecliqueePN+1].CommandeFerme);
EditCdeOuvre.text:=intToSTR(Tablo_PN[lignecliqueePN+1].CommandeOuvre);
end;
end;
@@ -7089,27 +7093,36 @@ procedure champs_pn_COMUSBSockets;
begin
with formConfig do
begin
EditCdeFerme.Text:=Tablo_PN[lignecliqueePN+1].CommandeF;
EditCdeOuvre.Text:=Tablo_PN[lignecliqueePN+1].CommandeO;
comboBoxPNCom.Visible:=true;
ComboBoxPNCom.Width:=150;
ComboBoxPNCom.Left:=4;
ComboBoxPNCom.top:=120;
ComboBoxPNCom.Left:=8;
EditAdrFerme.visible:=false;
editAdrOuvre.Visible:=false;
CheckPnPulse.Visible:=false;
EditCdeOuvre.width:=50;
editCdeFerme.width:=50;
editCdeFerme.top:=120;ButtonTestFerme.Top:=120;ButtonTestFerme.Top:=120;
editCdeOuvre.top:=150;ButtonTestOuvre.Top:=150;ButtonTestOuvre.Top:=150;
editCdeFerme.Left:=160;
editCdeOuvre.Left:=160;
editCdeFerme.top:=Label21.top+Label21.Height+10;
ButtonTestFerme.Top:=Label21.top+Label21.Height+10;
editCdeOuvre.top:=ButtonTestFerme.top+ButtonTestFerme.Height+10;
ButtonTestOuvre.Top:=ButtonTestFerme.top+ButtonTestFerme.Height+10;
EditCdeFerme.Left:=EditAdrFerme.Left+EditAdrFerme.width+10;
EditCdeOuvre.Left:=EditAdrOuvre.Left+EditAdrOuvre.width+10;
ComboBoxPNCom.top:=ButtonTestFerme.Top;
ButtonTestFerme.Hint:='Test de fermeture (par interface COM/USB)';
ButtonTestOuvre.Hint:='Test d''ouverture (par interface COM/USB)';
editcdeFerme.Hint:='Commande ASCII de fermeture';
EditCdeOuvre.Hint:='Commande ASCII d''ouverture';
Label22.visible:=false;
Label21.Caption:='Périphérique COM/USB/Socket Commandes';
EditCdeFerme.Text:=Tablo_PN[lignecliqueePN+1].CommandeF;
EditCdeOuvre.Text:=Tablo_PN[lignecliqueePN+1].CommandeO;
ComboBoxPnCom.ItemIndex:=Tablo_PN[lignecliqueePN+1].AdresseFerme-1;
CheckPNPulse.Visible:=false;
end;
@@ -7319,6 +7332,7 @@ begin
ButtonRdt.Caption:=s;
editNomTrain.text:=Trains[index].nom_train;
LabelTitreTrain.Caption:=Trains[index].nom_train;
editAdresseTrain.Text:=intToSTR(trains[index].adresse);
editVitesseMaxi.Text:=intToSTR(trains[index].vitmax);
editLongLoco.text:=IntToSTR(trains[index].longueur);
@@ -7662,12 +7676,12 @@ begin
begin
Left:=1;
Top:=32;
width:=617;
width:=round(617/redfonte);
Height:=420;
TitleCaptions[0]:='Désignation';
TitleCaptions[1]:='Valeur';
ColWidths[0]:=420;
ColWidths[0]:=round(420/RedFonte);
// création des lignes de la liste
for i:=1 to 22 do
@@ -7811,9 +7825,9 @@ begin
RowCount:=NbDetArret+1;
Options := StringGridArr.Options + [goEditing];
ColWidths[0]:=0; // colonne grise invisible
ColWidths[1]:=70; // Précédent
ColWidths[2]:=70; // détecteur
ColWidths[3]:=55; // temps
ColWidths[1]:=round(70/RedFonte); // Précédent
ColWidths[2]:=round(70/RedFonte); // détecteur
ColWidths[3]:=round(55/RedFonte); // temps
Cells[1,0]:='Précédent';
Cells[2,0]:='Détecteur';
@@ -7828,7 +7842,7 @@ begin
{$IFEND}
{$IFDEF WIN64} // si compilé en 64 bits
labelD12.Caption:='D12 x64';
LabelD12.Left:=730;
LabelD12.Left:=LabelD12.Left-30;
{$ENDIF}
// création des champs dynamiques de l'onglet décodeurs personnalisés
@@ -7961,7 +7975,7 @@ begin
Left:=8;
top:=GroupBoxPN.Top+GroupBoxPN.Height+5;
width:=GroupBoxPN.Width;
height:=190;
height:=GroupBoxGPN.height-GroupBoxPN.Height-40;
visible:=true;
end;
with GroupBoxPNZ do
@@ -7969,7 +7983,7 @@ begin
Left:=8;
top:=GroupBoxPN.Top+GroupBoxPN.Height+5;
width:=GroupBoxPN.Width;
height:=190;
height:=GroupBoxGPN.height-GroupBoxPN.Height-40;
visible:=false;
end;
@@ -7977,7 +7991,7 @@ begin
with LbATitre do
begin
Left:=64;Top:=20;Width:=50;Height:=12;
caption:='Act ferme Act ouvre';
caption:='Act ferme Act ouvre';
name:='LbATitre';
parent:=GroupBoxPNA;
end;
@@ -8185,7 +8199,7 @@ begin
with EditZDet2V1F do
begin
Name:='EditZDet2V1F';
left:=100;Top:=50;Width:=35;Height:=21;
left:=104;Top:=50;Width:=35;Height:=21;
text:='';
hint:='Détecteur 2 de fermeture';
showhint:=true;
@@ -8196,7 +8210,7 @@ begin
with EditZDet1V1O do
begin
Name:='EditZDet1V1O';
left:=152;Top:=50;Width:=35;Height:=21;
left:=164;Top:=50;Width:=35;Height:=21;
text:='';
hint:='Détecteur 1 d''ouverture';
showhint:=true;
@@ -8207,7 +8221,7 @@ begin
with EditZDet2V1O do
begin
Name:='EditZDet2V1O';
left:=190;Top:=50;Width:=35;Height:=21;
left:=204;Top:=50;Width:=35;Height:=21;
text:='';
hint:='Détecteur 2 d''ouverture';
showhint:=true;
@@ -8238,7 +8252,7 @@ begin
with EditZDet2V2F do
begin
Name:='EditZDet2V2F';
left:=100;Top:=74;Width:=35;Height:=21;
left:=104;Top:=74;Width:=35;Height:=21;
text:='';
hint:='Détecteur 2 de fermeture';
showhint:=true;
@@ -8249,7 +8263,7 @@ begin
with EditZDet1V2O do
begin
Name:='EditZDet1V2O';
left:=152;Top:=74;Width:=35;Height:=21;
left:=164;Top:=74;Width:=35;Height:=21;
text:='';
hint:='Détecteur 1 d''ouverture';
showhint:=true;
@@ -8260,7 +8274,7 @@ begin
with EditZDet2V2O do
begin
Name:='EditZDet2V2O';
left:=190;Top:=74;Width:=35;Height:=21;
left:=204;Top:=74;Width:=35;Height:=21;
text:='';
hint:='Détecteur 2 d''ouverture';
showhint:=true;
@@ -8292,7 +8306,7 @@ begin
with EditZDet2V3F do
begin
Name:='EditZDet2V3F';
left:=100;Top:=98;Width:=35;Height:=21;
left:=104;Top:=98;Width:=35;Height:=21;
text:='';
hint:='Détecteur 2 de fermeture';
showhint:=true;
@@ -8303,7 +8317,7 @@ begin
with EditZDet1V3O do
begin
Name:='EditZDet1V3O';
left:=152;Top:=98;Width:=35;Height:=21;
left:=164;Top:=98;Width:=35;Height:=21;
text:='';
parent:=GroupBoxPNZ;
hint:='Détecteur 1 d''ouverture';
@@ -8314,7 +8328,7 @@ begin
with EditZDet2V3O do
begin
Name:='EditZDet2V3O';
left:=190;Top:=98;Width:=35;Height:=21;
left:=204;Top:=98;Width:=35;Height:=21;
text:='';
parent:=GroupBoxPNZ;
hint:='Détecteur 2 d''ouverture';
@@ -8345,7 +8359,7 @@ begin
with EditZDet2V4F do
begin
Name:='EditZDet2V4F';
left:=100;Top:=122;Width:=35;Height:=21;
left:=104;Top:=122;Width:=35;Height:=21;
text:='';
hint:='Détecteur 2 de fermeture';
showhint:=true;
@@ -8356,7 +8370,7 @@ begin
with EditZDet1V4O do
begin
Name:='EditZDet1V4O';
left:=152;Top:=122;Width:=35;Height:=21;
left:=164;Top:=122;Width:=35;Height:=21;
text:='';
parent:=GroupBoxPNZ;
hint:='Détecteur 1 d''ouverture';
@@ -8367,7 +8381,7 @@ begin
with EditZDet2V4O do
begin
Name:='EditZDet2V4O';
left:=190;Top:=122;Width:=35;Height:=21;
left:=204;Top:=122;Width:=35;Height:=21;
text:='';
parent:=GroupBoxPNZ;
hint:='Détecteur 2 d''ouverture';
@@ -8398,7 +8412,7 @@ begin
with EditZDet2V5F do
begin
Name:='EditZDet2V5F';
left:=100;Top:=146;Width:=35;Height:=21;
left:=104;Top:=146;Width:=35;Height:=21;
text:='';
parent:=GroupBoxPNZ;
hint:='Détecteur 2 de fermeture';
@@ -8409,7 +8423,7 @@ begin
with EditZDet1V5O do
begin
Name:='EditZDet1V5O';
left:=152;Top:=146;Width:=35;Height:=21;
left:=164;Top:=146;Width:=35;Height:=21;
text:='';
parent:=GroupBoxPNZ;
hint:='Détecteur 1 d''ouverture';
@@ -8420,7 +8434,7 @@ begin
with EditZDet2V5O do
begin
Name:='EditZDet2V5O';
left:=190;Top:=146;Width:=35;Height:=21;
left:=204;Top:=146;Width:=35;Height:=21;
text:='';
parent:=GroupBoxPNZ;
hint:='Détecteur 2 d''ouverture';
@@ -8712,6 +8726,7 @@ begin
label72.caption:='La rotation de bouton changera la vitesse du train. L''appui sur le bouton stoppe le train.'+#13+
'Les évènements clavier sont interceptés par signaux complexes ce qui ne nécessite pas d''activer la fenêtre';
{
with GroupBoxBr do
begin
Left:=312;
@@ -8727,7 +8742,8 @@ begin
Width:=260;
Height:=140;
Visible:=false;
end;
end;}
GroupBoxBT.Visible:=false;
PageControl.ActivePage:=Formconfig.TabSheetCDM; // force le premier onglet sur la page
couleurs_config;
@@ -19292,7 +19308,7 @@ procedure TFormConfig.LabeledEditNUMChange(Sender: TObject);
var i,erreur : integer;
begin
val(LabeledEditNUM.Text,i,erreur);
if (erreur<>0) or (i<0) or (i>10) then exit;
if (erreur<>0) or (i<1) or (i>10) then exit;
NumBlocUSB:=i;
LabeledEditCT.Text:='';
LabeledEditRM.Text:='';
+2 -2
View File
@@ -226,7 +226,7 @@ object FormConfCellTCO: TFormConfCellTCO
OnChange = EditTexteCCTCOChange
end
end
object GroupBox2: TGroupBox
object GroupBoxEl: TGroupBox
Left = 8
Top = 8
Width = 297
@@ -256,7 +256,7 @@ object FormConfCellTCO: TFormConfCellTCO
end
object Label2: TLabel
Left = 192
Top = 6
Top = 14
Width = 53
Height = 20
Caption = 'Adresse : '
+23 -6
View File
@@ -15,7 +15,7 @@ type
Label1: TLabel;
ButtonFonte: TButton;
EditTexteCCTCO: TEdit;
GroupBox2: TGroupBox;
GroupBoxEl: TGroupBox;
Label15: TLabel;
EditTypeImage: TEdit;
CheckPinv: TCheckBox;
@@ -419,7 +419,7 @@ begin
with formConfCellTCO.StringGridDet do
begin
for i:=0 to ColCount-1 do
for j:= 1 to RowCount-1 do
for j:=1 to RowCount-1 do
Cells[i,j]:='';
ligne:=1;
for i:=1 to Ntrains do
@@ -822,10 +822,10 @@ begin
RowCount:=21;
Options := Options -[goEditing] ;
ColWidths[0]:=0; // colonne grise invisible
ColWidths[1]:=40; // Précédent
ColWidths[2]:=35; // tempe
ColWidths[3]:=60; // train
ColWidths[4]:=105; // icone train
ColWidths[1]:=round(40/RedFonte); // Précédent
ColWidths[2]:=round(35/RedFonte); // tempe
ColWidths[3]:=round(60/RedFonte); // train
ColWidths[4]:=round(105/RedFonte); // icone train
Cells[1,0]:='Précé.';
Cells[2,0]:='Temps';
@@ -880,6 +880,23 @@ begin
itemHeight:=16;
end;
// calcul des éléments en fonction de la taille de GroupBoxEL à cause du dimensionnement enn % des textes windows
width:=GroupBoxEL.Left+GroupBoxEL.Width+20;
height:=BitBtnOk.Top+BitBtnOK.Height+50;
GroupBoxCanton.top:=ButtonFond.Top+ButtonFond.Height+12;
GroupBoxCanton.Height:=RadioButtonDS.Height+RadioButtonDS.Top+10;
GroupBoxCanton.Width:=GroupBoxEL.Width-10;
GroupBoxDet.top:=RadioGroupSEl.Height+RadioGroupSel.Top+10;
GroupBoxDet.Width:=GroupBoxEL.Width-10;
GroupBoxAction.top:=RadioGroupSEl.Height+RadioGroupSel.Top+10;
GroupBoxAction.Width:=GroupBoxEL.Width-10;
GroupBoxOrientation.top:=RadioGroupSEl.Height+RadioGroupSel.Top+10;
GroupBoxOrientation.Width:=GroupBoxEL.Width-20;
GroupBoxImplantation.top:=GroupBoxOrientation.Height+GroupBoxOrientation.Top+10;
GroupBoxImplantation.Width:=GroupBoxEL.Width-20;
// dessine les composants - non utilisé
{
i:=1;
+10 -13
View File
@@ -15,43 +15,40 @@ object FormFicheHoraire: TFormFicheHoraire
OnActivate = FormActivate
OnCreate = FormCreate
DesignSize = (
620
354)
612
346)
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 104
Top = 313
Left = 96
Top = 305
Width = 310
Height = 13
Anchors = [akLeft, akBottom]
Caption =
'Le nom des trains doit respecter l'#39#233'criture d'#233'clar'#233'e dans CDM Ra' +
'il'
end
object LabelErreur: TLabel
Left = 99
Top = 297
Left = 11
Top = 0
Width = 3
Height = 13
Anchors = [akLeft, akBottom]
Caption = '.'
end
object Label2: TLabel
Left = 104
Top = 329
Left = 96
Top = 321
Width = 296
Height = 13
Anchors = [akLeft, akBottom]
Caption = 'Les horaires sont sauvegard'#233's dans le fichier '#39'FicheHoraire.txt"'
end
object ButtonOk: TButton
Left = 8
Top = 313
Top = 305
Width = 75
Height = 32
Hint = 'Sauvegarde la fiche et ferme la fen'#234'tre'
Anchors = [akLeft, akBottom]
Caption = 'Ok'
ParentShowHint = False
ShowHint = True
@@ -61,7 +58,7 @@ object FormFicheHoraire: TFormFicheHoraire
object StringGridFO: TStringGrid
Left = 8
Top = 16
Width = 601
Width = 593
Height = 273
ColCount = 4
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing]
+26 -12
View File
@@ -20,6 +20,7 @@ type
Rect: TRect; State: TGridDrawState);
procedure StringGridFOSetEditText(Sender: TObject; ACol, ARow: Integer;
const Value: String);
procedure Button1Click(Sender: TObject);
private
{ Déclarations privées }
public
@@ -118,7 +119,7 @@ end;
procedure TFormFicheHoraire.FormCreate(Sender: TObject);
var i,champ,ligne,col,erreur : integer;
var i,champ,ligne,col,erreur,larg : integer;
f : textFile ;
s,ss,v,nomTrain : string;
ver : single;
@@ -127,23 +128,29 @@ begin
with stringGridFO do
begin
Anchors:=[];
Anchors:=[AkTop,AkLeft,akright,akBottom];
//Anchors:=[AkTop,AkLeft,akright,akBottom];
Anchors:=[];
Anchors:=[AkTop,AkLeft,akright];
Options:=options
// édition pas multiselect trackbar dynamique autoriz le dimensionnement des colonnes
+ [goEditing] - [goRangeSelect] + [goThumbTracking]+ [goColSizing]
+ [goAlwaysShowEditor]; // autorise l'édition
Hint:='Grille horaire';
ShowHint:=true;
ColCount:=7;
RowCount:=MaxHoraire+1;
Options := stringGridFO.Options + [goEditing];
ColWidths[ColLigne]:=30;
ColWidths[ColTrain]:=200;
ColWidths[ColRoute]:=100;
ColWidths[ColHDep]:=60;
ColWidths[ColVitDem]:=60;
ColWidths[ColSens]:=60;
ColWidths[ColArret]:=60;
//Options := stringGridFO.Options + [goEditing];
ColWidths[ColLigne]:=round(30/RedFonte);
ColWidths[ColTrain]:=round(200/RedFonte);
ColWidths[ColRoute]:=round(100/RedFonte);
ColWidths[ColHDep]:=round(60/RedFonte);
ColWidths[ColVitDem]:=round(60/RedFonte);
ColWidths[ColSens]:=round(60/RedFonte);
ColWidths[ColArret]:=round(60/RedFonte);
larg:=0;
for i:=0 to colCount-1 do larg:=larg+ColWidths[i];
Cells[ColLigne,0]:='Ligne';
Cells[ColTrain,0]:='Nom du train';
@@ -154,8 +161,8 @@ begin
Cells[ColArret,0]:='Forcer arrêt'+#13+'O/N';
RowHeights[0]:=30;
// numéroter les lignes et fixer la hauteur des lignes
// numéroter les lignes et fixer la hauteur des lignes à 16
for i:=1 to RowCount-1 do
begin
if i>0 then Cells[0,i]:=intToSTR(i);
@@ -265,6 +272,8 @@ begin
closefile(f);
couleurs_Fiche;
StringGridFO.Selection:=tGridRect(rect(0,0,0,0));
FormFicheHoraire.Width:=larg+70;
FormFicheHoraire.Height:=ButtonOK.Top+ButtonOK.Height+50;
end;
procedure TFormFicheHoraire.FormActivate(Sender: TObject);
@@ -423,5 +432,10 @@ begin
end;
end;
procedure TFormFicheHoraire.Button1Click(Sender: TObject);
begin
FormFicheHoraire.Width:=StringGridFO.Left+StringGridFO.Width+10;
end;
end.
+5 -2
View File
@@ -49,7 +49,8 @@ begin
NewRule.Applicationname:=fichier;
NewRule.Protocol:=NET_FW_IP_PROTOCOL_TCP;
//NewRule.LocalPorts := '9999'; // '80,443,4520-4533' sans spécif=tous ports
NewRule.LocalPorts :=''; // sans spécif=tous ports
//NewRule.LocalPorts := '9999'; // '80,443,4520-4533'
NewRule.Direction:=net_fw_rule_dir_in;
NewRule.Enabled:=True;
NewRule.Grouping:='';
@@ -62,7 +63,9 @@ begin
r:=true;
except
begin
s:='Erreur: impossible d''accéder au pare feu Windows. Le pare feu est géré par un programme tiers.';
s:='Erreur: impossible d''accéder au pare feu Windows. Le pare feu est géré par un programme tiers';
Affiche(s,clred);
s:='ou Signaux_Complexes n''a pas été lancé en mode administrateur.';
Affiche(s,clred);
formconfig.Labelinfo.caption:=s;
r:=false;
+296 -296
View File
File diff suppressed because it is too large Load Diff
+72 -70
View File
@@ -1,5 +1,5 @@
unit Unitprinc;
// 27/03/2025
// 11/06/2025
(********************************************
Programme signaux complexes Graphique Lenz
Composants ClientSocket et ServeurSocket pour les connexions réseau socket
@@ -1056,7 +1056,7 @@ tTrain = record
Ttache = array[1..MaxTaches] of record
typeTache : integer ; // 0 : rien - 1 : accessoire ... etc
typeTache : integer ; // 0:rien - 1:accessoire 2:vitesse train 3:fonction F 4:tempo
traite : boolean; // traitement en cours
tempo : integer; // tempo avant exécution de la commande
dest : integer; // destinataire : 1=CDM - 2=XpressNet 3=Dccpp
@@ -1101,6 +1101,8 @@ var
Modesombre,serveur_ouvert,pasChgTBV,FpBouge,debugPN,simuInterface,option_demitour,
mesureTrains,AffCompteur,clicTBGB,clicTBfen,clicTBTrain,ModeTache,NoTraite : boolean;
RedFonte : single;
Style : array[0..200] of Tstyle;
Interfaces_CDM : array[1..20] of string;
@@ -1257,9 +1259,9 @@ var
famille : integer; // 1=système 2=CDM 3=SC ne sert qu'à filtrer l'affichage par la combobox
end;
Fonction : array[0..100,0..100] of Tfonction;
NomFonction : array[0..100] of string;
ArbreFonc : array[0..100,0..100] of integer;
Fonction : array[0..100,0..100] of Tfonction; // indice de la fonction,éléments de la fonction
NomFonction : array[0..100] of string; // nom de la fonction
ArbreFonc : array[0..100,0..100] of integer; // fonction sous forme d'arbre
blocUSB : array[1..10] of record
AffTrain : string;
@@ -1490,6 +1492,7 @@ procedure renseigne_comp_trains(i : integer);
function ClavierHookLLProc(Code : integer; WordParam : wparam; LongParam: lparam) : LongInt; stdcall;
procedure cree_GB_compteur(rang : integer);
procedure pilote_train(det1,det2,AdrTrain,it : integer);
procedure equation_droite(y1,y2,x1,x2 : single;var pente,b : single);
implementation
@@ -1866,7 +1869,7 @@ begin
Formprinc.FenRich.StyleName:='Windows';
// et dans formdebug.Create aussi
// énumérer tous les composants pour repaint les richedit - ne marche pas
// énumérer tous les composants pour repaint les richedit - ne marche pas :D
{
for i:=0 to Screen.FormCount-1 do
begin
@@ -2156,7 +2159,6 @@ var ts : tstrings;
f : textFile;
begin
s:=GetCurrentProcessEnvVar('SystemDrive'); // s='c:'
cmd:='/c vol '+s+' >vol.txt'; // /c ferme la fenetre en fin d'exec /k ne ferme pas
// si on fait un runas au lieu de open, çà ouvre une fenetre de demande admin sur les postes non admin
// ou dont le niveau d'utilisateur est bas dans le profil
@@ -2181,7 +2183,7 @@ begin
i:=pos('-',s);
if i>4 then
begin
i:=i-4;
i:=i-4;
s:=copy(s,i,9)+' '; // Id de formatage de c:\
end;
end
@@ -2405,12 +2407,6 @@ begin
chaine_HEX:=sa_hex;
end;
// Affiche une chaîne en Hexa Ascii
procedure affiche_chaine_hex(s : string;couleur : Tcolor);
begin
if traceTrames then AfficheDebug(chaine_HEX(s),couleur);
end;
procedure Affiche(s : string;lacouleur : TColor);
begin
with formprinc do
@@ -2841,7 +2837,6 @@ begin
if trouve then result:=port else result:=0;
end;
{$ELSE}
// connecte un port usb interface vers centrale avec TMSCOMM. Si le port n'est pas ouvert, renvoie 0, sinon renvoie
@@ -5221,7 +5216,7 @@ begin
end;
}
// dessine l'aspect du signal en fonction de son adresse dans la partie droite de droite
// dessine l'aspect du signal en fonction de son adresse dans le canvas de destination
procedure Dessine_signal_mx(CanvasDest : Tcanvas;x,y : integer;FrX,frY : single;adresse : integer;orientation : integer);
var i,aspect : integer;
begin
@@ -5507,6 +5502,7 @@ begin
//CompteurT[rang].ImgH:=imH;
end;
// Nom du train
CompteurT[rang].lbl:=TLabel.Create(Formprinc.ScrollBoxC);
with CompteurT[rang].lbl do
begin
@@ -5518,15 +5514,13 @@ begin
left:=8;
width:=largComptC-10;
font.Name:='Arial';
font.Size:=10;
font.Size:=round(RedFonte*10);
font.Style:=[fsbold];
//transparent:=false;
//couleur:=compteurT[rang].gb.Color;
//affiche(intToHex(couleur,6),clyellow);
//color:=couleur;
caption:=trains[rang].nom_train;
end;
CompteurT[rang].Img:=Timage.create(CompteurT[rang].gb);
@@ -5620,51 +5614,51 @@ end;
// renseigne les composants image train, label et vitesse
procedure renseigne_comp_trains(i : integer);
begin
with image_train[i] do
begin
Autosize:=true;
align:=alNone;
Parent:=Formprinc.ScrollBoxTrains;
Name:='ImageTrain'+IntToSTR(i); // nom de l'image
Top:=50*(i-1); // détermine les points d'origine
Left:=0;
picture.Bitmap.Width:=LargImgTrain;
picture.Bitmap.Height:=HautImgTrain;
end;
with labeltrain[i] do
begin
Name:='LabelTrain'+intToSTR(i);
Caption:=Trains[i].nom_train;
Parent:=Formprinc.ScrollBoxTrains;
font.color:=clBlack;
font.Style:=[fsbold];
width:=100;height:=20;
Top:=Image_train[i].Top+(HautImgTrain div 3);
Left:=LargImgTrain+10;
BringToFront;
end;
with LabelVitesse[i] do
begin
Name:='LabelVitesse'+intToSTR(i);
Caption:='V=0';
Parent:=Formprinc.ScrollBoxTrains;
font.color:=clBlack;
width:=100;height:=20;
Top:=Image_train[i].Top+(HautImgTrain div 3)+12;
Left:=LargImgTrain+10;
BringToFront;
end;
with LabelBlocUSB[i] do
begin
Name:='LabelBlocUSB'+intToSTR(i);
caption:='';
Parent:=Formprinc.ScrollBoxTrains;
font.color:=clBlack;
width:=100;height:=20;
Top:=Image_train[i].Top+(HautImgTrain div 3)+24;
Left:=LargImgTrain+10;
BringToFront;
end;
with image_train[i] do
begin
Autosize:=true;
align:=alNone;
Parent:=Formprinc.ScrollBoxTrains;
Name:='ImageTrain'+IntToSTR(i); // nom de l'image
Top:=50*(i-1); // détermine les points d'origine
Left:=0;
picture.Bitmap.Width:=LargImgTrain;
picture.Bitmap.Height:=HautImgTrain;
end;
with labeltrain[i] do
begin
Name:='LabelTrain'+intToSTR(i);
Caption:=Trains[i].nom_train;
Parent:=Formprinc.ScrollBoxTrains;
font.color:=clBlack;
font.Style:=[fsbold];
width:=100;height:=20;
Top:=Image_train[i].Top+(HautImgTrain div 3);
Left:=LargImgTrain+10;
BringToFront;
end;
with LabelVitesse[i] do
begin
Name:='LabelVitesse'+intToSTR(i);
Caption:='V=0';
Parent:=Formprinc.ScrollBoxTrains;
font.color:=clBlack;
width:=100;height:=20;
Top:=Image_train[i].Top+(HautImgTrain div 3)+12;
Left:=LargImgTrain+10;
BringToFront;
end;
with LabelBlocUSB[i] do
begin
Name:='LabelBlocUSB'+intToSTR(i);
caption:='';
Parent:=Formprinc.ScrollBoxTrains;
font.color:=clBlack;
width:=100;height:=20;
Top:=Image_train[i].Top+(HautImgTrain div 3)+24;
Left:=LargImgTrain+10;
BringToFront;
end;
end;
// créée une image dans l'onglet trains , 2 label dynamiquement dans la partie droite pour un nouveau train déclaré dans le fichier de config
@@ -5698,7 +5692,6 @@ begin
renseigne_comp_trains(rang);
with Image_Train[rang] do
begin
onClick:=Formprinc.ImageTrainonclick; // affectation procédure clique G sur image
OnDblClick:=formPrinc.ImageTrainDoubleClic;
//onMouseDown:=Formprinc.ProcOnMouseDown; // clique G ou D
@@ -5730,7 +5723,6 @@ begin
begin
labelBlocUSB[rang].Caption:='Bloc USB '+intToSTR(i);
end;
end;
end;
@@ -6032,7 +6024,8 @@ begin
end;
end;
// teste la condition d'une action
// teste la (les) condition(s) d'une action
// action : index de l'action
function teste_condition(action : integer) : boolean;
var condValide : boolean;
vit,vit1,vit2,it,pa,m1,m2,hc,n,ncond,cond,etat : integer;
@@ -6394,7 +6387,7 @@ end;
// fonction hook clavier de bas niveau (LL) appellée par appui ou relache sur une touche
// cette fonction intercepte tous les évènements clavier (pas les touches de fonctions [hotkeys]) windows quelque soit la fenetre ou le prog activé.
// cette fonction d'interception est appellée par tous les évènements clavier (pas les touches de fonctions [hotkeys]) windows quelque soit la fenetre ou le prog activé.
// https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms644984(v=vs.85)?redirectedfrom=MSDN
// https://learn.microsoft.com/fr-fr/windows/win32/api/winuser/ns-winuser-kbdllhookstruct
function ClavierHookLLProc(Code : integer; WordParam : wparam; LongParam: lparam) : longint;
@@ -6764,7 +6757,7 @@ begin
begin
sc:=false;
// il faut qu'on soit en RUN pour que les vitesses des trains soient prises en compte
// pour arrêter un train dans CDM, envoyer une consigne nulle ne suffit pas, il faut envoyer un _STOP
// pour arrêter un train dans CDM, envoyer une consigne nulle ne suffit pas, il faut envoyer un _STOP mais il n'y a pas de décélération
if PilotageTrainsCDMNom then
s:=chaine_CDM_vitesseST(vitesse,nom_train) // par nom du train
else
@@ -21091,6 +21084,12 @@ begin
timer1.Interval:=100;
timer1.Enabled:=true;
{$IF CompilerVersion >= 28.0}
RedFonte:=Screen.DefaultPixelsPerInch/Screen.PixelsPerInch; // pour la réduction des fontes : windows mise à l'échelle du texte
{$ELSE}
RedFonte:=100/Screen.PixelsPerInch; // pour la réduction des fontes : windows mise à l'échelle du texte
{$IFEND}
ButtonEssai.Visible:=not(diffusion);
GetLocaleFormatSettings(0,FormatSettings);
FormatSettings.DecimalSeparator:='.';
@@ -21943,7 +21942,7 @@ begin
end;
end;
// donne l'equation de droite: renvoie la pente et b (y=ax+b) de la droite passant par les points (x1,y1) et (x2,y2)
// donne l'equation de droite: renvoie la pente a et b (y=ax+b) de la droite passant par les points (x1,y1) et (x2,y2)
procedure equation_droite(y1,y2,x1,x2 : single;var pente,b : single);
begin
if x2-x1<>0 then pente:=(y2-y1)/(x2-x1) else pente:=9999;
@@ -21963,6 +21962,7 @@ begin
end;
// traite les taches par le timer
// une tache est piloter un accessoire, une vitesse de train ou une fonction F
// tableau taches[].typeTache
// [].chaine
// [].tempo
@@ -28097,4 +28097,6 @@ begin
menu.Items[1].caption:='Extraire le compteur du train '+trains[IdTrainClic].nom_train;
end;
end.
+14
View File
@@ -307,6 +307,20 @@ object FormTCO: TFormTCO
8888888888888888888BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBB}
end
object LabelPM: TLabel
Left = 968
Top = 320
Width = 16
Height = 20
Anchors = [akTop, akRight]
Caption = '- +'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Arial Narrow'
Font.Style = []
ParentFont = False
end
object ScrollBox: TScrollBox
Left = 8
Top = 12
+109 -30
View File
@@ -170,6 +170,7 @@ type
Modeslection1: TMenuItem;
Modedplacement1: TMenuItem;
N12: TMenuItem;
LabelPM: TLabel;
//TimerTCO: TTimer;
procedure FormCreate(Sender: TObject);
procedure FormActivate(Sender: TObject);
@@ -417,6 +418,7 @@ type
procedure EditAdrElementExit(Sender: TObject);
procedure Modeslection1Click(Sender: TObject);
procedure Modedplacement1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
public
{ Déclarations publiques }
end;
@@ -1633,7 +1635,7 @@ begin
if (typEL=Tjd) or (typel=Tjs) then
begin
if deb then Affiche(intToSTR(adr1),clred);
// croisements ou tjd
case Bim of
21 : begin
zone_tco(t,adr1,typEl,SensTCO_E,13,false,false); // chercher 1er élément à droite - xcanton Tel1
@@ -1835,7 +1837,7 @@ procedure Init_TCO(indexTCO : integer);
var x,y : integer;
begin
sauve_tco:=true;
Affiche('Nouveau tco '+intToSTr(indexTCO),clyellow);
Affiche('Nouveau tco '+intToStr(indexTCO),clyellow);
NbreCellX[indexTCO]:=35;NbreCellY[indexTCO]:=20;LargeurCell[indexTCO]:=35;HauteurCell[indexTCO]:=35;
largeurCelld2[indexTCO]:=largeurCell[indexTCO] div 2;HauteurCelld2[indexTCO]:=HauteurCell[indexTCO] div 2;
EcranTCO[indexTCO]:=1;
@@ -2500,13 +2502,6 @@ begin
b:=i;
end;
// donne l'équation de droite y=ax+b passant par les points (x1,y1) (x2,y2)
procedure droite(x1,y1,x2,y2: integer;var a,b: single);
begin
if x2<>x1 then a:=(y2-y1)/(x2-x1) else a:=99999;
b:=y1-a*x1;
end;
procedure sauve_fichiers_tco;
var fichier : textfile;
s : string;
@@ -2971,7 +2966,7 @@ begin
taillefont:=tco[indextco,x,y].TailleFonte;
if taillefont=0 then taillefont:=8;
tf:=(taillefont*LargeurCell[indexTCO]) div 40;
c.font.Size:=tf;
c.font.Size:=round(tf*RedFonte);
if b=id_action then c.Brush.Color:=couleurAction;
@@ -3018,7 +3013,7 @@ begin
if repr=4 then texte_reparti(s,indextco,x,y,c.font.size) else
c.Textout(x0+xt,y0+yt,s);
// texte encadré
if tco[indextco,x,y].buttoir=1 then
@@ -6294,7 +6289,7 @@ begin
if testbit(pont,2) or testbit(pont,6) then
begin
pen.color:=clfond[indexTCO];
droite(xf,y0,x0,yf,a1,b1);
equation_droite(xf,y0,x0,yf,a1,b1);
// droite a2,b2 // passant par x2,y2
a2:=a1;
@@ -6439,7 +6434,7 @@ begin
with canvas do
begin
// donne l'équation de droite y=ax+b passant par les points (x1,y1) (x2,y2)
droite(xc,yc,xf,y0,a1,b1);
equation_droite(xc,yc,xf,y0,a1,b1);
//haut
moveTo(x0,yc); LineTo(xc-epaisseur,yc);
LineTo(xc+epaisseur,round((xc+epaisseur)*a1+b1) ); LineTo(xf,y0);
@@ -6581,7 +6576,7 @@ begin
if testbit(pont,0) or testbit(pont,4) then
begin
pen.color:=clfond[indexTCO];
droite(x0,y0,xf,yf,a1,b1);
equation_droite(x0,y0,xf,yf,a1,b1);
// droite a2,b2 // passant par x2,y2
a2:=a1;
@@ -6717,7 +6712,7 @@ begin
with canvas do
begin
// donne l'équation de droite y=ax+b passant par les points (x1,y1) (x2,y2)
droite(x0,y0,xc,yc,a1,b1);
equation_droite(x0,y0,xc,yc,a1,b1);
moveTo(x0,y0);LineTo(xc-epaisseur,round((xc-epaisseur)*a1+b1) ); LineTo(xc+epaisseur,yc); LineTo(xf,yc);
moveTo(x0,yc);lineTo(xc-epaisseur,yc);
@@ -7115,7 +7110,7 @@ begin
s:=canton[i].nom;
if s<>'' then
begin
font.Size:=((Larg*10) div 30)+1; //((LargCell*5) div 29);
font.Size:=round(RedFonte*((Larg*10) div 30)+1); //((LargCell*5) div 29);
Brush.Color:=coul;
dx:=TextWidth(s) div 2;
dy:=TextHeight(s) div 2;
@@ -7168,7 +7163,7 @@ begin
if l<dx-xt then
begin
font.Style:=[];
font.Size:=((Larg*10) div 40)+1; //((LargCell*5) div 29);
font.Size:=round(RedFonte*((Larg*10) div 40)+1); //((LargCell*5) div 29);
// Affiche(intToSTR(numC)+' '+intToSTR(font.size),clYellow);
brush.color:=coul;
textout(xt,yt,s);
@@ -7346,7 +7341,7 @@ begin
s:=canton[i].nom;
if s<>'' then
begin
font.Size:=((Larg*10) div 30)+1; //((LargCell*5) div 29);
font.Size:=round(RedFonte*((Larg*10) div 30)+1); //((LargCell*5) div 29);
Brush.Color:=coul;
dy:=TextWidth(s) div 2;
dx:=TextHeight(s) div 2;
@@ -7941,7 +7936,7 @@ begin
if testbit(pont,2) or testbit(pont,6) then
begin
pen.color:=clfond[indexTCO];
droite(xf,y0,x0,yf,a1,b1);
equation_droite(xf,y0,x0,yf,a1,b1);
// droite a2,b2 // passant par x2,y2
a2:=a1;
@@ -8085,7 +8080,7 @@ begin
with canvas do
begin
// donne l'équation de droite y=ax+b passant par les points (x1,y1) (x2,y2)
droite(xc,yc,x0,yf,a1,b1);
equation_droite(xc,yc,x0,yf,a1,b1);
//gauche
moveTo(xc,y0); LineTo(xc,yc-epaisseur);
LineTo(xc-epaisseur,round((xc-epaisseur)*a1+b1) ); LineTo(x0,yf);
@@ -8236,7 +8231,7 @@ begin
if testbit(pont,0) or testbit(pont,4) then
begin
pen.color:=clfond[indexTCO];
droite(x0,y0,xf,yf,a1,b1);
equation_droite(x0,y0,xf,yf,a1,b1);
// droite a2,b2 // passant par x2,y2
a2:=a1;
@@ -8380,7 +8375,7 @@ begin
with canvas do
begin
// donne l'équation de droite y=ax+b passant par les points (x1,y1) (x2,y2)
droite(x0,y0,xf,yf,a1,b1);
equation_droite(x0,y0,xf,yf,a1,b1);
//gauche
moveTo(xc,yf); LineTo(xc,yc+epaisseur);
LineTo(xc-epaisseur,round((xc-epaisseur)*a1+b1) ); LineTo(x0,y0);
@@ -11390,7 +11385,7 @@ begin
with PCanvasTCO[indexTCO] do
begin
Brush.Color:=clFond;
font.Size:=((LargCell*6) div 30)+1; //((LargCell*5) div 29);
font.Size:=round(RedFonte*((LargCell*6) div 30)+1); //((LargCell*5) div 29);
if NB then font.color:=clBlack else
Font.Color:=tco[indextco,x,y].coulFonte;
Font.Name:='Arial';
@@ -11973,9 +11968,50 @@ begin
begin
parent:=self;
name:='BallonHint';
BallonHint.Style:=bhsBalloon;
BallonHint.HideAfter:=4000;
end;
{$IFEND}
Label1.Font.Size:=round(12*RedFonte);
Label2.Font.Size:=round(12*RedFonte);
Label3.Font.Size:=round(12*RedFonte);
Label4.Font.Size:=round(12*RedFonte);
Label5.Font.Size:=round(12*RedFonte);
Label6.Font.Size:=round(12*RedFonte);
Label7.Font.Size:=round(12*RedFonte);
Label8.Font.Size:=round(12*RedFonte);
Label9.Font.Size:=round(12*RedFonte);
Label10.Font.Size:=round(12*RedFonte);
Label11.Font.Size:=round(12*RedFonte);
Label12.Font.Size:=round(12*RedFonte);
Label13.Font.Size:=round(12*RedFonte);
Label14.Font.Size:=round(12*RedFonte);
Label15.Font.Size:=round(12*RedFonte);
Label16.Font.Size:=round(12*RedFonte);
Label17.Font.Size:=round(12*RedFonte);
Label18.Font.Size:=round(12*RedFonte);
Label19.Font.Size:=round(12*RedFonte);
Label20.Font.Size:=round(12*RedFonte);
Label21.Font.Size:=round(12*RedFonte);
Label22.Font.Size:=round(12*RedFonte);
Label23.Font.Size:=round(12*RedFonte);
Label24.Font.Size:=round(12*RedFonte);
Label25.Font.Size:=round(12*RedFonte);
Label26.Font.Size:=round(12*RedFonte);
Label27.Font.Size:=round(12*RedFonte);
Label28.Font.Size:=round(12*RedFonte);
Label29.Font.Size:=round(12*RedFonte);
Label32.Font.Size:=round(12*RedFonte);
Label33.Font.Size:=round(12*RedFonte);
Label34.Font.Size:=round(12*RedFonte);
Label50.Font.Size:=round(12*RedFonte);
Label51.Font.Size:=round(12*RedFonte);
Label52.Font.Size:=round(12*RedFonte);
Label53.Font.Size:=round(12*RedFonte);
ModeSlection1.checked:=false;
ModeDplacement1.Checked:=true;
modeGlisse:=true;
@@ -12000,7 +12036,19 @@ begin
TamponTCO_org.Yorg:=0;
indexTrace:=0;
KeyPreview:=true; // valide les évènements clavier
TrackBarZoom.Tabstop:=false; // permet d'avoir les evts curseurs
with TrackBarZoom do
begin
Tabstop:=false; // permet d'avoir les evts curseurs
Anchors:=[];
Anchors:=[akTop,akRight];
end;
ImageDrapVert.Visible:=false;
ImageDrapRouge.Visible:=false;
ImageBt0Bistable.Visible:=false;
ImageBt1Bistable.Visible:=false;
ImageTemp2.Visible:=false;
ImageTemp.Visible:=false;
ButtonSauveTCO.TabStop:=false;
ButtonConfigTCO.TabStop:=false;
ButtonRaz.TabStop:=false;
@@ -14169,6 +14217,7 @@ begin
clLarge:=Width;
clHaut:=Height;
PanelBas.Height:=GroupBox1.top+GroupBox1.Height+20;
panelBas.width:=clLarge-5;
PanelBas.Top:=clHaut-PanelBas.Height-50; // 50=entete de la fenetre
@@ -14204,7 +14253,7 @@ end;
procedure TFormTCO.FormActivate(Sender: TObject);
//procedure PFormTCO[indexTCO].FormActivate(Sender: TObject);
var indextco : integer;
var i,indextco : integer;
begin
indextco:=index_TCO(sender);
IndexTCOCourant:=indexTCO;
@@ -14248,6 +14297,10 @@ begin
TrackBarZoom.Min:=ZoomMin;
positionne(indexTCO);
i:=ScrollBox.Left+ScrollBox.Width;
trackBarZoom.Left:=i;
LabelPM.Left:=i;
LabelZoom.Left:=i;
renseigne_tous_cantons;
renseigne_TJDs_TCO;
@@ -15083,6 +15136,7 @@ var s,d,indexTCO : integer;
begin
if affevt then Affiche('TCO.FormKeyDown',clOrange);
indexTCO:=index_TCO(Sender);
//Affiche('Avant xClicCell='+intToSTR(XClicCell[indexTCO]),clCyan);
if (RadioGroupSel.ItemIndex=1) and (Key=Vk_Escape) then
@@ -15153,6 +15207,23 @@ begin
stop_modetrace(indexTCO);
end;
VK_DELETE : couper(indexTCO);
107 : begin
d:=TrackBarZoom.Position;
if d>15 then
begin
dec(d);
TrackBarZoom.Position:=d;
end;
end;
109 : begin
d:=TrackBarZoom.Position;
if d<100 then
begin
inc(d);
TrackBarZoom.Position:=d;
end;
end;
end;
if (ssShift in Shift) then
@@ -16329,13 +16400,12 @@ begin
begin
BallonHint.Title:=s1;
BallonHint.Description:=s2;
BallonHint.Style:=bhsBalloon;
BallonHint.HideAfter:=4000;
x:=(canton[IdCantonSelect].x-1)*LargeurCell[indexTCO]+(LargeurCell[indexTCO] div 2);
y:=(canton[IdCantonSelect].y-1)*HauteurCell[indexTCO]+HauteurCell[indexTCO] div 2;
ballonhint.ShowHint(PimageTCO[indexTCO].ClientToScreen(point(x,y))); // affiche le ballonHint
end;
{$IFEND}
ImageTCO.Hint:=''; // pas de hint "normal"
end;
{$IFEND}
end;
// évènement qui se produit quand on clique gauche ou droit
@@ -18184,7 +18254,7 @@ begin
begin
FontDialog1.Font.Name:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].Fonte;
FontDialog1.Font.Color:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].CoulFonte;
FontDialog1.Font.Size:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].taillefonte;
FontDialog1.Font.Size:=round(RedFonte*tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].taillefonte);
fs:=[];
s:=tco[indextco,XclicCell[indexTCO],YclicCell[indexTCO]].FontStyle;
@@ -19631,6 +19701,15 @@ begin
modeGlisse:=true;
end;
procedure TFormTCO.Button1Click(Sender: TObject);
var i : integer;
begin
i:=trackBarZoom.Left ;
Affiche(intToSTR(i),clLime);
dec(i);
trackBarZoom.Left:=i;
end;
end.
+1
View File
@@ -13,6 +13,7 @@ object FormAig: TFormAig
KeyPreview = True
OldCreateOrder = False
OnActivate = FormActivate
OnCreate = FormCreate
OnKeyPress = FormKeyPress
PixelsPerInch = 96
TextHeight = 13
+5 -3
View File
@@ -22,6 +22,7 @@ type
procedure ButtonDev2Click(Sender: TObject);
procedure ButtonDroit2Click(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure FormCreate(Sender: TObject);
private
{ Déclarations privées }
public
@@ -194,9 +195,10 @@ begin
if key=chr(27) then close;
end;
procedure TFormAig.FormCreate(Sender: TObject);
begin
width:=ButtonDroit2.left+buttonDroit2.Width+30; // adapte la fenetre aux taille des boutons qui ont pu changer si on sélectionne un % de fonte dans windows
end;
begin
end.
+10 -11
View File
@@ -36,12 +36,10 @@ type
{ Déclarations publiques }
end;
const
HauteurLigneSGT=30;
var
FormSelTrain: TFormSelTrain;
largC,hautC,LargeurSGT,indexTrainClic : Integer;
largC,hautC,LargeurSGT,indexTrainClic,HauteurLigneSGT : Integer;
routeSav : TuneRoute;
procedure actualise_seltrains;
@@ -437,6 +435,7 @@ end;
procedure TFormSelTrain.FormCreate(Sender: TObject);
var i : integer;
begin
HauteurLigneSGT:=round(30/redFonte);
with ImageHaut do begin Width:=60;Height:=60;visible:=false; end;
with ImageBas do begin Width:=60;Height:=60;visible:=false; end;
with ImageDroite do begin Width:=60;Height:=60;visible:=false; end;
@@ -454,14 +453,14 @@ begin
ShowHint:=true;
ColCount:=8; // nombre de colonnes
RowCount:=Ntrains+1;
ColWidths[0]:=50;
ColWidths[1]:=200; // icone
ColWidths[2]:=150; // nom du train
ColWidths[3]:=60; // canton
ColWidths[4]:=100;
ColWidths[5]:=120;
ColWidths[6]:=30;
ColWidths[7]:=35;
ColWidths[0]:=round(50/RedFonte);;
ColWidths[1]:=round(200/RedFonte);; // icone
ColWidths[2]:=round(150/RedFonte);; // nom du train
ColWidths[3]:=round(60/RedFonte);; // canton
ColWidths[4]:=round(100/RedFonte);;
ColWidths[5]:=round(120/RedFonte);;
ColWidths[6]:=round(30/RedFonte);;
ColWidths[7]:=round(35/RedFonte);;
LargeurSGT:=0;
for i:=0 to 7 do LargeurSGT:=LargeurSGT+ColWidths[i];
width:=LargeurSGT+30;
+1 -1
View File
@@ -26,7 +26,7 @@ var
f : textFile;
Const
VersionSC = '10.54'; // sert à la comparaison de la version publiée
VersionSC = '10.6'; // sert à la comparaison de la version publiée
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
// pour unzip
SHCONTCH_NOPROGRESSBOX=4;
+6 -1
View File
@@ -333,7 +333,12 @@ version 10.51 : Correction placement des trains dans le TCO.
version 10.52 : Sélection routes pour plusieurs trains dans le TCO.
version 10.53 : Vérification du répertoire d'installation de CDM Rail.
Correction d'un bug sur la suppression/création train.
version 10.54 : Améliorations diverses
version 10.54 : Améliorations diverses.
version 10.6 : Modification pour l'affichage de la barre de zoom du TCO pour les
versions les plus récentes de W11.
Ajout des touches + et - pour le zoom du TCO.
Correction des affichages lors des mises à l'échelle du texte dans win10/11.