V3.3
This commit is contained in:
Binary file not shown.
@@ -9,7 +9,8 @@ uses
|
|||||||
UnitSimule in 'UnitSimule.pas' {FormSimulation},
|
UnitSimule in 'UnitSimule.pas' {FormSimulation},
|
||||||
UnitTCO in 'UnitTCO.pas' {FormTCO},
|
UnitTCO in 'UnitTCO.pas' {FormTCO},
|
||||||
UnitConfig in 'UnitConfig.pas' {FormConfig},
|
UnitConfig in 'UnitConfig.pas' {FormConfig},
|
||||||
UnitConfigTCO in 'UnitConfigTCO.pas' {FormConfigTCO};
|
UnitConfigTCO in 'UnitConfigTCO.pas' {FormConfigTCO},
|
||||||
|
UnitSR in '..\macro fichier\UnitSR.pas' {FormSR};
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
@@ -22,5 +23,6 @@ begin
|
|||||||
Application.CreateForm(TFormConfig, FormConfig);
|
Application.CreateForm(TFormConfig, FormConfig);
|
||||||
Application.CreateForm(TFormConfigTCO, FormConfigTCO);
|
Application.CreateForm(TFormConfigTCO, FormConfigTCO);
|
||||||
Application.CreateForm(TFormVersion, FormVersion);
|
Application.CreateForm(TFormVersion, FormVersion);
|
||||||
|
Application.CreateForm(TFormSR, FormSR);
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
|
|||||||
BIN
UnitConfig.dcu
BIN
UnitConfig.dcu
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
object FormConfig: TFormConfig
|
object FormConfig: TFormConfig
|
||||||
Left = 291
|
Left = 268
|
||||||
Top = 218
|
Top = 207
|
||||||
Hint =
|
Hint =
|
||||||
'Modifie les fichiers de configuration selon les s'#233'lections chois' +
|
'Modifie les fichiers de configuration selon les s'#233'lections chois' +
|
||||||
'ies'
|
'ies'
|
||||||
@@ -1748,11 +1748,11 @@ object FormConfig: TFormConfig
|
|||||||
object Label20: TLabel
|
object Label20: TLabel
|
||||||
Left = 648
|
Left = 648
|
||||||
Top = 312
|
Top = 312
|
||||||
Width = 208
|
Width = 170
|
||||||
Height = 39
|
Height = 52
|
||||||
Caption =
|
Caption =
|
||||||
'Tous les param'#232'tres doivent '#234'tre valid'#233's en appuyant sur la touc' +
|
'Les param'#232'tres en vert doivent '#234'tre valid'#233's en appuyant sur la t' +
|
||||||
'he ENTREE apr'#232's leur introduction/modification'
|
'ouche ENTREE apr'#232's leur introduction/modification'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object ButtonAppliquerEtFermer: TButton
|
object ButtonAppliquerEtFermer: TButton
|
||||||
@@ -2486,7 +2486,7 @@ object FormConfig: TFormConfig
|
|||||||
Width = 33
|
Width = 33
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
OnKeyPress = EditAdrAigKeyPress
|
OnChange = EditAdrAigChange
|
||||||
end
|
end
|
||||||
object ComboBoxAig: TComboBox
|
object ComboBoxAig: TComboBox
|
||||||
Left = 8
|
Left = 8
|
||||||
@@ -2617,7 +2617,7 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnKeyPress = Edit_HGKeyPress
|
OnChange = Edit_HGChange
|
||||||
end
|
end
|
||||||
object EditPointe_BG: TEdit
|
object EditPointe_BG: TEdit
|
||||||
Left = 24
|
Left = 24
|
||||||
@@ -2627,13 +2627,14 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnKeyPress = EditPointe_BGKeyPress
|
OnChange = EditPointe_BGChange
|
||||||
end
|
end
|
||||||
object EditP1: TEdit
|
object EditP1: TEdit
|
||||||
Left = 88
|
Left = 88
|
||||||
Top = 28
|
Top = 28
|
||||||
Width = 33
|
Width = 33
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Color = clLime
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
OnKeyPress = EditP1KeyPress
|
OnKeyPress = EditP1KeyPress
|
||||||
end
|
end
|
||||||
@@ -2642,6 +2643,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 48
|
Top = 48
|
||||||
Width = 33
|
Width = 33
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Color = clLime
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
OnKeyPress = EditP2KeyPress
|
OnKeyPress = EditP2KeyPress
|
||||||
end
|
end
|
||||||
@@ -2650,6 +2652,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 22
|
Top = 22
|
||||||
Width = 33
|
Width = 33
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Color = clLime
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
OnKeyPress = EditP3KeyPress
|
OnKeyPress = EditP3KeyPress
|
||||||
end
|
end
|
||||||
@@ -2658,6 +2661,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 44
|
Top = 44
|
||||||
Width = 33
|
Width = 33
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Color = clLime
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
OnKeyPress = EditP4KeyPress
|
OnKeyPress = EditP4KeyPress
|
||||||
end
|
end
|
||||||
@@ -2669,7 +2673,7 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
OnKeyPress = EditDevie_HDKeyPress
|
OnChange = EditDevie_HDChange
|
||||||
end
|
end
|
||||||
object EditDroit_BD: TEdit
|
object EditDroit_BD: TEdit
|
||||||
Left = 232
|
Left = 232
|
||||||
@@ -2679,13 +2683,14 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
OnKeyPress = EditDroit_BDKeyPress
|
OnChange = EditDroit_BDChange
|
||||||
end
|
end
|
||||||
object EditDevieS2: TEdit
|
object EditDevieS2: TEdit
|
||||||
Left = 232
|
Left = 232
|
||||||
Top = 68
|
Top = 68
|
||||||
Width = 33
|
Width = 33
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Color = clLime
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
OnKeyPress = EditDevieS2KeyPress
|
OnKeyPress = EditDevieS2KeyPress
|
||||||
end
|
end
|
||||||
@@ -2720,7 +2725,7 @@ object FormConfig: TFormConfig
|
|||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
Visible = False
|
Visible = False
|
||||||
OnKeyPress = EditAigTripleKeyPress
|
OnChange = EditAigTripleChange
|
||||||
end
|
end
|
||||||
object GroupBox21: TGroupBox
|
object GroupBox21: TGroupBox
|
||||||
Left = 8
|
Left = 8
|
||||||
@@ -2749,7 +2754,7 @@ object FormConfig: TFormConfig
|
|||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnKeyPress = EditTempo10KeyPress
|
OnChange = EditTempo10Change
|
||||||
end
|
end
|
||||||
object ComboBoxDD: TComboBox
|
object ComboBoxDD: TComboBox
|
||||||
Left = 160
|
Left = 160
|
||||||
@@ -3046,7 +3051,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 48
|
Top = 48
|
||||||
Width = 129
|
Width = 129
|
||||||
Height = 21
|
Height = 21
|
||||||
ItemHeight = 0
|
ItemHeight = 13
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnChange = ComboBoxDecChange
|
OnChange = ComboBoxDecChange
|
||||||
end
|
end
|
||||||
@@ -3056,6 +3061,7 @@ object FormConfig: TFormConfig
|
|||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
OnChange = EditDet1Change
|
||||||
OnKeyPress = EditDet1KeyPress
|
OnKeyPress = EditDet1KeyPress
|
||||||
end
|
end
|
||||||
object EditSuiv1: TEdit
|
object EditSuiv1: TEdit
|
||||||
@@ -3066,6 +3072,7 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
OnChange = EditSuiv1Change
|
||||||
OnKeyPress = EditSuiv1KeyPress
|
OnKeyPress = EditSuiv1KeyPress
|
||||||
end
|
end
|
||||||
object EditDet2: TEdit
|
object EditDet2: TEdit
|
||||||
@@ -3074,6 +3081,7 @@ object FormConfig: TFormConfig
|
|||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
OnChange = EditDet2Change
|
||||||
OnKeyPress = EditDet2KeyPress
|
OnKeyPress = EditDet2KeyPress
|
||||||
end
|
end
|
||||||
object EditSuiv2: TEdit
|
object EditSuiv2: TEdit
|
||||||
@@ -3084,6 +3092,7 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
|
OnChange = EditSuiv2Change
|
||||||
OnKeyPress = EditSuiv2KeyPress
|
OnKeyPress = EditSuiv2KeyPress
|
||||||
end
|
end
|
||||||
object EditDet3: TEdit
|
object EditDet3: TEdit
|
||||||
@@ -3092,6 +3101,7 @@ object FormConfig: TFormConfig
|
|||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
|
OnChange = EditDet3Change
|
||||||
OnKeyPress = EditDet3KeyPress
|
OnKeyPress = EditDet3KeyPress
|
||||||
end
|
end
|
||||||
object EditSuiv3: TEdit
|
object EditSuiv3: TEdit
|
||||||
@@ -3102,6 +3112,7 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
|
OnChange = EditSuiv3Change
|
||||||
OnKeyPress = EditSuiv3KeyPress
|
OnKeyPress = EditSuiv3KeyPress
|
||||||
end
|
end
|
||||||
object EditDet4: TEdit
|
object EditDet4: TEdit
|
||||||
@@ -3110,6 +3121,7 @@ object FormConfig: TFormConfig
|
|||||||
Width = 41
|
Width = 41
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
|
OnChange = EditDet4Change
|
||||||
OnKeyPress = EditDet4KeyPress
|
OnKeyPress = EditDet4KeyPress
|
||||||
end
|
end
|
||||||
object EditSuiv4: TEdit
|
object EditSuiv4: TEdit
|
||||||
@@ -3120,6 +3132,7 @@ object FormConfig: TFormConfig
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
|
OnChange = EditSuiv4Change
|
||||||
OnKeyPress = EditSuiv4KeyPress
|
OnKeyPress = EditSuiv4KeyPress
|
||||||
end
|
end
|
||||||
object CheckVerrouCarre: TCheckBox
|
object CheckVerrouCarre: TCheckBox
|
||||||
@@ -3143,6 +3156,7 @@ object FormConfig: TFormConfig
|
|||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = ' '
|
Text = ' '
|
||||||
|
OnChange = EditAdrSigChange
|
||||||
OnKeyPress = EditAdrSigKeyPress
|
OnKeyPress = EditAdrSigKeyPress
|
||||||
end
|
end
|
||||||
object ComboBoxAsp: TComboBox
|
object ComboBoxAsp: TComboBox
|
||||||
@@ -3173,11 +3187,12 @@ object FormConfig: TFormConfig
|
|||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 14
|
TabOrder = 14
|
||||||
Visible = False
|
Visible = False
|
||||||
|
OnChange = EditSpecUniChange
|
||||||
OnKeyPress = EditSpecUniKeyPress
|
OnKeyPress = EditSpecUniKeyPress
|
||||||
end
|
end
|
||||||
object Buttonrestaure: TButton
|
object Buttonrestaure: TButton
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 216
|
Top = 200
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 25
|
Height = 25
|
||||||
Hint = 'Restaure la configuration du feu d'#39'avant sa modification'
|
Hint = 'Restaure la configuration du feu d'#39'avant sa modification'
|
||||||
@@ -3196,6 +3211,15 @@ object FormConfig: TFormConfig
|
|||||||
TabOrder = 15
|
TabOrder = 15
|
||||||
OnClick = CheckBoxFBClick
|
OnClick = CheckBoxFBClick
|
||||||
end
|
end
|
||||||
|
object ButtonConfigSR: TButton
|
||||||
|
Left = 8
|
||||||
|
Top = 232
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Caption = 'Configuration'
|
||||||
|
TabOrder = 16
|
||||||
|
OnClick = ButtonConfigSRClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object RichSig: TRichEdit
|
object RichSig: TRichEdit
|
||||||
Left = 0
|
Left = 0
|
||||||
@@ -3275,8 +3299,8 @@ object FormConfig: TFormConfig
|
|||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object GroupBoxPN: TGroupBox
|
object GroupBoxPN: TGroupBox
|
||||||
Left = 16
|
Left = 8
|
||||||
Top = 16
|
Top = 24
|
||||||
Width = 225
|
Width = 225
|
||||||
Height = 289
|
Height = 289
|
||||||
Caption = 'Actionneurs gestion passage '#224' niveau'
|
Caption = 'Actionneurs gestion passage '#224' niveau'
|
||||||
@@ -3444,7 +3468,7 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object GroupBoxRadio: TGroupBox
|
object GroupBoxRadio: TGroupBox
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 72
|
Top = 40
|
||||||
Width = 225
|
Width = 225
|
||||||
Height = 65
|
Height = 65
|
||||||
Caption = 'Type d'#39'actionneur '
|
Caption = 'Type d'#39'actionneur '
|
||||||
@@ -3469,8 +3493,8 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GroupBoxAct: TGroupBox
|
object GroupBoxAct: TGroupBox
|
||||||
Left = 48
|
Left = 40
|
||||||
Top = 176
|
Top = 248
|
||||||
Width = 225
|
Width = 225
|
||||||
Height = 225
|
Height = 225
|
||||||
Caption = 'Actionneur fonction de locomotive '
|
Caption = 'Actionneur fonction de locomotive '
|
||||||
|
|||||||
491
UnitConfig.pas
491
UnitConfig.pas
@@ -230,6 +230,7 @@ type
|
|||||||
EditL: TEdit;
|
EditL: TEdit;
|
||||||
CheckBoxFB: TCheckBox;
|
CheckBoxFB: TCheckBox;
|
||||||
Label20: TLabel;
|
Label20: TLabel;
|
||||||
|
ButtonConfigSR: TButton;
|
||||||
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
|
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
@@ -293,19 +294,12 @@ type
|
|||||||
procedure CheckBoxFBClick(Sender: TObject);
|
procedure CheckBoxFBClick(Sender: TObject);
|
||||||
procedure Button2Click(Sender: TObject);
|
procedure Button2Click(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure EditAdrAigKeyPress(Sender: TObject; var Key: Char);
|
|
||||||
procedure EditAdrSigKeyPress(Sender: TObject; var Key: Char);
|
procedure EditAdrSigKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditP3KeyPress(Sender: TObject; var Key: Char);
|
procedure EditP3KeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditP4KeyPress(Sender: TObject; var Key: Char);
|
procedure EditP4KeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditAigTripleKeyPress(Sender: TObject; var Key: Char);
|
|
||||||
procedure Edit_HGKeyPress(Sender: TObject; var Key: Char);
|
|
||||||
procedure EditPointe_BGKeyPress(Sender: TObject; var Key: Char);
|
|
||||||
procedure EditP1KeyPress(Sender: TObject; var Key: Char);
|
procedure EditP1KeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditP2KeyPress(Sender: TObject; var Key: Char);
|
procedure EditP2KeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditDevie_HDKeyPress(Sender: TObject; var Key: Char);
|
|
||||||
procedure EditDroit_BDKeyPress(Sender: TObject; var Key: Char);
|
|
||||||
procedure EditDevieS2KeyPress(Sender: TObject; var Key: Char);
|
procedure EditDevieS2KeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditTempo10KeyPress(Sender: TObject; var Key: Char);
|
|
||||||
procedure EditDet1KeyPress(Sender: TObject; var Key: Char);
|
procedure EditDet1KeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditSuiv1KeyPress(Sender: TObject; var Key: Char);
|
procedure EditSuiv1KeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditDet2KeyPress(Sender: TObject; var Key: Char);
|
procedure EditDet2KeyPress(Sender: TObject; var Key: Char);
|
||||||
@@ -315,6 +309,24 @@ type
|
|||||||
procedure EditDet4KeyPress(Sender: TObject; var Key: Char);
|
procedure EditDet4KeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditSuiv4KeyPress(Sender: TObject; var Key: Char);
|
procedure EditSuiv4KeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure EditSpecUniKeyPress(Sender: TObject; var Key: Char);
|
procedure EditSpecUniKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure ButtonConfigSRClick(Sender: TObject);
|
||||||
|
procedure EditDet1Change(Sender: TObject);
|
||||||
|
procedure EditSuiv1Change(Sender: TObject);
|
||||||
|
procedure EditAdrSigChange(Sender: TObject);
|
||||||
|
procedure EditDet2Change(Sender: TObject);
|
||||||
|
procedure EditSuiv2Change(Sender: TObject);
|
||||||
|
procedure EditDet3Change(Sender: TObject);
|
||||||
|
procedure EditSuiv3Change(Sender: TObject);
|
||||||
|
procedure EditDet4Change(Sender: TObject);
|
||||||
|
procedure EditSuiv4Change(Sender: TObject);
|
||||||
|
procedure EditSpecUniChange(Sender: TObject);
|
||||||
|
procedure EditAdrAigChange(Sender: TObject);
|
||||||
|
procedure EditAigTripleChange(Sender: TObject);
|
||||||
|
procedure EditPointe_BGChange(Sender: TObject);
|
||||||
|
procedure EditDroit_BDChange(Sender: TObject);
|
||||||
|
procedure EditDevie_HDChange(Sender: TObject);
|
||||||
|
procedure EditTempo10Change(Sender: TObject);
|
||||||
|
procedure Edit_HGChange(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
public
|
public
|
||||||
@@ -368,10 +380,11 @@ Procedure aff_champs_sig_feux(index : integer);
|
|||||||
procedure decode_ligne_feux(chaine_signal : string;i : integer);
|
procedure decode_ligne_feux(chaine_signal : string;i : integer);
|
||||||
function verif_coherence : boolean;
|
function verif_coherence : boolean;
|
||||||
function compile_branche(s : string;i : integer) : boolean;
|
function compile_branche(s : string;i : integer) : boolean;
|
||||||
|
function encode_sig_feux(i : integer): string;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses UnitDebug, UnitTCO;
|
uses UnitDebug, UnitTCO, UnitSR;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
@@ -572,7 +585,7 @@ begin
|
|||||||
encode_init_aig:=s;
|
encode_init_aig:=s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// transforme l'aiguillage du tableau aiguillage en texte
|
// transforme l'aiguillage de la base de données aiguillage en texte
|
||||||
function encode_aig(index : integer): string;
|
function encode_aig(index : integer): string;
|
||||||
var s : string;
|
var s : string;
|
||||||
c : char;
|
c : char;
|
||||||
@@ -646,103 +659,6 @@ begin
|
|||||||
encode_aig:=s;
|
encode_aig:=s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// transforme l'aiguillage des champs graphiques en texte
|
|
||||||
function encode_aig_gfx : string;
|
|
||||||
var s,ss : string;
|
|
||||||
c : char;
|
|
||||||
tjd,tjs,tri : boolean;
|
|
||||||
modele,erreur,i : integer;
|
|
||||||
begin
|
|
||||||
val(formconfig.EditAdrAig.text,i,erreur);
|
|
||||||
s:=intToSTR(i);
|
|
||||||
modele:=Formconfig.comboBoxAig.ItemIndex;
|
|
||||||
tjd:=modele=1;
|
|
||||||
tjs:=modele=2;
|
|
||||||
tri:=modele=3;
|
|
||||||
|
|
||||||
if tjd then s:=s+'TJD';
|
|
||||||
if tjs then s:=s+'TJS';
|
|
||||||
if tri then begin s:=s+'TRI,';val(formconfig.editAigTriple.text,i,erreur);s:=s+intToSTR(i);end;
|
|
||||||
|
|
||||||
s:=s+',';
|
|
||||||
if not(tjd) then
|
|
||||||
with formconfig do
|
|
||||||
begin
|
|
||||||
// P
|
|
||||||
s:=s+'P';
|
|
||||||
ss:=EditPointe_BG.Text;
|
|
||||||
val(ss,i,erreur);s:=s+intToSTR(i);
|
|
||||||
if erreur<>0 then c:=ss[erreur] ;
|
|
||||||
if (c<>'Z') and (c<>#0) then s:=s+c;
|
|
||||||
// D
|
|
||||||
s:=s+',D';
|
|
||||||
ss:=EditDroit_BD.Text;
|
|
||||||
val(ss,i,erreur);s:=s+intToSTR(i);
|
|
||||||
if erreur<>0 then c:=ss[erreur] ;
|
|
||||||
if (c<>'Z') and (c<>#0) then s:=s+c;
|
|
||||||
// S
|
|
||||||
s:=s+',S';
|
|
||||||
ss:=EditDevie_HD.Text;
|
|
||||||
val(ss,i,erreur);s:=s+intToSTR(i);
|
|
||||||
if erreur<>0 then c:=ss[erreur] ;
|
|
||||||
if (c<>'Z') and (c<>#0) then s:=s+c;
|
|
||||||
|
|
||||||
// S2 aiguillage triple
|
|
||||||
if tri then
|
|
||||||
begin
|
|
||||||
s:=s+',S2-';
|
|
||||||
ss:=EditDevieS2.Text;
|
|
||||||
val(ss,i,erreur);s:=s+intToSTR(i);
|
|
||||||
if erreur<>0 then c:=ss[erreur] ;
|
|
||||||
if (c<>'Z') and (c<>#0) then s:=s+c;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// vitesse de franchissement
|
|
||||||
if radioButtonSans.Checked then s:=s+',V0';
|
|
||||||
if radioButton30kmh.Checked then s:=s+',V30';
|
|
||||||
if radioButton60kmh.Checked then s:=s+',V60';
|
|
||||||
if checkinverse.Checked then s:=s+',I1' else s:=s+',I0';
|
|
||||||
end
|
|
||||||
|
|
||||||
else
|
|
||||||
// tjd
|
|
||||||
begin
|
|
||||||
with formconfig do
|
|
||||||
begin
|
|
||||||
s:=s+'D(';
|
|
||||||
ss:=Edit_HG.Text;
|
|
||||||
val(ss,i,erreur);s:=s+intToSTR(i);
|
|
||||||
if erreur<>0 then c:=ss[erreur] ;
|
|
||||||
if (c<>'Z') and (c<>#0) then s:=s+c;
|
|
||||||
|
|
||||||
s:=s+',';
|
|
||||||
ss:=EditP1.Text;
|
|
||||||
val(ss,i,erreur);s:=s+intToSTR(i);
|
|
||||||
if erreur<>0 then c:=ss[erreur] ;
|
|
||||||
if (c<>'Z') and (c<>#0) then s:=s+c;
|
|
||||||
s:=s+'),';
|
|
||||||
|
|
||||||
s:=s+',S(';
|
|
||||||
ss:=EditPointe_BG.Text;
|
|
||||||
val(ss,i,erreur);s:=s+intToSTR(i);
|
|
||||||
if erreur<>0 then c:=ss[erreur] ;
|
|
||||||
if (c<>'Z') and (c<>#0) then s:=s+c;
|
|
||||||
|
|
||||||
s:=s+',';
|
|
||||||
ss:=EditP2.Text;
|
|
||||||
val(ss,i,erreur);s:=s+intToSTR(i);
|
|
||||||
if erreur<>0 then c:=ss[erreur] ;
|
|
||||||
if (c<>'Z') and (c<>#0) then s:=s+c;
|
|
||||||
s:=s+'),';
|
|
||||||
|
|
||||||
s:=s+'I';
|
|
||||||
if checkInverse.Checked then s:=s+'1' else s:=s+'0';
|
|
||||||
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
encode_aig_gfx:=s;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// renvoie un A si BT est un aiguillage
|
// renvoie un A si BT est un aiguillage
|
||||||
function TypeEl_to_char(BT : TEquipement) : string;
|
function TypeEl_to_char(BT : TEquipement) : string;
|
||||||
begin
|
begin
|
||||||
@@ -799,6 +715,41 @@ begin
|
|||||||
j:=feux[i].Adr_det4;
|
j:=feux[i].Adr_det4;
|
||||||
if j<>0 then s:=s+','+IntToSTR(feux[i].Adr_det4)+','+TypeEl_To_char(feux[i].Btype_suiv4)+IntToSTR(feux[i].Adr_el_suiv4);
|
if j<>0 then s:=s+','+IntToSTR(feux[i].Adr_det4)+','+TypeEl_To_char(feux[i].Btype_suiv4)+IntToSTR(feux[i].Adr_el_suiv4);
|
||||||
s:=s+'),';
|
s:=s+'),';
|
||||||
|
|
||||||
|
//verrouillage au carré
|
||||||
|
if feux[i].verrouCarre then s:=s+'1' else s:=s+'0';
|
||||||
|
// si unsemaf, paramètre supplémentaire
|
||||||
|
if feux[i].decodeur=6 then s:=s+',U'+intToSTR(feux[i].unisemaf);
|
||||||
|
|
||||||
|
// conditions supplémentaires pour le carré
|
||||||
|
for nc:=1 to 6 do
|
||||||
|
begin
|
||||||
|
CondCarre:=Length(feux[i].condcarre[nc]); // nombre de conditions (nombre de parenthèses ex 3 pour (A21S,A6D)(A30S,A20D)(A1D,A2S,A3D)
|
||||||
|
dec(condcarre);
|
||||||
|
if condCarre>0 then
|
||||||
|
begin
|
||||||
|
s:=s+',(';
|
||||||
|
for k:=1 to condcarre do
|
||||||
|
begin
|
||||||
|
s:=s+'A'+IntToSTR(feux[i].condcarre[nc][k].Adresse)+feux[i].condcarre[nc][k].PosAig;
|
||||||
|
if k<condcarre then s:=s+',';
|
||||||
|
end;
|
||||||
|
s:=s+')';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// déodeur SR
|
||||||
|
if feux[i].decodeur=7 then
|
||||||
|
begin
|
||||||
|
s:=s+',SR(';
|
||||||
|
for nc:=1 to 8 do
|
||||||
|
begin
|
||||||
|
s:=s+intToSTR(feux[i].SR[nc].sortie1)+',';
|
||||||
|
s:=s+intToSTR(feux[i].SR[nc].sortie0);
|
||||||
|
if nc<8 then s:=s+',' else s:=s+')';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
// feux directionnels
|
// feux directionnels
|
||||||
@@ -815,34 +766,7 @@ begin
|
|||||||
s:=s+')';
|
s:=s+')';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//verrouillage au carré
|
|
||||||
if aspect<10 then
|
|
||||||
begin
|
|
||||||
if feux[i].verrouCarre then s:=s+'1' else s:=s+'0';
|
|
||||||
// si unsemaf, paramètre supplémentaire
|
|
||||||
if feux[i].decodeur=6 then s:=s+','+intToSTR(feux[i].unisemaf);
|
|
||||||
end;
|
|
||||||
|
|
||||||
// conditions supplémentaires pour le carré
|
|
||||||
if aspect<10 then
|
|
||||||
begin
|
|
||||||
for nc:=1 to 6 do
|
|
||||||
begin
|
|
||||||
CondCarre:=Length(feux[i].condcarre[nc]); // nombre de conditions (nombre de parenthèses ex 3 pour (A21S,A6D)(A30S,A20D)(A1D,A2S,A3D)
|
|
||||||
if condCarre<>0 then dec(condcarre);
|
|
||||||
if condCarre<>0 then
|
|
||||||
begin
|
|
||||||
s:=s+',(';
|
|
||||||
for k:=1 to condcarre do
|
|
||||||
begin
|
|
||||||
s:=s+'A'+IntToSTR(feux[i].condcarre[nc][k].Adresse)+feux[i].condcarre[nc][k].PosAig;
|
|
||||||
if k<condcarre then s:=s+',';
|
|
||||||
end;
|
|
||||||
s:=s+')';
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
encode_sig_feux:=s;
|
encode_sig_feux:=s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -874,13 +798,14 @@ begin
|
|||||||
val(sa,l,erreur); // nombre de feux du signal directionnel
|
val(sa,l,erreur); // nombre de feux du signal directionnel
|
||||||
if l>6 then
|
if l>6 then
|
||||||
begin
|
begin
|
||||||
Affiche('Ligne '+s+' 6 feux maximum pour un panneau directionnel',clred);
|
Affiche('Ligne '+chaine_signal+' 6 feux maximum pour un panneau directionnel',clred);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
feux[i].aspect:=l+10;Delete(s,1,j);
|
feux[i].aspect:=l+10;Delete(s,1,j);
|
||||||
// décodeur
|
// décodeur
|
||||||
val(s,adr,erreur);
|
val(s,adr,erreur);
|
||||||
Feux[i].decodeur:=adr;
|
Feux[i].decodeur:=adr;
|
||||||
|
if (adr>NbDecodeur-1) then Affiche('Ligne '+chaine_signal+' : erreur décodeur inconnu',clred);
|
||||||
j:=pos(',',s);Delete(s,1,j);
|
j:=pos(',',s);Delete(s,1,j);
|
||||||
// liste des aiguillages
|
// liste des aiguillages
|
||||||
k:=1; // numéro de feu directionnel
|
k:=1; // numéro de feu directionnel
|
||||||
@@ -889,7 +814,7 @@ begin
|
|||||||
delete(s,1,1); // supprimer ( ou le ,
|
delete(s,1,1); // supprimer ( ou le ,
|
||||||
j:=1; // Nombre de descriptions d'aiguillages dans le feu
|
j:=1; // Nombre de descriptions d'aiguillages dans le feu
|
||||||
repeat
|
repeat
|
||||||
if s[1]<>'A' then begin Affiche('Erreur a la ligne '+s,clred);exit;end;
|
if s[1]<>'A' then begin Affiche('Erreur a la ligne '+chaine_signal,clred);exit;end;
|
||||||
delete(s,1,1);
|
delete(s,1,1);
|
||||||
val(s,adr,erreur); // adresse
|
val(s,adr,erreur); // adresse
|
||||||
c:=s[erreur]; // type
|
c:=s[erreur]; // type
|
||||||
@@ -923,6 +848,7 @@ begin
|
|||||||
if j>1 then begin Feux[i].FeuBlanc:=(copy(s,1,j-1))='1';delete(s,1,j);end;
|
if j>1 then begin Feux[i].FeuBlanc:=(copy(s,1,j-1))='1';delete(s,1,j);end;
|
||||||
j:=pos(',',s);
|
j:=pos(',',s);
|
||||||
val(s,Feux[i].decodeur,erreur);
|
val(s,Feux[i].decodeur,erreur);
|
||||||
|
if (Feux[i].decodeur>NbDecodeur-1) then Affiche('Ligne '+chaine_signal+' : erreur décodeur inconnu',clred);
|
||||||
if j<>0 then delete(s,1,j);
|
if j<>0 then delete(s,1,j);
|
||||||
feux[i].Adr_el_suiv1:=0;feux[i].Adr_el_suiv2:=0;feux[i].Adr_el_suiv3:=0;feux[i].Adr_el_suiv4:=0;
|
feux[i].Adr_el_suiv1:=0;feux[i].Adr_el_suiv2:=0;feux[i].Adr_el_suiv3:=0;feux[i].Adr_el_suiv4:=0;
|
||||||
feux[i].Btype_Suiv1:=rien;feux[i].Btype_Suiv2:=rien;feux[i].Btype_Suiv3:=rien;feux[i].Btype_Suiv4:=rien;
|
feux[i].Btype_Suiv1:=rien;feux[i].Btype_Suiv2:=rien;feux[i].Btype_Suiv3:=rien;feux[i].Btype_Suiv4:=rien;
|
||||||
@@ -930,7 +856,6 @@ begin
|
|||||||
// éléments optionnels des voies supplémentaires
|
// éléments optionnels des voies supplémentaires
|
||||||
if j<>0 then
|
if j<>0 then
|
||||||
begin
|
begin
|
||||||
//Affiche('Entrée:s='+s,clyellow);
|
|
||||||
sa:=s;
|
sa:=s;
|
||||||
multiple:=s[1]='(';
|
multiple:=s[1]='(';
|
||||||
if multiple then
|
if multiple then
|
||||||
@@ -944,8 +869,6 @@ begin
|
|||||||
val(s,adr,erreur); // extraire l'adresse
|
val(s,adr,erreur); // extraire l'adresse
|
||||||
Delete(s,1,k);
|
Delete(s,1,k);
|
||||||
end;
|
end;
|
||||||
//Affiche('Adr='+IntToSTR(adr)+' ' +intToSTR(erreur),clyellow);
|
|
||||||
//Affiche('S avec premier champ supprimé='+s,clyellow);
|
|
||||||
inc(j);
|
inc(j);
|
||||||
if (j=1) then feux[i].Adr_det1:=adr;
|
if (j=1) then feux[i].Adr_det1:=adr;
|
||||||
if (j=2) then feux[i].Adr_det2:=adr;
|
if (j=2) then feux[i].Adr_det2:=adr;
|
||||||
@@ -968,17 +891,14 @@ begin
|
|||||||
if (j=4) then feux[i].Btype_Suiv4:=det;
|
if (j=4) then feux[i].Btype_Suiv4:=det;
|
||||||
end;
|
end;
|
||||||
Val(s,adr,erreur);
|
Val(s,adr,erreur);
|
||||||
//Affiche('Adr='+IntToSTR(Adr),clyellow);
|
|
||||||
if (j=1) then feux[i].Adr_el_suiv1:=Adr;
|
if (j=1) then feux[i].Adr_el_suiv1:=Adr;
|
||||||
if (j=2) then feux[i].Adr_el_suiv2:=Adr;
|
if (j=2) then feux[i].Adr_el_suiv2:=Adr;
|
||||||
if (j=3) then feux[i].Adr_el_suiv3:=Adr;
|
if (j=3) then feux[i].Adr_el_suiv3:=Adr;
|
||||||
if (j=4) then feux[i].Adr_el_suiv4:=Adr;
|
if (j=4) then feux[i].Adr_el_suiv4:=Adr;
|
||||||
delete(s,1,erreur-1);
|
delete(s,1,erreur-1);
|
||||||
if s[1]=',' then delete(s,1,1);
|
if s[1]=',' then delete(s,1,1);
|
||||||
//Affiche('S en fin de traitement s='+s,clyellow);
|
|
||||||
fini:=s[1]=')';
|
fini:=s[1]=')';
|
||||||
until (fini) or (j>4);
|
until (fini) or (j>4);
|
||||||
//if fini then Affiche('fini',clyellow);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if (j>4) or (not(multiple)) then begin Affiche('Erreur: fichier de configuration ligne erronnée : '+chaine_signal,clred); closefile(fichier);exit;end;
|
if (j>4) or (not(multiple)) then begin Affiche('Erreur: fichier de configuration ligne erronnée : '+chaine_signal,clred); closefile(fichier);exit;end;
|
||||||
@@ -986,16 +906,20 @@ begin
|
|||||||
k:=pos(',',s);
|
k:=pos(',',s);
|
||||||
delete(s,1,k);
|
delete(s,1,k);
|
||||||
//Affiche('s='+s,clyellow);
|
//Affiche('s='+s,clyellow);
|
||||||
|
if length(s)=0 then begin Affiche('Erreur: fichier de configuration ligne erronnée : '+chaine_signal,clred); closefile(fichier);exit;end;
|
||||||
feux[i].VerrouCarre:=s[1]='1';
|
feux[i].VerrouCarre:=s[1]='1';
|
||||||
delete(s,1,1);
|
delete(s,1,1);
|
||||||
|
|
||||||
|
if length(s)>0 then if s[1]=',' then delete(s,1,1);
|
||||||
|
if length(s)>0 then if s[1]='U' then delete(s,1,1);
|
||||||
|
|
||||||
// si décodeur UniSemaf (6) champ supplémentaire
|
// si décodeur UniSemaf (6) champ supplémentaire
|
||||||
if Feux[i].decodeur=6 then
|
if Feux[i].decodeur=6 then
|
||||||
begin
|
begin
|
||||||
k:=pos(',',s);
|
|
||||||
if k=0 then begin Affiche('Ligne '+chaine_signal,clred);Affiche('Manque définition de la cible pour le décodeur UniSemaf',clred);end
|
if k=0 then begin Affiche('Ligne '+chaine_signal,clred);Affiche('Manque définition de la cible pour le décodeur UniSemaf',clred);end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Delete(S,1,k);
|
|
||||||
Val(s,k,erreur);
|
Val(s,k,erreur);
|
||||||
Feux[i].UniSemaf:=k;
|
Feux[i].UniSemaf:=k;
|
||||||
erreur:=verif_UniSemaf(adresse,k);
|
erreur:=verif_UniSemaf(adresse,k);
|
||||||
@@ -1008,17 +932,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// voir si conditions supplémentaires de carré
|
// voir si conditions supplémentaires de carré
|
||||||
l:=1; // nombre de parenthèses
|
l:=1; // nombre de parenthèses
|
||||||
repeat
|
repeat
|
||||||
t:=pos('(',s);
|
t:=pos('(',s);
|
||||||
if t<>0 then
|
if t=1 then
|
||||||
begin
|
begin
|
||||||
//Affiche('Conditions supplémentaires pour le feu '+IntToSTR(adresse)+' parenthèse '+intToSTR(l),clyellow);
|
//Affiche('Conditions supplémentaires pour le feu '+IntToSTR(adresse)+' parenthèse '+intToSTR(l),clyellow);
|
||||||
k:=pos(')',s);
|
k:=pos(')',s);
|
||||||
sa:=copy(s,t+1,k-t-1); // contient l'intérieur des parenthèses sans les parenthèses
|
sa:=copy(s,t+1,k-t-1); // contient l'intérieur des parenthèses sans les parenthèses
|
||||||
//Affiche(sa,clLime);
|
|
||||||
delete(s,1,k);//Affiche(s,clYellow);
|
delete(s,1,k);//Affiche(s,clYellow);
|
||||||
|
|
||||||
// boucle dans la parenthèse
|
// boucle dans la parenthèse
|
||||||
bd:=0;
|
bd:=0;
|
||||||
repeat
|
repeat
|
||||||
@@ -1033,7 +958,6 @@ begin
|
|||||||
if chaine[1]='A' then
|
if chaine[1]='A' then
|
||||||
begin
|
begin
|
||||||
delete(chaine,1,1);
|
delete(chaine,1,1);
|
||||||
//Affiche(chaine,ClOrange);
|
|
||||||
val(chaine,adresse,erreur);
|
val(chaine,adresse,erreur);
|
||||||
feux[i].condCarre[l][bd].Adresse:=adresse;
|
feux[i].condCarre[l][bd].Adresse:=adresse;
|
||||||
if erreur<>0 then feux[i].condCarre[l][bd].PosAig:=chaine[erreur] else
|
if erreur<>0 then feux[i].condCarre[l][bd].PosAig:=chaine[erreur] else
|
||||||
@@ -1041,11 +965,31 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
k:=pos(',',sa);if k<>0 then delete(sa,1,k);
|
k:=pos(',',sa);if k<>0 then delete(sa,1,k);
|
||||||
//Affiche(sa,clyellow);
|
|
||||||
until k=0;
|
until k=0;
|
||||||
inc(l);
|
inc(l);
|
||||||
end;
|
end;
|
||||||
until t=0;
|
until t<>1;
|
||||||
|
if length(s)>1 then if s[1]=',' then delete(s,1,1);
|
||||||
|
|
||||||
|
// champ SR
|
||||||
|
if length(s)>2 then
|
||||||
|
if copy(s,1,2)='SR' then
|
||||||
|
begin
|
||||||
|
delete(s,1,3);
|
||||||
|
for l:=1 to 8 do
|
||||||
|
begin
|
||||||
|
k:=pos(',',s);
|
||||||
|
val(s,j,erreur);
|
||||||
|
delete(s,1,k);
|
||||||
|
feux[i].SR[l].sortie1:=j;
|
||||||
|
|
||||||
|
k:=pos(',',s);
|
||||||
|
val(s,j,erreur);
|
||||||
|
delete(s,1,k);
|
||||||
|
feux[i].SR[l].sortie0:=j;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -1953,12 +1897,18 @@ begin
|
|||||||
EditDet3.Text:=''; EditSuiv3.Text:='';
|
EditDet3.Text:=''; EditSuiv3.Text:='';
|
||||||
EditDet4.Text:=''; EditSuiv4.Text:='';
|
EditDet4.Text:=''; EditSuiv4.Text:='';
|
||||||
ComboBoxDec.ItemIndex:=feux[i].decodeur;
|
ComboBoxDec.ItemIndex:=feux[i].decodeur;
|
||||||
|
|
||||||
|
if feux[i].decodeur=7 then
|
||||||
|
ButtonConfigSR.Visible:=true else ButtonConfigSR.Visible:=false;
|
||||||
|
|
||||||
if feux[i].decodeur=6 then
|
if feux[i].decodeur=6 then
|
||||||
begin
|
begin
|
||||||
EditSpecUni.Visible:=true;LabelUni.Visible:=true;
|
EditSpecUni.Visible:=true;LabelUni.Visible:=true;
|
||||||
EditSpecUni.Text:=IntToSTR(feux[i].Unisemaf);
|
EditSpecUni.Text:=IntToSTR(feux[i].Unisemaf);
|
||||||
end
|
end
|
||||||
else begin EditSpecUni.Visible:=false;LabelUni.Visible:=false;end;
|
else begin EditSpecUni.Visible:=false;LabelUni.Visible:=false;end;
|
||||||
|
|
||||||
|
|
||||||
d:=feux[i].aspect;
|
d:=feux[i].aspect;
|
||||||
case d of
|
case d of
|
||||||
2 : ComboBoxAsp.ItemIndex:=0;
|
2 : ComboBoxAsp.ItemIndex:=0;
|
||||||
@@ -2264,13 +2214,12 @@ begin
|
|||||||
clicliste:=false;
|
clicliste:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// on change la valeur de la description du champ HG pour les TJD
|
procedure TFormConfig.Edit_HGChange(Sender: TObject);
|
||||||
procedure TFormConfig.Edit_HGKeyPress(Sender: TObject; var Key: Char);
|
|
||||||
var s : string;
|
var s : string;
|
||||||
adr,adraig,erreur,index : integer;
|
adr,adraig,erreur,index : integer;
|
||||||
b : char;
|
b : char;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste then exit;
|
||||||
if affevt then affiche('Evt change HG',clyellow);
|
if affevt then affiche('Evt change HG',clyellow);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
||||||
@@ -2302,8 +2251,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// on change la valeur de la description de la déviation de l'aiguillage
|
// on change la valeur de la description du champ HG pour les TJD
|
||||||
procedure TFormConfig.EditDevie_HDKeyPress(Sender: TObject; var Key: Char);
|
procedure TFormConfig.EditDevie_HDChange(Sender: TObject);
|
||||||
var AdrAig,adr,adr2,erreur,index : integer;
|
var AdrAig,adr,adr2,erreur,index : integer;
|
||||||
b : char;
|
b : char;
|
||||||
modele:Tequipement;
|
modele:Tequipement;
|
||||||
@@ -2311,7 +2260,7 @@ var AdrAig,adr,adr2,erreur,index : integer;
|
|||||||
begin
|
begin
|
||||||
// cliqué sur le edit dévié aiguillage
|
// cliqué sur le edit dévié aiguillage
|
||||||
// ne pas traiter si on a cliqué sur la liste
|
// ne pas traiter si on a cliqué sur la liste
|
||||||
if clicliste or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste then exit;
|
||||||
if affevt then affiche('Evt change dévié',clyellow);
|
if affevt then affiche('Evt change dévié',clyellow);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
||||||
@@ -2364,8 +2313,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// on change la valeur de la description du droit de l'aiguillage
|
// on change la valeur de la description de la déviation de l'aiguillage
|
||||||
procedure TFormConfig.EditDroit_BDKeyPress(Sender: TObject; var Key: Char);
|
procedure TFormConfig.EditDroit_BDChange(Sender: TObject);
|
||||||
var AdrAig,adr,erreur,index,adr2 : integer;
|
var AdrAig,adr,erreur,index,adr2 : integer;
|
||||||
b : char;
|
b : char;
|
||||||
modele: TEquipement;
|
modele: TEquipement;
|
||||||
@@ -2373,7 +2322,7 @@ var AdrAig,adr,erreur,index,adr2 : integer;
|
|||||||
begin
|
begin
|
||||||
// cliqué sur le edit droit aiguillage
|
// cliqué sur le edit droit aiguillage
|
||||||
// ne pas traiter si on a cliqué sur la liste
|
// ne pas traiter si on a cliqué sur la liste
|
||||||
if clicliste or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste then exit;
|
||||||
if affevt then affiche('Evt change droit',clyellow);
|
if affevt then affiche('Evt change droit',clyellow);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
||||||
@@ -2421,10 +2370,10 @@ begin
|
|||||||
LabelInfo.caption:='Modification de la TJD homologe ('+IntToSTR(adr2)+')';
|
LabelInfo.caption:='Modification de la TJD homologe ('+IntToSTR(adr2)+')';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditPointe_BGKeyPress(Sender: TObject;
|
procedure TFormConfig.EditPointe_BGChange(Sender: TObject);
|
||||||
var Key: Char);
|
|
||||||
var AdrAig,adr,erreur,index : integer;
|
var AdrAig,adr,erreur,index : integer;
|
||||||
b : char;
|
b : char;
|
||||||
normal,tjdC,tjsC,triC : boolean;
|
normal,tjdC,tjsC,triC : boolean;
|
||||||
@@ -2432,7 +2381,7 @@ var AdrAig,adr,erreur,index : integer;
|
|||||||
begin
|
begin
|
||||||
// cliqué sur le edit pointe aiguillage
|
// cliqué sur le edit pointe aiguillage
|
||||||
// ne pas traiter si on a cliqué sur la liste
|
// ne pas traiter si on a cliqué sur la liste
|
||||||
if clicliste or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste then exit;
|
||||||
if affevt then affiche('Evt change pointe',clyellow);
|
if affevt then affiche('Evt change pointe',clyellow);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
||||||
@@ -2477,7 +2426,10 @@ begin
|
|||||||
else
|
else
|
||||||
LabelInfo.caption:='Erreur pointe aiguillage '+intToSTR(AdrAig);
|
LabelInfo.caption:='Erreur pointe aiguillage '+intToSTR(AdrAig);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TFormConfig.EditDevieS2KeyPress(Sender: TObject; var Key: Char);
|
procedure TFormConfig.EditDevieS2KeyPress(Sender: TObject; var Key: Char);
|
||||||
var AdrAig,adr,erreur,index : integer;
|
var AdrAig,adr,erreur,index : integer;
|
||||||
@@ -2645,11 +2597,11 @@ begin
|
|||||||
clicliste:=false;
|
clicliste:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditDet1KeyPress(Sender: TObject; var Key: Char);
|
procedure Det1;
|
||||||
var s : string;
|
var s : string;
|
||||||
i,erreur : integer;
|
i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
if affevt then Affiche('Evt detecteur 1',clOrange);
|
if affevt then Affiche('Evt detecteur 1',clOrange);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -2667,12 +2619,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditSuiv1KeyPress(Sender: TObject; var Key: Char);
|
procedure TFormConfig.EditDet1KeyPress(Sender: TObject; var Key: Char);
|
||||||
var s : string;
|
begin
|
||||||
|
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||||
|
Det1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditDet1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Det1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Suiv1;
|
||||||
|
var s : string;
|
||||||
i,erreur : integer;
|
i,erreur : integer;
|
||||||
bt : Tequipement;
|
bt : Tequipement;
|
||||||
begin
|
begin
|
||||||
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
if affevt then Affiche('Evt Element suivant1',clOrange);
|
if affevt then Affiche('Evt Element suivant1',clOrange);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -2707,11 +2670,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditDet2KeyPress(Sender: TObject; var Key: Char);
|
|
||||||
|
procedure TFormConfig.EditSuiv1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Suiv1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditSuiv1KeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||||
|
Suiv1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Det2;
|
||||||
var s : string;
|
var s : string;
|
||||||
i,erreur : integer;
|
i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
if affevt then Affiche('Evt detecteur 2',clOrange);
|
if affevt then Affiche('Evt detecteur 2',clOrange);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -2729,6 +2704,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditDet2Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
det2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditDet2KeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||||
|
det2;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.CheckVerrouCarreClick(Sender: TObject);
|
procedure TFormConfig.CheckVerrouCarreClick(Sender: TObject);
|
||||||
var s : string;
|
var s : string;
|
||||||
begin
|
begin
|
||||||
@@ -2759,12 +2745,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditSuiv2KeyPress(Sender: TObject; var Key: Char);
|
procedure Suiv2;
|
||||||
var s : string;
|
var s : string;
|
||||||
erreur,i: integer;
|
erreur,i: integer;
|
||||||
bt : Tequipement;
|
bt : Tequipement;
|
||||||
begin
|
begin
|
||||||
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
|
||||||
if affevt then Affiche('Evt Element suivant2',clOrange);
|
if affevt then Affiche('Evt Element suivant2',clOrange);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -2799,12 +2784,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditSuiv2Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) then exit;
|
||||||
|
Suiv2;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditDet3KeyPress(Sender: TObject; var Key: Char);
|
procedure TFormConfig.EditSuiv2KeyPress(Sender: TObject; var Key: Char);
|
||||||
|
|
||||||
|
begin
|
||||||
|
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||||
|
Suiv2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure det3;
|
||||||
var s : string;
|
var s : string;
|
||||||
i,erreur : integer;
|
i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
if affevt then Affiche('Evt detecteur 3',clOrange);
|
if affevt then Affiche('Evt detecteur 3',clOrange);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -2822,12 +2819,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditSuiv3KeyPress(Sender: TObject; var Key: Char);
|
procedure TFormConfig.EditDet3Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
|
det3;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditDet3KeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||||
|
det3;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Suiv3;
|
||||||
var s : string;
|
var s : string;
|
||||||
erreur,i : integer;
|
erreur,i : integer;
|
||||||
bt : Tequipement;
|
bt : Tequipement;
|
||||||
begin
|
begin
|
||||||
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
if affevt then Affiche('Evt Element suivant3',clOrange);
|
if affevt then Affiche('Evt Element suivant3',clOrange);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -2860,13 +2869,25 @@ begin
|
|||||||
s:=encode_sig_feux(ligneClicSig+1);
|
s:=encode_sig_feux(ligneClicSig+1);
|
||||||
RichSig.Lines[ligneClicSig]:=s;
|
RichSig.Lines[ligneClicSig]:=s;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditSuiv3Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) then exit;
|
||||||
|
suiv3;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditDet4KeyPress(Sender: TObject; var Key: Char);
|
procedure TFormConfig.EditSuiv3KeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) then exit;
|
||||||
|
suiv3;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure det4;
|
||||||
var s : string;
|
var s : string;
|
||||||
i,erreur : integer;
|
i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste then exit;
|
||||||
if affevt then Affiche('Evt detecteur 4',clOrange);
|
if affevt then Affiche('Evt detecteur 4',clOrange);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -2882,14 +2903,26 @@ begin
|
|||||||
RichSig.Lines[ligneClicSig]:=s;
|
RichSig.Lines[ligneClicSig]:=s;
|
||||||
feux[ligneClicSig+1].modifie:=true;
|
feux[ligneClicSig+1].modifie:=true;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditDet4Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
|
det4;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditSuiv4KeyPress(Sender: TObject; var Key: Char);
|
procedure TFormConfig.EditDet4KeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||||
|
det4;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure suiv4;
|
||||||
var s : string;
|
var s : string;
|
||||||
erreur,i : integer;
|
erreur,i : integer;
|
||||||
bt : Tequipement;
|
bt : Tequipement;
|
||||||
begin
|
begin
|
||||||
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
if affevt then Affiche('Evt Element suivant4',clOrange);
|
if affevt then Affiche('Evt Element suivant4',clOrange);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -2924,6 +2957,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditSuiv4Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) then exit;
|
||||||
|
Suiv4;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditSuiv4KeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if clicliste or (comboBoxAsp.Itemindex>=6) or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||||
|
Suiv4;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFormConfig.EditActChange(Sender: TObject);
|
procedure TFormConfig.EditActChange(Sender: TObject);
|
||||||
var s : string;
|
var s : string;
|
||||||
act,erreur : integer;
|
act,erreur : integer;
|
||||||
@@ -3119,11 +3165,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditAdrSigKeyPress(Sender: TObject; var Key: Char);
|
procedure AdrSig;
|
||||||
var s : string;
|
var s : string;
|
||||||
i, erreur : integer;
|
i, erreur : integer;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste then exit;
|
||||||
if affevt then Affiche('Evt adresse signal',clOrange);
|
if affevt then Affiche('Evt adresse signal',clOrange);
|
||||||
// attention interférence avec clic droit propriétés sur un signal qui génère un evt sur ce contrôle
|
// attention interférence avec clic droit propriétés sur un signal qui génère un evt sur ce contrôle
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -3151,13 +3197,25 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditAdrAigKeyPress(Sender: TObject; var Key: Char);
|
|
||||||
var s : string;
|
procedure TFormConfig.EditAdrSigChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
AdrSig;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditAdrSigKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if clicliste or (ord(Key)<>VK_RETURN) then exit;
|
||||||
|
AdrSig;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditAdrAigChange(Sender: TObject);
|
||||||
|
var s : string;
|
||||||
i,vide,erreur,index,adr2 : integer;
|
i,vide,erreur,index,adr2 : integer;
|
||||||
modele: TEquipement;
|
modele: TEquipement;
|
||||||
c : char;
|
c : char;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste then exit;
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
||||||
with Formconfig do
|
with Formconfig do
|
||||||
begin
|
begin
|
||||||
@@ -3184,12 +3242,12 @@ begin
|
|||||||
LabelInfo.caption:='aiguillage '+IntToSTR(i)+' existe déja - ne sera pas écrasé' ;
|
LabelInfo.caption:='aiguillage '+IntToSTR(i)+' existe déja - ne sera pas écrasé' ;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
EditAdrAig.Color:=clWindow;
|
EditAdrAig.Color:=clWindow;
|
||||||
LabelInfo.caption:=' ';
|
LabelInfo.caption:=' ';
|
||||||
s:=encode_aig_gfx;
|
|
||||||
|
|
||||||
aiguillage[index].adresse:=i;
|
aiguillage[index].adresse:=i;
|
||||||
aiguillage[index].modifie:=true;
|
aiguillage[index].modifie:=true;
|
||||||
|
s:=encode_aig(index);
|
||||||
formconfig.RichAig.Lines[ligneclicAig]:=s;
|
formconfig.RichAig.Lines[ligneclicAig]:=s;
|
||||||
end;
|
end;
|
||||||
if (modele=tjd) or (modele=tjs) then
|
if (modele=tjd) or (modele=tjs) then
|
||||||
@@ -3256,11 +3314,11 @@ begin
|
|||||||
dessine_feu_mx(Feux[index].Img.Canvas,0,0,1,1,feux[index].adresse,1); // dessine les feux du signal
|
dessine_feu_mx(Feux[index].Img.Canvas,0,0,1,1,feux[index].adresse,1); // dessine les feux du signal
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditSpecUniKeyPress(Sender: TObject; var Key: Char);
|
procedure Uni;
|
||||||
var erreur,i,Adr : integer ;
|
var erreur,i,Adr : integer ;
|
||||||
s : string ;
|
s : string ;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
if affevt then Affiche('Evt Unisemaf',clOrange);
|
if affevt then Affiche('Evt Unisemaf',clOrange);
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetSig then
|
||||||
@@ -3280,6 +3338,18 @@ begin
|
|||||||
s:=encode_sig_feux(ligneClicSig+1);
|
s:=encode_sig_feux(ligneClicSig+1);
|
||||||
RichSig.Lines[ligneClicSig]:=s;
|
RichSig.Lines[ligneClicSig]:=s;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditSpecUniChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if clicliste or (ligneClicSig<0) then exit;
|
||||||
|
uni;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFormConfig.EditSpecUniKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if clicliste or (ligneClicSig<0) or (ord(Key)<>VK_RETURN) then exit;
|
||||||
|
uni;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.ButtonrestaureClick(Sender: TObject);
|
procedure TFormConfig.ButtonrestaureClick(Sender: TObject);
|
||||||
@@ -3566,7 +3636,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
LabelInfo.caption:='Erreur adresse actionneur voie 2 ouvre';exit
|
LabelInfo.caption:='Erreur adresse actionneur voie 2 ouvre';exit
|
||||||
end else LabelInfo.caption:=' ';
|
end else LabelInfo.caption:=' ';
|
||||||
i:=lignecliqueePN;
|
i:=lignecliqueePN+1;
|
||||||
tablo_PN[i].voie[2].ActOuvre:=act;
|
tablo_PN[i].voie[2].ActOuvre:=act;
|
||||||
V2valide:=(EditV2O.text<>'') and (EditV2F.text<>'');
|
V2valide:=(EditV2O.text<>'') and (EditV2F.text<>'');
|
||||||
NbVoies:=tablo_PN[i].NbVoies;
|
NbVoies:=tablo_PN[i].NbVoies;
|
||||||
@@ -4992,8 +5062,9 @@ begin
|
|||||||
LabelInfo.Caption:='';
|
LabelInfo.Caption:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditAigTripleKeyPress(Sender: TObject; var Key: Char);
|
|
||||||
var s : string;
|
procedure TFormConfig.EditAigTripleChange(Sender: TObject);
|
||||||
|
var s : string;
|
||||||
i,erreur,index : integer;
|
i,erreur,index : integer;
|
||||||
model: TEquipement;
|
model: TEquipement;
|
||||||
begin
|
begin
|
||||||
@@ -5020,9 +5091,10 @@ begin
|
|||||||
end ;
|
end ;
|
||||||
if i=0 then EditAigTriple.Color:=clred else EditAigTriple.Color:=clWindow;
|
if i=0 then EditAigTriple.Color:=clred else EditAigTriple.Color:=clWindow;
|
||||||
LabelInfo.caption:='';
|
LabelInfo.caption:='';
|
||||||
s:=encode_aig_gfx;
|
|
||||||
aiguillage[index].AdrTriple:=i;
|
aiguillage[index].AdrTriple:=i;
|
||||||
aiguillage[index].modifie:=true;
|
aiguillage[index].modifie:=true;
|
||||||
|
s:=encode_aig(index);
|
||||||
formconfig.RichAig.Lines[ligneclicAig]:=s;
|
formconfig.RichAig.Lines[ligneclicAig]:=s;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -5036,7 +5108,7 @@ begin
|
|||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
||||||
with Formconfig do
|
with Formconfig do
|
||||||
begin
|
begin
|
||||||
s:=encode_aig_gfx;
|
|
||||||
i:=ComboBoxDD.ItemIndex;
|
i:=ComboBoxDD.ItemIndex;
|
||||||
case i of
|
case i of
|
||||||
0 : pos:=const_devie;
|
0 : pos:=const_devie;
|
||||||
@@ -5046,17 +5118,16 @@ begin
|
|||||||
|
|
||||||
aiguillage[ligneclicAig+1].PosInit:=pos;
|
aiguillage[ligneclicAig+1].PosInit:=pos;
|
||||||
aiguillage[ligneclicAig+1].modifie:=true;
|
aiguillage[ligneclicAig+1].modifie:=true;
|
||||||
formconfig.RichAig.Lines[ligneclicAig]:=s;
|
|
||||||
s:=encode_aig(ligneclicAig+1);
|
s:=encode_aig(ligneclicAig+1);
|
||||||
RichAig.lines[ligneclicAig]:=s;
|
RichAig.lines[ligneclicAig]:=s;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.EditTempo10KeyPress(Sender: TObject; var Key: Char);
|
procedure TFormConfig.EditTempo10Change(Sender: TObject);
|
||||||
var s : string;
|
var s : string;
|
||||||
i,erreur : integer;
|
i,erreur : integer;
|
||||||
begin
|
begin
|
||||||
if clicliste or (ord(Key)<>VK_RETURN) or (ligneclicAig<0) then exit;
|
if clicliste or (ligneclicAig<0) then exit;
|
||||||
|
|
||||||
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
if FormConfig.PageControl.ActivePage=FormConfig.TabSheetAig then
|
||||||
with Formconfig do
|
with Formconfig do
|
||||||
@@ -5066,14 +5137,12 @@ begin
|
|||||||
if (i>0) and (i<50) then
|
if (i>0) and (i<50) then
|
||||||
begin
|
begin
|
||||||
LabelInfo.caption:='';
|
LabelInfo.caption:='';
|
||||||
s:=encode_aig_gfx;
|
|
||||||
aiguillage[ligneclicAig+1].temps:=i;
|
aiguillage[ligneclicAig+1].temps:=i;
|
||||||
aiguillage[ligneclicAig+1].modifie:=true;
|
aiguillage[ligneclicAig+1].modifie:=true;
|
||||||
formconfig.RichAig.Lines[ligneclicAig]:=s;
|
|
||||||
s:=encode_aig(ligneclicAig+1);
|
s:=encode_aig(ligneclicAig+1);
|
||||||
RichAig.lines[ligneclicAig]:=s;
|
RichAig.lines[ligneclicAig]:=s;
|
||||||
end ;
|
end ;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.CheckInvInitClick(Sender: TObject);
|
procedure TFormConfig.CheckInvInitClick(Sender: TObject);
|
||||||
@@ -5198,13 +5267,29 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TFormConfig.ButtonConfigSRClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
clicListe:=true;
|
||||||
|
formSR.showmodal;
|
||||||
begin
|
formSR.close;
|
||||||
|
clicListe:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
BIN
UnitDebug.dcu
BIN
UnitDebug.dcu
Binary file not shown.
BIN
UnitPilote.dcu
BIN
UnitPilote.dcu
Binary file not shown.
BIN
UnitPrinc.dcu
BIN
UnitPrinc.dcu
Binary file not shown.
@@ -1,5 +1,5 @@
|
|||||||
object FormPrinc: TFormPrinc
|
object FormPrinc: TFormPrinc
|
||||||
Left = 13
|
Left = 15
|
||||||
Top = 175
|
Top = 175
|
||||||
Width = 1212
|
Width = 1212
|
||||||
Height = 664
|
Height = 664
|
||||||
|
|||||||
142
UnitPrinc.pas
142
UnitPrinc.pas
@@ -198,8 +198,11 @@ Max_Simule=10000;
|
|||||||
|
|
||||||
EtatSign : array[0..13] of string[20] =('carré','sémaphore','sémaphore cli','vert','vert cli','violet',
|
EtatSign : array[0..13] of string[20] =('carré','sémaphore','sémaphore cli','vert','vert cli','violet',
|
||||||
'blanc','blanc cli','jaune','jaune cli','ral 30','ral 60','rappel 30','rappel 60');
|
'blanc','blanc cli','jaune','jaune cli','ral 30','ral 60','rappel 30','rappel 60');
|
||||||
NbDecodeur = 7;
|
NbDecodeur = 8;
|
||||||
decodeur : array[0..NbDecodeur-1] of string[20] =('rien','digital Bahn','CDF','LDT','LEB','NMRA','Unisemaf');
|
decodeur : array[0..NbDecodeur-1] of string[20] =('rien','digital Bahn','CDF','LDT','LEB','NMRA','Unisemaf','SR');
|
||||||
|
Etats : array[0..19] of string[30]=('Non commandé','carré','sémaphore','sémaphore cli','vert','vert cli','violet',
|
||||||
|
'blanc','blanc cli','jaune','jaune cli','ralen 30','ralen 60','ralen 60 + jaune cli','rappel 30','rappel 60',
|
||||||
|
'rappel 30 + jaune','rappel 30 + jaune cli','rappel 60 + jaune','rappel 60 + jaune cli');
|
||||||
|
|
||||||
type
|
type
|
||||||
Taccessoire = (aigP,feu);
|
Taccessoire = (aigP,feu);
|
||||||
@@ -278,6 +281,9 @@ TBranche = record
|
|||||||
Adresse : integer; // aiguillage
|
Adresse : integer; // aiguillage
|
||||||
posAig : char;
|
posAig : char;
|
||||||
end;
|
end;
|
||||||
|
SR : array[1..8] of record // décodeur Stéphane Ravaut
|
||||||
|
sortie1,sortie0 : integer;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -421,8 +427,25 @@ begin
|
|||||||
StatusBar1.Simpletext:=Application.Hint;
|
StatusBar1.Simpletext:=Application.Hint;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// fonctions sur les bits
|
||||||
|
function testBit(n : word;position : integer) : boolean;
|
||||||
|
begin
|
||||||
|
testBit:=n and (1 shl position) = (1 shl position);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function RazBit(n : word;position : integer) : word;
|
||||||
|
begin
|
||||||
|
RazBit:=n and not(1 shl position);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function SetBit(n : word;position : integer) : word;
|
||||||
|
begin
|
||||||
|
SetBit:=n or (1 shl position);
|
||||||
|
end;
|
||||||
|
|
||||||
// renvoie le 1er numéro de bit à 1
|
// renvoie le 1er numéro de bit à 1
|
||||||
// ex BitNum(4)=2
|
// PremBitNum(1)=0
|
||||||
|
// PremBitNum(4)=2
|
||||||
Function PremBitNum(n : word) : integer;
|
Function PremBitNum(n : word) : integer;
|
||||||
var i : integer;
|
var i : integer;
|
||||||
trouve : boolean;
|
trouve : boolean;
|
||||||
@@ -436,6 +459,7 @@ begin
|
|||||||
PremBitNum:=i;
|
PremBitNum:=i;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// conversion du motif de bits (codebin) de la configuration du signal complexe en deux mots:
|
// conversion du motif de bits (codebin) de la configuration du signal complexe en deux mots:
|
||||||
// en sortie :
|
// en sortie :
|
||||||
// premierBit : code de la signalisation
|
// premierBit : code de la signalisation
|
||||||
@@ -447,6 +471,47 @@ begin
|
|||||||
combine:=PremBitNum(CodeBin and $fc00);
|
combine:=PremBitNum(CodeBin and $fc00);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// conversion d'un état signal binaire en état unique
|
||||||
|
// exemple code_to_etat(10001000000000) (jaune_cli et rappel 60) renvoie 19
|
||||||
|
function code_to_etat(code : word) : integer;
|
||||||
|
var aspect,combine : word;
|
||||||
|
begin
|
||||||
|
code_to_aspect(code,aspect,combine);
|
||||||
|
result:=9999;
|
||||||
|
if aspect=0 then result:=1; // carré
|
||||||
|
if aspect=1 then result:=2; // sémaphore
|
||||||
|
if aspect=2 then result:=3; // sémaphore cli
|
||||||
|
if aspect=3 then result:=4; // vert
|
||||||
|
if aspect=4 then result:=5; // vert cli
|
||||||
|
if aspect=5 then result:=6; // violet
|
||||||
|
if aspect=6 then result:=7; // blanc
|
||||||
|
if aspect=7 then result:=8; // blanc cli
|
||||||
|
if aspect=8 then result:=9; // jaune
|
||||||
|
if aspect=9 then result:=10; // jaune cli
|
||||||
|
|
||||||
|
if aspect=16 then
|
||||||
|
begin
|
||||||
|
if combine=10 then result:=11; // ralen 30
|
||||||
|
if combine=11 then result:=12; // ralen 60
|
||||||
|
if combine=12 then result:=14; // rappel 30
|
||||||
|
if combine=13 then result:=15; // rappel 60
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if (aspect=9) and (combine=11) then result:=13; //ralen 60 + jaune cli
|
||||||
|
if (aspect=8) and (combine=12) then result:=16; //rappel 30 + jaune
|
||||||
|
if (aspect=9) and (combine=12) then result:=17; //rappel 30 + jaune cli
|
||||||
|
if (aspect=8) and (combine=13) then result:=18; //rappel 60 + jaune
|
||||||
|
if (aspect=9) and (combine=13) then result:=19; //rappel 60 + jaune cli
|
||||||
|
end;
|
||||||
|
code_to_etat:=result;
|
||||||
|
{'Non commandé','carré','sémaphore','sémaphore cli','vert','vert cli','violet',
|
||||||
|
'blanc','blanc cli','jaune','jaune cli','ralen 30','ralen 60','ralen 60 + jaune cli','rappel 30','rappel 60',
|
||||||
|
7 8 9 10 11 12 13 14 15
|
||||||
|
'rappel 30 + jaune','rappel 30 + jaune cli','rappel 60 + jaune','rappel 60 + jaune cli');
|
||||||
|
16 17 18 19 }
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
// dessine un cercle plein dans le feu
|
// dessine un cercle plein dans le feu
|
||||||
procedure cercle(ACanvas : Tcanvas;x,y,rayon : integer;couleur : Tcolor);
|
procedure cercle(ACanvas : Tcanvas;x,y,rayon : integer;couleur : Tcolor);
|
||||||
@@ -1593,21 +1658,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// fonctions sur les bits
|
|
||||||
function testBit(n : word;position : integer) : boolean;
|
|
||||||
begin
|
|
||||||
testBit:=n and (1 shl position) = (1 shl position);
|
|
||||||
end;
|
|
||||||
|
|
||||||
Function RazBit(n : word;position : integer) : word;
|
|
||||||
begin
|
|
||||||
RazBit:=n and not(1 shl position);
|
|
||||||
end;
|
|
||||||
|
|
||||||
Function SetBit(n : word;position : integer) : word;
|
|
||||||
begin
|
|
||||||
SetBit:=n or (1 shl position);
|
|
||||||
end;
|
|
||||||
|
|
||||||
// renvoie la chaîne de l'état du signal
|
// renvoie la chaîne de l'état du signal
|
||||||
function chaine_signal(etat : word) : string;
|
function chaine_signal(etat : word) : string;
|
||||||
@@ -1820,6 +1870,51 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{==========================================================================
|
||||||
|
envoie les données au décodeur SR
|
||||||
|
===========================================================================*}
|
||||||
|
procedure envoi_SR(adresse : integer);
|
||||||
|
var
|
||||||
|
code,aspect,combine : word;
|
||||||
|
index,i,etat : integer;
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
if (ancien_tablo_signalCplx[adresse]<>EtatSignalCplx[adresse]) then //; && (stop_cmd==FALSE))
|
||||||
|
begin
|
||||||
|
ancien_tablo_signalCplx[adresse]:=EtatSignalCplx[adresse];
|
||||||
|
code:=EtatSignalCplx[adresse];
|
||||||
|
//code_to_aspect(code,aspect,combine);
|
||||||
|
s:='Signal SR: ad'+IntToSTR(adresse)+'='+chaine_signal(code);
|
||||||
|
if traceSign then affiche(s,clOrange);
|
||||||
|
if Affsignal then afficheDebug(s,clOrange);
|
||||||
|
index:=index_feu(adresse);
|
||||||
|
etat:=code_to_etat(code);
|
||||||
|
|
||||||
|
//Affiche('Code a chercher='+IntToSTR(etat),clyellow);
|
||||||
|
|
||||||
|
inc(aspect);
|
||||||
|
if index<>0 then
|
||||||
|
begin
|
||||||
|
i:=0;
|
||||||
|
repeat
|
||||||
|
inc(i);
|
||||||
|
until (feux[index].SR[i].sortie1=etat) or (feux[index].SR[i].sortie0=etat) or (i=8);
|
||||||
|
|
||||||
|
if (feux[index].SR[i].sortie1=etat) then
|
||||||
|
begin
|
||||||
|
//affiche('trouvé en sortie1 index '+IntToSTR(i),clyellow);
|
||||||
|
Pilote_acc(adresse+i-1,2,feu);
|
||||||
|
end;
|
||||||
|
if (feux[index].SR[i].sortie0=etat) then
|
||||||
|
begin
|
||||||
|
//affiche('trouvé en sortie0 index '+IntToSTR(i),clyellow);
|
||||||
|
Pilote_acc(adresse+i-1,1,feu);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{==========================================================================
|
{==========================================================================
|
||||||
envoie les données au décodeur LEB
|
envoie les données au décodeur LEB
|
||||||
===========================================================================*}
|
===========================================================================*}
|
||||||
@@ -2403,6 +2498,7 @@ begin
|
|||||||
4 : envoi_LEB(Adr);
|
4 : envoi_LEB(Adr);
|
||||||
5 : envoi_NMRA(Adr);
|
5 : envoi_NMRA(Adr);
|
||||||
6 : envoi_UniSemaf(Adr);
|
6 : envoi_UniSemaf(Adr);
|
||||||
|
7 : envoi_SR(Adr);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// vérifier si on quitte le rouge
|
// vérifier si on quitte le rouge
|
||||||
@@ -3035,6 +3131,7 @@ begin
|
|||||||
repeat
|
repeat
|
||||||
inc(Nligne);
|
inc(Nligne);
|
||||||
s:=lit_ligne;
|
s:=lit_ligne;
|
||||||
|
//affiche(s,clyellow);
|
||||||
ici3:
|
ici3:
|
||||||
if s<>'0' then
|
if s<>'0' then
|
||||||
begin
|
begin
|
||||||
@@ -7652,6 +7749,15 @@ begin
|
|||||||
inc(l);
|
inc(l);
|
||||||
if nc>0 then s:=s+'/';
|
if nc>0 then s:=s+'/';
|
||||||
until (nc<=0) or (l>6);
|
until (nc<=0) or (l>6);
|
||||||
|
|
||||||
|
s:=s+' RV(';
|
||||||
|
for l:=1 to 8 do
|
||||||
|
begin
|
||||||
|
s:=s+intToSTR(feux[i].SR[l].sortie1)+',';
|
||||||
|
s:=s+intToSTR(feux[i].SR[l].sortie0);
|
||||||
|
if l<8 then s:=s+'/' else s:=s+')';
|
||||||
|
end;
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
BIN
UnitSimule.dcu
BIN
UnitSimule.dcu
Binary file not shown.
BIN
UnitTCO.dcu
BIN
UnitTCO.dcu
Binary file not shown.
@@ -23,8 +23,8 @@ var
|
|||||||
Lance_verif : integer;
|
Lance_verif : integer;
|
||||||
verifVersion,notificationVersion : boolean;
|
verifVersion,notificationVersion : boolean;
|
||||||
|
|
||||||
Const Version='3.2'; // sert à la comparaison de la version publiée
|
Const Version='3.3'; // sert à la comparaison de la version publiée
|
||||||
SousVersion='C'; // en cas d'absence de sous version mettre un espace
|
SousVersion=' '; // en cas d'absence de sous version mettre un espace
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ version 3.1 : Renforcement de la v
|
|||||||
Correction d'un bug sur présence train avant signal sur aiguille en talon mal positionnée.
|
Correction d'un bug sur présence train avant signal sur aiguille en talon mal positionnée.
|
||||||
version 3.2 : Correction bug cohérence signal unisemaf.
|
version 3.2 : Correction bug cohérence signal unisemaf.
|
||||||
: Simplification des aiguillages pilotés inversés
|
: Simplification des aiguillages pilotés inversés
|
||||||
|
version 3.3 : Gestion du décodeur de signaux Stéphane Ravaut
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user