V9.8
This commit is contained in:
BIN
Binary file not shown.
Binary file not shown.
+318
-25
@@ -670,7 +670,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 8
|
Top = 8
|
||||||
Width = 633
|
Width = 633
|
||||||
Height = 505
|
Height = 505
|
||||||
ActivePage = TabSheetPeriph
|
ActivePage = TabSheetBouton
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clBlack
|
Font.Color = clBlack
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
@@ -684,8 +684,8 @@ object FormConfig: TFormConfig
|
|||||||
object Label36: TLabel
|
object Label36: TLabel
|
||||||
Left = 24
|
Left = 24
|
||||||
Top = 458
|
Top = 458
|
||||||
Width = 369
|
Width = 325
|
||||||
Height = 13
|
Height = 26
|
||||||
Caption =
|
Caption =
|
||||||
'Param'#232'tres de connexion et d'#39#233'change avec CDM rail et param'#232'tres' +
|
'Param'#232'tres de connexion et d'#39#233'change avec CDM rail et param'#232'tres' +
|
||||||
' g'#233'n'#233'raux'
|
' g'#233'n'#233'raux'
|
||||||
@@ -1067,7 +1067,7 @@ object FormConfig: TFormConfig
|
|||||||
Hint =
|
Hint =
|
||||||
'Utilis'#233' avec la fenetre CDM de signaux complexes pour afficher l' +
|
'Utilis'#233' avec la fenetre CDM de signaux complexes pour afficher l' +
|
||||||
'es trains'
|
'es trains'
|
||||||
Caption = 'Position trains'
|
Caption = 'Position et vitesses trains'
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@@ -1222,8 +1222,8 @@ object FormConfig: TFormConfig
|
|||||||
object Label9: TLabel
|
object Label9: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 456
|
Top = 456
|
||||||
Width = 294
|
Width = 249
|
||||||
Height = 13
|
Height = 26
|
||||||
Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail'
|
Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
@@ -1244,7 +1244,7 @@ object FormConfig: TFormConfig
|
|||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 45
|
Top = 45
|
||||||
Width = 138
|
Width = 135
|
||||||
Height = 26
|
Height = 26
|
||||||
Caption = '2. Temporisation d'#39'envoi des octets de la trame (ms)'
|
Caption = '2. Temporisation d'#39'envoi des octets de la trame (ms)'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
@@ -1252,7 +1252,7 @@ object FormConfig: TFormConfig
|
|||||||
object Label5: TLabel
|
object Label5: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 75
|
Top = 75
|
||||||
Width = 151
|
Width = 148
|
||||||
Height = 26
|
Height = 26
|
||||||
Caption =
|
Caption =
|
||||||
'3. Temporisation d'#39'attente de la r'#233'ponse de l'#39'interface (x 50 ms' +
|
'3. Temporisation d'#39'attente de la r'#233'ponse de l'#39'interface (x 50 ms' +
|
||||||
@@ -1534,7 +1534,7 @@ object FormConfig: TFormConfig
|
|||||||
object LabelCrois: TLabel
|
object LabelCrois: TLabel
|
||||||
Left = 96
|
Left = 96
|
||||||
Top = 312
|
Top = 312
|
||||||
Width = 187
|
Width = 178
|
||||||
Height = 26
|
Height = 26
|
||||||
Caption =
|
Caption =
|
||||||
'Les croisements re'#231'oivent une adresse m'#234'me s'#39'ils ne sont pas pil' +
|
'Les croisements re'#231'oivent une adresse m'#234'me s'#39'ils ne sont pas pil' +
|
||||||
@@ -2077,8 +2077,8 @@ object FormConfig: TFormConfig
|
|||||||
object Label34: TLabel
|
object Label34: TLabel
|
||||||
Left = 472
|
Left = 472
|
||||||
Top = 200
|
Top = 200
|
||||||
Width = 136
|
Width = 115
|
||||||
Height = 26
|
Height = 39
|
||||||
Caption = 'Tapez CTRL-Z pour annuler une modification r'#233'cente'
|
Caption = 'Tapez CTRL-Z pour annuler une modification r'#233'cente'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
@@ -2274,8 +2274,8 @@ object FormConfig: TFormConfig
|
|||||||
object Label17: TLabel
|
object Label17: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 326
|
Top = 326
|
||||||
Width = 131
|
Width = 115
|
||||||
Height = 39
|
Height = 52
|
||||||
Hint =
|
Hint =
|
||||||
'Permet d'#39'afficher un carr'#233' si les aiguillages sont dans les posi' +
|
'Permet d'#39'afficher un carr'#233' si les aiguillages sont dans les posi' +
|
||||||
'tions d'#233'crites ci dessous'
|
'tions d'#233'crites ci dessous'
|
||||||
@@ -2369,7 +2369,7 @@ object FormConfig: TFormConfig
|
|||||||
object Label69: TLabel
|
object Label69: TLabel
|
||||||
Left = 152
|
Left = 152
|
||||||
Top = 326
|
Top = 326
|
||||||
Width = 122
|
Width = 107
|
||||||
Height = 39
|
Height = 39
|
||||||
Hint =
|
Hint =
|
||||||
'Permet d'#39'afficher un feu blanc si les aiguillages sont dans les ' +
|
'Permet d'#39'afficher un feu blanc si les aiguillages sont dans les ' +
|
||||||
@@ -2800,9 +2800,9 @@ object FormConfig: TFormConfig
|
|||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object LabelNa: TLabel
|
object LabelNa: TLabel
|
||||||
Left = 19
|
Left = 36
|
||||||
Top = 304
|
Top = 304
|
||||||
Width = 126
|
Width = 109
|
||||||
Height = 39
|
Height = 39
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
Caption = 'Nombre d'#39'adresses occup'#233'es par le signal sur le d'#233'codeur:'
|
Caption = 'Nombre d'#39'adresses occup'#233'es par le signal sur le d'#233'codeur:'
|
||||||
@@ -3187,7 +3187,7 @@ object FormConfig: TFormConfig
|
|||||||
Left = 240
|
Left = 240
|
||||||
Top = 19
|
Top = 19
|
||||||
Width = 33
|
Width = 33
|
||||||
Height = 22
|
Height = 21
|
||||||
MaxValue = 2
|
MaxValue = 2
|
||||||
MinValue = 0
|
MinValue = 0
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
@@ -3348,7 +3348,7 @@ object FormConfig: TFormConfig
|
|||||||
object Label31: TLabel
|
object Label31: TLabel
|
||||||
Left = 352
|
Left = 352
|
||||||
Top = 296
|
Top = 296
|
||||||
Width = 229
|
Width = 203
|
||||||
Height = 26
|
Height = 26
|
||||||
Caption = 'Les actionneurs doivent '#234'tre compris entre deux d'#233'tecteurs'
|
Caption = 'Les actionneurs doivent '#234'tre compris entre deux d'#233'tecteurs'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
@@ -4338,8 +4338,8 @@ object FormConfig: TFormConfig
|
|||||||
object Label45: TLabel
|
object Label45: TLabel
|
||||||
Left = 50
|
Left = 50
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 192
|
Width = 160
|
||||||
Height = 26
|
Height = 39
|
||||||
Alignment = taCenter
|
Alignment = taCenter
|
||||||
Caption =
|
Caption =
|
||||||
'Arr'#234't temporis'#233' du train sur routes sur d'#233'tecteurs : (mode auton' +
|
'Arr'#234't temporis'#233' du train sur routes sur d'#233'tecteurs : (mode auton' +
|
||||||
@@ -4376,8 +4376,8 @@ object FormConfig: TFormConfig
|
|||||||
object LabelEt: TLabel
|
object LabelEt: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 24
|
Top = 24
|
||||||
Width = 213
|
Width = 201
|
||||||
Height = 26
|
Height = 39
|
||||||
Caption =
|
Caption =
|
||||||
'Les 3 coefficients de vitesse sont issus de la proc'#233'dure d'#39#233'talo' +
|
'Les 3 coefficients de vitesse sont issus de la proc'#233'dure d'#39#233'talo' +
|
||||||
'nnage de la mesure du train'
|
'nnage de la mesure du train'
|
||||||
@@ -4641,8 +4641,8 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object Label23: TLabel
|
object Label23: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 36
|
Top = 28
|
||||||
Width = 534
|
Width = 571
|
||||||
Height = 26
|
Height = 26
|
||||||
Caption =
|
Caption =
|
||||||
'Les p'#233'riph'#233'riques sont utilis'#233's pour '#234'tre activ'#233's par une action' +
|
'Les p'#233'riph'#233'riques sont utilis'#233's pour '#234'tre activ'#233's par une action' +
|
||||||
@@ -4870,9 +4870,302 @@ object FormConfig: TFormConfig
|
|||||||
OnClick = BoutonComClick
|
OnClick = BoutonComClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object TabSheetBouton: TTabSheet
|
||||||
|
Caption = 'Boutons USB'
|
||||||
|
ImageIndex = 10
|
||||||
|
object GroupBoxB: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 593
|
||||||
|
Height = 441
|
||||||
|
Caption = 'Boutons rotatifs / poussoirs USB'
|
||||||
|
TabOrder = 0
|
||||||
|
object Shape1: TShape
|
||||||
|
Left = 72
|
||||||
|
Top = 80
|
||||||
|
Width = 193
|
||||||
|
Height = 201
|
||||||
|
Brush.Color = clOlive
|
||||||
|
end
|
||||||
|
object ShapeBR: TShape
|
||||||
|
Left = 120
|
||||||
|
Top = 112
|
||||||
|
Width = 97
|
||||||
|
Height = 89
|
||||||
|
Hint = 'Bouton rotatif et clic'
|
||||||
|
Brush.Color = clGray
|
||||||
|
ParentShowHint = False
|
||||||
|
Shape = stCircle
|
||||||
|
ShowHint = True
|
||||||
|
OnMouseDown = ShapeBRMouseDown
|
||||||
|
end
|
||||||
|
object ShapeB1: TShape
|
||||||
|
Left = 80
|
||||||
|
Top = 224
|
||||||
|
Width = 33
|
||||||
|
Height = 33
|
||||||
|
Hint = 'Clic bouton 1'
|
||||||
|
Brush.Color = clGray
|
||||||
|
ParentShowHint = False
|
||||||
|
Shape = stCircle
|
||||||
|
ShowHint = True
|
||||||
|
OnMouseDown = ShapeB1MouseDown
|
||||||
|
end
|
||||||
|
object ShapeB2: TShape
|
||||||
|
Left = 128
|
||||||
|
Top = 224
|
||||||
|
Width = 33
|
||||||
|
Height = 33
|
||||||
|
Hint = 'Clic bouton 2'
|
||||||
|
Brush.Color = clGray
|
||||||
|
ParentShowHint = False
|
||||||
|
Shape = stCircle
|
||||||
|
ShowHint = True
|
||||||
|
OnMouseDown = ShapeB2MouseDown
|
||||||
|
end
|
||||||
|
object ShapeB3: TShape
|
||||||
|
Left = 176
|
||||||
|
Top = 224
|
||||||
|
Width = 33
|
||||||
|
Height = 33
|
||||||
|
Hint = 'Clic bouton 3'
|
||||||
|
Brush.Color = clGray
|
||||||
|
ParentShowHint = False
|
||||||
|
Shape = stCircle
|
||||||
|
ShowHint = True
|
||||||
|
OnMouseDown = ShapeB3MouseDown
|
||||||
|
end
|
||||||
|
object ShapeB4: TShape
|
||||||
|
Left = 224
|
||||||
|
Top = 224
|
||||||
|
Width = 33
|
||||||
|
Height = 33
|
||||||
|
Hint = 'Clic bouton 4'
|
||||||
|
Brush.Color = clGray
|
||||||
|
ParentShowHint = False
|
||||||
|
Shape = stCircle
|
||||||
|
ShowHint = True
|
||||||
|
OnMouseDown = ShapeB4MouseDown
|
||||||
|
end
|
||||||
|
object Label66: TLabel
|
||||||
|
Left = 72
|
||||||
|
Top = 336
|
||||||
|
Width = 122
|
||||||
|
Height = 16
|
||||||
|
Caption = 'Code de touche : '
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object LabelCode: TLabel
|
||||||
|
Left = 200
|
||||||
|
Top = 336
|
||||||
|
Width = 5
|
||||||
|
Height = 16
|
||||||
|
Caption = '.'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label70: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 32
|
||||||
|
Width = 263
|
||||||
|
Height = 13
|
||||||
|
Caption = 'D'#233'finition des boutons des blocs claviers USB'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label72: TLabel
|
||||||
|
Left = 27
|
||||||
|
Top = 392
|
||||||
|
Width = 3
|
||||||
|
Height = 13
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Label74: TLabel
|
||||||
|
Left = 312
|
||||||
|
Top = 240
|
||||||
|
Width = 81
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Affecter au train :'
|
||||||
|
end
|
||||||
|
object LabelId: TLabel
|
||||||
|
Left = 80
|
||||||
|
Top = 88
|
||||||
|
Width = 16
|
||||||
|
Height = 34
|
||||||
|
Caption = '1'
|
||||||
|
Color = clOlive
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -29
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object LabeledEditCT: TLabeledEdit
|
||||||
|
Left = 480
|
||||||
|
Top = 80
|
||||||
|
Width = 40
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Code ascii envoy'#233' par le bouton'
|
||||||
|
EditLabel.Width = 76
|
||||||
|
EditLabel.Height = 13
|
||||||
|
EditLabel.Caption = 'Code de touche'
|
||||||
|
EditLabel.Layout = tlBottom
|
||||||
|
LabelPosition = lpLeft
|
||||||
|
LabelSpacing = 50
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = LabeledEditCTChange
|
||||||
|
end
|
||||||
|
object LabeledEditRm: TLabeledEdit
|
||||||
|
Left = 480
|
||||||
|
Top = 128
|
||||||
|
Width = 40
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Code ascii envoy'#233' par la rotation anti horaire (-)'
|
||||||
|
EditLabel.Width = 99
|
||||||
|
EditLabel.Height = 13
|
||||||
|
EditLabel.Caption = 'Code de rotation en -'
|
||||||
|
EditLabel.Layout = tlBottom
|
||||||
|
LabelPosition = lpLeft
|
||||||
|
LabelSpacing = 50
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = LabeledEditRmChange
|
||||||
|
end
|
||||||
|
object LabeledEditRp: TLabeledEdit
|
||||||
|
Left = 480
|
||||||
|
Top = 152
|
||||||
|
Width = 40
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Code ascii envoy'#233' par la rotation horaire (+)'
|
||||||
|
EditLabel.Width = 102
|
||||||
|
EditLabel.Height = 13
|
||||||
|
EditLabel.Caption = 'Code de rotation en +'
|
||||||
|
EditLabel.Layout = tlBottom
|
||||||
|
LabelPosition = lpLeft
|
||||||
|
LabelSpacing = 50
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = LabeledEditRpChange
|
||||||
|
end
|
||||||
|
object LabeledEditClic: TLabeledEdit
|
||||||
|
Left = 480
|
||||||
|
Top = 176
|
||||||
|
Width = 40
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Code ascii envoy'#233' par le clic bouton'
|
||||||
|
EditLabel.Width = 59
|
||||||
|
EditLabel.Height = 13
|
||||||
|
EditLabel.Caption = 'Code de clic'
|
||||||
|
EditLabel.Layout = tlBottom
|
||||||
|
LabelPosition = lpLeft
|
||||||
|
LabelSpacing = 50
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = LabeledEditClicChange
|
||||||
|
end
|
||||||
|
object LabeledEditNUM: TLabeledEdit
|
||||||
|
Left = 480
|
||||||
|
Top = 40
|
||||||
|
Width = 25
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Num'#233'ro de contr'#244'leur clavier USB (1 '#224' 10)'
|
||||||
|
EditLabel.Width = 134
|
||||||
|
EditLabel.Height = 13
|
||||||
|
EditLabel.Caption = 'Num'#233'ro de bloc clavier USB'
|
||||||
|
EditLabel.Layout = tlBottom
|
||||||
|
LabelPosition = lpLeft
|
||||||
|
LabelSpacing = 30
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = LabeledEditNUMChange
|
||||||
|
end
|
||||||
|
object LabeledEditF: TLabeledEdit
|
||||||
|
Left = 480
|
||||||
|
Top = 104
|
||||||
|
Width = 40
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Fonction F associ'#233'e au bouton'
|
||||||
|
EditLabel.Width = 100
|
||||||
|
EditLabel.Height = 13
|
||||||
|
EditLabel.Caption = 'Fonction F '#224' envoyer'
|
||||||
|
EditLabel.Layout = tlBottom
|
||||||
|
LabelPosition = lpLeft
|
||||||
|
LabelSpacing = 50
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = LabeledEditFChange
|
||||||
|
end
|
||||||
|
object LabeledEditIncr: TLabeledEdit
|
||||||
|
Left = 480
|
||||||
|
Top = 200
|
||||||
|
Width = 40
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Valeur de l'#39'incr'#233'ment sur une rotation'
|
||||||
|
EditLabel.Width = 105
|
||||||
|
EditLabel.Height = 13
|
||||||
|
EditLabel.Caption = 'Incr'#233'ment '#224' la rotation'
|
||||||
|
EditLabel.Layout = tlBottom
|
||||||
|
LabelPosition = lpLeft
|
||||||
|
LabelSpacing = 50
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = LabeledEditIncrChange
|
||||||
|
end
|
||||||
|
object ComboBoxUSBTr: TComboBox
|
||||||
|
Left = 416
|
||||||
|
Top = 240
|
||||||
|
Width = 153
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 7
|
||||||
|
OnChange = ComboBoxUSBTrChange
|
||||||
|
end
|
||||||
|
object LabeledEditFn: TLabeledEdit
|
||||||
|
Left = 536
|
||||||
|
Top = 104
|
||||||
|
Width = 16
|
||||||
|
Height = 21
|
||||||
|
Hint = '0 ou 1'
|
||||||
|
EditLabel.Width = 6
|
||||||
|
EditLabel.Height = 13
|
||||||
|
EditLabel.Caption = #224
|
||||||
|
EditLabel.Layout = tlBottom
|
||||||
|
LabelPosition = lpLeft
|
||||||
|
LabelSpacing = 5
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 8
|
||||||
|
OnChange = LabeledEditFnChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
object TabAvance: TTabSheet
|
object TabAvance: TTabSheet
|
||||||
Caption = 'Avanc'#233
|
Caption = 'Avanc'#233
|
||||||
ImageIndex = 10
|
ImageIndex = 11
|
||||||
object Label50: TLabel
|
object Label50: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 8
|
Top = 8
|
||||||
|
|||||||
+691
-204
File diff suppressed because it is too large
Load Diff
@@ -419,7 +419,7 @@ begin
|
|||||||
ligne:=1;
|
ligne:=1;
|
||||||
for i:=1 to Ntrains do
|
for i:=1 to Ntrains do
|
||||||
begin
|
begin
|
||||||
for j:=1 to 10 do
|
for j:=1 to NbDetArret do
|
||||||
if (trains[i].DetecteurArret[j].detecteur=adr) and (adr<>0) then
|
if (trains[i].DetecteurArret[j].detecteur=adr) and (adr<>0) then
|
||||||
begin
|
begin
|
||||||
s:='';
|
s:='';
|
||||||
@@ -666,7 +666,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure TFormConfCellTCO.EditAdrElementChange(Sender: TObject);
|
procedure TFormConfCellTCO.EditAdrElementChange(Sender: TObject);
|
||||||
var Adr,erreur,index,Bimage,x,y : integer;
|
var Adr,erreur,Bimage,x,y : integer;
|
||||||
begin
|
begin
|
||||||
if clicTCO or not(ConfCellTCO) or actualize then exit;
|
if clicTCO or not(ConfCellTCO) or actualize then exit;
|
||||||
if affevt then Affiche('TFormConfCellTCO.EditAdrElementChange',clyellow);
|
if affevt then Affiche('TFormConfCellTCO.EditAdrElementChange',clyellow);
|
||||||
@@ -697,11 +697,10 @@ begin
|
|||||||
|
|
||||||
if BImage=Id_signal then
|
if BImage=Id_signal then
|
||||||
begin
|
begin
|
||||||
index:=Index_Signal(adr);
|
{ index:=Index_Signal(adr);
|
||||||
if index=0 then exit
|
if index=0 then exit
|
||||||
else
|
else }
|
||||||
begin
|
begin
|
||||||
//Affiche('Feu '+intToSTR(Adr),clyellow);
|
|
||||||
affiche_tco(indexTCOcourant);
|
affiche_tco(indexTCOcourant);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
+2
-2
@@ -54,7 +54,7 @@ uses UnitPrinc,unitTCO;
|
|||||||
procedure arret_mesure ;
|
procedure arret_mesure ;
|
||||||
begin
|
begin
|
||||||
mesureTrains:=false;
|
mesureTrains:=false;
|
||||||
vitesse_loco('',0,trains[indexTrainMes].adresse,0,10);
|
vitesse_loco('',0,trains[indexTrainMes].adresse,0,10,ActionVitesse); // action vitesse pour ne pas générer d'event vitesse
|
||||||
with formMesure do
|
with formMesure do
|
||||||
begin
|
begin
|
||||||
ComboBoxTrains.Enabled:=true;
|
ComboBoxTrains.Enabled:=true;
|
||||||
@@ -219,7 +219,7 @@ begin
|
|||||||
|
|
||||||
|
|
||||||
mesureTrains:=true;
|
mesureTrains:=true;
|
||||||
vitesse_loco('',0,trains[indexTrainMes].adresse,v1,10);
|
vitesse_loco('',0,trains[indexTrainMes].adresse,v1,10,ActionVitesse); // ActionVitesse pour ne pas générer d'event_vitesse
|
||||||
|
|
||||||
LabelMesC.Visible:=true;
|
LabelMesC.Visible:=true;
|
||||||
LabelMesC.top:=178;
|
LabelMesC.top:=178;
|
||||||
|
|||||||
+5
-1
@@ -60,7 +60,7 @@ object FormModifAction: TFormModifAction
|
|||||||
Top = 64
|
Top = 64
|
||||||
Width = 729
|
Width = 729
|
||||||
Height = 337
|
Height = 337
|
||||||
ActivePage = TabSheetOp
|
ActivePage = TabSheetDecl
|
||||||
MultiLine = True
|
MultiLine = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object TabSheetDecl: TTabSheet
|
object TabSheetDecl: TTabSheet
|
||||||
@@ -684,6 +684,8 @@ object FormModifAction: TFormModifAction
|
|||||||
EditLabel.Caption = 'Adresse'
|
EditLabel.Caption = 'Adresse'
|
||||||
LabelPosition = lpLeft
|
LabelPosition = lpLeft
|
||||||
LabelSpacing = 10
|
LabelSpacing = 10
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnChange = LabeledEditAdresseChange
|
OnChange = LabeledEditAdresseChange
|
||||||
end
|
end
|
||||||
@@ -734,6 +736,8 @@ object FormModifAction: TFormModifAction
|
|||||||
EditLabel.Caption = 'Tempo x100ms'
|
EditLabel.Caption = 'Tempo x100ms'
|
||||||
LabelPosition = lpLeft
|
LabelPosition = lpLeft
|
||||||
LabelSpacing = 10
|
LabelSpacing = 10
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
OnChange = LabeledEditTempoFChange
|
OnChange = LabeledEditTempoFChange
|
||||||
end
|
end
|
||||||
|
|||||||
+229
-237
@@ -163,13 +163,11 @@ uses Unitprinc, UnitConfigCellTCO, UnitConfig;
|
|||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
// rend tous les composants invisibles
|
procedure efface_champs_declencheurs_conditions;
|
||||||
procedure efface_tous_parametres;
|
|
||||||
begin
|
begin
|
||||||
with FormModifAction do
|
with formModifAction do
|
||||||
begin
|
begin
|
||||||
//r:=Rect(
|
// déclencheurs
|
||||||
// r:=TRect(ListBoxDeclench.handle,0,i*10,ListBoxDeclench.width,16);
|
|
||||||
RadioEtatSignal.Visible:=false;
|
RadioEtatSignal.Visible:=false;
|
||||||
LabelAdresse.Visible:=false;
|
LabelAdresse.Visible:=false;
|
||||||
SpinEditEtat.Visible:=false;
|
SpinEditEtat.Visible:=false;
|
||||||
@@ -178,8 +176,33 @@ begin
|
|||||||
EditAdr2.Visible:=false;
|
EditAdr2.Visible:=false;
|
||||||
LabelTrain.Visible:=false;
|
LabelTrain.Visible:=false;
|
||||||
EditTrainDecl.Visible:=false;
|
EditTrainDecl.Visible:=false;
|
||||||
LabelPeriph.Visible:=false;
|
|
||||||
LabelEtat.Visible:=false;
|
LabelEtat.Visible:=false;
|
||||||
|
LabelInfoFonc.Visible:=false;
|
||||||
|
ButtonFonction.Visible:=false;
|
||||||
|
// conditions
|
||||||
|
Champ1.Visible:=false;
|
||||||
|
Champ2.Visible:=false;
|
||||||
|
SpinEditHeure1.visible:=false;
|
||||||
|
SpinEditMn1.visible:=false;
|
||||||
|
SpinEditHeure2.visible:=false;
|
||||||
|
SpinEditMn2.visible:=false;
|
||||||
|
LabelHeureDebut.Visible:=false;
|
||||||
|
LabelHeureFin.Visible:=false;
|
||||||
|
LabelEtat2.Visible:=false;
|
||||||
|
SpinEditEtat2.Visible:=false;
|
||||||
|
ChampTrain.Visible:=false;
|
||||||
|
ButtonVoirFonc.Visible:=false;
|
||||||
|
Label2InfoFonction.visible:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
// rend invisibles les champs opérations
|
||||||
|
procedure efface_champs_operations;
|
||||||
|
begin
|
||||||
|
with FormModifAction do
|
||||||
|
begin
|
||||||
|
LabelPeriph.Visible:=false;
|
||||||
LabeledEditTempoF.Visible:=false;
|
LabeledEditTempoF.Visible:=false;
|
||||||
LabeledEditTrain.Visible:=false;
|
LabeledEditTrain.Visible:=false;
|
||||||
SpeedButtonJoue.visible:=false;
|
SpeedButtonJoue.visible:=false;
|
||||||
@@ -192,21 +215,6 @@ begin
|
|||||||
labelEtatOp.Visible:=false;
|
labelEtatOp.Visible:=false;
|
||||||
RichEditInf.clear;
|
RichEditInf.clear;
|
||||||
ComboBoxAccComUSB.visible:=false;
|
ComboBoxAccComUSB.visible:=false;
|
||||||
Champ1.Visible:=false;
|
|
||||||
Champ2.Visible:=false;
|
|
||||||
LabelHeureDebut.Visible:=false;
|
|
||||||
LabelHeureFin.Visible:=false;
|
|
||||||
SpinEditHeure1.visible:=false;
|
|
||||||
SpinEditMn1.visible:=false;
|
|
||||||
SpinEditHeure2.visible:=false;
|
|
||||||
SpinEditMn2.visible:=false;
|
|
||||||
LabelEtat2.Visible:=false;
|
|
||||||
SpinEditEtat2.Visible:=false;
|
|
||||||
ChampTrain.Visible:=false;
|
|
||||||
ButtonVoirFonc.Visible:=false;
|
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
LabelInfoFonc.Visible:=false;
|
|
||||||
Label2InfoFonction.visible:=false;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -287,7 +295,8 @@ begin
|
|||||||
'Double clic pour valider/dévalider une opération';
|
'Double clic pour valider/dévalider une opération';
|
||||||
LabeledEditFonctionF.Hint:='Fonction F de 0 à 28';
|
LabeledEditFonctionF.Hint:='Fonction F de 0 à 28';
|
||||||
|
|
||||||
Efface_tous_parametres;
|
Efface_champs_operations;
|
||||||
|
Efface_champs_declencheurs_conditions;
|
||||||
PageControlAct.ActivePage:=TabSheetDecl;
|
PageControlAct.ActivePage:=TabSheetDecl;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -338,7 +347,7 @@ var
|
|||||||
i,erreur: Integer;
|
i,erreur: Integer;
|
||||||
ItemText: string;
|
ItemText: string;
|
||||||
begin
|
begin
|
||||||
//Affiche('Evt ListBoxOperationsDrawItem',clyellow);
|
if affevt then Affiche('Evt ListBoxOperationsDrawItem '+intToSTR(index),clyellow);
|
||||||
with ListBoxOperations do
|
with ListBoxOperations do
|
||||||
begin
|
begin
|
||||||
ItemText:=Items[index];
|
ItemText:=Items[index];
|
||||||
@@ -390,9 +399,9 @@ begin
|
|||||||
DeclZoneDet :
|
DeclZoneDet :
|
||||||
s:=s+'Zone détection '+intToSTR(Tablo_Action[i].adresse)+' '+intToSTR(Tablo_Action[i].adresse2);
|
s:=s+'Zone détection '+intToSTR(Tablo_Action[i].adresse)+' '+intToSTR(Tablo_Action[i].adresse2);
|
||||||
DeclDemarTrain :
|
DeclDemarTrain :
|
||||||
s:=s+'démarrage du train '+Tablo_Action[i].trainDecl+' au seuil de '+intToSTR(Tablo_Action[i].adresse);
|
s:=s+'démarrage du train '+Tablo_Action[i].trainDecl;
|
||||||
DeclArretTrain :
|
DeclArretTrain :
|
||||||
s:=s+'arrêt du train '+Tablo_Action[i].trainDecl+' au seuil de '+intToSTR(Tablo_Action[i].adresse);
|
s:=s+'arrêt du train '+Tablo_Action[i].trainDecl;
|
||||||
DeclSignal :
|
DeclSignal :
|
||||||
begin
|
begin
|
||||||
s:=s+'changement du signal '+intToSTR(Tablo_Action[i].adresse);
|
s:=s+'changement du signal '+intToSTR(Tablo_Action[i].adresse);
|
||||||
@@ -481,15 +490,187 @@ begin
|
|||||||
result:=s;
|
result:=s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure affiche_champs_operations(index,indexaction : integer);
|
||||||
|
var nb,act : integer;
|
||||||
|
begin
|
||||||
|
Nb:=Tablo_Action[index].NbOperations;
|
||||||
|
// si pas d'action sélectionnée et que la liste n'est pas nulle, sélectionner la première
|
||||||
|
if (Nb>0) and (indexAction=0) then
|
||||||
|
begin
|
||||||
|
indexAction:=1;
|
||||||
|
formModifAction.listBoxOperations.itemIndex:=indexaction;
|
||||||
|
formModifAction.listBoxOperations.Selected[indexaction-1]:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
efface_champs_operations;
|
||||||
|
|
||||||
|
if Nb>=indexAction then
|
||||||
|
begin
|
||||||
|
Act:=Tablo_Action[index].tabloop[indexAction].numoperation;
|
||||||
|
|
||||||
|
with formModifAction do
|
||||||
|
begin
|
||||||
|
case Act of
|
||||||
|
ActionAffTCO :
|
||||||
|
begin
|
||||||
|
LabeledEditAdresse.hint:='Numéro du TCO';
|
||||||
|
LabeledEditAdresse.Visible:=true;
|
||||||
|
LabeledEditAdresse.EditLabel.Caption:='TCO n°';
|
||||||
|
LabeledEditAdresse.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].NumTCO);
|
||||||
|
end;
|
||||||
|
ActionAccessoire :
|
||||||
|
begin
|
||||||
|
LabeledEditAdresse.hint:='Adresse d''accessoire sur le bus DCC';
|
||||||
|
LabeledEditAdresse.EditLabel.Caption:='Adresse';
|
||||||
|
LabeledEditAdresse.visible:=true;
|
||||||
|
SpinEditEtatop.Visible:=true;
|
||||||
|
labelEtatOp.Visible:=true;
|
||||||
|
SpinEditEtatop.MinValue:=0;
|
||||||
|
SpinEditEtatop.MaxValue:=2;
|
||||||
|
SpinEditEtatop.hint:='Etat de l''accessoire'+#13+
|
||||||
|
'0=nul'+#13+
|
||||||
|
'1=dévié'+#13+
|
||||||
|
'2=droit';
|
||||||
|
|
||||||
|
checkBoxRaz.Visible:=true;
|
||||||
|
LabeledEditAdresse.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
||||||
|
SpinEditEtatop.Value:=Tablo_Action[index].tabloop[indexAction].etat;
|
||||||
|
checkBoxRAZ.Checked:=Tablo_Action[index].tabloop[indexAction].zero;
|
||||||
|
end;
|
||||||
|
ActionVitesse :
|
||||||
|
begin
|
||||||
|
LabeledEditAdresse.EditLabel.Caption:='Vitesse';
|
||||||
|
LabeledEditAdresse.visible:=true;
|
||||||
|
LabeledEditAdresse.hint:='Vitesse de pilotage du train en crans';
|
||||||
|
LabeledEditTrain.Visible:=true;
|
||||||
|
LabeledEditTrain.EditLabel.Caption:='Train destinataire';
|
||||||
|
LabeledEditTrain.hint:='Nom unique du train';
|
||||||
|
LabeledEditAdresse.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].vitesse);
|
||||||
|
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].train;
|
||||||
|
end;
|
||||||
|
ActionCdePeriph :
|
||||||
|
begin
|
||||||
|
LabeledEditTrain.Visible:=true;
|
||||||
|
ComboBoxAccComUSB.Visible:=true;
|
||||||
|
LabelPeriph.Visible:=true;
|
||||||
|
LabeledEditTrain.EditLabel.Caption:='Commande';
|
||||||
|
LabeledEditTrain.Hint:='Commande Ascii';
|
||||||
|
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].chaine;
|
||||||
|
ComboBoxAccComUSB.itemIndex:=Tablo_Action[index].tabloop[indexAction].periph-1;
|
||||||
|
end;
|
||||||
|
ActionFonctionF :
|
||||||
|
begin
|
||||||
|
with SpinEditEtatop do
|
||||||
|
begin
|
||||||
|
Visible:=true;
|
||||||
|
MinValue:=0;
|
||||||
|
MaxValue:=1;
|
||||||
|
hint:='Etat 0 ou 1 de la fonction F';
|
||||||
|
end;
|
||||||
|
labelEtatOp.Visible:=true;
|
||||||
|
with LabeledEditTempoF do
|
||||||
|
begin
|
||||||
|
Visible:=true;
|
||||||
|
hint:='Valeur de la temporisation en 1/10ème de s'+#13+
|
||||||
|
'pour désactiver la fonction F'+#13+
|
||||||
|
'Si 0, la fonction F reste activée';
|
||||||
|
EditLabel.Caption:='Tempo (x100ms)';
|
||||||
|
Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].TempoF);
|
||||||
|
end;
|
||||||
|
LabeledEditTrain.Visible:=true;
|
||||||
|
LabeledEditTrain.EditLabel.Caption:='Train destinataire';
|
||||||
|
LabeledEditTrain.hint:='Nom unique du train';
|
||||||
|
SpinEditEtatOp.Text:=IntToSTR(Tablo_Action[index].tabloop[indexAction].etat);
|
||||||
|
LabeledEditFonctionF.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].fonctionF);
|
||||||
|
LabeledEditFonctionF.Visible:=true;
|
||||||
|
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].train;
|
||||||
|
end;
|
||||||
|
ActionSon :
|
||||||
|
begin
|
||||||
|
LabeledEditTrain.Visible:=true;
|
||||||
|
SpeedButtonJoue.Visible:=true;
|
||||||
|
SpeedButtonCharger.Visible:=true;
|
||||||
|
LabeledEditTrain.EditLabel.Caption:='Son';
|
||||||
|
LabeledEditTrain.Hint:='fichier son';
|
||||||
|
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].train;
|
||||||
|
end;
|
||||||
|
ActionTempo :
|
||||||
|
begin
|
||||||
|
LabeledEditTempoF.Visible:=true;
|
||||||
|
LabeledEditTempoF.EditLabel.Caption:='Temporisation (x100 ms)';
|
||||||
|
LabeledEditTempoF.hint:='Valeur en dixièmes de secondes';
|
||||||
|
LabeledEditTempoF.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].TempoF);
|
||||||
|
end;
|
||||||
|
ActionBoutonTCO :
|
||||||
|
begin
|
||||||
|
with LabeledEditAdresse do
|
||||||
|
begin
|
||||||
|
hint:='Numéro de bouton de TCO';
|
||||||
|
Visible:=true;
|
||||||
|
EditLabel.Caption:='Bouton';
|
||||||
|
text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
||||||
|
end;
|
||||||
|
With SpinEditEtatOp do
|
||||||
|
begin
|
||||||
|
Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].etat);
|
||||||
|
Visible:=true;
|
||||||
|
MinValue:=0;
|
||||||
|
MaxValue:=1;
|
||||||
|
hint:='Etat 0 ou 1 du bouton';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ActionAffecteMemoire :
|
||||||
|
begin
|
||||||
|
with LabeledEditAdresse do
|
||||||
|
begin
|
||||||
|
EditLabel.Caption:='Mémoire';
|
||||||
|
Visible:=true;
|
||||||
|
hint:='Numéro de mémoire';
|
||||||
|
text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
||||||
|
end;
|
||||||
|
with SpinEditEtatOp do
|
||||||
|
begin
|
||||||
|
Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].etat);
|
||||||
|
Visible:=true;
|
||||||
|
MinValue:=-999;
|
||||||
|
MaxValue:=999;
|
||||||
|
hint:='Valeur d''affectation de -999 à 999';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ActionIncMemoire :
|
||||||
|
begin
|
||||||
|
with LabeledEditAdresse do
|
||||||
|
begin
|
||||||
|
EditLabel.Caption:='Mémoire';
|
||||||
|
hint:='Numéro de mémoire';
|
||||||
|
Visible:=true;
|
||||||
|
text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ActionDecMemoire :
|
||||||
|
begin
|
||||||
|
with LabeledEditAdresse do
|
||||||
|
begin
|
||||||
|
EditLabel.Caption:='Mémoire';
|
||||||
|
hint:='Numéro de mémoire';
|
||||||
|
Visible:=true;
|
||||||
|
text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
// affiche les champs en fonction de l'index du tablo actionneur et de l'index de l'action
|
// affiche les champs en fonction de l'index du tablo actionneur et de l'index de l'action
|
||||||
procedure Aff_champs(index,IndexCond,IndexAction : integer);
|
procedure Aff_champs(index,IndexCond,IndexAction : integer);
|
||||||
var i,decl,act,cond,Nb,icone : integer;
|
var i,decl,act,cond,icone : integer;
|
||||||
s : string;
|
s : string;
|
||||||
begin
|
begin
|
||||||
if (index<1) then exit;
|
if (index<1) then exit;
|
||||||
if clicListe then exit;
|
if clicListe then exit;
|
||||||
clicliste:=true;
|
clicliste:=true;
|
||||||
// Affiche('Aff_champs('+intToSTR(index)+','+intToSTR(indexAction)+')',clYellow);
|
if affevt then Affiche('Aff_champs('+intToSTR(index)+', indexOperation='+intToSTR(indexAction)+')',clYellow);
|
||||||
decl:=Tablo_Action[index].declencheur;
|
decl:=Tablo_Action[index].declencheur;
|
||||||
formModifAction.ListBoxDeclench.ItemIndex:=decl-1;
|
formModifAction.ListBoxDeclench.ItemIndex:=decl-1;
|
||||||
// comboboxActions
|
// comboboxActions
|
||||||
@@ -515,6 +696,7 @@ begin
|
|||||||
FormModifAction.LabeledEditNomAct.Text:=Tablo_Action[index].NomAction;
|
FormModifAction.LabeledEditNomAct.Text:=Tablo_Action[index].NomAction;
|
||||||
|
|
||||||
// ListBox opérations
|
// ListBox opérations
|
||||||
|
|
||||||
with FormModifAction.ListBoxOperations do
|
with FormModifAction.ListBoxOperations do
|
||||||
begin
|
begin
|
||||||
clear;
|
clear;
|
||||||
@@ -535,7 +717,6 @@ begin
|
|||||||
if act=ActionIncMemoire then items.Add(Format('%d%s', [iconeActionIncMemoire, s]));
|
if act=ActionIncMemoire then items.Add(Format('%d%s', [iconeActionIncMemoire, s]));
|
||||||
if act=ActionDecMemoire then items.Add(Format('%d%s', [iconeActionDecMemoire, s]));
|
if act=ActionDecMemoire then items.Add(Format('%d%s', [iconeActionDecMemoire, s]));
|
||||||
|
|
||||||
|
|
||||||
// listboxOperations de la formConfig
|
// listboxOperations de la formConfig
|
||||||
if act<=ActionTempo then formConfig.ListBoxOperations.Items.add(Format('%d%s', [act-1, s]));
|
if act<=ActionTempo then formConfig.ListBoxOperations.Items.add(Format('%d%s', [act-1, s]));
|
||||||
if act=ActionBoutonTCO then formConfig.ListBoxOperations.items.Add(Format('%d%s', [IconeBouton, s]));
|
if act=ActionBoutonTCO then formConfig.ListBoxOperations.items.Add(Format('%d%s', [IconeBouton, s]));
|
||||||
@@ -575,6 +756,7 @@ begin
|
|||||||
if indexCond<>0 then itemIndex:=indexCond-1;
|
if indexCond<>0 then itemIndex:=indexCond-1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// listBoxActions de la formConfig
|
// listBoxActions de la formConfig
|
||||||
FormConfig.ListBoxActions.Clear;
|
FormConfig.ListBoxActions.Clear;
|
||||||
for i:=1 to maxTablo_act do
|
for i:=1 to maxTablo_act do
|
||||||
@@ -583,7 +765,7 @@ begin
|
|||||||
formConfig.ListBoxActions.Items.add(s);
|
formConfig.ListBoxActions.Items.add(s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
efface_tous_parametres;
|
efface_champs_declencheurs_conditions;
|
||||||
|
|
||||||
// déclencheurs
|
// déclencheurs
|
||||||
with FormModifAction do
|
with FormModifAction do
|
||||||
@@ -595,40 +777,24 @@ begin
|
|||||||
LabelHeure.visible:=true;
|
LabelHeure.visible:=true;
|
||||||
LabelAdresse.visible:=true;
|
LabelAdresse.visible:=true;
|
||||||
EditAdr.Visible:=true;
|
EditAdr.Visible:=true;
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
LabelAdresse.Caption:='Heure';
|
LabelAdresse.Caption:='Heure';
|
||||||
EditAdr.Hint:='Heure du déclencheur';
|
EditAdr.Hint:='Heure du déclencheur';
|
||||||
EditAdr2.Hint:='Minute du déclencheur';
|
EditAdr2.Hint:='Minute du déclencheur';
|
||||||
EditAdr2.Visible:=true;
|
EditAdr2.Visible:=true;
|
||||||
LabelEtat.Visible:=false;
|
|
||||||
SpinEditEtat.Visible:=false;
|
|
||||||
LabelTrain.Visible:=false;
|
|
||||||
EditTrainDecl.Visible:=false;
|
|
||||||
RichEditInf.Lines.Add('Déclenchement par l''horloge');
|
RichEditInf.Lines.Add('Déclenchement par l''horloge');
|
||||||
ImageIcone.Picture:=nil;
|
ImageIcone.Picture:=nil;
|
||||||
LabelInfoFonc.Visible:=false;
|
|
||||||
formConfCellTCO.ImageListIcones.GetBitmap(IconeHorloge,ImageIcone.Picture.Bitmap);
|
formConfCellTCO.ImageListIcones.GetBitmap(IconeHorloge,ImageIcone.Picture.Bitmap);
|
||||||
ImageIcone.repaint;
|
ImageIcone.repaint;
|
||||||
end;
|
end;
|
||||||
DeclPeriph :
|
DeclPeriph :
|
||||||
begin
|
begin
|
||||||
EditTrainDecl.Text:=Tablo_Action[index].ordrePeriph;
|
EditTrainDecl.Text:=Tablo_Action[index].ordrePeriph;
|
||||||
LabelHeure.visible:=false;
|
|
||||||
LabelAdresse.visible:=false;
|
|
||||||
EditAdr.Visible:=false;
|
|
||||||
EditAdr2.Visible:=false;
|
|
||||||
LabelEtat.Visible:=false;
|
|
||||||
|
|
||||||
SpinEditEtat.Visible:=false;
|
|
||||||
LabelTrain.Visible:=false;
|
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
EditTrainDecl.Visible:=true;
|
EditTrainDecl.Visible:=true;
|
||||||
EditTrainDecl.Hint:='Chaîne ASCII';
|
EditTrainDecl.Hint:='Chaîne ASCII';
|
||||||
|
|
||||||
LabelTrain.visible:=true;
|
LabelTrain.visible:=true;
|
||||||
LabelTrain.Caption:='Commande du périphérique';
|
LabelTrain.Caption:='Commande du périphérique';
|
||||||
RichEditInf.Lines.Add('Déclenchement par chaîne ASCII depuis un périphérique COM/USB - Socket');
|
RichEditInf.Lines.Add('Déclenchement par chaîne ASCII depuis un périphérique COM/USB - Socket');
|
||||||
LabelInfoFonc.Visible:=false;
|
|
||||||
|
|
||||||
ImageIcone.Picture:=nil;
|
ImageIcone.Picture:=nil;
|
||||||
formConfCellTCO.ImageListIcones.GetBitmap(IconePeriph,ImageIcone.Picture.Bitmap);
|
formConfCellTCO.ImageListIcones.GetBitmap(IconePeriph,ImageIcone.Picture.Bitmap);
|
||||||
@@ -651,18 +817,11 @@ begin
|
|||||||
visible:=true;
|
visible:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
LabelHeure.visible:=false;
|
|
||||||
LabelAdresse.caption:='Adresse';
|
LabelAdresse.caption:='Adresse';
|
||||||
LabelAdresse.visible:=true;
|
LabelAdresse.visible:=true;
|
||||||
EditAdr.Hint:='Adresse de l''accessoire sur le bus';
|
EditAdr.Hint:='Adresse de l''accessoire sur le bus';
|
||||||
EditAdr.Visible:=true;
|
EditAdr.Visible:=true;
|
||||||
EditAdr2.Visible:=false;
|
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
LabelEtat.Visible:=true;
|
LabelEtat.Visible:=true;
|
||||||
LabelInfoFonc.Visible:=false;
|
|
||||||
|
|
||||||
LabelTrain.Visible:=false;
|
|
||||||
EditTrainDecl.Visible:=false;
|
|
||||||
RichEditInf.Lines.Add('Accessoire sur le bus DCC (aiguillage)');
|
RichEditInf.Lines.Add('Accessoire sur le bus DCC (aiguillage)');
|
||||||
ImageIcone.Picture:=nil;
|
ImageIcone.Picture:=nil;
|
||||||
formConfCellTCO.ImageListIcones.GetBitmap(IconeAccessoire,ImageIcone.Picture.Bitmap);
|
formConfCellTCO.ImageListIcones.GetBitmap(IconeAccessoire,ImageIcone.Picture.Bitmap);
|
||||||
@@ -674,18 +833,13 @@ begin
|
|||||||
EditAdr.text:=intToSTR(Tablo_Action[index].adresse);
|
EditAdr.text:=intToSTR(Tablo_Action[index].adresse);
|
||||||
EditTrainDecl.Visible:=true;
|
EditTrainDecl.Visible:=true;
|
||||||
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
EdittrainDecl.Hint:='Train(s) déclencheur(s) séparés par des virgules pour lesquels la condition s''applique.'
|
EdittrainDecl.Hint:='Train(s) déclencheur(s) séparés par des virgules pour lesquels la condition s''applique.'
|
||||||
+#13+'Mettre X pour tous les trains.'+#13+'Déclenchement par actionneur uniquement';
|
+#13+'Mettre X pour tous les trains.'+#13+'Déclenchement par actionneur uniquement';
|
||||||
LabelAdresse.visible:=true;
|
|
||||||
EditAdr.Visible:=true;
|
EditAdr.Visible:=true;
|
||||||
EditAdr.Hint:='Adresse du détecteur sur le bus de rétrosignalisation '+#13+'ou de l''actionneur CDM';
|
EditAdr.Hint:='Adresse du détecteur sur le bus de rétrosignalisation '+#13+'ou de l''actionneur CDM';
|
||||||
LabelHeure.visible:=false;
|
|
||||||
EditAdr2.Visible:=false;
|
|
||||||
LabelAdresse.Caption:='Adresse';
|
LabelAdresse.Caption:='Adresse';
|
||||||
LabelEtat.Visible:=true;
|
LabelEtat.Visible:=true;
|
||||||
LabelInfoFonc.Visible:=false;
|
LabelAdresse.Visible:=true;
|
||||||
|
|
||||||
with SpinEditEtat do
|
with SpinEditEtat do
|
||||||
begin
|
begin
|
||||||
text:=intToSTR(Tablo_Action[index].etat);
|
text:=intToSTR(Tablo_Action[index].etat);
|
||||||
@@ -697,7 +851,6 @@ begin
|
|||||||
ShowHint:=true;
|
ShowHint:=true;
|
||||||
visible:=true;
|
visible:=true;
|
||||||
end;
|
end;
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
LabelTrain.Visible:=true;
|
LabelTrain.Visible:=true;
|
||||||
LabelTrain.Caption:='Train déclencheur';
|
LabelTrain.Caption:='Train déclencheur';
|
||||||
s:='Déclenchement par détecteur/actionneur suivant son état et un train, un groupe de trains ou tous les trains.'+#13;
|
s:='Déclenchement par détecteur/actionneur suivant son état et un train, un groupe de trains ou tous les trains.'+#13;
|
||||||
@@ -719,11 +872,9 @@ begin
|
|||||||
EditAdr2.Hint:='Adresse2 de la zone de détection du déclencheur';
|
EditAdr2.Hint:='Adresse2 de la zone de détection du déclencheur';
|
||||||
LabelAdresse.visible:=true;
|
LabelAdresse.visible:=true;
|
||||||
EditAdr.Visible:=true;
|
EditAdr.Visible:=true;
|
||||||
LabelHeure.visible:=false;
|
|
||||||
EditAdr2.Visible:=true;
|
EditAdr2.Visible:=true;
|
||||||
LabelAdresse.Caption:='Adresse';
|
LabelAdresse.Caption:='Adresse';
|
||||||
LabelEtat.Visible:=true;
|
LabelEtat.Visible:=true;
|
||||||
LabelInfoFonc.Visible:=false;
|
|
||||||
|
|
||||||
EditTrainDecl.Visible:=true;
|
EditTrainDecl.Visible:=true;
|
||||||
EdittrainDecl.Hint:='Train(s) déclencheur(s) séparés par des virgules pour lesquels la condition s''applique.'
|
EdittrainDecl.Hint:='Train(s) déclencheur(s) séparés par des virgules pour lesquels la condition s''applique.'
|
||||||
@@ -740,7 +891,6 @@ begin
|
|||||||
ShowHint:=true;
|
ShowHint:=true;
|
||||||
visible:=true;
|
visible:=true;
|
||||||
end;
|
end;
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
LabelTrain.Visible:=true;
|
LabelTrain.Visible:=true;
|
||||||
LabelTrain.Caption:='Train déclencheur';
|
LabelTrain.Caption:='Train déclencheur';
|
||||||
RichEditInf.Lines.Add('Déclenchement par zones de détections contigües suivant son état et un train, un groupe de trains ou tous les trains.');
|
RichEditInf.Lines.Add('Déclenchement par zones de détections contigües suivant son état et un train, un groupe de trains ou tous les trains.');
|
||||||
@@ -753,16 +903,10 @@ begin
|
|||||||
begin
|
begin
|
||||||
LabelTrain.visible:=true;
|
LabelTrain.visible:=true;
|
||||||
EditTrainDecl.Visible:=true;
|
EditTrainDecl.Visible:=true;
|
||||||
LabelAdresse.Visible:=true;
|
|
||||||
LabelAdresse.caption:='Seuil de vitesse';
|
|
||||||
EditAdr.Visible:=true;
|
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
EdittrainDecl.Hint:='Train déclencheur unique';
|
EdittrainDecl.Hint:='Train déclencheur unique';
|
||||||
LabelInfoFonc.Visible:=false;
|
|
||||||
EditADR.Hint:='Seuil de vitesse de démarrage du train ';
|
|
||||||
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
||||||
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
|
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
|
||||||
RichEditInf.Lines.Add('Déclenchement par démarrage d''un train à un seuil donné');
|
RichEditInf.Lines.Add('Déclenchement par démarrage d''un train');
|
||||||
ImageIcone.Picture:=nil;
|
ImageIcone.Picture:=nil;
|
||||||
formConfCellTCO.ImageListIcones.GetBitmap(IconeDemarTrain,ImageIcone.Picture.Bitmap);
|
formConfCellTCO.ImageListIcones.GetBitmap(IconeDemarTrain,ImageIcone.Picture.Bitmap);
|
||||||
ImageIcone.repaint;
|
ImageIcone.repaint;
|
||||||
@@ -772,17 +916,11 @@ begin
|
|||||||
begin
|
begin
|
||||||
LabelTrain.visible:=true;
|
LabelTrain.visible:=true;
|
||||||
EditTrainDecl.Visible:=true;
|
EditTrainDecl.Visible:=true;
|
||||||
LabelAdresse.Visible:=true;
|
|
||||||
LabelAdresse.caption:='Seuil de vitesse';
|
|
||||||
EdittrainDecl.Hint:='Train déclencheur unique';
|
EdittrainDecl.Hint:='Train déclencheur unique';
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
EditAdr.Visible:=true;
|
|
||||||
EditADR.Hint:='Seuil de vitesse d''arrêt du train';
|
|
||||||
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
|
||||||
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
|
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
|
||||||
RichEditInf.Lines.Add('Déclenchement par arrêt d''un train à un seuil donné');
|
RichEditInf.Lines.Add('Déclenchement par arrêt d''un train');
|
||||||
ImageIcone.Picture:=nil;
|
ImageIcone.Picture:=nil;
|
||||||
LabelInfoFonc.Visible:=false;
|
|
||||||
formConfCellTCO.ImageListIcones.GetBitmap(IconeArretTrain,ImageIcone.Picture.Bitmap);
|
formConfCellTCO.ImageListIcones.GetBitmap(IconeArretTrain,ImageIcone.Picture.Bitmap);
|
||||||
ImageIcone.repaint;
|
ImageIcone.repaint;
|
||||||
end;
|
end;
|
||||||
@@ -794,12 +932,10 @@ begin
|
|||||||
RadioEtatSignal.ItemIndex:=Tablo_Action[index].Etat;
|
RadioEtatSignal.ItemIndex:=Tablo_Action[index].Etat;
|
||||||
LabelAdresse.Caption:='Adresse';
|
LabelAdresse.Caption:='Adresse';
|
||||||
EditAdr.Hint:='Adresse de base du signal';
|
EditAdr.Hint:='Adresse de base du signal';
|
||||||
ButtonFonction.Visible:=false;
|
|
||||||
EditAdr.Visible:=true;
|
EditAdr.Visible:=true;
|
||||||
RadioEtatSignal.Visible:=true;
|
RadioEtatSignal.Visible:=true;
|
||||||
RadioEtatSignal.Left:=16;
|
RadioEtatSignal.Left:=16;
|
||||||
RadioEtatSignal.top:=64;
|
RadioEtatSignal.top:=64;
|
||||||
LabelInfoFonc.Visible:=false;
|
|
||||||
RichEditInf.Lines.Add('Déclenchement par changement d''état d''un signal');
|
RichEditInf.Lines.Add('Déclenchement par changement d''état d''un signal');
|
||||||
ImageIcone.Picture:=nil;
|
ImageIcone.Picture:=nil;
|
||||||
formConfCellTCO.ImageListIcones.GetBitmap(IconeSignal,ImageIcone.Picture.Bitmap);
|
formConfCellTCO.ImageListIcones.GetBitmap(IconeSignal,ImageIcone.Picture.Bitmap);
|
||||||
@@ -810,18 +946,16 @@ begin
|
|||||||
begin
|
begin
|
||||||
LabelAdresse.Visible:=true; // numéro de fonction
|
LabelAdresse.Visible:=true; // numéro de fonction
|
||||||
LabelAdresse.caption:='Numéro de fonction';
|
LabelAdresse.caption:='Numéro de fonction';
|
||||||
EditAdr.Visible:=false;
|
|
||||||
ButtonFonction.Visible:=true;
|
ButtonFonction.Visible:=true;
|
||||||
RadioEtatSignal.visible:=false;
|
|
||||||
EditAdr2.Visible:=true; // entrée le la fonction
|
EditAdr2.Visible:=true; // entrée le la fonction
|
||||||
EditAdr2.Text:=IntToSTR(tablo_action[index].adresse);
|
EditAdr2.Text:=IntToSTR(tablo_action[index].adresse);
|
||||||
RadioEtatSignal.Visible:=false;
|
|
||||||
ImageIcone.Picture:=nil;
|
ImageIcone.Picture:=nil;
|
||||||
formConfCellTCO.ImageListIcones.GetBitmap(IconeFonction,ImageIcone.Picture.Bitmap);
|
formConfCellTCO.ImageListIcones.GetBitmap(IconeFonction,ImageIcone.Picture.Bitmap);
|
||||||
ImageIcone.repaint;
|
ImageIcone.repaint;
|
||||||
LabelInfoFonc.Visible:=true;
|
LabelInfoFonc.Visible:=true;
|
||||||
RichEditInf.Lines.Add('Déclenchement par fonction logique');
|
RichEditInf.Lines.Add('Déclenchement par fonction logique');
|
||||||
LabelInfoFonc.Caption:=NomFonction[index];
|
if (tablo_action[index].adresse>0) and (tablo_action[index].adresse<NbreFL) then LabelInfoFonc.Caption:=NomFonction[tablo_action[index].adresse]
|
||||||
|
else LabelInfoFonc.Caption:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@@ -845,7 +979,6 @@ begin
|
|||||||
ChampTrain.Hint:='Nom du train unique pour la condition';
|
ChampTrain.Hint:='Nom du train unique pour la condition';
|
||||||
champ1.Visible:=true;
|
champ1.Visible:=true;
|
||||||
champ2.Visible:=true;
|
champ2.Visible:=true;
|
||||||
ButtonVoirFonc.Visible:=false;
|
|
||||||
ChampTrain.Visible:=true;
|
ChampTrain.Visible:=true;
|
||||||
end;
|
end;
|
||||||
CondPosAcc :
|
CondPosAcc :
|
||||||
@@ -860,7 +993,6 @@ begin
|
|||||||
'2=droit';
|
'2=droit';
|
||||||
Champ1.EditLabel.Caption:='Adresse'+#13+'acc';
|
Champ1.EditLabel.Caption:='Adresse'+#13+'acc';
|
||||||
champ1.Visible:=true;
|
champ1.Visible:=true;
|
||||||
ButtonVoirFonc.Visible:=false;
|
|
||||||
labelEtat2.Visible:=true;
|
labelEtat2.Visible:=true;
|
||||||
SpinEditEtat2.visible:=true;
|
SpinEditEtat2.visible:=true;
|
||||||
SpinEditEtat2.MinValue:=0;
|
SpinEditEtat2.MinValue:=0;
|
||||||
@@ -877,7 +1009,6 @@ begin
|
|||||||
SpinEditHeure2.visible:=true;
|
SpinEditHeure2.visible:=true;
|
||||||
SpinEditMn1.visible:=true;
|
SpinEditMn1.visible:=true;
|
||||||
SpinEditMn2.visible:=true;
|
SpinEditMn2.visible:=true;
|
||||||
ButtonVoirFonc.Visible:=false;
|
|
||||||
LabelHeureDebut.Visible:=true;
|
LabelHeureDebut.Visible:=true;
|
||||||
LabelHeureFin.Visible:=true;
|
LabelHeureFin.Visible:=true;
|
||||||
end;
|
end;
|
||||||
@@ -887,7 +1018,6 @@ begin
|
|||||||
champ1.editLabel.Caption:='Adresse du signal';
|
champ1.editLabel.Caption:='Adresse du signal';
|
||||||
champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
|
champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
|
||||||
champ1.Visible:=true;
|
champ1.Visible:=true;
|
||||||
ButtonVoirFonc.Visible:=false;
|
|
||||||
champTrain.Visible:=true;
|
champTrain.Visible:=true;
|
||||||
end;
|
end;
|
||||||
condFonction :
|
condFonction :
|
||||||
@@ -897,7 +1027,6 @@ begin
|
|||||||
champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
|
champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
|
||||||
champ1.Visible:=true;
|
champ1.Visible:=true;
|
||||||
ButtonVoirFonc.Visible:=true;
|
ButtonVoirFonc.Visible:=true;
|
||||||
champTrain.Visible:=false;
|
|
||||||
Label2InfoFonction.Visible:=true;
|
Label2InfoFonction.Visible:=true;
|
||||||
Label2InfoFonction.Caption:=NomFonction[Tablo_Action[index].tabloCond[indexCond].adresse];
|
Label2InfoFonction.Caption:=NomFonction[Tablo_Action[index].tabloCond[indexCond].adresse];
|
||||||
end;
|
end;
|
||||||
@@ -907,9 +1036,6 @@ begin
|
|||||||
champ1.editLabel.Caption:='Numéro de bouton TCO';
|
champ1.editLabel.Caption:='Numéro de bouton TCO';
|
||||||
champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
|
champTrain.Text:=Tablo_Action[index].tabloCond[indexCond].train;
|
||||||
champ1.Visible:=true;
|
champ1.Visible:=true;
|
||||||
ButtonVoirFonc.Visible:=false;
|
|
||||||
champTrain.Visible:=false;
|
|
||||||
Label2InfoFonction.Visible:=false;
|
|
||||||
end;
|
end;
|
||||||
condMemoireEgal,CondMemoireInf,CondMemoireSup :
|
condMemoireEgal,CondMemoireInf,CondMemoireSup :
|
||||||
begin
|
begin
|
||||||
@@ -925,137 +1051,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Nb:=Tablo_Action[index].NbOperations;
|
Efface_champs_operations;
|
||||||
|
Affiche_champs_operations(index,indexaction);
|
||||||
|
|
||||||
// si pas d'action sélectionnée et que la liste n'est pas nulle, sélectionner la première
|
|
||||||
if (Nb>0) and (indexAction=0) then
|
|
||||||
begin
|
|
||||||
indexAction:=1;
|
|
||||||
formModifAction.listBoxOperations.itemIndex:=indexaction;
|
|
||||||
formModifAction.listBoxOperations.Selected[indexaction-1]:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if Nb>=indexAction then
|
|
||||||
begin
|
|
||||||
|
|
||||||
Act:=Tablo_Action[index].tabloop[indexAction].numoperation;
|
|
||||||
|
|
||||||
with formModifAction do
|
|
||||||
begin
|
|
||||||
|
|
||||||
case Act of
|
|
||||||
ActionAffTCO :
|
|
||||||
begin
|
|
||||||
LabeledEditAdresse.Visible:=true;
|
|
||||||
LabeledEditAdresse.EditLabel.Caption:='TCO n°';
|
|
||||||
LabeledEditAdresse.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].NumTCO);
|
|
||||||
end;
|
|
||||||
ActionAccessoire :
|
|
||||||
begin
|
|
||||||
LabeledEditAdresse.EditLabel.Caption:='Adresse';
|
|
||||||
LabeledEditAdresse.visible:=true;
|
|
||||||
SpinEditEtatop.Visible:=true;
|
|
||||||
labelEtatOp.Visible:=true;
|
|
||||||
SpinEditEtatop.MinValue:=0;
|
|
||||||
SpinEditEtatop.MaxValue:=2;
|
|
||||||
SpinEditEtatop.hint:='Etat de l''accessoire'+#13+
|
|
||||||
'0=nul'+#13+
|
|
||||||
'1=dévié'+#13+
|
|
||||||
'2=droit';
|
|
||||||
|
|
||||||
checkBoxRaz.Visible:=true;
|
|
||||||
LabeledEditAdresse.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
|
||||||
SpinEditEtatop.Value:=Tablo_Action[index].tabloop[indexAction].etat;
|
|
||||||
checkBoxRAZ.Checked:=Tablo_Action[index].tabloop[indexAction].zero;
|
|
||||||
end;
|
|
||||||
ActionVitesse :
|
|
||||||
begin
|
|
||||||
LabeledEditAdresse.EditLabel.Caption:='Vitesse';
|
|
||||||
LabeledEditAdresse.visible:=true;
|
|
||||||
LabeledEditTrain.Visible:=true;
|
|
||||||
LabeledEditTrain.EditLabel.Caption:='Train destinataire';
|
|
||||||
LabeledEditTrain.hint:='Nom unique du train';
|
|
||||||
LabeledEditAdresse.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].vitesse);
|
|
||||||
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].train;
|
|
||||||
end;
|
|
||||||
ActionCdePeriph :
|
|
||||||
begin
|
|
||||||
LabeledEditTrain.Visible:=true;
|
|
||||||
ComboBoxAccComUSB.Visible:=true;
|
|
||||||
LabelPeriph.Visible:=true;
|
|
||||||
LabeledEditTrain.EditLabel.Caption:='Commande';
|
|
||||||
LabeledEditTrain.Hint:='Commande Ascii';
|
|
||||||
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].chaine;
|
|
||||||
ComboBoxAccComUSB.itemIndex:=Tablo_Action[index].tabloop[indexAction].periph-1;
|
|
||||||
end;
|
|
||||||
ActionFonctionF :
|
|
||||||
begin
|
|
||||||
SpinEditEtatop.Visible:=true;
|
|
||||||
SpinEditEtatop.MinValue:=0;
|
|
||||||
SpinEditEtatop.MaxValue:=1;
|
|
||||||
|
|
||||||
labelEtatOp.Visible:=true;
|
|
||||||
LabeledEditFonctionF.Visible:=true;
|
|
||||||
LabeledEditTempoF.Visible:=true;
|
|
||||||
LabeledEditTrain.EditLabel.Caption:='Train destinataire';
|
|
||||||
LabeledEditFonctionF.EditLabel.Caption:='Fonction F';
|
|
||||||
LabeledEditTrain.Visible:=true;
|
|
||||||
LabeledEditTrain.hint:='Nom unique du train';
|
|
||||||
SpinEditEtatOp.Text:=IntToSTR(Tablo_Action[index].tabloop[indexAction].etat);
|
|
||||||
LabeledEditFonctionF.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].fonctionF);
|
|
||||||
LabeledEditTempoF.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].TempoF);
|
|
||||||
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].train;
|
|
||||||
end;
|
|
||||||
ActionSon :
|
|
||||||
begin
|
|
||||||
LabeledEditTrain.Visible:=true;
|
|
||||||
SpeedButtonJoue.Visible:=true;
|
|
||||||
SpeedButtonCharger.Visible:=true;
|
|
||||||
LabeledEditTrain.EditLabel.Caption:='Son';
|
|
||||||
LabeledEditTrain.Hint:='fichier son';
|
|
||||||
LabeledEditTrain.Text:=Tablo_Action[index].tabloop[indexAction].train;
|
|
||||||
end;
|
|
||||||
ActionTempo :
|
|
||||||
begin
|
|
||||||
LabeledEditTempoF.Visible:=true;
|
|
||||||
LabeledEditTempoF.EditLabel.Caption:='Temporisation (x100 ms)';
|
|
||||||
LabeledEditTempoF.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].TempoF);
|
|
||||||
end;
|
|
||||||
ActionBoutonTCO :
|
|
||||||
begin
|
|
||||||
LabeledEditAdresse.Visible:=true;
|
|
||||||
LabeledEditAdresse.EditLabel.Caption:='Bouton';
|
|
||||||
LabeledEditAdresse.text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
|
||||||
SpinEditEtatOp.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].etat);
|
|
||||||
SpinEditEtatOp.Visible:=true;
|
|
||||||
SpinEditEtatOp.MinValue:=0;
|
|
||||||
SpinEditEtatOp.MaxValue:=1;
|
|
||||||
end;
|
|
||||||
ActionAffecteMemoire :
|
|
||||||
begin
|
|
||||||
LabeledEditAdresse.EditLabel.Caption:='Mémoire';
|
|
||||||
LabeledEditAdresse.Visible:=true;
|
|
||||||
LabeledEditAdresse.text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
|
||||||
SpinEditEtatOp.Text:=intToSTR(Tablo_Action[index].tabloop[indexAction].etat);
|
|
||||||
SpinEditEtatOp.Visible:=true;
|
|
||||||
SpinEditEtatOp.MinValue:=-999;
|
|
||||||
SpinEditEtatOp.MaxValue:=999;
|
|
||||||
end;
|
|
||||||
ActionIncMemoire :
|
|
||||||
begin
|
|
||||||
LabeledEditAdresse.EditLabel.Caption:='Mémoire';
|
|
||||||
LabeledEditAdresse.Visible:=true;
|
|
||||||
LabeledEditAdresse.text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
|
||||||
end;
|
|
||||||
ActionDecMemoire :
|
|
||||||
begin
|
|
||||||
LabeledEditAdresse.EditLabel.Caption:='Mémoire';
|
|
||||||
LabeledEditAdresse.Visible:=true;
|
|
||||||
LabeledEditAdresse.text:=intToSTR(Tablo_Action[index].tabloop[indexAction].adresse);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
clicliste:=false;
|
clicliste:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -1250,6 +1248,7 @@ begin
|
|||||||
|
|
||||||
ItemIndex:=indexSrc+1;
|
ItemIndex:=indexSrc+1;
|
||||||
end;
|
end;
|
||||||
|
Config_Modifie:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure maj_combocactions(i : integer);
|
procedure maj_combocactions(i : integer);
|
||||||
@@ -1353,10 +1352,10 @@ end;
|
|||||||
procedure TFormModifAction.ListBoxOperationsMouseDown(Sender: TObject;
|
procedure TFormModifAction.ListBoxOperationsMouseDown(Sender: TObject;
|
||||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
begin
|
begin
|
||||||
//Affiche('Clic ListBoxOperations',clyellow);
|
if affevt then Affiche('Clic ListBoxOperations',clyellow);
|
||||||
ClicAction:=ListBoxOperations.itemindex;
|
ClicAction:=ListBoxOperations.itemindex;
|
||||||
if ClicAction<0 then exit;
|
if ClicAction<0 then exit;
|
||||||
Aff_champs(ligneclicAct+1,1,ClicAction+1);
|
Affiche_champs_operations(ligneclicAct+1,ClicAction+1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormModifAction.LabeledEditAdresseChange(Sender: TObject);
|
procedure TFormModifAction.LabeledEditAdresseChange(Sender: TObject);
|
||||||
@@ -1456,6 +1455,7 @@ begin
|
|||||||
|
|
||||||
Tablo_Action[ligneclicAct+1].declencheur:=i+1;
|
Tablo_Action[ligneclicAct+1].declencheur:=i+1;
|
||||||
Aff_champs(ligneclicAct+1,0,0);
|
Aff_champs(ligneclicAct+1,0,0);
|
||||||
|
//aff_champs_declencheur(
|
||||||
ListBoxDeclench.Refresh;
|
ListBoxDeclench.Refresh;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -1739,32 +1739,24 @@ begin
|
|||||||
if (nb<1) or clicliste then exit;
|
if (nb<1) or clicliste then exit;
|
||||||
if key=VK_delete then supprime_operation;
|
if key=VK_delete then supprime_operation;
|
||||||
|
|
||||||
exit; // interfére,ce avec montée baisse
|
|
||||||
if ord(Key)=VK_UP then
|
if ord(Key)=VK_UP then
|
||||||
begin
|
begin
|
||||||
clicListe:=true;
|
|
||||||
//with FormModifAction.ListBoxOperations.Items do
|
|
||||||
begin
|
begin
|
||||||
if clicAction>0 then
|
if clicAction>0 then
|
||||||
begin
|
begin
|
||||||
dec(clicaction);
|
dec(clicaction);
|
||||||
Aff_champs(ligneclicAct+1,ClicCond+1,ClicAction+1);
|
Affiche_champs_operations(ligneclicAct+1,ClicAction+1);
|
||||||
Formconfig.ListBoxactions.Itemindex:=clicaction;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ord(Key)=VK_DOWN then
|
if ord(Key)=VK_DOWN then
|
||||||
begin
|
begin
|
||||||
//if clicListe then exit;
|
|
||||||
clicListe:=true;
|
|
||||||
//with Formconfig.ListBoxactions.Items do
|
|
||||||
begin
|
begin
|
||||||
if clicaction<nb-1 then
|
if clicaction<nb-1 then
|
||||||
begin
|
begin
|
||||||
inc(clicaction);
|
inc(clicaction);
|
||||||
Aff_champs(ligneclicAct+1,ClicCond+1,ClicAction+1);
|
Affiche_champs_operations(ligneclicAct+1,ClicAction+1);
|
||||||
Formconfig.ListBoxactions.Itemindex:=clicaction;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -1785,13 +1777,13 @@ end;
|
|||||||
|
|
||||||
procedure TFormModifAction.ButtonFonctionClick(Sender: TObject);
|
procedure TFormModifAction.ButtonFonctionClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
FoncCourante:=Tablo_Action[ligneClicAct+1].adresse;
|
||||||
|
if (FoncCourante<=0) or (FoncCourante>NbreFL) then exit;
|
||||||
|
|
||||||
formModifAction.Close;
|
formModifAction.Close;
|
||||||
formconfig.PageControl.ActivePage:=formconfig.TabSheetFonctions;
|
formconfig.PageControl.ActivePage:=formconfig.TabSheetFonctions;
|
||||||
|
formConfig.comboBoxFL.ItemIndex:=FoncCourante-1;
|
||||||
FoncCourante:=Tablo_Action[ligneClicAct+1].adresse;
|
ComboBoxFL_mizajour;
|
||||||
|
|
||||||
FormConfig.ComboBoxFL.ItemIndex:=FoncCourante-1;
|
|
||||||
fabrique_treeview(FoncCourante);
|
|
||||||
formconfig.show;
|
formconfig.show;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -73,6 +73,7 @@ type
|
|||||||
// code des aspects des signaux
|
// code des aspects des signaux
|
||||||
const
|
const
|
||||||
|
|
||||||
|
// signaux français
|
||||||
carre =0 ; carre_F=1;
|
carre =0 ; carre_F=1;
|
||||||
semaphore =1 ; semaphore_F=2;
|
semaphore =1 ; semaphore_F=2;
|
||||||
semaphore_cli =2 ; semaphore_cli_F=4;
|
semaphore_cli =2 ; semaphore_cli_F=4;
|
||||||
@@ -92,7 +93,7 @@ Disque_D =14; // pour d
|
|||||||
ral_60_jaune_cli =15;ral_60_jaune_cli_F=32768; // pour décodeur LDT
|
ral_60_jaune_cli =15;ral_60_jaune_cli_F=32768; // pour décodeur LDT
|
||||||
aspect8 =16 ;
|
aspect8 =16 ;
|
||||||
|
|
||||||
// signal belge
|
// signaux belges
|
||||||
// base
|
// base
|
||||||
vert_jaune_H =0 ; vert_jaune_H_F=1; // signal belge
|
vert_jaune_H =0 ; vert_jaune_H_F=1; // signal belge
|
||||||
rouge =1 ; rouge_F=2;
|
rouge =1 ; rouge_F=2;
|
||||||
|
|||||||
+65
-26
@@ -1,6 +1,6 @@
|
|||||||
object FormPrinc: TFormPrinc
|
object FormPrinc: TFormPrinc
|
||||||
Left = 103
|
Left = 80
|
||||||
Top = 192
|
Top = 204
|
||||||
Width = 1146
|
Width = 1146
|
||||||
Height = 625
|
Height = 625
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Anchors = [akLeft, akTop, akRight]
|
||||||
@@ -11,6 +11,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
Font.Name = 'MS Sans Serif'
|
Font.Name = 'MS Sans Serif'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
|
KeyPreview = True
|
||||||
Menu = MainMenu1
|
Menu = MainMenu1
|
||||||
OldCreateOrder = False
|
OldCreateOrder = False
|
||||||
Position = poDefault
|
Position = poDefault
|
||||||
@@ -18,10 +19,11 @@ object FormPrinc: TFormPrinc
|
|||||||
Visible = True
|
Visible = True
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
OnKeyDown = FormKeyDown
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
1138
|
1130
|
||||||
574)
|
567)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object LabelTitre: TLabel
|
object LabelTitre: TLabel
|
||||||
@@ -1445,8 +1447,8 @@ object FormPrinc: TFormPrinc
|
|||||||
end
|
end
|
||||||
object StatusBar1: TStatusBar
|
object StatusBar1: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 552
|
Top = 545
|
||||||
Width = 1138
|
Width = 1130
|
||||||
Height = 22
|
Height = 22
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
@@ -1513,20 +1515,6 @@ object FormPrinc: TFormPrinc
|
|||||||
OnChange = FenRichChange
|
OnChange = FenRichChange
|
||||||
OnMouseDown = FenRichMouseDown
|
OnMouseDown = FenRichMouseDown
|
||||||
end
|
end
|
||||||
object ScrollBoxSig: TScrollBox
|
|
||||||
Left = 536
|
|
||||||
Top = 176
|
|
||||||
Width = 465
|
|
||||||
Height = 249
|
|
||||||
HorzScrollBar.Increment = 48
|
|
||||||
HorzScrollBar.Tracking = True
|
|
||||||
VertScrollBar.Smooth = True
|
|
||||||
VertScrollBar.Tracking = True
|
|
||||||
Anchors = [akTop, akRight]
|
|
||||||
Color = clSilver
|
|
||||||
ParentColor = False
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
object GroupBoxAcc: TGroupBox
|
object GroupBoxAcc: TGroupBox
|
||||||
Left = 497
|
Left = 497
|
||||||
Top = 5
|
Top = 5
|
||||||
@@ -1534,7 +1522,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Height = 52
|
Height = 52
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'Commande d'#39'accessoires'
|
Caption = 'Commande d'#39'accessoires'
|
||||||
TabOrder = 2
|
TabOrder = 1
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 7
|
Left = 7
|
||||||
Top = 24
|
Top = 24
|
||||||
@@ -1591,7 +1579,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Height = 129
|
Height = 129
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'Commande aux trains'
|
Caption = 'Commande aux trains'
|
||||||
TabOrder = 3
|
TabOrder = 2
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 22
|
Top = 22
|
||||||
@@ -1784,6 +1772,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Top = 16
|
Top = 16
|
||||||
Width = 145
|
Width = 145
|
||||||
Height = 21
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
ItemHeight = 13
|
ItemHeight = 13
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
OnChange = ComboTrainsChange
|
OnChange = ComboTrainsChange
|
||||||
@@ -1844,7 +1833,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Width = 281
|
Width = 281
|
||||||
Height = 180
|
Height = 180
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
TabOrder = 4
|
TabOrder = 3
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
281
|
281
|
||||||
180)
|
180)
|
||||||
@@ -1986,15 +1975,15 @@ object FormPrinc: TFormPrinc
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GroupBoxCV: TGroupBox
|
object GroupBoxCV: TGroupBox
|
||||||
Left = 561
|
Left = 753
|
||||||
Top = 40
|
Top = 32
|
||||||
Width = 265
|
Width = 265
|
||||||
Height = 129
|
Height = 129
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'Variables CV'
|
Caption = 'Variables CV'
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
TabOrder = 5
|
TabOrder = 4
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 208
|
Left = 208
|
||||||
Top = 42
|
Top = 42
|
||||||
@@ -2049,6 +2038,47 @@ object FormPrinc: TFormPrinc
|
|||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object PageControl: TPageControl
|
||||||
|
Left = 536
|
||||||
|
Top = 232
|
||||||
|
Width = 305
|
||||||
|
Height = 193
|
||||||
|
ActivePage = TabSheetTrains
|
||||||
|
TabOrder = 5
|
||||||
|
object TabSheetSig: TTabSheet
|
||||||
|
Caption = 'Signaux'
|
||||||
|
DesignSize = (
|
||||||
|
297
|
||||||
|
165)
|
||||||
|
object ScrollBoxSig: TScrollBox
|
||||||
|
Left = 0
|
||||||
|
Top = 4
|
||||||
|
Width = 137
|
||||||
|
Height = 161
|
||||||
|
HorzScrollBar.Increment = 48
|
||||||
|
HorzScrollBar.Tracking = True
|
||||||
|
VertScrollBar.Smooth = True
|
||||||
|
VertScrollBar.Tracking = True
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
Color = clSilver
|
||||||
|
ParentColor = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object TabSheetTrains: TTabSheet
|
||||||
|
Caption = 'Trains'
|
||||||
|
ImageIndex = 1
|
||||||
|
object ScrollBoxTrains: TScrollBox
|
||||||
|
Left = 8
|
||||||
|
Top = 24
|
||||||
|
Width = 241
|
||||||
|
Height = 65
|
||||||
|
Color = clSilver
|
||||||
|
ParentColor = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object ButtonEssai: TButton
|
object ButtonEssai: TButton
|
||||||
Left = 504
|
Left = 504
|
||||||
@@ -2057,6 +2087,7 @@ object FormPrinc: TFormPrinc
|
|||||||
Height = 25
|
Height = 25
|
||||||
Caption = 'Essai'
|
Caption = 'Essai'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnClick = ButtonEssaiClick
|
||||||
end
|
end
|
||||||
object Timer1: TTimer
|
object Timer1: TTimer
|
||||||
Interval = 100
|
Interval = 100
|
||||||
@@ -2541,4 +2572,12 @@ object FormPrinc: TFormPrinc
|
|||||||
OnClientRead = ServerSocketClientRead
|
OnClientRead = ServerSocketClientRead
|
||||||
Left = 320
|
Left = 320
|
||||||
end
|
end
|
||||||
|
object PopupMenuTrains: TPopupMenu
|
||||||
|
OnPopup = PopupMenuTrainsPopup
|
||||||
|
Left = 1008
|
||||||
|
object Propritsdutrain1: TMenuItem
|
||||||
|
Caption = 'Propri'#233't'#233's du train'
|
||||||
|
OnClick = Propritsdutrain1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+636
-122
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -428,7 +428,7 @@ begin
|
|||||||
SendMessage(FormRoute.ListBoxRoutes.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0);
|
SendMessage(FormRoute.ListBoxRoutes.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0);
|
||||||
|
|
||||||
// icone train
|
// icone train
|
||||||
if idcantonRoute<>0 then Maj_icone_train(FormRoute.ImageTrainR,idTrainCourant);
|
if idcantonRoute<>0 then Maj_icone_train(FormRoute.ImageTrainR,idTrainCourant,clWhite);
|
||||||
|
|
||||||
formRoute.ButtonFenPil.enabled:=trains[IdTrainCourant].route[0].adresse<>0;
|
formRoute.ButtonFenPil.enabled:=trains[IdTrainCourant].route[0].adresse<>0;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@ object FormRouteTrain: TFormRouteTrain
|
|||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Liste des routes affect'#233'es et m'#233'moris'#233'es aux trains'
|
Caption = 'Liste des routes affect'#233'es et m'#233'moris'#233'es aux trains'
|
||||||
ClientHeight = 194
|
ClientHeight = 194
|
||||||
ClientWidth = 853
|
ClientWidth = 850
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
@@ -53,7 +53,7 @@ object FormRouteTrain: TFormRouteTrain
|
|||||||
Top = 8
|
Top = 8
|
||||||
Width = 585
|
Width = 585
|
||||||
Height = 177
|
Height = 177
|
||||||
ActivePage = TabSheetRA
|
ActivePage = TabSheetRM
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object TabSheetRA: TTabSheet
|
object TabSheetRA: TTabSheet
|
||||||
Caption = 'Route affect'#233'e'
|
Caption = 'Route affect'#233'e'
|
||||||
|
|||||||
+7
-6
@@ -197,7 +197,7 @@ begin
|
|||||||
vitesse:=GrilleHoraire[i].vitesse;
|
vitesse:=GrilleHoraire[i].vitesse;
|
||||||
if trains[indexTrain].route[0].talon then vitesse:=-vitesse;
|
if trains[indexTrain].route[0].talon then vitesse:=-vitesse;
|
||||||
trains[indexTrain].roulage:=2;
|
trains[indexTrain].roulage:=2;
|
||||||
vitesse_loco(train,indextrain,adrTrain,vitesse,10);
|
vitesse_loco(train,indextrain,adrTrain,vitesse,10,0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ begin
|
|||||||
|
|
||||||
formRouteTrain.comboBoxTrains.ItemIndex:=indexTrainFR-1;
|
formRouteTrain.comboBoxTrains.ItemIndex:=indexTrainFR-1;
|
||||||
|
|
||||||
Maj_icone_train(FormRouteTrain.ImageTrainR,idTrain);
|
Maj_icone_train(FormRouteTrain.ImageTrainR,idTrain,clWhite);
|
||||||
with formRouteTrain do
|
with formRouteTrain do
|
||||||
begin
|
begin
|
||||||
TabSheetRM.Enabled:=false;
|
TabSheetRM.Enabled:=false;
|
||||||
@@ -329,7 +329,7 @@ procedure TFormRouteTrain.FormActivate(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
maj_infos(indexTrainFR);
|
maj_infos(indexTrainFR);
|
||||||
|
|
||||||
if ntrains>0 then Maj_icone_train(FormRouteTrain.ImageTrainR,indexTrainFR);
|
if ntrains>0 then Maj_icone_train(FormRouteTrain.ImageTrainR,indexTrainFR,clWhite);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormRouteTrain.ButtonQuitteClick(Sender: TObject);
|
procedure TFormRouteTrain.ButtonQuitteClick(Sender: TObject);
|
||||||
@@ -769,6 +769,7 @@ begin
|
|||||||
el2R:=trains[indexTrainFR].routePref[IrPref][2].adresse;
|
el2R:=trains[indexTrainFR].routePref[IrPref][2].adresse;
|
||||||
t2R:=trains[indexTrainFR].routePref[IrPref][2].typ;
|
t2R:=trains[indexTrainFR].routePref[IrPref][2].typ;
|
||||||
|
|
||||||
|
// canton du départ de la route
|
||||||
IdCanton:=index_canton_det(el1R); // trouve l'index du canton du détecteur el1R (départ de route) = c'est le canton origine de la route
|
IdCanton:=index_canton_det(el1R); // trouve l'index du canton du détecteur el1R (départ de route) = c'est le canton origine de la route
|
||||||
if IdCanton=0 then begin labelRoute.caption:='Le train de départ n''est pas sur un canton';exit;end;
|
if IdCanton=0 then begin labelRoute.caption:='Le train de départ n''est pas sur un canton';exit;end;
|
||||||
FormRouteTrain.Caption:=trains[indexTrainFR].nom_train+' départ depuis canton '+intToSTR(canton[IdCanton].numero)+' '+canton[idcanton].nom;
|
FormRouteTrain.Caption:=trains[indexTrainFR].nom_train+' départ depuis canton '+intToSTR(canton[IdCanton].numero)+' '+canton[idcanton].nom;
|
||||||
@@ -838,7 +839,7 @@ begin
|
|||||||
canton[idCantonOrg].Bouton:=0;
|
canton[idCantonOrg].Bouton:=0;
|
||||||
dessin_canton(IdCantonOrg,0);
|
dessin_canton(IdCantonOrg,0);
|
||||||
end;
|
end;
|
||||||
if idcantonOrg<>0 then
|
if idcantonDest<>0 then
|
||||||
begin
|
begin
|
||||||
canton[idCantonDest].NumcantonOrg:=0;
|
canton[idCantonDest].NumcantonOrg:=0;
|
||||||
canton[idCantonDest].NumcantonDest:=0;
|
canton[idCantonDest].NumcantonDest:=0;
|
||||||
@@ -846,8 +847,8 @@ begin
|
|||||||
dessin_canton(IdCantonDest,0);
|
dessin_canton(IdCantonDest,0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// affecter le canton origine et destination
|
// affecter le canton origine et destination - IdCanton = canton départ de la route
|
||||||
canton[IdCanton].bouton:=3;
|
canton[IdCanton].bouton:=3; // 3 = drapeau vert
|
||||||
|
|
||||||
n:=trains[indexTrainFR].route[0].adresse ;
|
n:=trains[indexTrainFR].route[0].adresse ;
|
||||||
detfin:=trains[indexTrainFR].route[n].adresse;
|
detfin:=trains[indexTrainFR].route[n].adresse;
|
||||||
|
|||||||
+3
-3
@@ -24,8 +24,8 @@ object FormTCO: TFormTCO
|
|||||||
OnKeyPress = FormKeyPress
|
OnKeyPress = FormKeyPress
|
||||||
OnMouseWheel = FormMouseWheel
|
OnMouseWheel = FormMouseWheel
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
1005
|
997
|
||||||
556)
|
548)
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object LabelZoom: TLabel
|
object LabelZoom: TLabel
|
||||||
@@ -1299,10 +1299,10 @@ object FormTCO: TFormTCO
|
|||||||
Font.Name = 'MS Sans Serif'
|
Font.Name = 'MS Sans Serif'
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
ReadOnly = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = EditAdrElementChange
|
OnChange = EditAdrElementChange
|
||||||
OnClick = EditAdrElementClick
|
OnClick = EditAdrElementClick
|
||||||
|
OnExit = EditAdrElementExit
|
||||||
end
|
end
|
||||||
object EditTypeImage: TEdit
|
object EditTypeImage: TEdit
|
||||||
Left = 184
|
Left = 184
|
||||||
|
|||||||
+32
-16
@@ -405,6 +405,7 @@ type
|
|||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
function index_TCOMainMenu : integer;
|
function index_TCOMainMenu : integer;
|
||||||
procedure Mmoiredezone1Click(Sender: TObject);
|
procedure Mmoiredezone1Click(Sender: TObject);
|
||||||
|
procedure EditAdrElementExit(Sender: TObject);
|
||||||
public
|
public
|
||||||
{ Déclarations publiques }
|
{ Déclarations publiques }
|
||||||
end;
|
end;
|
||||||
@@ -1450,7 +1451,6 @@ end;
|
|||||||
|
|
||||||
// remplit les informations du canton avec les éléments adjacents, et des détecteurs adjacents
|
// remplit les informations du canton avec les éléments adjacents, et des détecteurs adjacents
|
||||||
// et vérifie si le canton ne contient pas de case incorrecte
|
// et vérifie si le canton ne contient pas de case incorrecte
|
||||||
// Cantons uniquement TCO1
|
|
||||||
// i : indexCanton
|
// i : indexCanton
|
||||||
// remplit les champs horizontal, el1,el2,typ1,typ2,sens1,sens2 de canton[]
|
// remplit les champs horizontal, el1,el2,typ1,typ2,sens1,sens2 de canton[]
|
||||||
// et les champs canton1 et canton2 du tableau detecteurs[]
|
// et les champs canton1 et canton2 du tableau detecteurs[]
|
||||||
@@ -2446,7 +2446,7 @@ begin
|
|||||||
closefile(fichier);
|
closefile(fichier);
|
||||||
renseigne_tous_cantons;
|
renseigne_tous_cantons;
|
||||||
trier_cantons;
|
trier_cantons;
|
||||||
affecte_trains_config;
|
|
||||||
|
|
||||||
sauve_styles_tco(indexTCO); // sauver le jeu sombre
|
sauve_styles_tco(indexTCO); // sauver le jeu sombre
|
||||||
if jeucouleurs=2 then jeu_clair(indexTCO);
|
if jeucouleurs=2 then jeu_clair(indexTCO);
|
||||||
@@ -14989,6 +14989,7 @@ begin
|
|||||||
//Affiche('xClicCell='+intToSTR(XClicCell[indexTCO]),clYellow);
|
//Affiche('xClicCell='+intToSTR(XClicCell[indexTCO]),clYellow);
|
||||||
clicTCO:=true;
|
clicTCO:=true;
|
||||||
formTCO[indexTCO].EditAdrElement.Text:=IntToSTR(tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].Adresse);
|
formTCO[indexTCO].EditAdrElement.Text:=IntToSTR(tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].Adresse);
|
||||||
|
defocusControl(EditAdrElement,true); // pour enlever le curseur
|
||||||
actualise(indexTCO);
|
actualise(indexTCO);
|
||||||
clicTCO:=false;
|
clicTCO:=false;
|
||||||
end;
|
end;
|
||||||
@@ -15290,7 +15291,9 @@ begin
|
|||||||
tco[indextco,XClic,YClic].liaisons:=liaisons[icone]; // liaisons des voies
|
tco[indextco,XClic,YClic].liaisons:=liaisons[icone]; // liaisons des voies
|
||||||
tco[indextco,xClic,YClic].CoulFonte:=clYellow;
|
tco[indextco,xClic,YClic].CoulFonte:=clYellow;
|
||||||
tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].Repr:=2;
|
tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].Repr:=2;
|
||||||
|
|
||||||
formTCO[indexTCO].EditAdrElement.Text:=IntToSTR(tco[indextco,XClic,YClic].Adresse);
|
formTCO[indexTCO].EditAdrElement.Text:=IntToSTR(tco[indextco,XClic,YClic].Adresse);
|
||||||
|
|
||||||
formTCO[indexTCO].EdittypeImage.Text:=IntToSTR(tco[indextco,XClic,YClic].BImage);
|
formTCO[indexTCO].EdittypeImage.Text:=IntToSTR(tco[indextco,XClic,YClic].BImage);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -16284,8 +16287,7 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
// detdépart validé : valider le det de destination sauf si route en roulage
|
// detdépart validé : valider le det de destination sauf si route en roulage
|
||||||
if (detatrouve=0) and (bt<=3) and not(ConfCellTCO) and (NbreRoutes=0)
|
if (detatrouve=0) and (bt<=3) and not(ConfCellTCO) and (canton[idCantonClic].NumCantonDest=0) then // bt=3 drapeau vert bt=4 drapeau rouge
|
||||||
then // bt=3 drapeau vert bt=4 drapeau rouge
|
|
||||||
begin
|
begin
|
||||||
if (canton[IdCantonClic].adresseTrain<>0) and (bt<3) then
|
if (canton[IdCantonClic].adresseTrain<>0) and (bt<3) then
|
||||||
begin
|
begin
|
||||||
@@ -16776,6 +16778,7 @@ begin
|
|||||||
YclicCellInserer:=YClic;
|
YclicCellInserer:=YClic;
|
||||||
clicTCO:=true;
|
clicTCO:=true;
|
||||||
EditAdrElement.Text:=IntToSTR(tco[indextco,XClicCellInserer,YClicCellInserer].Adresse);
|
EditAdrElement.Text:=IntToSTR(tco[indextco,XClicCellInserer,YClicCellInserer].Adresse);
|
||||||
|
defocusControl(EditAdrElement,true);
|
||||||
EditTypeImage.Text:=IntToSTR(tco[indextco,XClicCellInserer,YClicCellInserer].Bimage);
|
EditTypeImage.Text:=IntToSTR(tco[indextco,XClicCellInserer,YClicCellInserer].Bimage);
|
||||||
CheckPinv.Checked:=tco[indextco,XClicCellInserer,YClicCellInserer].inverse;
|
CheckPinv.Checked:=tco[indextco,XClicCellInserer,YClicCellInserer].inverse;
|
||||||
clicTCO:=false;
|
clicTCO:=false;
|
||||||
@@ -17081,15 +17084,24 @@ end;
|
|||||||
|
|
||||||
// changement de l'adresse d'un élément
|
// changement de l'adresse d'un élément
|
||||||
procedure TFormTCO.EditAdrElementChange(Sender: TObject);
|
procedure TFormTCO.EditAdrElementChange(Sender: TObject);
|
||||||
var Adr,erreur,index,indexTCO : integer;
|
var Adr,erreur,indexTCO,Bim : integer;
|
||||||
s: string;
|
s: string;
|
||||||
begin
|
begin
|
||||||
exit;
|
// exit;
|
||||||
//Affiche('Chgt adresse',clyellow);
|
//Affiche('EditAdrElement change',clyellow);
|
||||||
if clicTCO or not(ConfCellTCO) then exit;
|
//if clicTCO or not(ConfCellTCO) then exit;
|
||||||
clicTCO:=true;
|
|
||||||
auto_tcurs:=false; // interdit le déplacement du curseur encadré du TCO (pour que les touches curseur s'applique au Tedit)
|
if clicTCO then
|
||||||
|
begin
|
||||||
|
HideCaret(EditAdrElement.Handle); // supprime le curseur
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
//clicTCO:=true;
|
||||||
indexTCO:=index_TCO(sender);
|
indexTCO:=index_TCO(sender);
|
||||||
|
bim:=tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].Bimage;
|
||||||
|
if bim=0 then exit;
|
||||||
|
|
||||||
|
auto_tcurs:=false; // interdit le déplacement du curseur encadré du TCO (pour que les touches curseur s'applique au Tedit)
|
||||||
s:=formTCO[indexTCO].EditAdrElement.Text;
|
s:=formTCO[indexTCO].EditAdrElement.Text;
|
||||||
if length(s)>1 then
|
if length(s)>1 then
|
||||||
begin
|
begin
|
||||||
@@ -17106,17 +17118,16 @@ begin
|
|||||||
|
|
||||||
efface_entoure(indexTCO);
|
efface_entoure(indexTCO);
|
||||||
tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].Adresse:=Adr;
|
tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].Adresse:=Adr;
|
||||||
//formConfCellTCO.editAdrElement.Text:=intToSTR(Adr);
|
formConfCellTCO.editAdrElement.Text:=intToSTR(Adr);
|
||||||
tco_Modifie:=true;
|
tco_Modifie:=true;
|
||||||
|
|
||||||
// si signal
|
// si signal
|
||||||
if tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].BImage=Id_signal then
|
if tco[indextco,XClicCell[indexTCO],YClicCell[indexTCO]].BImage=Id_signal then
|
||||||
begin
|
begin
|
||||||
index:=Index_Signal(adr);
|
{index:=Index_Signal(adr);
|
||||||
if index=0 then exit
|
if index=0 then exit
|
||||||
else
|
else }
|
||||||
begin
|
begin
|
||||||
//Affiche('Signal '+intToSTR(Adr),clyellow);
|
|
||||||
affiche_tco(indexTCO);
|
affiche_tco(indexTCO);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -17198,7 +17209,6 @@ begin
|
|||||||
end_drag(10,x,y,Sender,Target);
|
end_drag(10,x,y,Sender,Target);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFormTCO.ImagePalette11EndDrag(Sender, Target: TObject; X,
|
procedure TFormTCO.ImagePalette11EndDrag(Sender, Target: TObject; X,
|
||||||
Y: Integer);
|
Y: Integer);
|
||||||
begin
|
begin
|
||||||
@@ -18739,7 +18749,7 @@ end;
|
|||||||
|
|
||||||
procedure TFormTCO.EditAdrElementClick(Sender: TObject);
|
procedure TFormTCO.EditAdrElementClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
auto_tcurs:=false;
|
// auto_tcurs:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormTCO.ImagePalette53DragOver(Sender, Source: TObject; X,
|
procedure TFormTCO.ImagePalette53DragOver(Sender, Source: TObject; X,
|
||||||
@@ -19224,6 +19234,12 @@ begin
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormTCO.EditAdrElementExit(Sender: TObject);
|
||||||
|
begin
|
||||||
|
auto_tcurs:=true; // réautorise le déplacement du curseur
|
||||||
|
defocusControl(EditAdrElement,true);
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
-3
@@ -41,7 +41,7 @@ HauteurLigneSGT=30;
|
|||||||
|
|
||||||
var
|
var
|
||||||
FormSelTrain: TFormSelTrain;
|
FormSelTrain: TFormSelTrain;
|
||||||
x,y,El,largC,hautC,indexTrainClic,LargeurSGT : Integer;
|
x,y,El,largC,hautC,LargeurSGT,indexTrainClic : Integer;
|
||||||
routeSav : TuneRoute;
|
routeSav : TuneRoute;
|
||||||
|
|
||||||
procedure actualise_seltrains;
|
procedure actualise_seltrains;
|
||||||
@@ -216,6 +216,7 @@ begin
|
|||||||
trains[i].canton:=0;
|
trains[i].canton:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// Maj_icone_train(Image_Train[i],i,clWhite); // maj arrière plan train page principale
|
||||||
|
|
||||||
// balayer les détecteurs pour trouver sur quel détecteur est le train pour le razer
|
// balayer les détecteurs pour trouver sur quel détecteur est le train pour le razer
|
||||||
// non
|
// non
|
||||||
@@ -259,7 +260,7 @@ begin
|
|||||||
idTrain:=Index_train_adresse(adrTrain);
|
idTrain:=Index_train_adresse(adrTrain);
|
||||||
|
|
||||||
raz_cantons_train(AdrTrain,false); // efface tous les cantons contenant le train Adrtrain sans raz du détecteur
|
raz_cantons_train(AdrTrain,false); // efface tous les cantons contenant le train Adrtrain sans raz du détecteur
|
||||||
|
//Maj_icone_train(Image_Train[idTrain],idTrain,$e0e0e0); // maj arrière plan train page principale
|
||||||
trains[idTrain].canton:=canton[idcanton].numero;
|
trains[idTrain].canton:=canton[idcanton].numero;
|
||||||
trains[idTrain].sens:=sens;
|
trains[idTrain].sens:=sens;
|
||||||
canton[IdCanton].SensLoco:=sens;
|
canton[IdCanton].SensLoco:=sens;
|
||||||
@@ -280,8 +281,10 @@ begin
|
|||||||
canton[Idcanton].NomTrain:='';
|
canton[Idcanton].NomTrain:='';
|
||||||
canton[Idcanton].indexTrain:=0;
|
canton[Idcanton].indexTrain:=0;
|
||||||
canton[IdCanton].adresseTrain:=0;
|
canton[IdCanton].adresseTrain:=0;
|
||||||
|
// a revoir IDTrain=0 !!!! Maj_icone_train(Image_Train[idTrain],idTrain,clWhite);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// affecte le canton avec l'id du train, même si nul
|
||||||
t:=canton[IdCanton].Ntco;
|
t:=canton[IdCanton].Ntco;
|
||||||
if (t>0) and (t<=nbreTCO) then
|
if (t>0) and (t<=nbreTCO) then
|
||||||
begin
|
begin
|
||||||
@@ -305,7 +308,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//affiche('Det du canton '+intToSTR(canton[Idcanton].numero)+' det1='+intToSTR(canton[Idcanton].det1)+' det2='+intToSTR(canton[Idcanton].det2),clyellow);
|
//affiche('Det du canton '+intToSTR(canton[Idcanton].numero)+' det1='+intToSTR(canton[Idcanton].det1)+' det2='+intToSTR(canton[Idcanton].det2),clyellow);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// renvoie x,y El et indexCanton de IdCantonSelect en variable globale
|
// renvoie x,y El et indexCanton de IdCantonSelect en variable globale
|
||||||
|
|||||||
+55
-46
@@ -26,7 +26,7 @@ var
|
|||||||
f : text;
|
f : text;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
VersionSC = '9.77'; // sert à la comparaison de la version publiée
|
VersionSC = '9.8'; // sert à la comparaison de la version publiée
|
||||||
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
|
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
|
||||||
// pour unzip
|
// pour unzip
|
||||||
SHCONTCH_NOPROGRESSBOX=4;
|
SHCONTCH_NOPROGRESSBOX=4;
|
||||||
@@ -39,7 +39,6 @@ SHCONTF_NONFOLDERS=64;
|
|||||||
function GetCurrentProcessEnvVar(const VariableName: string): string;
|
function GetCurrentProcessEnvVar(const VariableName: string): string;
|
||||||
function verifie_version : real;
|
function verifie_version : real;
|
||||||
function DownloadURL_NOCache(aUrl: string;s : string;var taille : longint): Boolean;
|
function DownloadURL_NOCache(aUrl: string;s : string;var taille : longint): Boolean;
|
||||||
function Unzip(zipfile : oleVariant): boolean;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@@ -173,6 +172,59 @@ begin
|
|||||||
log(s+' copié',clLime);
|
log(s+' copié',clLime);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// dézipe un fichier. Si réussi : result=true
|
||||||
|
function Unzip(zipfile : oleVariant): boolean;
|
||||||
|
var
|
||||||
|
shellobj,srcfldr, destfldr, shellfldritems,repertoire: Olevariant;
|
||||||
|
filtre: string;
|
||||||
|
i : integer;
|
||||||
|
erreur : integer;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
filtre:='';
|
||||||
|
zipfile:=lowercase(zipfile);
|
||||||
|
i:=pos('.zip',zipfile);
|
||||||
|
if i=0 then
|
||||||
|
begin
|
||||||
|
log('Fichier zip : '+zipfile+' incorrect',clred);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
filtre:=zipfile;
|
||||||
|
delete(filtre,i,4);
|
||||||
|
|
||||||
|
// créer le répertoire destination du zip (obligatoire car la commande de dézippe ne le créée pas)
|
||||||
|
if not(Cree_dir(filtre)) then
|
||||||
|
begin
|
||||||
|
log('Création répertoire '+filtre+' impossible',clred);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
repertoire:=filtre; // mettre dans olevariant
|
||||||
|
|
||||||
|
filtre:='';
|
||||||
|
shellobj:=CreateOleObject('Shell.Application');
|
||||||
|
srcfldr:=ShellObj.NameSpace(Zipfile);
|
||||||
|
if not((VarType(srcfldr)=varDispatch) and Assigned(TVarData(srcfldr).VDispatch)) then
|
||||||
|
begin
|
||||||
|
log('Fichier '+zipfile+ ' invalide ou absent',clred);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destfldr:=ShellObj.NameSpace(repertoire);
|
||||||
|
if not ((VarType(destfldr)=varDispatch) and Assigned(TVarData(destfldr).VDispatch)) then
|
||||||
|
begin
|
||||||
|
log('Répertoire destination invalide : '+ repertoire,clred);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
shellfldritems:=srcfldr.Items;
|
||||||
|
if (filtre<>'') then shellfldritems.Filter(SHCONTF_INCLUDEHIDDEN or SHCONTF_NONFOLDERS or SHCONTF_FOLDERS,filtre);
|
||||||
|
|
||||||
|
//destfldr.CopyHere(shellfldritems, SHCONTCH_NOPROGRESSBOX or SHCONTCH_RESPONDYESTOALL);
|
||||||
|
destfldr.CopyHere(shellfldritems, SHCONTCH_RESPONDYESTOALL);
|
||||||
|
result:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
// dézipe copie les fichiers et lance la nouvelle version
|
// dézipe copie les fichiers et lance la nouvelle version
|
||||||
// s : chemin et fichier à déziper
|
// s : chemin et fichier à déziper
|
||||||
@@ -227,6 +279,7 @@ begin
|
|||||||
|
|
||||||
if i>32 then
|
if i>32 then
|
||||||
begin
|
begin
|
||||||
|
fermeSC:=true;
|
||||||
Application.Terminate;
|
Application.Terminate;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -572,50 +625,6 @@ begin
|
|||||||
Result:=(0=ShFileOperation(fos));
|
Result:=(0=ShFileOperation(fos));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function Unzip(zipfile : oleVariant): boolean;
|
|
||||||
var
|
|
||||||
shellobj,srcfldr, destfldr, shellfldritems,repertoire: Olevariant;
|
|
||||||
filtre: string;
|
|
||||||
i : integer;
|
|
||||||
erreur : integer;
|
|
||||||
begin
|
|
||||||
filtre:='';
|
|
||||||
zipfile:=lowercase(zipfile);
|
|
||||||
i:=pos('.zip',zipfile);
|
|
||||||
if i=0 then exit;
|
|
||||||
filtre:=zipfile;
|
|
||||||
delete(filtre,i,4);
|
|
||||||
|
|
||||||
// créer le répertoire destination du zip (obligatoire car la commande de dézippe ne le créée pas)
|
|
||||||
if not(Cree_dir(filtre)) then exit;
|
|
||||||
|
|
||||||
repertoire:=filtre; // mettre dans olevariant
|
|
||||||
|
|
||||||
filtre:='';
|
|
||||||
shellobj:=CreateOleObject('Shell.Application');
|
|
||||||
srcfldr:=ShellObj.NameSpace(Zipfile);
|
|
||||||
if not((VarType(srcfldr)=varDispatch) and Assigned(TVarData(srcfldr).VDispatch)) then
|
|
||||||
begin
|
|
||||||
log('Fichier '+zipfile+ ' invalide ou absent',clred);
|
|
||||||
result:=false;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
destfldr:=ShellObj.NameSpace(repertoire);
|
|
||||||
if not ((VarType(destfldr)=varDispatch) and Assigned(TVarData(destfldr).VDispatch)) then
|
|
||||||
begin
|
|
||||||
log('Répertoire destination invalide : '+ repertoire,clred);
|
|
||||||
result:=false;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
shellfldritems:=srcfldr.Items;
|
|
||||||
if (filtre<>'') then shellfldritems.Filter(SHCONTF_INCLUDEHIDDEN or SHCONTF_NONFOLDERS or SHCONTF_FOLDERS,filtre);
|
|
||||||
|
|
||||||
//destfldr.CopyHere(shellfldritems, SHCONTCH_NOPROGRESSBOX or SHCONTCH_RESPONDYESTOALL);
|
|
||||||
destfldr.CopyHere(shellfldritems, SHCONTCH_RESPONDYESTOALL);
|
|
||||||
result:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|||||||
+4
-2
@@ -307,9 +307,11 @@ version 9.75 : Corrections dans le TCO.
|
|||||||
version 9.76 : Amélioration de l'importation des réseaux depuis CDM rail.
|
version 9.76 : Amélioration de l'importation des réseaux depuis CDM rail.
|
||||||
Correction de l'affichage du réseau CDM en version x64.
|
Correction de l'affichage du réseau CDM en version x64.
|
||||||
Renforcement de la vérification de la configuration.
|
Renforcement de la vérification de la configuration.
|
||||||
version 9.77 : Amélioratios diverses.
|
version 9.77 : Améliorations diverses.
|
||||||
Correction de quelques bugs.
|
Correction de quelques bugs.
|
||||||
|
version 9.78 : Correction du déclencheur "démarrage train"
|
||||||
|
version 9.79 : Corrections et améliorations diverses.
|
||||||
|
version 9.8 : Intégration des claviers et boutons rotatifs USB
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user