This commit is contained in:
f1iwq2
2023-04-10 18:17:03 +02:00
parent a13df2cd9d
commit 5e35f9a042
36 changed files with 251 additions and 134 deletions
+1
View File
@@ -13,6 +13,7 @@ object FormCDF: TFormCDF
Font.Style = []
OldCreateOrder = False
OnActivate = FormActivate
OnClose = FormClose
PixelsPerInch = 96
TextHeight = 13
object Label20: TLabel
+85 -2
View File
@@ -4,7 +4,7 @@ interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls , unitconfig, UnitPrinc, Buttons;
Dialogs, StdCtrls, ExtCtrls , unitconfig, Buttons , UnitPilote , unitPrinc;
type
TFormCDF = class(TForm)
@@ -78,6 +78,7 @@ type
procedure Edit17Change(Sender: TObject);
procedure EditNAdressesChange(Sender: TObject);
procedure BitBtnOkClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Déclarations privées }
public
@@ -87,10 +88,15 @@ type
var
FormCDF: TFormCDF;
Adresse,Index : integer;
dessineCDF : boolean;
{$R *.dfm}
procedure dessine_feu_CDF;
implementation
{$R *.dfm}
@@ -101,6 +107,8 @@ begin
index:=index_feu(Adresse);
LabelTitre.caption:='Adresse du signal: '+intToSTR(adresse);
erreur:=feux[index].decodeur;
feux[0]:=feux[index];
//Asp:=feux[index].aspect;
if erreur=5 then
begin
caption:='Configuration du décodeur Digikeijs';
@@ -165,6 +173,34 @@ begin
editNadresses.text:=intToSTR(feux[index].NA);
end;
procedure dessine_feu_CDF;
var i : integer;
Vcanvas : Tcanvas;
begin
i:=0;
//ImagePilote.Picture.Bitmap:=FormPilote.ImagePilote.picture.bitmap;
EtatFeuPilote:=feux[i].EtatSignal;
dessineCDF:=true; // demande dessin CDF pour les clignotements
Vcanvas:=FormCDF.ImageDigi.picture.bitmap.Canvas;
case feux[i].aspect of
// feux de signalisation
2 : dessine_feu2(Vcanvas,0,0,1,1,EtatFeupilote,1);
3 : dessine_feu3(Vcanvas,0,0,1,1,EtatFeupilote,1);
4 : dessine_feu4(VCanvas,0,0,1,1,EtatFeupilote,1);
5 : dessine_feu5(VCanvas,0,0,1,1,EtatFeupilote,1);
7 : dessine_feu7(VCanvas,0,0,1,1,EtatFeupilote,1);
9 : dessine_feu9(VCanvas,0,0,1,1,EtatFeupilote,1);
// indicateurs de direction
12 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,2);
13 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,3);
14 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,4);
15 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,5);
16 : dessine_dirN(VCanvas,0,0,1,1,EtatFeupilote,1,6);
end;
end;
procedure Maj_DB;
var s : string;
begin
@@ -180,6 +216,8 @@ begin
begin
val(Edit1.Text,Feux[index].SR[1].sortie1,erreur);
Maj_DB;
if label1.Caption=etats[1] then Maj_Etat_Signal(0,carre);
dessine_feu_CDF;
end;
end;
@@ -190,6 +228,8 @@ begin
begin
val(Edit2.Text,Feux[index].SR[2].sortie1,erreur);
Maj_DB;
if label2.Caption=etats[2] then Maj_Etat_Signal(0,semaphore);
dessine_feu_CDF;
end;
end;
@@ -200,6 +240,8 @@ begin
begin
val(Edit3.Text,Feux[index].SR[3].sortie1,erreur);
Maj_DB;
if label3.Caption=etats[3] then Maj_Etat_Signal(0,semaphore_cli);
dessine_feu_CDF;
end;
end;
@@ -210,6 +252,8 @@ begin
begin
val(Edit4.Text,Feux[index].SR[4].sortie1,erreur);
Maj_DB;
if label4.Caption=etats[4] then Maj_Etat_Signal(0,vert);
dessine_feu_CDF;
end;
end;
@@ -220,6 +264,8 @@ begin
begin
val(Edit5.Text,Feux[index].SR[5].sortie1,erreur);
Maj_DB;
if label5.Caption=etats[5] then Maj_Etat_Signal(0,vert_cli);
dessine_feu_CDF;
end;
end;
@@ -230,6 +276,8 @@ begin
begin
val(Edit6.Text,Feux[index].SR[6].sortie1,erreur);
Maj_DB;
if label6.Caption=etats[6] then Maj_Etat_Signal(0,violet);
dessine_feu_CDF;
end;
end;
@@ -240,6 +288,8 @@ begin
begin
val(Edit7.Text,Feux[index].SR[7].sortie1,erreur);
Maj_DB;
if label7.Caption=etats[7] then Maj_Etat_Signal(0,blanc);
dessine_feu_CDF;
end;
end;
@@ -250,6 +300,8 @@ begin
begin
val(Edit8.Text,Feux[index].SR[8].sortie1,erreur);
Maj_DB;
if label8.Caption=etats[8] then Maj_Etat_Signal(0,blanc_cli);
dessine_feu_CDF;
end;
end;
@@ -260,6 +312,8 @@ begin
begin
val(Edit9.Text,Feux[index].SR[9].sortie1,erreur);
Maj_DB;
if label9.Caption=etats[9] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,jaune);end;
dessine_feu_CDF;
end;
end;
@@ -270,6 +324,12 @@ begin
begin
val(Edit10.Text,Feux[index].SR[10].sortie1,erreur);
Maj_DB;
if label10.Caption=etats[10] then
begin
Maj_Etat_Signal(0,semaphore);
Maj_Etat_Signal(0,jaune_cli);
end;
dessine_feu_CDF;
end;
end;
@@ -280,6 +340,8 @@ begin
begin
val(Edit11.Text,Feux[index].SR[11].sortie1,erreur);
Maj_DB;
if label11.Caption=etats[11] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,ral_30);end;
dessine_feu_CDF;
end;
end;
@@ -290,6 +352,8 @@ begin
begin
val(Edit12.Text,Feux[index].SR[12].sortie1,erreur);
Maj_DB;
if label12.Caption=etats[12] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,ral_60);end;
dessine_feu_CDF;
end;
end;
@@ -300,6 +364,8 @@ begin
begin
val(Edit13.Text,Feux[index].SR[13].sortie1,erreur);
Maj_DB;
if label13.Caption=etats[13] then begin Maj_Etat_Signal(0,ral_60);Maj_Etat_Signal(0,jaune_cli);end;
dessine_feu_CDF;
end;
end;
@@ -310,6 +376,8 @@ begin
begin
val(Edit14.Text,Feux[index].SR[14].sortie1,erreur);
Maj_DB;
if label14.Caption=etats[14] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,rappel_30);end;
dessine_feu_CDF;
end;
end;
@@ -320,6 +388,8 @@ begin
begin
val(Edit15.Text,Feux[index].SR[15].sortie1,erreur);
Maj_DB;
if label15.Caption=etats[15] then begin Maj_Etat_Signal(0,semaphore);Maj_Etat_Signal(0,rappel_60);end;
dessine_feu_CDF;
end;
end;
@@ -330,6 +400,8 @@ begin
begin
val(Edit16.Text,Feux[index].SR[16].sortie1,erreur);
Maj_DB;
if label16.Caption=etats[16] then begin Maj_Etat_Signal(0,rappel_30); Maj_Etat_Signal(0,jaune);end;
dessine_feu_CDF;
end;
end;
@@ -340,6 +412,8 @@ begin
begin
val(Edit17.Text,Feux[index].SR[17].sortie1,erreur);
Maj_DB;
if label17.Caption=etats[17] then begin Maj_Etat_Signal(0,rappel_30); Maj_Etat_Signal(0,jaune_cli);end;
dessine_feu_CDF;
end;
end;
@@ -350,6 +424,8 @@ begin
begin
val(Edit18.Text,Feux[index].SR[18].sortie1,erreur);
Maj_DB;
if label18.Caption=etats[18] then begin Maj_Etat_Signal(0,rappel_60); Maj_Etat_Signal(0,jaune);end;
dessine_feu_CDF;
end;
end;
@@ -360,6 +436,8 @@ begin
begin
val(Edit19.Text,Feux[index].SR[19].sortie1,erreur);
Maj_DB;
if label19.Caption=etats[19] then begin Maj_Etat_Signal(0,rappel_60); Maj_Etat_Signal(0,jaune_cli);end;
dessine_feu_CDF;
end;
end;
@@ -382,4 +460,9 @@ begin
close;
end;
procedure TFormCDF.FormClose(Sender: TObject; var Action: TCloseAction);
begin
dessineCDF:=false;
end;
end.
BIN
View File
Binary file not shown.
+13 -8
View File
@@ -1571,7 +1571,7 @@ object FormConfig: TFormConfig
Top = 8
Width = 633
Height = 505
ActivePage = TabSheetAct
ActivePage = TabSheetCDM
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
@@ -1728,6 +1728,8 @@ object FormConfig: TFormConfig
ShowHint = True
TabOrder = 6
Text = 'Nom du fichier LAY avec .lay'
OnChange = EditLAYChange
OnExit = EditLAYExit
end
end
object GroupBox6: TGroupBox
@@ -3126,7 +3128,7 @@ object FormConfig: TFormConfig
Width = 129
Height = 21
Style = csDropDownList
ItemHeight = 13
ItemHeight = 0
TabOrder = 1
OnChange = ComboBoxDecChange
end
@@ -3400,7 +3402,7 @@ object FormConfig: TFormConfig
Caption = 'Description de l'#39'action'
TabOrder = 0
object GroupBoxRadio: TGroupBox
Left = 64
Left = 8
Top = 16
Width = 225
Height = 73
@@ -3435,8 +3437,8 @@ object FormConfig: TFormConfig
end
end
object GroupBoxAct: TGroupBox
Left = 192
Top = 28
Left = 8
Top = 84
Width = 233
Height = 341
Caption = 'Action fonction de locomotive '
@@ -3485,6 +3487,9 @@ object FormConfig: TFormConfig
Top = 100
Width = 17
Height = 21
Hint = 'Etat '#224' ou 1'
ParentShowHint = False
ShowHint = True
TabOrder = 1
OnChange = EditEtatActionneurChange
end
@@ -3547,7 +3552,7 @@ object FormConfig: TFormConfig
end
object GroupBox19: TGroupBox
Left = 8
Top = 176
Top = 184
Width = 217
Height = 129
Caption = 'Destinataire de l'#39'action '
@@ -3749,8 +3754,8 @@ object FormConfig: TFormConfig
end
end
object GroupBoxPN: TGroupBox
Left = 8
Top = 16
Left = 224
Top = 176
Width = 233
Height = 401
Caption = 'Action gestion passage '#224' niveau'
+64 -36
View File
@@ -4,8 +4,8 @@ interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg, ComCtrls ,StrUtils, Unitprinc,
MMSystem, Buttons , UnitPareFeu;
Dialogs, ExtCtrls, StdCtrls , jpeg, ComCtrls ,StrUtils, Unitprinc,
MMSystem, Buttons , UnitPareFeu, verif_version;
type
TFormConfig = class(TForm)
@@ -487,6 +487,8 @@ type
procedure EditZdet2V5FChange(Sender: TObject);
procedure EditZdet1V5OChange(Sender: TObject);
procedure EditZdet2V5OChange(Sender: TObject);
procedure EditLAYChange(Sender: TObject);
procedure EditLAYExit(Sender: TObject);
private
{ Déclarations privées }
public
@@ -557,7 +559,7 @@ var
ack_cdm,clicliste,config_modifie,clicproprietes,confasauver,trouve_MaxPort,
modif_branches,ConfigPrete,trouve_section_dccpp,trouve_section_trains,
trouveAvecVerifIconesTCO : boolean;
trouveAvecVerifIconesTCO,Affiche_avert : boolean;
fichier : text;
function config_com(s : string) : boolean;
@@ -1419,14 +1421,14 @@ procedure genere_config;
var s: string;
fichierN : text;
i : integer;
begin
assign(fichierN,NomConfig);
rewrite(fichierN);
// entête
// copie_commentaire;
writeln(fichierN,'/ Fichier de configuration de signaux_complexes_GL');
s:='/ Fichier de configuration de signaux_complexes_GL version '+version+sousversion;
writeln(fichierN,s);
writeln(fichierN,AvecVerifIconesTCO_ch+'=',AvecVerifIconesTCO);
writeln(fichierN,Algo_localisation_ch+'=',Algo_localisation);
writeln(fichierN,Avec_roulage_ch+'=',avecRoulage);
@@ -1633,7 +1635,7 @@ var s,sa,SOrigine: string;
trouve_section_branche,trouve_section_sig,trouve_section_act,trouve_tempo_feu,
trouve_algo_uni,croi,trouve_Nb_cantons_Sig,trouve_dem_aig,trouve_demcnxCOMUSB,trouve_demcnxEth : boolean;
virgule,i_detect,i,erreur,aig2,detect,offset,j,position,
ComptEl,Compt_IT,Num_Element,k,adr,erreur2,l,t,Nligne,postriple,itl,
ComptEl,Compt_IT,Num_Element,adr,t,Nligne,postriple,itl,
postjd,postjs,nv,it,Num_Champ,asp,adraig,poscroi : integer;
function lit_ligne : string ;
@@ -3294,7 +3296,7 @@ begin
RadioButton2.checked:=false;
if Valeur_entete=0 then RadioButton1.checked:=true;
if Valeur_entete=1 then RadioButton2.checked:=true;
LabelInfo.Width:=240;LabelInfo.Height:=25;
LabelInfo.Width:=240;LabelInfo.Height:=65;LabelInfo.AutoSize:=false;
LabelResult.width:=137;LabelResult.Height:=25;
LabelNomSon.top:=16;LabelNomSon.Left:=48;
SpeedButtonJoue.Top:=60; SpeedButtonCharger.Top:=60;
@@ -3306,7 +3308,7 @@ begin
CheckLanceCDM.Checked:=LanceCDM;
CheckAvecTCO.checked:=avecTCO;
CheckBandeauTCO.Checked:=MasqueBandeauTCO;
editLAY.Text:=lay;
RadioButton4.Checked:=ServeurInterfaceCDM=0;
RadioButton5.Checked:=ServeurInterfaceCDM=1;
RadioButton6.Checked:=ServeurInterfaceCDM=2;
@@ -3341,7 +3343,7 @@ begin
EditDroit_BD.Text:='';
EditPointe_BG.Text:='';
EditDevie_HD.Text:='';
editLAY.Text:=lay;
ligneclicSig:=-1;
AncLigneClicSig:=-1;
ligneclicAct:=-1;
@@ -3367,8 +3369,8 @@ begin
begin
SelStart:=0;
Perform(EM_SCROLLCARET,0,0);
end;
end;
// branches
clicListe:=true;
RichBranche.clear;
@@ -3382,7 +3384,7 @@ begin
begin
SelStart:=0;
Perform(EM_SCROLLCARET,0,0);
end;
end;
// signaux
RichSig.clear;
@@ -3477,6 +3479,7 @@ end;
procedure TFormConfig.FormCreate(Sender: TObject);
begin
clicListe:=true;
Affiche_avert:=false;
if affevt then affiche('FormConfig create',clLime);
PageControl.ActivePage:=Formconfig.TabSheetCDM; // force le premier onglet sur la page
Aig_supprime.Adresse:=0;
@@ -3554,7 +3557,7 @@ begin
GroupBox21.Visible:=true;
GroupBox10.Visible:=true;
checkInverse.Visible:=true;
// tjd
if tjd or tjs or croi then
begin
@@ -3626,7 +3629,7 @@ begin
EditP2.Text:=intToSTR(adresse)+aiguillage[Index].DDevieB;
// milieu haut droit
EditP3.Text:=intToSTR(aiguillage[index].Ddevie)+aiguillage[index].DDevieB;
EditP3.Text:=intToSTR(aiguillage[index].Ddevie)+aiguillage[index].DDevieB;
// milieu bas droit
EditP4.Text:=intToSTR(aiguillage[index].Ddroit)+aiguillage[index].DdroitB;
@@ -3880,7 +3883,8 @@ begin
radioButtonZones.Checked:=false;
radioButtonAig.Checked:=false;
editact2.Visible:=false;
LabelActionneur.Caption:='Actionneur DétecteurZ';
LabelActionneur.Caption:='Actionneur Détecteur';
EditEtatActionneur.Hint:='0 ou 1';
end;
end;
@@ -3895,6 +3899,7 @@ begin
LabelTrain.Visible:=false;
editact2.Visible:=true;
LabelActionneur.Caption:='Mémoire de Zone';
EditEtatActionneur.Hint:='0 ou 1';
end;
end;
@@ -3910,6 +3915,7 @@ begin
LabelTrain.Visible:=false;
editact2.Visible:=false;
LabelActionneur.Caption:='Aiguillage';
EditEtatActionneur.Hint:='1 ou S=dévié 2 ou D=droit';
end;
end;
@@ -4008,7 +4014,7 @@ begin
// signal normal
if d<10 then
begin
begin
Label17.Caption:='Conditions supplémentaires d''affichage du carré par les aiguillages :';
Label17.Width:=228;
LabelDetAss.visible:=true;
@@ -5331,7 +5337,6 @@ end;
procedure TFormConfig.EditAct2Change(Sender: TObject);
var s : string;
det2,erreur : integer;
det : boolean;
begin
if clicliste then exit;
if affevt then affiche('Evt Edit act2 Change',clyellow);
@@ -5399,16 +5404,30 @@ begin
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAct then
with Formconfig do
begin
s:=EditEtatActionneur.Text;
s:=upperCase(EditEtatActionneur.Text);
if radioButtonLoc.Checked or RadioButtonAccess.Checked or RadioButtonSon.Checked then
begin
Val(s,etat,erreur);
typ:=tablo_actionneur[ligneClicAct+1].typdeclenche;
if (erreur<>0) or (etat<0) or ((typ<3) and (etat>1)) or ((typ=2) and (etat>2)) then
if (typ=2) and (s<>'') then // aiguillage
begin
if typ<2 then begin LabelInfo.caption:='Erreur état actionneur';exit;end;
if typ=2 then begin LabelInfo.caption:='Erreur position aiguillage';exit;end;
end else LabelInfo.caption:=' ';
if s[1]='S' then s:='1';
if s[1]='D' then s:='2';
end;
Val(s,etat,erreur);
// act det memzone
if (typ=0) or (typ=1) or (typ=3) then
begin
if (etat<0) or (etat>1) then begin LabelInfo.caption:='Erreur état actionneur/détecteur';exit;end;
end;
// aig
if (typ=2) then
begin
if (etat<1) or (etat>2) then begin LabelInfo.caption:='Erreur position aiguillage';exit;end;
end;
LabelInfo.caption:=' ';
tablo_actionneur[ligneClicAct+1].etat:=etat;
s:=encode_act_loc_son(ligneClicAct+1);
@@ -5458,7 +5477,6 @@ begin
RichAct.Lines[ligneClicAct]:=s;
end;
end;
end;
@@ -8725,7 +8743,7 @@ begin
editAct2.Visible:=false;
EditTrainDecl.Visible:=true;
LabelTrain.Visible:=true;
EditEtatActionneur.Hint:='Etat 0 ou 1';
Tablo_Actionneur[i].trainDecl:=trainSauve;
EditTrainDecl.Text:=trainSauve;
@@ -8761,6 +8779,7 @@ begin
editAct2.Visible:=true;
//editact.Text:=intToSTR(Tablo_actionneur[i].adresse2);
EditEtatActionneur.Hint:='Etat 0 ou 1';
Tablo_actionneur[i].trainDecl:='X';
val(editact.Text,champ,erreur);
Tablo_actionneur[i].adresse:=champ ;
@@ -8791,6 +8810,7 @@ begin
editAct2.Visible:=false;
//editact.Text:=intToSTR(Tablo_actionneur[i].adresse2);
EditEtatActionneur.Hint:='1 ou S=dévié 2 ou D=droit';
Tablo_actionneur[i].trainDecl:='X';
val(editact.Text,champ,erreur);
Tablo_actionneur[i].adresse:=champ ;
@@ -9747,8 +9767,7 @@ end;
end;
procedure TFormConfig.ButtonNTClick(Sender: TObject);
var j : integer;
begin
begin
if nTrains>=Max_Trains then exit;
clicListe:=true;
inc(nTrains);
@@ -9758,7 +9777,6 @@ begin
trains[ntrains].VitRalenti:=40;
trains[ntrains].vitmax:=120;
clicListeTrains(ntrains);
j:=richEditTrains.Selstart;
RE_ColorLine(Formconfig.richeditTrains,ligneclicTrain,ClAqua);
ligneclicTrain:=ntrains-1;
RE_ColorLine(Formconfig.richeditTrains,ligneclicTrain,ClYellow);
@@ -10087,15 +10105,25 @@ begin
activecontrol:=nil;
end;
procedure TFormConfig.EditLAYChange(Sender: TObject);
var s : string;
begin
if clicListe then exit;
if not(Affiche_avert) then
begin
Affiche_avert:=true;
s:='Pour que cette fonction soit opérationnelle, dans CDM Rail, il faut charger votre réseau, puis "définir le réseau actuel comme ';
s:=s+'réseau de démarrage" puis le dévalider';
LabelInfo.caption:=s;
end;
end;
procedure TFormConfig.EditLAYExit(Sender: TObject);
begin
Affiche_avert:=false;
LabelInfo.caption:='';
end;
end.
+1
View File
@@ -417,4 +417,5 @@ begin
end;
begin
end.
BIN
View File
Binary file not shown.
+1
View File
@@ -438,4 +438,5 @@ begin
end;
end;
begin
end.
BIN
View File
Binary file not shown.
+1
View File
@@ -625,4 +625,5 @@ begin
AFfDetSIg:=checkDetSig.checked;
end;
begin
end.
BIN
View File
Binary file not shown.
-14
View File
@@ -1,14 +0,0 @@
object Frame1: TFrame1
Left = 0
Top = 0
Width = 289
Height = 86
TabOrder = 0
object Label1: TLabel
Left = 104
Top = 16
Width = 60
Height = 13
Caption = 'Cadre Frame'
end
end
-22
View File
@@ -1,22 +0,0 @@
unit UnitFrame1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TFrame1 = class(TFrame)
Label1: TLabel;
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
implementation
{$R *.dfm}
end.
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -7,7 +7,7 @@ function cree_regle : boolean;
implementation
uses
SysUtils,ActiveX,ComObj,Variants,UnitPrinc,Graphics,unitConfig;
SysUtils,ActiveX,ComObj,Variants,UnitPrinc,Graphics,unitConfig,verif_version;
Const
NET_FW_ACTION_ALLOW = 1;
NET_FW_IP_PROTOCOL_TCP = 6;
@@ -29,8 +29,8 @@ var
s,fichier : string;
r : boolean;
begin
r:=false;
if IsWow64Process then fichier:='C:\Program Files (x86)\CDM-Rail\cdr.exe' else fichier:='C:\Program Files\CDM-Rail\cdr.exe';
fichier:=CheminProgrammes+'\CDM-Rail\cdr.exe';
// Crée l'objet FwPolicy2
fwPolicy2:=CreateOleObject('HNetCfg.FwPolicy2');
RulesObject:=fwPolicy2.Rules;
BIN
View File
Binary file not shown.
+1
View File
@@ -290,4 +290,5 @@ begin
if key=chr(27) then close;
end;
begin
end.
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -18,7 +18,7 @@ object FormPrinc: TFormPrinc
OnCreate = FormCreate
DesignSize = (
1197
611)
612)
PixelsPerInch = 96
TextHeight = 13
object LabelTitre: TLabel
@@ -1203,7 +1203,7 @@ object FormPrinc: TFormPrinc
object SplitterH: TSplitter
Left = 0
Top = 0
Height = 589
Height = 590
end
object ScrollBox1: TScrollBox
Left = 632
@@ -1268,7 +1268,7 @@ object FormPrinc: TFormPrinc
end
object StatusBar1: TStatusBar
Left = 0
Top = 589
Top = 590
Width = 1197
Height = 22
Panels = <>
+51 -43
View File
@@ -397,7 +397,7 @@ var
Nbre_recu_cdm,Tempo_chgt_feux,Adj1,Adj2,NbrePN,ServeurInterfaceCDM,index_couleur,
ServeurRetroCDM,TailleFonte,Nb_Det_Dist,Tdoubleclic,algo_Unisemaf,fA,fB,
etape,idEl,avecRoulage,intervalle_courant,filtrageDet0,SauvefiltrageDet0,
TpsTimeoutSL,formatY : integer;
TpsTimeoutSL,formatY,OsBits : integer;
ack,portCommOuvert,traceTrames,AffMem,CDM_connecte,dupliqueEvt,affiche_retour_dcc,
Raz_Acc_signaux,AvecInit,AvecTCO,terminal,Srvc_Aig,Srvc_Det,Srvc_Act,MasqueBandeauTCO,
@@ -415,8 +415,8 @@ var
FormPrinc: TFormPrinc;
Enregistrement,chaine_Envoi,chaine_recue,Id_CDM,Af,version_Interface,entete,suffixe,Lay
: string;
Enregistrement,chaine_Envoi,chaine_recue,Id_CDM,Af,version_Interface,entete,suffixe,Lay,
CheminProgrammes : string;
Ancien_detecteur : array[0..NbMemZone] of boolean; // anciens état des détecteurs et adresses des détecteurs et leur état
detecteur : array[0..NbMemZone] of // détecteurs indexés par l'adresse
@@ -480,7 +480,7 @@ var
adresse,adresse2, // adresse: adresse de base ; adresse2=cas d'une Zone
etat,fonction,tempo,TempoCourante,
accessoire,sortie,
typdeclenche : integer; // déclencheur: 0=actioneur/détecteur 2=evt aig 3=MemZone
typdeclenche : integer; // déclencheur: 0=actionneur/détecteur 2=evt aig 3=MemZone
Raz : boolean;
FichierSon,trainDecl,TrainDest,TrainCourant : string;
end;
@@ -623,8 +623,7 @@ function testBit(n : word;position : integer) : boolean;
implementation
uses UnitDebug, UnitPilote, UnitSimule, UnitTCO, UnitConfig,
Unitplace,
verif_version;
Unitplace, verif_version , UnitCDF;
{
procedure menu_interface(MA : TMA);
@@ -653,10 +652,6 @@ var s: string;
begin
s:=Application.Hint;
StatusBar1.Simpletext:=s;
if s='insère une ligne au dessus' then
begin
// grise_ligne_TCO;
end;
end;
// fonctions sur les bits
@@ -1240,7 +1235,7 @@ begin
Temp:=LgImage-X4;X4:=Y4;Y4:=Temp;
Temp:=LgImage-X5;X5:=Y5;Y5:=Temp;
Temp:=LgImage-X6;X6:=Y6;Y6:=Temp;
end;
end;
X1:=round(X1*Frx)+x; Y1:=round(Y1*Fry)+Y;
X2:=round(X2*FrX)+x; Y2:=round(Y2*FrY)+Y;
@@ -1516,7 +1511,7 @@ begin
Select_dessin_feu:=bm;
end;
// créée une image dynamiquement pour un nouveau feu déclaré dans le fichier de config
// créée une image dynamiquement pour un nouveau signal déclaré dans le fichier de config
// rang commence à 1
procedure cree_image(rang : integer);
var adresse,TypeFeu : integer;
@@ -1775,7 +1770,7 @@ begin
chaine_CDM_vitesseST:=so+s;
end;
// chaîne pour vitesse train INT par son adresse
// renvoie une chaîne pour vitesse train INT par son adresse
function chaine_CDM_vitesseINT(vitesse:integer;train:integer) : string;
var s,so,sx: string;
begin
@@ -1789,7 +1784,7 @@ begin
chaine_CDM_vitesseINT:=so+s;
end;
// chaîne pour un accessoire via CDM
// renvoie une chaîne pour piloter un accessoire via CDM
Function chaine_CDM_Acc(adresse,etat : integer) : string;
var so,sx,s : string;
begin
@@ -2116,7 +2111,7 @@ begin
chaine_signal:=s;
end;
// mise à jour état signal complexe dans le tableau de bits du signal EtatSignalCplx */
// mise à jour état signal complexe dans le tableau de bits du signal EtatSignalCplx
// adresse : adresse du signal complexe
// Aspect : code représentant l'état du signal de 0 à 15
procedure Maj_Etat_Signal(adresse,aspect : integer);
@@ -10532,7 +10527,7 @@ end;
// Lance et connecte CDM rail. en sortie si CDM est lancé Lance_CDM=true,
function Lance_CDM : boolean;
var i,retour,retour2 : integer;
s : string;
repertoire,s : string;
cdm_lanceLoc : boolean;
begin
s:='CDR';
@@ -10551,33 +10546,24 @@ begin
cdm_lanceLoc:=false;
// lancement depuis le répertoire 32 bits d'un OS64
repertoire:=CheminProgrammes+'\CDM-Rail';
//Affiche(s,clred);
//Affiche(repertoire,clorange);
retour:=ShellExecute(Formprinc.Handle,'open',
Pchar('cdr.exe'),
Pchar(s), // paramètre
PChar('C:\Program Files (x86)\CDM-Rail\') // répertoire
PChar(repertoire) // répertoire
,SW_SHOWNORMAL);
if retour>32 then
begin
cdm_lanceLoc:=true;
Affiche('Lancement de CDM 64 ',clyellow);
end;
if not(cdm_lanceLoc) then
end
else
begin
// si çà marche pas essayer depuis le répertoire de base sur un OS32
retour2:=ShellExecute(Formprinc.Handle,'open',
PChar('cdr.exe'),
Pchar(s), // paramètre
PChar('C:\Program Files\CDM-Rail\') // répertoire
,SW_SHOWNORMAL);
if retour2<=32 then
begin
ShowMessage('CDM rail introuvable : '+#13#10+'Erreur 32='+intToSTR(retour)+' Erreur 64='+inttoStr(retour2));
lance_CDM:=false;exit;
end;
cdm_lanceLoc:=true;
Affiche('Lancement de CDM 32 ',clyellow);
ShowMessage('CDM rail introuvable : '+#13#10+'Erreur='+intToSTR(retour));
lance_CDM:=false;
exit;
end;
if cdm_lanceLoc then
@@ -10859,11 +10845,7 @@ begin
GroupBox3.visible:=true;
procetape(''); //0
// version d'OS pour info
if IsWow64Process then s:='OS 64 Bits' else s:='OS 32 Bits';
s:=DateToStr(date)+' '+TimeToStr(Time)+' '+s;
Affiche(s,clLime);
LabelEtat.Caption:='Initialisations en cours';
N_Trains:=0;
NivDebug:=0;
@@ -10889,6 +10871,23 @@ begin
Diffusion:=AvecInit; // mode diffusion publique
roulage1.visible:=false;
OsBits:=0;
if IsWow64Process then
begin
OsBits:=64;
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES(X86)');
end
else
begin
OsBits:=32;
CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES');
end;
// version d'OS pour info
if OsBits=64 then s:='OS 64 Bits' else s:='OS 32 Bits';
s:=DateToStr(date)+' '+TimeToStr(Time)+' '+s;
Affiche(s,clLime);
LabelEtat.Caption:='Initialisations en cours';
With ScrollBox1 do
begin
HorzScrollBar.Tracking:=true;
@@ -11333,6 +11332,16 @@ begin
testBit(a,vert_cli) or testbit(a,blanc_cli) then
Dessine_feu_pilote; // dessiner le feu en fonction du bit "clignotant"
end;
// fenetre de config du signal CDF
if dessineCDF then
begin
a:=feux[0].EtatSignal;
if TestBit(a,jaune_cli) or TestBit(a,ral_60) or
TestBit(a,rappel_60) or testBit(a,semaphore_cli) or
testBit(a,vert_cli) or testbit(a,blanc_cli) then
Dessine_feu_CDF; // dessiner le feu CDF en fonction du bit "clignotant"
end;
end;
// tempo retombée actionneur
@@ -12992,7 +13001,7 @@ var s : string;
fte : textFile;
begin
s:=GetCurrentDir;
s:='C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL';
//s:='C:\Program Files (x86)\Borland\Delphi7\Projects\Signaux_complexes_GL';
OpenDialog.InitialDir:=s;
OpenDialog.Title:='Ouvrir un fichier de trames CDM (protocole COM-IPC)';
OpenDialog.DefaultExt:='txt';
@@ -13622,8 +13631,6 @@ end;
procedure TFormPrinc.PopupMenuFeuPopup(Sender: TObject);
var s : string;
P_image_pilote : Timage;
adressefeuclic: integer;
ob : TPopupMenu;
begin
// AdrPilote est récupéré de l'event OnMouseDown de l'image du signal qui se produit avant
@@ -13633,5 +13640,6 @@ begin
ob.Items[1].Caption:='Informations du signal '+intToSTR(AdrPilote);
end;
begin
end.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -505,7 +505,7 @@ object FormSR: TFormSR
object LabelErreur: TLabel
Left = 224
Top = 528
Width = 89
Width = 3
Height = 13
Caption = ':'
end
+1 -1
View File
@@ -451,7 +451,6 @@ begin
labelCV30.Caption:='CV='+IntToSTR(etat2);
feux[indexSig].SR[8].sortie1:=i;
maj_db;
end;
procedure TFormSR.ComboBoxAdr16Change(Sender: TObject);
@@ -496,5 +495,6 @@ begin
close;
end;
begin
end.
BIN
View File
Binary file not shown.
+1
View File
@@ -164,4 +164,5 @@ begin
if (intervalle<0) then Intervalle:=1;
end;
begin
end.
BIN
View File
Binary file not shown.
+15
View File
@@ -467,6 +467,20 @@ begin
Affiche('Nouveau tco',clyellow);
NbreCellX:=35;NbreCellY:=20;LargeurCell:=35;HauteurCell:=35;
RatioC:=10;
ClFond:=$202050;
ClVoies:=$0077FF;
ClAllume:=$00FFFF;
ClGrille:=$404040;
ClTexte:=$00FF00;
ClQuai:=$808080;
clPiedSignal:=$4080FF;
ClCanton:=$00FFFF;
AvecGrille:=true;
SetLength(TCO,NbreCellX+1,NbreCellY+1);
SetLength(TamponTCO,NbreCellX+1,NbreCellY+1);
for x:=1 to NbreCellX do
for y:=1 to NbreCellY do
tco[x,y].CouleurFond:=clfond;
exit;
end;
{$I-}
@@ -485,6 +499,7 @@ begin
trouve_AvecGrille:=false;
eval_format:=false;
ModeCouleurCanton:=1;
AvecGrille:=true;
clCanton:=ClYellow;
// couleurs
Binary file not shown.
+1
View File
@@ -134,4 +134,5 @@ begin
if key=chr(27) then close;
end;
begin
end.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+4 -1
View File
@@ -23,9 +23,11 @@ var
Lance_verif : integer;
verifVersion,notificationVersion : boolean;
Const Version='5.73'; // sert à la comparaison de la version publiée
Const Version='5.74'; // 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;
implementation
{$R *.dfm}
@@ -270,4 +272,5 @@ begin
if lance_verif=1 then begin lance_verif:=0;verifie_version;end;
end;
begin
end.
+4
View File
@@ -159,3 +159,7 @@ version 5.72 : Actualisation des r
Correction d'une régression sur les evt actionneurs par aiguillages.
version 5.73 : Ajout d'un bouton d'autorisation pour le pare-feu windows.
Ajout d'une 5ème voie pour la gestion des PN par actionneurs.
version 5.74 : Correction bug création nouveau TCO.
Nouvel installeur-> Signaux complexes s'installe dans c:\programmes\signaux_complexes.
avec un raccourci sur le bureau.