This commit is contained in:
f1iwq2
2023-07-16 10:04:33 +02:00
parent f09fa4c454
commit 9957edb6c9
16 changed files with 2442 additions and 389 deletions
+2 -2
View File
@@ -14,8 +14,8 @@
-$N+
-$O-
-$P+
-$Q+
-$R+
-$Q-
-$R-
-$S-
-$T-
-$U-
+2 -2
View File
@@ -17,8 +17,8 @@ M=0
N=1
O=0
P=1
Q=1
R=1
Q=0
R=0
S=0
T=0
U=0
+10 -9
View File
@@ -178,6 +178,8 @@ procedure Compilation;
procedure lit_fichier_segments_cdm;
procedure affichage(imprime : boolean);
procedure Aff_train(adr: integer;train:string;x1,y1,x2,y2 :integer);
procedure D_Arc(Canvas: TCanvas; CenterX,CenterY: integer;
rayon: Integer; StartDegres, StopDegres: Double);
implementation
@@ -998,11 +1000,10 @@ end;
// dessine un arc orienté de xa,ya à xb,yb dans le canvas image (pas imprimante)
// coordonnées CDM
procedure arc_xy(centreX,centreY,rayon,xa,ya,xb,yb : integer);
procedure arc_xy(canvas : tcanvas;centreX,centreY,rayon,xa,ya,xb,yb : integer);
var x1,y1,x2,y2: integer ;
arcXa,arcYa,arcxb,arcYb,angleA,angleB,
cosA,SinA,CosB,SinB,vectoriel,AngleAB: double;
canvas : Tcanvas;
inverse,maxA,maxB,deb : boolean;
begin
deb:=false;
@@ -1012,7 +1013,7 @@ begin
coords(xa,ya);
coords(xb,yb);
rayon:=round(rayon*reducX) div 1000;
canvas:=FormAnalyseCDM.ImageCDM.Canvas;
X1:=centreX - rayon;
Y1:=centreY - rayon;
@@ -1149,7 +1150,7 @@ begin
canvas.pen.color:=clred;
ligneCDM(canvas,milieuX,milieuY,centreX,centreY);
//ligneCDM(canvas,x0,y0,x1,y1);
arc_xy(centreX,centreY,round(rayonD)+250,x1,y1,x0,y0);
arc_xy(canvas,centreX,centreY,round(rayonD)+250,x1,y1,x0,y0);
centreX:=round(-rayonD*cos(alpha))+MilieuX;
centreY:=round(pente*centreX+b);
@@ -1157,7 +1158,7 @@ begin
canvas.pen.color:=clyellow;
ligneCDM(canvas,milieuX,milieuY,centreX,centreY);
//ligneCDM(canvas,x0,y0,x1,y1);
arc_xy(centreX,centreY,round(rayonD)+250,x1,y1,x0,y0);
arc_xy(canvas,centreX,centreY,round(rayonD)+250,x1,y1,x0,y0);
exit;
@@ -1200,7 +1201,7 @@ begin
centreX:=x0+5000;
centreY:=round(pente*centreX+b);
rayon:=round(sqrt(sqr(centreX-x0)+sqr(centreY-y0)));
arc_xy(centreX,centreY,rayon,x2,y2,x0,y0);
arc_xy(canvas,centreX,centreY,rayon,x2,y2,x0,y0);
// point de départ en vert
canvas.pen.color:=clLime;
@@ -3882,7 +3883,7 @@ begin
CentreY:=segment[ind1].lyc;
Canvas.pen.color:=clred;
x1:=segment[ind1].periph[per1].x;
y1:=segment[ind1].periph[per1].y;
y1:=segment[ind1].periph[per1].y;
x2:=segment[ind1].periph[per2].x;
y2:=segment[ind1].periph[per2].y;
canvas.pen.Color:=clred;
@@ -4019,7 +4020,7 @@ begin
// déterminer la destination
// trouve le port connecté au segment suivant
tp:=index_port_connecte(index,circuit_det[2].index,indexPort);
// trouver les coordonnées su x,y sur lequel est connecté le port
// trouver les coordonnées su x,y sur lequel est connecté le port
xs:=Segment[index].port[IndexPort].x;
ys:=Segment[index].port[IndexPort].y;
// donc tracer un arc de (x,y) détecteur à (xs,ys) port
@@ -4094,7 +4095,7 @@ begin
// déterminer la destination
// trouve le port connecté au segment précédent
tp:=index_port_connecte(index,circuit_det[NindexR-1].index,indexPort);
// trouver les coordonnées su x,y sur lequel est connecté le port
// trouver les coordonnées su x,y sur lequel est connecté le port
xs:=Segment[index].port[IndexPort].x;
ys:=Segment[index].port[IndexPort].y;
// donc tracer un arc de (x,y) (détecteur) à (xs,ys) port
+4 -1
View File
@@ -571,7 +571,7 @@ var
ack_cdm,clicliste,config_modifie,clicproprietes,confasauver,trouve_MaxPort,
modif_branches,ConfigPrete,trouve_section_dccpp,trouve_section_trains,
trouveAvecVerifIconesTCO,Affiche_avert : boolean;
trouveAvecVerifIconesTCO,Affiche_avert,activ : boolean;
fichier : text;
function config_com(s : string) : boolean;
@@ -3320,6 +3320,7 @@ var i :integer;
s : string;
begin
if affevt then affiche('FormConfig activate',clLime);
activ:=true;
clicListe:=false;
Edit_HG.Visible:=false;
labelHG.Visible:=false;
@@ -3546,6 +3547,7 @@ begin
//l'onglet affiché est sélectionné à l'appel de la fiche dans l'unité UnitPrinc
clicListe:=false;
activ:=false;
end;
@@ -9825,6 +9827,7 @@ end;
procedure TFormConfig.RichCdeDccppChange(Sender: TObject);
var i,maxi : integer;
begin
if activ then exit;
maxi:=RichCdeDCCpp.Lines.count;
if maxi>MaxCdeDccpp then maxi:=MaxCdeDccpp;
for i:=1 to maxi do
-1
View File
@@ -387,7 +387,6 @@ begin
if clicTCO or not(formConfCellTCOAff) or actualize then exit;
tco[XClicCell,YClicCell].Repr:=comborepr.ItemIndex;
efface_entoure;SelectionAffichee:=false;
sourisclic:=false;
FormTCO.ComboRepr.ItemIndex:=ComboRepr.ItemIndex;
//affiche_cellule(XClicCell,yClicCell);
affiche_tco;
+30 -6
View File
@@ -73,9 +73,9 @@ object FormConfigTCO: TFormConfigTCO
OnClick = ButtonDessineClick
end
object CheckDessineGrille: TCheckBox
Left = 16
Top = 96
Width = 105
Left = 160
Top = 16
Width = 97
Height = 17
Caption = 'dessine grille'
TabOrder = 1
@@ -244,7 +244,7 @@ object FormConfigTCO: TFormConfigTCO
end
object Memo1: TMemo
Left = 16
Top = 136
Top = 168
Width = 273
Height = 65
BevelInner = bvLowered
@@ -278,9 +278,33 @@ object FormConfigTCO: TFormConfigTCO
OnClick = BitBtnOkClick
Kind = bkOK
end
object RadioGroup1: TRadioGroup
Left = 16
Top = 96
Width = 281
Height = 57
Caption = 'Graphisme'
TabOrder = 8
end
object RadioButtonLignes: TRadioButton
Left = 40
Top = 112
Width = 113
Height = 17
Caption = 'Lignes bris'#233'es'
TabOrder = 9
end
object RadioButtonCourbes: TRadioButton
Left = 40
Top = 128
Width = 113
Height = 17
Caption = 'Lignes courbes'
TabOrder = 10
end
object ColorDialog1: TColorDialog
OnShow = ColorDialog1Show
Left = 248
Top = 88
Left = 272
Top = 8
end
end
+56 -12
View File
@@ -44,6 +44,9 @@ type
Label1: TLabel;
ImagePiedFeu: TImage;
BitBtnOk: TBitBtn;
RadioGroup1: TRadioGroup;
RadioButtonLignes: TRadioButton;
RadioButtonCourbes: TRadioButton;
procedure ButtonDessineClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure ImageAigClick(Sender: TObject);
@@ -65,7 +68,8 @@ type
var FormConfigTCO: TFormConfigTCO;
AvecGrille : boolean;
titre_couleur : string;
graphisme : integer;
implementation
uses UnitPrinc ;
@@ -97,7 +101,7 @@ begin
end;
end;
procedure dessine_icones;
procedure dessine_icones_config;
var r : Trect;
x1,y1,x2,y2,jy1,jy2,larg,haut : integer;
begin
@@ -277,67 +281,86 @@ end;
procedure TFormConfigTCO.FormActivate(Sender: TObject);
var s: string;
begin
EditNbCellX.Text:=IntToSTR(NbreCellX);
EditNbCellY.Text:=IntToSTR(NbreCellY);
EditRatio.text:=IntToSTR(RatioC);
RadioButtonCourbes.checked:=graphisme=2;
RadioButtonLignes.checked:=graphisme=1;
checkDessineGrille.Checked:=AvecGrille;
checkCouleur.Checked:=ModeCouleurCanton=1;
labelMaxX.caption:='Max='+intToSTR(MaxCellX);
labelMaxY.caption:='Max='+intToSTR(MaxCellY);
dessine_icones;
dessine_icones_config;
s:='ColorA='+IntToHex(clfond,6); // ajouter aux couleurs personnalisées
colorDialog1.CustomColors.Add(s);
end;
procedure TFormConfigTCO.ImageAigClick(Sender: TObject);
var s : string;
begin
titre_couleur:='Changer la couleur des voies';
ColorDialog1.Color:=clVoies;
s:='ColorA='+IntToHex(clfond,6); // ajouter aux couleurs personnalisées
colorDialog1.CustomColors.Add(s);
if ColorDialog1.execute then
begin
clVoies:=ColorDialog1.Color;
TCO_modifie:=true;
dessine_icones;
dessine_icones_config;
end;
end;
procedure TFormConfigTCO.ImageFondClick(Sender: TObject);
var s : string;
begin
titre_couleur:='Changer la couleur de fond';
ColorDialog1.Color:=clfond;
s:='ColorA='+IntToHex(clfond,6); // pour rajouter aux couleurs personnalisées
colorDialog1.CustomColors.Add(s);
if ColorDialog1.execute then
begin
clfond:=ColorDialog1.Color;
TCO_modifie:=true;
dessine_icones;
dessine_icones_config;
end;
end;
procedure TFormConfigTCO.ImageGrilleClick(Sender: TObject);
var s: string;
begin
titre_couleur:='Changer la couleur de la grille';
ColorDialog1.Color:=clGrille;
s:='ColorA='+IntToHex(clfond,6); // ajouter aux couleurs personnalisées
colorDialog1.CustomColors.Add(s);
if ColorDialog1.execute then
begin
ClGrille:=ColorDialog1.Color;
TCO_modifie:=true;
dessine_icones;
dessine_icones_config;
end;
end;
procedure TFormConfigTCO.ImageDetActClick(Sender: TObject);
var s: string;
begin
titre_couleur:='Changer la couleur de détecteur activé';
ColorDialog1.Color:=clAllume;
s:='ColorA='+IntToHex(clfond,6); // ajouter aux couleurs personnalisées
colorDialog1.CustomColors.Add(s);
if ColorDialog1.execute then
begin
ClAllume:=ColorDialog1.Color;
TCO_modifie:=true;
dessine_icones;
dessine_icones_config;
end;
end;
@@ -349,7 +372,7 @@ begin
if ColorDialog1.execute then
begin
ClCanton:=ColorDialog1.Color;
dessine_icones;
dessine_icones_config;
end;
end;
@@ -361,7 +384,7 @@ begin
if ColorDialog1.execute then
begin
ClTexte:=ColorDialog1.Color;
dessine_icones;
dessine_icones_config;
end;
end;
@@ -373,7 +396,7 @@ begin
if ColorDialog1.execute then
begin
ClQuai:=ColorDialog1.Color;
dessine_icones;
dessine_icones_config;
end;
end;
@@ -385,7 +408,7 @@ begin
if ColorDialog1.execute then
begin
clPiedSignal:=ColorDialog1.Color;
dessine_icones;
dessine_icones_config;
end;
end;
@@ -397,6 +420,7 @@ end;
procedure TFormConfigTCO.BitBtnOkClick(Sender: TObject);
var ok : boolean;
x,y : integer;
begin
ok:=true;
@@ -417,6 +441,12 @@ begin
ok:=false;
end;
for y:=1 to NbreCellY do
for x:=1 to NbreCellX do
begin
if tco[x,y].CouleurFond=0 then tco[x,y].CouleurFond:=clfond;
end;
try
SetLength(TamponTCO,NbreCellX+1,NbreCellY+1);
except
@@ -426,11 +456,25 @@ begin
ok:=false;
end;
if RadioButtonLignes.Checked then
begin
if graphisme=2 then TCO_modifie:=true;
graphisme:=1 ;
end;
if RadioButtonCourbes.Checked then
begin
if graphisme=1 then TCO_modifie:=true;
graphisme:=2;
end;
AvecGrille:=checkDessineGrille.Checked;
if ok then
begin
calcul_cellules;
affiche_TCO;
dessine_icones;
LabelErreur.caption:='';
close;
end;
+3 -6
View File
@@ -1,5 +1,5 @@
Unit UnitPrinc;
// 8/7 17h
(********************************************
programme signaux complexes Graphique Lenz
Delphi 7 + activeX Tmscomm + clientSocket
@@ -47,7 +47,7 @@ uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, ExtCtrls, jpeg, ComCtrls, ShellAPI, TlHelp32,
ImgList, ScktComp, StrUtils, Menus, ActnList, MSCommLib_TLB, MMSystem , registry,
Buttons, NB30 ;
Buttons, NB30;
type
TFormPrinc = class(TForm)
@@ -11109,7 +11109,6 @@ begin
etape:=1;
affevt:=false;
avec_splitter:=false;
DebugAffiche:=false;
Algo_localisation:=1; // normal
AntiTimeoutEthLenz:=0;
Verif_AdrXpressNet:=1;
@@ -11538,7 +11537,7 @@ begin
ClientSocketInterface.Socket.SendText(' ');
end;
end;
if sourisclic then inc(Temposouris);
if tempoSouris>0 then dec(Temposouris);
if Tdoubleclic>0 then dec(Tdoubleclic);
if Tempo_init>0 then dec(Tempo_init);
if tps_affiche_retour_dcc>0 then
@@ -14021,11 +14020,9 @@ end;
procedure TFormPrinc.Affiche_fenetre_CDMClick(Sender: TObject);
begin
formAnalyseCDM.Show;
end;
end.
+1 -1
View File
@@ -49,7 +49,7 @@ object FormSimulation: TFormSimulation
OnChange = EditIntervalleChange
OnKeyPress = EditIntervalleKeyPress
end
object CheckAffTick: TCheckBox
object CheckRaz: TCheckBox
Left = 64
Top = 48
Width = 313
+4 -3
View File
@@ -12,7 +12,7 @@ type
OpenDialog: TOpenDialog;
EditIntervalle: TEdit;
Label1: TLabel;
CheckAffTick: TCheckBox;
CheckRaz: TCheckBox;
CheckEvalroutes: TCheckBox;
procedure ButtonChargeClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
@@ -136,7 +136,7 @@ begin
OpenDialog.Filter:='Fichiers texte (*.txt)|*.txt|Tous fichiers (*.*)|*.*';
if openDialog.Execute then
begin
if checkAffTick.Checked then raz_tout;
if checkRAZ.Checked then raz_tout;
if checkEvalRoutes.Checked then TraceListe:=true;
s:=openDialog.FileName;
ouvre_simulation(s);
@@ -145,7 +145,8 @@ end;
procedure TFormSimulation.FormCreate(Sender: TObject);
begin
Intervalle:=0;
Intervalle:=1;
CheckRaz.Checked:=true;
EditIntervalle.Text:=IntToSTR(Intervalle);
end;
+16 -5
View File
@@ -1,6 +1,6 @@
object FormTCO: TFormTCO
Left = 147
Top = 77
Left = 195
Top = 62
Width = 1141
Height = 678
VertScrollBar.Visible = False
@@ -119,7 +119,6 @@ object FormTCO: TFormTCO
ParentShowHint = False
PopupMenu = PopupMenu1
ShowHint = True
OnContextPopup = ImageTCOContextPopup
OnDblClick = ImageTCODblClick
OnDragOver = ImageTCODragOver
OnMouseDown = ImageTCOMouseDown
@@ -910,6 +909,7 @@ object FormTCO: TFormTCO
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
ReadOnly = True
TabOrder = 1
OnChange = EditTypeImageChange
end
@@ -1008,8 +1008,18 @@ object FormTCO: TFormTCO
ParentShowHint = False
ShowHint = True
TabOrder = 10
TabStop = False
OnClick = ButtonDessinerClick
end
object ButtonTrajet: TButton
Left = 712
Top = 128
Width = 75
Height = 25
Caption = 'Trajets'
TabOrder = 11
OnClick = ButtonTrajetClick
end
end
object ButtonAfficheBandeau: TButton
Left = 1069
@@ -1024,7 +1034,8 @@ object FormTCO: TFormTCO
end
object PopupMenu1: TPopupMenu
OnPopup = PopupMenu1Popup
Left = 360
Left = 368
Top = 8
object MenuCouper: TMenuItem
Caption = 'Couper'
OnClick = MenuCouperClick
@@ -1041,7 +1052,7 @@ object FormTCO: TFormTCO
Caption = '-'
end
object Annulercouper: TMenuItem
Caption = 'Annuler couper'
Caption = 'Annuler ctrl+Z'
OnClick = AnnulercouperClick
end
object N1: TMenuItem
+2248 -324
View File
File diff suppressed because it is too large Load Diff
+4 -3
View File
@@ -1,4 +1,4 @@
/ Définitions
/ Définitions TCO version 6.3
CoulFond=202050
CoulVoies=0077FF
CoulAllume=00FFFF
@@ -9,6 +9,7 @@ CoulPiedSig=4080FF
CoulCanton=00FFFF
ModeCouleurCanton=1
AvecGrille=1
Graphisme=2
/ Taille de la matrice x,y
Matrice=39,13
/ Ratio d'affichage celluleX/CelluleY
@@ -18,8 +19,8 @@ Ratio=10
/ couleur fond,adresse,image,inversion aiguillage,Orientation du signal, pied du signal , [texte], representation, fonte, taille fonte, couleur fonte, style, réserve
(202050,358,30,0,1,1,,2,,0,FFFFFF,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,G,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,497,30,0,1,2,,2,,0,FFFFFF,G,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,TCO GARE PRINCIPALE,1,ARIAL,20,00FFFF,GI,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,FFFFFF,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)
(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,8,00FF00,,0)(202050,0,0,0,0,0,,2,,8,00FF00,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,9,0,0,0,,2,,0,000000,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,0,,0,00FFFF,,0)(202050,0,8,0,0,0,,0,,0,00FFFF,,0)(202050,0,20,0,0,0,,2,,0,000000,,0)(202050,0,20,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)
(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,517,20,0,0,0,,2,,0,00FFFF,,0)(202050,531,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,6,2,0,0,0,,2,,0,00FF00,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,516,1,0,0,0,,2,,0,00FFFF,,0)(202050,516,1,0,0,0,,0,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,10,0,0,0,,2,,0,000000,,0)(202050,0,9,0,0,0,,2,,0,000000,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,0,,0,00FFFF,,0)(202050,0,8,0,0,0,,2,,0,00FFFF,,0)(202050,103,25,0,0,0,,2,MS SANS SERIF,10,00FF00,,0)(202050,0,20,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)
(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,10,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,232,30,0,3,1,,2,,0,00FF00,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,FFFFFF,,0)(202050,288,30,0,2,1,,2,,0,FFFFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,10,0,0,0,,2,MS SANS SERIF,10,00FFFF,,0)(202050,0,10,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,302,30,0,1,1,,0,,0,FFFFFF,,0)(202050,9,24,0,0,0,,2,MS SANS SERIF,10,00FF00,,0)(202050,8,24,0,0,0,,0,MS SANS SERIF,10,00FF00,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)
(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,517,20,0,0,0,,2,,0,00FFFF,,0)(202050,531,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,6,2,0,0,0,,2,,0,00FF00,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,516,1,0,0,0,,2,,0,00FFFF,,0)(202050,516,1,0,0,0,,0,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,10,0,0,0,,2,,0,000000,,0)(202050,0,9,0,0,0,,2,,0,000000,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,0,,0,00FFFF,,0)(202050,0,8,0,0,0,,2,,0,00FFFF,,0)(202050,103,25,0,0,0,,2,MS SANS SERIF,10,00FF00,,0)(202050,0,20,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)
(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,10,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,232,30,0,3,1,,2,,0,00FF00,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,FFFFFF,,0)(202050,288,30,0,2,1,,2,,0,FFFFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,10,0,0,0,,2,MS SANS SERIF,10,00FFFF,,0)(202050,0,10,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,302,30,0,1,1,,0,,0,FFFFFF,,0)(202050,9,24,0,0,0,,2,MS SANS SERIF,10,00FF00,,0)(202050,8,24,0,0,0,,0,MS SANS SERIF,10,00FF00,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)
(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,372,30,0,1,1,,2,,0,FFFFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,4,15,0,0,0,,2,,0,00FF00,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,514,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,522,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,7,0,0,0,,2,,0,000000,,0)(202050,0,10,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,FFFFFF,,0)(202050,0,20,0,0,0,,0,,0,00FFFF,,0)(202050,0,20,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)
(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,3,15,0,0,0,,2,,0,00FF00,,0)(202050,5,2,0,0,0,,2,,0,00FF00,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,515,1,0,0,0,,2,,0,00FFFF,,0)(202050,515,1,0,0,0,,0,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,1,0,0,0,,2,,0,00FFFF,,0)(202050,0,7,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,00FFFF,,0)(202050,0,0,0,0,0,,0,,0,FFFFFF,,0)(202050,526,20,0,0,0,,2,,0,00FFFF,,0)(202050,0,20,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,00FFFF,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)
(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,19,0,0,0,,2,,0,00FFFF,,0)(202050,0,19,0,0,0,,2,,0,00FFFF,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,520,30,0,2,1,,2,,0,00FF00,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,10,0,0,0,,2,,0,000000,,0)(202050,0,10,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,316,30,0,3,1,,2,,0,00FF00,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,31,0,0,0,,2,,0,000000,,0)(202050,0,31,0,0,0,,2,,0,000000,,0)(202050,0,31,0,0,0,QUAI 1,1,ARIAL,12,FFFFFF,G,0)(202050,0,31,0,0,0,,2,,8,00FF00,,0)(202050,0,31,0,0,0,,2,,8,00FF00,,0)(202050,0,31,0,0,0,,2,,0,000000,,0)(202050,0,31,0,0,0,,2,,0,000000,,0)(202050,0,31,0,0,0,,2,,0,000000,,0)(202050,0,31,0,0,0,,2,,0,000000,,0)(202050,0,31,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,190,30,0,2,1,,2,,0,00FF00,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,2,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,00FFFF,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,18,0,0,0,,0,,0,00FFFF,,0)(202050,0,18,0,0,0,,0,,0,00FFFF,,0)(202050,0,0,0,0,0,,0,,0,00FFFF,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)(202050,0,0,0,0,0,,0,,0,000000,,0)
+59 -13
View File
@@ -4,7 +4,8 @@ interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls , ComCtrls ,WinInet, ExtCtrls , StrUtils, unitPrinc;
Dialogs, StdCtrls , ComCtrls ,WinInet, ExtCtrls , StrUtils, unitPrinc,
ShellAPI ;
type
TFormVersion = class(TForm)
@@ -23,11 +24,13 @@ var
Lance_verif : integer;
verifVersion,notificationVersion : boolean;
Const Version='6.2'; // sert à la comparaison de la version publiée
Const Version='6.3'; // sert à la comparaison de la version publiée
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
function GetCurrentProcessEnvVar(const VariableName: string): string;
function verifie_version : real;
function DownloadURL_NOCache(aUrl: string;s : string;var taille : longint): Boolean;
function url_github(var url: string) : boolean;
implementation
@@ -58,6 +61,46 @@ begin
end;
end;
// récupère l'url de téléchargement du github avec curl
// curl -s https://api.github.com/repos/f1iwq2/signaux_complexes_gl/releases/latest \
function url_github(var url: string) : boolean;
var s : string;
retour,i : integer;
trouve : boolean;
fichier : text;
begin
result:=false;
url:='';
s:='-s -o url.txt https://api.github.com/repos/f1iwq2/signaux_complexes_gl/releases/latest'; // résultat dans url.txt
//s:='';
retour:=ShellExecute(Formprinc.Handle,'open',
Pchar('curl.exe'),
//Pchar('cmd.exe'),
Pchar(s), // paramètre
Pchar('') // répertoire
,SW_HIDE); // pas d'affichage
if retour>32 then
begin
result:=true;
assign(fichier,'url.txt');
reset(fichier);
trouve:=false;
while not(eof(fichier)) or not trouve do
begin
readln(fichier,s);
if pos('browser_download_url',s)<>0 then
begin
trouve:=true;
i:=pos('https',s);
delete(s,1,i-1);
i:=pos('"',s);
s:=copy(s,1,i-1);
url:=s;
end;
end;
end
end;
// téléchargement d'une page internet sans cache dans un fichier
// aUrl = adresse URL du fichier - S : chemin et nom du fichier à écrire - taille : renvoie la taille lue en octets
@@ -97,7 +140,7 @@ begin
InternetReadFile(hService,@lpBuffer,1024,dwBytesRead);
fs.WriteBuffer(lpBuffer,dwBytesRead);
t:=t+dwBytesRead;
if dwBytesRead=0 then break;
if dwBytesRead=0 then break;
end;
Result := True;
taille:=t;
@@ -115,7 +158,7 @@ end;
// renvoie le numéro de version depuis le forum CDM
function verifie_version : real;
var s,s2,s3,Version_p,Url,LocalFile,nomfichier : string;
var s,s2,s3,Version_p,Url,LocalFile,nomfichier,UrlGIT : string;
trouve_version,trouve_zip,zone_comm,LocZip : boolean;
fichier : text;
i,j,erreur,Ncomm,i2,i3,l : integer;
@@ -125,6 +168,9 @@ var s,s2,s3,Version_p,Url,LocalFile,nomfichier : string;
comm : array[1..10] of string;
begin
//Affiche('vérifie version',clLime);
// tester si on peut extraire l'url par curl
//if url_github(UrlGIT) then affiche('curl ok',clyellow);
Url:='http://cdmrail.free.fr/ForumCDR/viewtopic.php?f=77&t=3906#p50499';
LocalFile:='page.txt';
trouve_version:=false;
@@ -162,14 +208,14 @@ begin
end;
end;
// commentaire en gras
if zone_comm then
begin
i:=pos('bold">',LowerCase(s))+6;i2:=posEx('<br />',LowerCase(s),i+1); i3:=posEx('</span>',LowerCase(s),i+1) ;
if i<>6 then
if zone_comm then
begin
//Affiche(s,clred);
inc(ncomm);
if i3<i2 then i2:=i3;
i:=pos('bold">',LowerCase(s))+6;i2:=posEx('<br />',LowerCase(s),i+1); i3:=posEx('</span>',LowerCase(s),i+1) ;
if i<>6 then
begin
//Affiche(s,clred);
inc(ncomm);
if i3<i2 then i2:=i3;
comm[ncomm]:=UTF8Decode(copy(s,i,i2-i));
Delete(s,1,i2-1);
j:=0;
@@ -211,7 +257,7 @@ begin
end;
i:=pos('zip"',LowerCase(s3)); // s3 contient l'url du zip
s3:=copy(s3,1,i+2);
//----------------------------------------------------
//isoler le nom du fichier
i:=length(s3);
repeat
@@ -251,7 +297,7 @@ begin
Aff('Nouveautés de la V'+version_p+SV_publie+' de Signaux_Complexes_GL :');
aff(' ');
for i:=1 to ncomm-1 do aff(comm[i]);
end;
end;
if MessageDlg(s+'. Voulez-vous la télécharger?',mtConfirmation,[mbYes,mbNo],0)=mrYes then
begin
// récupérer depuis la variable d'environnement windows USERPROFILE le repertoire de la session ouverte
+3 -1
View File
@@ -168,6 +168,8 @@ version 6.0 : Gestion du d
version 6.1 : Amélioration de la fenêtre réseau CDM.
Animation des trains dans la fenêtre réseau CDM.
version 6.2 : Déplacement du curseur du TCO avec les touches curseur.
Dessin du TCO à la souris
Dessin du TCO à la souris.
version 6.3 : Choix du graphisme du TCO en lignes brisées ou courbes.