diff --git a/Notice d'utilisation des signaux_complexes_GL_V8.35.pdf b/Notice d'utilisation des signaux_complexes_GL_V8.36.pdf similarity index 76% rename from Notice d'utilisation des signaux_complexes_GL_V8.35.pdf rename to Notice d'utilisation des signaux_complexes_GL_V8.36.pdf index 7b9f630..98e6e2f 100644 Binary files a/Notice d'utilisation des signaux_complexes_GL_V8.35.pdf and b/Notice d'utilisation des signaux_complexes_GL_V8.36.pdf differ diff --git a/Signaux_complexes_GL.cfg b/Signaux_complexes_GL.cfg index 8d97c47..bcc5ab2 100644 --- a/Signaux_complexes_GL.cfg +++ b/Signaux_complexes_GL.cfg @@ -14,8 +14,8 @@ -$N+ -$O- -$P+ --$Q- --$R- +-$Q+ +-$R+ -$S- -$T- -$U- diff --git a/Signaux_complexes_GL.dof b/Signaux_complexes_GL.dof index 5ccec48..454559d 100644 --- a/Signaux_complexes_GL.dof +++ b/Signaux_complexes_GL.dof @@ -17,8 +17,8 @@ M=0 N=1 O=0 P=1 -Q=0 -R=0 +Q=1 +R=1 S=0 T=0 U=0 diff --git a/Signaux_complexes_GL.map b/Signaux_complexes_GL.map index 22cc40a..b5c325d 100644 --- a/Signaux_complexes_GL.map +++ b/Signaux_complexes_GL.map @@ -1,8 +1,8 @@ Start Length Name Class - 0001:00000000 0019EF04H .text CODE - 0002:00000000 00002C2CH .data DATA - 0002:00002C2C 045DDFF1H .bss BSS + 0001:00000000 001A20F8H .text CODE + 0002:00000000 00002C7CH .data DATA + 0002:00002C7C 045DE035H .bss BSS Detailed map of segments @@ -76,29 +76,29 @@ Detailed map of segments 0001:00095228 00000128 C=CODE S=.text G=(none) M=WinSock ACBP=A9 0001:00095350 00003A78 C=CODE S=.text G=(none) M=ScktComp ACBP=A9 0001:00098DC8 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9 - 0001:000996B4 00000598 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9 - 0001:00099C4C 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9 - 0001:00099C8C 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9 - 0001:00099CC4 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9 - 0001:0009A6DC 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9 - 0001:0009C7E4 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9 - 0001:000A5A30 00001748 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9 - 0001:000A7178 000004D0 C=CODE S=.text G=(none) M=Importation ACBP=A9 - 0001:000A7648 00013ACC C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9 - 0001:000BB114 000026F4 C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9 - 0001:000BD808 00000D10 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9 - 0001:000BE518 00003A0C C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9 - 0001:000C1F24 000452C0 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9 - 0001:001071E4 000030E4 C=CODE S=.text G=(none) M=UnitSR ACBP=A9 - 0001:0010A2C8 000027D4 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9 - 0001:0010CA9C 00001833 C=CODE S=.text G=(none) M=verif_version ACBP=A9 - 0001:0010E2D0 000011D0 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9 - 0001:0010F4A0 00042A80 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9 - 0001:00151F20 00002B44 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9 - 0001:00154A64 00000D2C C=CODE S=.text G=(none) M=UnitSimule ACBP=A9 - 0001:00155790 00002584 C=CODE S=.text G=(none) M=Unitplace ACBP=A9 - 0001:00157D14 00046D60 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9 - 0001:0019EA74 0000048D C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9 + 0001:000996B4 000005A0 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9 + 0001:00099C54 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9 + 0001:00099C94 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9 + 0001:00099CCC 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9 + 0001:0009A6E4 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9 + 0001:0009C7EC 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9 + 0001:000A5A38 00001980 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9 + 0001:000A73B8 000004D0 C=CODE S=.text G=(none) M=Importation ACBP=A9 + 0001:000A7888 00013ACC C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9 + 0001:000BB354 00002CA4 C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9 + 0001:000BDFF8 00000D10 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9 + 0001:000BED08 00004DD8 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9 + 0001:000C3AE0 00045748 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9 + 0001:00109228 00003160 C=CODE S=.text G=(none) M=UnitSR ACBP=A9 + 0001:0010C388 00002880 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9 + 0001:0010EC08 000431B4 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9 + 0001:00151DBC 00001833 C=CODE S=.text G=(none) M=verif_version ACBP=A9 + 0001:001535F0 000011D0 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9 + 0001:001547C0 00002BC8 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9 + 0001:00157388 00000D2C C=CODE S=.text G=(none) M=UnitSimule ACBP=A9 + 0001:001580B4 00002604 C=CODE S=.text G=(none) M=Unitplace ACBP=A9 + 0001:0015A6B8 000475B0 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9 + 0001:001A1C68 0000048D C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9 0002:00000000 000000CC C=DATA S=.data G=DGROUP M=System ACBP=A9 0002:000000CC 00000020 C=DATA S=.data G=DGROUP M=SysInit ACBP=A9 0002:000000EC 00000254 C=DATA S=.data G=DGROUP M=SysUtils ACBP=A9 @@ -125,12 +125,12 @@ Detailed map of segments 0002:00001250 00000030 C=DATA S=.data G=DGROUP M=ComObj ACBP=A9 0002:00001280 0000002C C=DATA S=.data G=DGROUP M=OleCtrls ACBP=A9 0002:000012AC 00000908 C=DATA S=.data G=DGROUP M=jpeg ACBP=A9 - 0002:00001BB4 00000058 C=DATA S=.data G=DGROUP M=MSCommLib_TLB ACBP=A9 - 0002:00001C0C 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9 - 0002:00001C18 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9 - 0002:00001C1C 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9 - 0002:00001C24 000000D4 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9 - 0002:00001CF8 0000060D C=DATA S=.data G=DGROUP M=UnitPrinc ACBP=A9 + 0002:00001BB4 00000080 C=DATA S=.data G=DGROUP M=MSCommLib_TLB ACBP=A9 + 0002:00001C34 00000009 C=DATA S=.data G=DGROUP M=MaskUtils ACBP=A9 + 0002:00001C40 00000004 C=DATA S=.data G=DGROUP M=Mask ACBP=A9 + 0002:00001C44 00000006 C=DATA S=.data G=DGROUP M=Grids ACBP=A9 + 0002:00001C4C 000000D4 C=DATA S=.data G=DGROUP M=UnitTCO ACBP=A9 + 0002:00001D20 0000060D C=DATA S=.data G=DGROUP M=UnitPrinc ACBP=A9 0002:00003000 00000664 C=BSS S=.bss G=DGROUP M=System ACBP=A9 0002:00003664 00000010 C=BSS S=.bss G=DGROUP M=SysInit ACBP=A9 0002:00003674 00000004 C=BSS S=.bss G=DGROUP M=Types ACBP=A9 @@ -212,16 +212,16 @@ Detailed map of segments 0002:00015724 00000014 C=BSS S=.bss G=DGROUP M=UnitConfigTCO ACBP=A9 0002:00015738 00000014 C=BSS S=.bss G=DGROUP M=Unit_Pilote_aig ACBP=A9 0002:0001574C 00000014 C=BSS S=.bss G=DGROUP M=UnitConfigCellTCO ACBP=A9 - 0002:00015760 004186C8 C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9 - 0002:0042DE28 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9 - 0002:0042DE38 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9 - 0002:0042DE4C 00000018 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9 - 0002:0042DE64 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9 - 0002:0042DE68 000004FC C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9 - 0002:0042E364 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9 - 0002:0042E390 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9 - 0002:0042E39C 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9 - 0002:0042E3A4 041B2C4C C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9 + 0002:00015760 00418704 C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9 + 0002:0042DE64 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9 + 0002:0042DE74 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9 + 0002:0042DE88 000004FC C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9 + 0002:0042E384 00000018 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9 + 0002:0042E39C 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9 + 0002:0042E3A0 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9 + 0002:0042E3CC 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9 + 0002:0042E3D8 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9 + 0002:0042E3E0 041B2C54 C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9 Bound resource files @@ -237,8 +237,8 @@ UnitConfigCellTCO.dfm UnitTCO.dfm UnitSR.dfm UnitCDF.dfm -verif_version.dfm UnitConfig.dfm +verif_version.dfm UnitDebug.dfm UnitSimule.dfm Unitplace.dfm @@ -247,4 +247,4 @@ Signaux_complexes_GL.res Signaux_complexes_GL.drf -Program entry point at 0001:0019ED84 +Program entry point at 0001:001A1F78 diff --git a/UnitCDF.dfm b/UnitCDF.dfm index 0f319d9..caafe13 100644 --- a/UnitCDF.dfm +++ b/UnitCDF.dfm @@ -14,6 +14,7 @@ object FormCDF: TFormCDF OldCreateOrder = False OnActivate = FormActivate OnClose = FormClose + OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object Label20: TLabel diff --git a/UnitCDF.pas b/UnitCDF.pas index 87f98b8..45338dd 100644 --- a/UnitCDF.pas +++ b/UnitCDF.pas @@ -81,6 +81,7 @@ type procedure EditNAdressesChange(Sender: TObject); procedure BitBtnOkClick(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); private { Déclarations privées } public @@ -95,12 +96,28 @@ var {$R *.dfm} procedure dessine_feu_CDF; +procedure couleurs_cdf; implementation +procedure couleurs_cdf; +var i : integer; + c : tComponent; +begin + if sombre then with formCDF do + begin + Color:=Couleurfond; + for i:=0 to ComponentCount-1 do + begin + c:=Components[i]; + composant(c,couleurFond,clWhite); + end; + end; +end; procedure TFormCDF.FormActivate(Sender: TObject); -var erreur : integer; +var i,erreur : integer; + c : tcomponent; begin Val(FormConfig.EditAdrSig.text,Adresse,erreur); index:=index_Signal(Adresse); @@ -170,6 +187,8 @@ begin Edit19.Text:=intToSTR(Signaux[index].SR[19].sortie1); editNadresses.text:=intToSTR(Signaux[index].NA); + + end; procedure dessine_feu_CDF; @@ -466,4 +485,9 @@ begin dessineCDF:=false; end; +procedure TFormCDF.FormCreate(Sender: TObject); +begin + couleurs_cdf; +end; + end. diff --git a/UnitConfig.dfm b/UnitConfig.dfm index f4ef5a8..fbc331d 100644 --- a/UnitConfig.dfm +++ b/UnitConfig.dfm @@ -1,6 +1,6 @@ object FormConfig: TFormConfig - Left = 251 - Top = 157 + Left = 238 + Top = 145 Hint = 'Modifie la configuration selon les s'#233'lections choisies' BorderStyle = bsDialog Caption = 'Configuration g'#233'n'#233'rale' @@ -668,7 +668,7 @@ object FormConfig: TFormConfig Top = 8 Width = 633 Height = 505 - ActivePage = TabSheetAig + ActivePage = TabSheetPeriph Font.Charset = DEFAULT_CHARSET Font.Color = clBlack Font.Height = -11 @@ -681,7 +681,7 @@ object FormConfig: TFormConfig Caption = 'CDM Rail' object Label36: TLabel Left = 24 - Top = 448 + Top = 456 Width = 369 Height = 13 Caption = @@ -1032,49 +1032,49 @@ object FormConfig: TFormConfig end object GroupBox15: TGroupBox Left = 312 - Top = 280 + Top = 272 Width = 297 - Height = 161 + Height = 177 Caption = 'Divers' TabOrder = 5 object Label31: TLabel Left = 8 - Top = 24 + Top = 22 Width = 204 Height = 13 Caption = 'Seuil du nombre de d'#233'tecteurs trop distants' end object Label41: TLabel Left = 8 - Top = 68 + Top = 64 Width = 188 Height = 13 Caption = 'Taille de la fonte de la fen'#234'tre principale' end object Label44: TLabel Left = 8 - Top = 45 + Top = 43 Width = 223 Height = 13 Caption = 'Nombre de cantons pr'#233'sence train avant signal' end object Label55: TLabel Left = 8 - Top = 90 + Top = 86 Width = 32 Height = 13 Caption = 'Debug' end object Label28: TLabel Left = 8 - Top = 136 + Top = 110 Width = 182 Height = 13 Caption = 'Port du serveur de Signaux Complexes' end object EditNbDetDist: TEdit Left = 240 - Top = 20 + Top = 18 Width = 25 Height = 21 ParentShowHint = False @@ -1083,7 +1083,7 @@ object FormConfig: TFormConfig end object EditFonte: TEdit Left = 240 - Top = 64 + Top = 62 Width = 25 Height = 21 ParentShowHint = False @@ -1092,7 +1092,7 @@ object FormConfig: TFormConfig end object EditNbCantons: TEdit Left = 240 - Top = 41 + Top = 39 Width = 25 Height = 21 Hint = @@ -1104,7 +1104,7 @@ object FormConfig: TFormConfig end object EditDebug: TEdit Left = 240 - Top = 88 + Top = 86 Width = 25 Height = 21 Hint = @@ -1116,7 +1116,7 @@ object FormConfig: TFormConfig end object CheckBoxVerifXpressNet: TCheckBox Left = 8 - Top = 108 + Top = 150 Width = 233 Height = 17 Hint = @@ -1130,8 +1130,8 @@ object FormConfig: TFormConfig OnClick = CheckBoxVerifXpressNetClick end object EditPortServeur: TEdit - Left = 224 - Top = 130 + Left = 216 + Top = 110 Width = 49 Height = 21 Hint = 'Port de 1 '#224' 65535' @@ -1141,9 +1141,33 @@ object FormConfig: TFormConfig OnChange = EditPortServeurChange OnExit = EditPortServeurExit end + object CheckBoxSombre: TCheckBox + Left = 8 + Top = 132 + Width = 209 + Height = 17 + Hint = + 'Red'#233'marrer signaux_complexes pour prise en compte apr'#232's changeme' + + 'nt' + Caption = 'Affichage mode sombre' + ParentShowHint = False + ShowHint = True + TabOrder = 6 + end + object ButtonCouleur: TButton + Left = 144 + Top = 130 + Width = 25 + Height = 17 + Caption = '...' + ParentShowHint = False + ShowHint = True + TabOrder = 7 + OnClick = ButtonCouleurClick + end end object ButtonPFCDM: TButton - Left = 40 + Left = 32 Top = 416 Width = 241 Height = 25 @@ -1448,7 +1472,7 @@ object FormConfig: TFormConfig end object GroupBox22: TGroupBox Left = 312 - Top = 376 + Top = 368 Width = 297 Height = 65 Caption = 'Protocole de connexion '#224' la centrale ou '#224' l'#39'interface' @@ -1478,14 +1502,14 @@ object FormConfig: TFormConfig end object GroupBox25: TGroupBox Left = 312 - Top = 320 + Top = 304 Width = 297 - Height = 49 + Height = 57 Caption = 'Divers' TabOrder = 9 object Label58: TLabel - Left = 24 - Top = 24 + Left = 16 + Top = 20 Width = 155 Height = 13 Caption = 'Filtrage des d'#233'tecteurs (x100 ms)' @@ -2267,7 +2291,7 @@ object FormConfig: TFormConfig end object Label24: TLabel Left = 104 - Top = 120 + Top = 124 Width = 8 Height = 13 Caption = '1' @@ -2280,7 +2304,7 @@ object FormConfig: TFormConfig end object Label25: TLabel Left = 104 - Top = 144 + Top = 148 Width = 8 Height = 13 Caption = '2' @@ -2293,7 +2317,7 @@ object FormConfig: TFormConfig end object Label26: TLabel Left = 104 - Top = 168 + Top = 172 Width = 8 Height = 13 Caption = '3' @@ -2306,7 +2330,7 @@ object FormConfig: TFormConfig end object Label27: TLabel Left = 104 - Top = 192 + Top = 196 Width = 8 Height = 13 Caption = '4' @@ -2381,7 +2405,7 @@ object FormConfig: TFormConfig Width = 137 Height = 21 Style = csDropDownList - ItemHeight = 0 + ItemHeight = 13 TabOrder = 1 OnChange = ComboBoxDecChange end @@ -2488,7 +2512,7 @@ object FormConfig: TFormConfig Width = 137 Height = 21 Style = csDropDownList - ItemHeight = 0 + ItemHeight = 13 TabOrder = 2 OnChange = ComboBoxAspChange end @@ -2570,9 +2594,9 @@ object FormConfig: TFormConfig end object CheckBoxContreVoie: TCheckBox Left = 120 - Top = 294 + Top = 296 Width = 137 - Height = 25 + Height = 17 Hint = 'Signal clignotant' Caption = 'Signal de contrevoie' ParentShowHint = False @@ -2781,7 +2805,7 @@ object FormConfig: TFormConfig Top = 56 Width = 193 Height = 21 - ItemHeight = 0 + ItemHeight = 13 TabOrder = 0 OnChange = ComboBoxDecodeurPersoChange end @@ -2800,7 +2824,7 @@ object FormConfig: TFormConfig Width = 145 Height = 21 Style = csDropDownList - ItemHeight = 0 + ItemHeight = 13 TabOrder = 2 OnChange = ComboBoxNationChange end @@ -2846,7 +2870,7 @@ object FormConfig: TFormConfig Width = 193 Height = 21 Style = csDropDownList - ItemHeight = 0 + ItemHeight = 13 TabOrder = 6 OnChange = ComboBoxDecCdeChange end @@ -3231,7 +3255,7 @@ object FormConfig: TFormConfig Height = 21 Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"' Style = csDropDownList - ItemHeight = 0 + ItemHeight = 13 ParentShowHint = False ShowHint = True TabOrder = 6 @@ -3412,7 +3436,7 @@ object FormConfig: TFormConfig Height = 21 Hint = 'Nom de l'#39'accessoire d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"' Style = csDropDownList - ItemHeight = 0 + ItemHeight = 13 ParentShowHint = False ShowHint = True TabOrder = 10 @@ -4151,7 +4175,7 @@ object FormConfig: TFormConfig end object GroupBoxDesc: TGroupBox Left = 280 - Top = 80 + Top = 88 Width = 329 Height = 129 Caption = 'Description du p'#233'riph'#233'rique' @@ -4254,4 +4278,9 @@ object FormConfig: TFormConfig OnClick = outcopierentatquetexte1Click end end + object ColorDialogFond: TColorDialog + OnShow = ColorDialogFondShow + Left = 696 + Top = 376 + end end diff --git a/UnitConfig.pas b/UnitConfig.pas index 8d038a6..63658a7 100644 --- a/UnitConfig.pas +++ b/UnitConfig.pas @@ -352,6 +352,9 @@ type ButtonPFCDM: TButton; CheckBoxZ21: TCheckBox; RadioButtonDCCpp: TRadioButton; + CheckBoxSombre: TCheckBox; + ButtonCouleur: TButton; + ColorDialogFond: TColorDialog; procedure ButtonAppliquerEtFermerClick(Sender: TObject); procedure FormActivate(Sender: TObject); procedure FormCreate(Sender: TObject); @@ -533,6 +536,8 @@ type procedure EditP1Exit(Sender: TObject); procedure EditP2Exit(Sender: TObject); procedure EditDevieS2Change(Sender: TObject); + procedure ButtonCouleurClick(Sender: TObject); + procedure ColorDialogFondShow(Sender: TObject); private { Déclarations privées } @@ -551,6 +556,8 @@ const // constantes du fichier de configuration NomConfig='ConfigGenerale.cfg'; Debug_ch='Debug'; +Sombre_ch='Mode_Sombre'; +couleur_fond_ch='coul_fond'; serveurIPCDM_Touche_ch='serveurIPCDM_Touche'; PortServeur_ch='Port_Serveur'; AntiTimeoutEthLenz_ch='AntiTimeoutEthLenz'; @@ -681,6 +688,7 @@ procedure trier_detecteurs; function decodeDCC(s : string) : string; function encode_aig(index : integer): string; function Ipok(s : string) : boolean; +procedure couleurs_config; implementation @@ -1697,6 +1705,9 @@ begin writeln(fichierN,Algo_localisation_ch+'=',Algo_localisation); writeln(fichierN,Avec_roulage_ch+'=',avecRoulage); writeln(fichierN,debug_ch+'=',debug); + if sombre then s:='1' else s:='0'; + writeln(fichierN,sombre_ch+'=',s); + writeln(fichierN,couleur_fond_ch+'='+IntToHex(couleurFond,6)); if serveurIPCDM_Touche then s:='1' else s:='0'; writeln(fichierN,serveurIPCDM_Touche_ch+'='+s); writeln(fichierN,PortServeur_ch+'=',PortServeur); @@ -2975,6 +2986,22 @@ var s,sa,SOrigine: string; val(s,debug,erreur); end; + sa:=uppercase(sombre_ch)+'='; + i:=pos(sa,s); + if i=1 then + begin + delete(s,i,length(sa)); + val(s,i,erreur); + sombre:=i=1; + end; + + sa:=uppercase(couleur_fond_ch)+'='; + i:=pos(sa,s); + if i=1 then + begin + delete(s,i,length(sa)); + val('$'+s,CouleurFond,erreur); + end; sa:=uppercase(serveurIPCDM_Touche_ch)+'='; i:=pos(sa,s); @@ -3967,6 +3994,7 @@ begin AvecDemandeAiguillages:=checkPosAig.checked; AvecDemandeInterfaceUSB:=CheckBoxDemarUSB.checked; AvecDemandeInterfaceEth:=CheckBoxDemarEth.checked; + sombre:=CheckBoxSombre.Checked; protocole:=1; if RadioButtonXpress.Checked then begin @@ -4029,7 +4057,7 @@ begin Val(s,Adresse,erreur); // Adresse du signal if adresse=0 then exit; - FormConfig.EditAdrSig.Color:=clWindow; + if sombre then Formconfig.editAdrSig.Color:=couleurfond else FormConfig.EditAdrSig.Color:=clWindow; aff_champs_sig_feux(index); // affiche les champs du feu clicliste:=false; @@ -4128,6 +4156,7 @@ begin CheckPosAig.checked:=AvecDemandeAiguillages; CheckBoxDemarUSB.checked:=AvecDemandeInterfaceUSB; CheckBoxDemarEth.checked:=AvecDemandeInterfaceEth; + CheckBoxSombre.Checked:=sombre; RadioButtonXpress.Checked:=protocole=1; RadioButtonDcc.Checked:=protocole=2; @@ -4514,7 +4543,7 @@ begin Tablo_periph[ligneClicAccPeriph+1].NumCom:=i; Tablo_com_cde[ligneClicAccPeriph+1].NumPeriph:=ligneClicAccPeriph+1; ListBoxPeriph.Selected[ligneClicAccPeriph]:=true; - + maj_champs_combos(ligneClicAccPeriph+1); // recalculer le nombre de sockets et de comusb @@ -4541,6 +4570,52 @@ begin end; end; +procedure couleurs_config; +var i : integer; + c : tcomponent; +begin + if sombre then + with formconfig do + begin + Color:=Couleurfond; + // page principale + for i:=0 to formconfig.ComponentCount-1 do + begin + c:=Components[i]; + composant(c,couleurfond,couleurTexte); + end; + + // onglet cdmrail + for i:=0 to TabSheetCDM.ComponentCount-1 do + begin + c:=TabSheetCDM.Components[i]; + Affiche(c.Name,clred); + composant(c,couleurfond,couleurTexte); + end; + + // onglet décodeurs + for i:=0 to TabSheetDecodeurs.ComponentCount-1 do + begin + c:=TabSheetDecodeurs.Components[i]; + composant(c,couleurfond,couleurTexte); + end; + + // PN + for i:=0 to GroupBoxPNA.ComponentCount-1 do + begin + c:=GroupBoxPNA.Components[i]; + composant(c,couleurfond,couleurTexte); + end; + + // périphériques + for i:=0 to TabSheetPeriph.ComponentCount-1 do + begin + c:=TabSheetPeriph.Components[i]; + composant(c,couleurfond,couleurTexte); + end; + end; +end; + // on change textBoxCde des décodeurs procedure TformConfig.tbCde_onchange(sender : Tobject); var tb : tEdit; @@ -4559,10 +4634,17 @@ end; procedure TFormConfig.FormCreate(Sender: TObject); var i,j,y,l,LongestLength,PixelLength : integer; - s,LongestString : string; + cs,s,LongestString : string; begin if debug=1 then Affiche('Création fenêtre config',clLime); clicListe:=true; + + cs:='ColorA='+IntToHex(couleurFond,6); // pour rajouter aux couleurs personnalisées de la fenetre couleur + colorDialogFond.CustomColors.Add(cs); + ButtonCouleur.Hint:='Change la couleur de fond de toutes les fenêtres de Signaux_Complexes.'+#13+ + 'Utilisez la couleur personnalisée n°1 et après modification,'+#13+ + 'cliquer sur "ajouter aux couleurs personnalisées" qui seule sera sauvegardée'; + Affiche_avert:=false; if affevt then affiche('FormConfig create',clLime); PageControl.ActivePage:=Formconfig.TabSheetCDM; // force le premier onglet sur la page @@ -4593,7 +4675,6 @@ begin name:='Ligne'+intToSTR(i); left:=5;width:=350; top:=y;height:=42; brush.Style:=bsSolid; - brush.Color:=clBtnFace; pen.color:=clBlack; shape:=stRectangle; parent:=TabSheetDecodeurs; @@ -4611,7 +4692,7 @@ begin onChange:=formConfig.modif_ComboL; Style:=csDropDownList; visible:=false; - end; + end; ComboL2[i]:=Tcombobox.create(FormConfig.TabSheetDecodeurs); with ComboL2[i] do @@ -4625,7 +4706,7 @@ begin onChange:=formConfig.modif_ComboL; Style:=csDropDownList; visible:=false; - end; + end; EditT[i]:=TEdit.create(FormConfig.TabSheetDecodeurs); with EditT[i] do @@ -4690,6 +4771,7 @@ begin ShowHint:=false; visible:=false; end; + TextBoxCde[i]:=Tedit.Create(FormConfig.TabSheetDecodeurs); with TextBoxCde[i] do begin @@ -5350,8 +5432,8 @@ begin end; // composants dynamiques car on ne peut plus ajouter de composants en mode conception! - // onglet accessoires COM/USB/Socket - //--------- groupbox + // onglet périphériques COM/USB/Socket + //--------- groupbox gp1:=TgroupBox.Create(FormConfig.TabSheetPeriph); with gp1 do begin @@ -5447,7 +5529,6 @@ begin caption:='Périphérique'; parent:=FormConfig.TabSheetPeriph; name:='LabelNumeroP'; - end; EditPortCde:=TEdit.Create(FormConfig.TabSheetPeriph); @@ -5458,7 +5539,7 @@ begin text:=''; parent:=GroupBoxDesc; hint:='Port COM/USB : COMX:vitesse,parité,nombre de bits de données, nombre de bits de stop '+#13+ - 'ou'+#13+#13+ + 'ou'+#13+ 'Socket : AdresseIPV4:port'; ShowHint:=true; OnChange:=formconfig.tb_onChange; @@ -5517,6 +5598,7 @@ begin ligneClicAccPeriph:=-1; AncligneClicAccPeriph:=-1; + couleurs_config; end; @@ -5635,7 +5717,6 @@ var Adresse,Adr2,ind,id2,erreur,position : integer; tjd,tri,tjs,croi : boolean; s,ss : string; i : integer; - B : char; begin if index<1 then exit; s:=Uppercase(formConfig.ListBoxAig.items[index-1]); @@ -5650,6 +5731,7 @@ begin ss:=InttoSTr(Adresse); formconfig.EditAdrAig.text:= ss; + if sombre then formConfig.editAdrAig.Color:=couleurfond else FormConfig.EditAdrAig.Color:=clWindow; tjd:=pos('TJD',s)<>0 ; tri:=pos('TRI',s)<>0 ; @@ -5657,7 +5739,6 @@ begin croi:=pos('CROI',s)<>0 ; with formconfig do begin - EditAdrAig.Color:=clWindow; ImageAffiche.Picture.Bitmap.TransparentMode:=tmAuto; ImageAffiche.Picture.Bitmap.TransparentColor:=clblue; ImageAffiche.Transparent:=true; @@ -6744,7 +6825,8 @@ begin with formConfig do begin LabelInfo.caption:=''; - EditAdrAig.Text:='';EditAigTriple.Text:=''; + EditAdrAig.Text:=''; + EditAigTriple.Text:=''; Edit_HG.text:=''; editDevie_HD.Text:=''; editDroit_BD.Text:=''; @@ -8123,11 +8205,11 @@ begin if (aiguillage[Index_Aig(i)].modele<>rien) then begin EditAdrAig.Color:=clred; - LabelInfo.caption:='aiguillage '+IntToSTR(i)+' existe déja - ne sera pas écrasé' ; + LabelInfo.caption:='aiguillage '+IntToSTR(i)+' existe déjà - ne sera pas écrasé' ; exit; end; - EditAdrAig.Color:=clWindow; + if sombre then editAdrAig.Color:=couleurfond else EditAdrAig.Color:=clWindow; LabelInfo.caption:=' '; if (modele=aig) or (modele=triple) or (modele=crois) then @@ -12746,6 +12828,7 @@ begin ligneClicSig:=itemindex; clicListeSignal(ligneClicSig+1); end; + clicliste:=false; end; procedure TFormConfig.ListBoxSigKeyDown(Sender: TObject; var Key: Word; @@ -13052,7 +13135,7 @@ begin for i:=1 to NbPeriph do begin - if com_socket(i)=1 then // si port comusb + if com_socket(i)=1 then // si port com$usb begin if connecte_port_usb_periph(i) then Affiche('COM'+intToSTR(Tablo_periph[i].numcom)+' périphérique ouvert',clLime) @@ -13471,7 +13554,7 @@ begin LabelInfo.caption:='Signal '+intToSTR(i)+' existe, il ne sera pas écrasé';exit; end; - EditAdrSig.Color:=clWindow; + if sombre then editAdrSig.Color:=couleurfond else EditAdrSig.Color:=clWindow; LabelInfo.caption:=' '; Signaux[ligneClicSig+1].adresse:=i; tablo_index_signal[i]:=ligneClicSig+1; @@ -13495,6 +13578,22 @@ procedure TFormConfig.EditP2Exit(Sender: TObject); end; - end. + procedure TFormConfig.ButtonCouleurClick(Sender: TObject); + begin + if colorDialogFond.execute then + begin + Couleurfond:=colorDialogFond.Color; + Maj_couleurs; + end; +end; + +procedure TFormConfig.ColorDialogFondShow(Sender: TObject); + var s : string; + begin + s:='Couleur de fond de Signaux_complexes'; + SetWindowText(ColorDialogFond.Handle,pchar(s)); +end; + +end. diff --git a/UnitConfigCellTCO.pas b/UnitConfigCellTCO.pas index b346b75..a665255 100644 --- a/UnitConfigCellTCO.pas +++ b/UnitConfigCellTCO.pas @@ -453,6 +453,8 @@ begin end; procedure TFormConfCellTCO.FormCreate(Sender: TObject); +var i : integer; + c : tcomponent; begin // fenetre toujours dessus if affevt then Affiche('FormConfCellTCO create',clyellow); @@ -463,6 +465,17 @@ begin ImagePaletteCC.Width:=iconeX; ImagePaletteCC.Height:=iconeY; RadioGroupSel.itemIndex:=0; + + if sombre then + begin + Color:=Couleurfond; + for i:=0 to ComponentCount-1 do + begin + c:=Components[i]; + composant(c,couleurFond,couleurTexte); + end; + end; + // dessine les composants - non utilisé { i:=1; diff --git a/UnitConfigTCO.dfm b/UnitConfigTCO.dfm index ae917ff..5ba8131 100644 --- a/UnitConfigTCO.dfm +++ b/UnitConfigTCO.dfm @@ -212,24 +212,21 @@ object FormConfigTCO: TFormConfigTCO Width = 353 Height = 57 Caption = 'Graphisme de tous les TCOs' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False TabOrder = 4 end - object RadioButtonLignes: TRadioButton - Left = 376 - Top = 312 - Width = 113 - Height = 17 - Caption = 'Lignes bris'#233'es' - TabOrder = 5 - OnClick = RadioButtonLignesClick - end object RadioButtonCourbes: TRadioButton - Left = 376 + Left = 392 Top = 328 Width = 113 Height = 17 Caption = 'Lignes courbes' - TabOrder = 6 + TabOrder = 5 OnClick = RadioButtonCourbesClick end object GroupBox3: TGroupBox @@ -238,7 +235,7 @@ object FormConfigTCO: TFormConfigTCO Width = 289 Height = 89 Caption = 'Configuration du TCO ' - TabOrder = 7 + TabOrder = 6 object Label3: TLabel Left = 16 Top = 20 @@ -318,7 +315,7 @@ object FormConfigTCO: TFormConfigTCO Width = 289 Height = 273 Caption = 'Configuration de tous les TCOs' - TabOrder = 8 + TabOrder = 7 object Ratio: TLabel Left = 8 Top = 208 @@ -369,6 +366,7 @@ object FormConfigTCO: TFormConfigTCO Width = 273 Height = 161 ColCount = 3 + FixedColor = clAppWorkSpace RowCount = 11 TabOrder = 0 ColWidths = ( @@ -426,6 +424,21 @@ object FormConfigTCO: TFormConfigTCO OnChange = TrackBarEpaisseurChange end end + object RadioButtonLignes: TRadioButton + Left = 392 + Top = 312 + Width = 113 + Height = 17 + Caption = 'Lignes bris'#233'es' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + TabOrder = 8 + OnClick = RadioButtonLignesClick + end object ColorDialog1: TColorDialog OnShow = ColorDialog1Show Left = 272 diff --git a/UnitConfigTCO.pas b/UnitConfigTCO.pas index 0923c2f..e6f767a 100644 --- a/UnitConfigTCO.pas +++ b/UnitConfigTCO.pas @@ -36,7 +36,6 @@ type ImagePiedFeu: TImage; BitBtnOk: TBitBtn; RadioGroup1: TRadioGroup; - RadioButtonLignes: TRadioButton; RadioButtonCourbes: TRadioButton; GroupBox3: TGroupBox; Label3: TLabel; @@ -59,6 +58,7 @@ type TrackBarEpaisseur: TTrackBar; Label17: TLabel; Label18: TLabel; + RadioButtonLignes: TRadioButton; procedure ButtonDessineClick(Sender: TObject); procedure FormActivate(Sender: TObject); procedure ImageAigClick(Sender: TObject); @@ -204,7 +204,6 @@ begin x2:=x1+width; jy1:=(Haut div 2)-round(12*fryGlob[indexTCO]); // pos Y de la bande sup jy2:=(Haut div 2)+round(12*fryGlob[indexTCO]); // pos Y de la bande inf - canvas.PolyGon([point(x1,jy1),point(x2,jy1),point(x2,jy2),point(x1,jy2)]); end; @@ -220,11 +219,10 @@ begin x1:=Larg div 2; y1:=0; canvas.moveTo(x1,y1); - y2:=HauteurCell[indexTCO] div 2; + y2:=haut div 2; canvas.LineTo(x1,y2); canvas.LineTo(x1-10,y2); end; - end; function verif_config_TCO(indexTCO : integer) : boolean; // renvoie true si ok @@ -317,6 +315,7 @@ begin for i:=1 to 10 do begin stringGridTCO.Cells[1,i]:=NomFichierTCO[i]; + if i<=nbreTCO then stringGridTCO.Cells[2,i]:='X' else stringGridTCO.Cells[2,i]:=' '; end; // stringGridTCO.canvas.Font.Style:=[fsBOld]; @@ -548,8 +547,9 @@ end; procedure TFormConfigTCO.FormCreate(Sender: TObject); var i : integer; + c : tcomponent; begin - for i := 0 to stringGridTCO.RowCount - 1 do + for i:=0 to stringGridTCO.RowCount - 1 do with stringGridTCO do begin RowHeights[i]:=15; @@ -565,6 +565,17 @@ begin Cells[0,0]:='Num'; Cells[1,0]:='Nom fichier'; Cells[2,0]:='X'; + font.Color:=clBlack; + end; + + if sombre then + begin + Color:=Couleurfond; + for i:=0 to ComponentCount-1 do + begin + c:=Components[i]; + composant(c,couleurFond,couleurTexte); + end; end; end; @@ -580,4 +591,6 @@ end; + + end. diff --git a/UnitDebug.dfm b/UnitDebug.dfm index 6edbe37..086fdae 100644 --- a/UnitDebug.dfm +++ b/UnitDebug.dfm @@ -1,10 +1,9 @@ object FormDebug: TFormDebug - Left = 321 - Top = 0 - Width = 864 - Height = 718 + Left = 234 + Top = 128 + Width = 884 + Height = 732 VertScrollBar.Increment = 67 - VertScrollBar.Position = 98 VertScrollBar.Tracking = True Caption = 'Fen'#234'tre de d'#233'bug' Color = clWindow @@ -21,13 +20,13 @@ object FormDebug: TFormDebug OnCreate = FormCreate OnKeyPress = FormKeyPress DesignSize = ( - 839 - 687) + 851 + 693) PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel - Left = 595 - Top = -94 + Left = 615 + Top = 4 Width = 108 Height = 13 Anchors = [akTop, akRight] @@ -41,9 +40,9 @@ object FormDebug: TFormDebug ParentColor = False ParentFont = False end - object Label2: TLabel - Left = 443 - Top = -96 + object LabelTitreDebug: TLabel + Left = 463 + Top = 2 Width = 131 Height = 18 Anchors = [akTop, akRight] @@ -56,8 +55,8 @@ object FormDebug: TFormDebug ParentFont = False end object EditNivDebug: TEdit - Left = 754 - Top = -96 + Left = 774 + Top = 2 Width = 49 Height = 21 Anchors = [akTop, akRight] @@ -72,8 +71,8 @@ object FormDebug: TFormDebug OnKeyPress = EditNivDebugKeyPress end object ButtonEcrLog: TButton - Left = 442 - Top = 230 + Left = 462 + Top = 328 Width = 97 Height = 29 Anchors = [akTop, akRight] @@ -82,8 +81,8 @@ object FormDebug: TFormDebug OnClick = ButtonEcrLogClick end object ButtonRazTampon: TButton - Left = 442 - Top = 262 + Left = 462 + Top = 360 Width = 97 Height = 33 Anchors = [akTop, akRight] @@ -93,8 +92,8 @@ object FormDebug: TFormDebug OnClick = ButtonRazTamponClick end object ButtonCherche: TButton - Left = 442 - Top = 198 + Left = 462 + Top = 296 Width = 97 Height = 25 Hint = 'Cherche la cha'#238'ne "erreur"' @@ -106,8 +105,8 @@ object FormDebug: TFormDebug OnClick = ButtonChercheClick end object ButtonAffEvtChrono: TButton - Left = 442 - Top = 158 + Left = 462 + Top = 256 Width = 97 Height = 33 Anchors = [akTop, akRight] @@ -117,8 +116,8 @@ object FormDebug: TFormDebug OnClick = ButtonAffEvtChronoClick end object ButtonCop: TButton - Left = 442 - Top = 110 + Left = 462 + Top = 208 Width = 97 Height = 41 Anchors = [akTop, akRight] @@ -134,8 +133,8 @@ object FormDebug: TFormDebug OnClick = ButtonCopClick end object ButtonRazLog: TButton - Left = 442 - Top = 302 + Left = 462 + Top = 400 Width = 97 Height = 33 Anchors = [akTop, akRight] @@ -145,8 +144,8 @@ object FormDebug: TFormDebug OnClick = ButtonRazLogClick end object GroupBox1: TGroupBox - Left = 448 - Top = 502 + Left = 468 + Top = 600 Width = 369 Height = 185 Anchors = [akTop, akRight] @@ -305,9 +304,9 @@ object FormDebug: TFormDebug end end object GroupBox2: TGroupBox - Left = 440 - Top = -78 - Width = 401 + Left = 460 + Top = 20 + Width = 384 Height = 149 Anchors = [akTop, akRight] Caption = 'S'#233'lections d'#39'affichage' @@ -466,7 +465,7 @@ object FormDebug: TFormDebug OnClick = CheckBox1Click end object CheckDebugTCO: TCheckBox - Left = 264 + Left = 256 Top = 128 Width = 121 Height = 17 @@ -482,7 +481,7 @@ object FormDebug: TFormDebug OnClick = CheckDebugTCOClick end object CheckDetSIg: TCheckBox - Left = 264 + Left = 256 Top = 112 Width = 121 Height = 17 @@ -501,7 +500,7 @@ object FormDebug: TFormDebug OnClick = CheckDetSIgClick end object CheckBoxPrinc: TCheckBox - Left = 264 + Left = 256 Top = 96 Width = 121 Height = 17 @@ -519,9 +518,9 @@ object FormDebug: TFormDebug end object RichDebug: TRichEdit Left = 8 - Top = -90 - Width = 425 - Height = 671 + Top = 8 + Width = 445 + Height = 685 Anchors = [akLeft, akTop, akRight, akBottom] Lines.Strings = ( 'RichDebug') @@ -531,8 +530,8 @@ object FormDebug: TFormDebug OnChange = RichDebugChange end object GroupBox5: TGroupBox - Left = 448 - Top = 390 + Left = 468 + Top = 488 Width = 372 Height = 57 Anchors = [akTop, akRight] @@ -598,8 +597,8 @@ object FormDebug: TFormDebug end end object ButtonRazTout: TButton - Left = 443 - Top = 78 + Left = 463 + Top = 176 Width = 97 Height = 25 Hint = @@ -613,8 +612,8 @@ object FormDebug: TFormDebug OnClick = ButtonRazToutClick end object GroupBox6: TGroupBox - Left = 448 - Top = 454 + Left = 468 + Top = 552 Width = 372 Height = 41 Anchors = [akTop, akRight] @@ -690,9 +689,9 @@ object FormDebug: TFormDebug end end object MemoEvtDet: TRichEdit - Left = 544 - Top = 76 - Width = 281 + Left = 565 + Top = 174 + Width = 280 Height = 307 Anchors = [akTop, akRight] Color = clBlack diff --git a/UnitDebug.pas b/UnitDebug.pas index d91b3c5..7f5b07c 100644 --- a/UnitDebug.pas +++ b/UnitDebug.pas @@ -10,7 +10,7 @@ type TFormDebug = class(TForm) EditNivDebug: TEdit; Label1: TLabel; - Label2: TLabel; + LabelTitreDebug: TLabel; SaveDialog: TSaveDialog; ButtonEcrLog: TButton; ButtonRazTampon: TButton; @@ -124,6 +124,7 @@ procedure AfficheDebug(s : string;lacouleur : TColor); procedure AfficheDebug_suivi(s : string;lacouleur : TColor); procedure RE_ColorLine(ARichEdit: TRichEdit; ARow: Integer; AColor: TColor); procedure affiche_evt(s: string;lacouleur : TColor); +procedure couleurs_debug; implementation @@ -163,6 +164,21 @@ begin end; end; +procedure couleurs_debug; +var c : tcomponent; + i : integer; +begin + if sombre then with formdebug do + begin + Color:=Couleurfond; + for i:=0 to ComponentCount-1 do + begin + c:=Components[i]; + composant(c,couleurFond,couleurTexte); + end; + end; +end; + procedure AfficheDebug_suivi(s : string;lacouleur : TColor); var i : integer; begin @@ -192,6 +208,8 @@ begin compt_erreur:=0; LigneErreur:=0; if debug=1 then Affiche('Fin création fenêtre debug',clLime); + + couleurs_debug; end; procedure TFormDebug.ButtonEcrLogClick(Sender: TObject); diff --git a/UnitPilote.pas b/UnitPilote.pas index d271f7b..dd8315f 100644 --- a/UnitPilote.pas +++ b/UnitPilote.pas @@ -111,6 +111,7 @@ var AdrPilote : integer; procedure dessine_feu_pilote; +procedure couleurs_pilote; implementation @@ -269,10 +270,24 @@ begin dessine_feu_pilote; end; +procedure couleurs_pilote; +var i : integer; + c : tcomponent; +begin + if sombre then with formPilote do + begin + Color:=Couleurfond; + for i:=0 to ComponentCount-1 do + begin + c:=Components[i]; + composant(c,couleurFond,couleurTexte); + end; + end; +end; + procedure TFormPilote.FormCreate(Sender: TObject); begin -// radioVert.Checked:=false; -// radioVertCli.Checked:=false; + couleurs_pilote; end; procedure TFormPilote.ButtonPiloteClick(Sender: TObject); diff --git a/UnitPrinc.dfm b/UnitPrinc.dfm index 4fb33c4..6e7fba7 100644 --- a/UnitPrinc.dfm +++ b/UnitPrinc.dfm @@ -1,8 +1,8 @@ object FormPrinc: TFormPrinc - Left = 79 - Top = 256 - Width = 1133 - Height = 653 + Left = 107 + Top = 224 + Width = 1149 + Height = 689 Anchors = [akLeft, akTop, akRight] Caption = 'Signaux complexes' Color = clBtnFace @@ -19,8 +19,8 @@ object FormPrinc: TFormPrinc OnCreate = FormCreate OnResize = FormResize DesignSize = ( - 1117 - 595) + 1141 + 638) PixelsPerInch = 96 TextHeight = 13 object LabelTitre: TLabel @@ -1429,8 +1429,8 @@ object FormPrinc: TFormPrinc end object StatusBar1: TStatusBar Left = 0 - Top = 573 - Width = 1117 + Top = 616 + Width = 1141 Height = 22 Panels = < item @@ -1467,7 +1467,7 @@ object FormPrinc: TFormPrinc 00020000802500000000080000000000000000003F00000011000000} end object Button1: TButton - Left = 728 + Left = 744 Top = 8 Width = 75 Height = 25 @@ -1478,15 +1478,14 @@ object FormPrinc: TFormPrinc OnClick = Button1Click end object GrandPanel: TPanel - Left = 0 - Top = 32 - Width = 1065 - Height = 473 - Anchors = [akLeft, akTop, akRight] + Left = 8 + Top = 48 + Width = 1025 + Height = 476 TabOrder = 3 DesignSize = ( - 1065 - 473) + 1025 + 476) object SplitterV: TSplitter Left = 1 Top = 1 @@ -1521,8 +1520,8 @@ object FormPrinc: TFormPrinc OnMouseDown = FenRichMouseDown end object ScrollBox1: TScrollBox - Left = 512 - Top = 192 + Left = 504 + Top = 176 Width = 465 Height = 249 HorzScrollBar.Increment = 48 @@ -1535,7 +1534,7 @@ object FormPrinc: TFormPrinc TabOrder = 1 end object GroupBox1: TGroupBox - Left = 505 + Left = 465 Top = 21 Width = 265 Height = 52 @@ -1555,6 +1554,12 @@ object FormPrinc: TFormPrinc Width = 49 Height = 21 Hint = 'Adresse accessoire' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False TabOrder = 0 Text = '1' end @@ -1586,7 +1591,7 @@ object FormPrinc: TFormPrinc end end object GroupBox3: TGroupBox - Left = 497 + Left = 457 Top = 104 Width = 265 Height = 129 @@ -1752,7 +1757,10 @@ object FormPrinc: TFormPrinc Top = 88 Width = 83 Height = 33 + Hint = 'Envoie la vitesse au train' Caption = 'Envoi vitesse '#224' loco' + ParentShowHint = False + ShowHint = True TabOrder = 0 WordWrap = True OnClick = locoClick @@ -1809,7 +1817,7 @@ object FormPrinc: TFormPrinc TabOrder = 5 end object TrackBarVit: TTrackBar - Left = 24 + Left = 16 Top = 64 Width = 233 Height = 21 @@ -1818,12 +1826,14 @@ object FormPrinc: TFormPrinc Max = 100 Min = -100 ParentCtl3D = False + ParentShowHint = False + ShowHint = True TabOrder = 7 OnChange = TrackBarVitChange end end object Panel1: TPanel - Left = 729 + Left = 689 Top = -3 Width = 288 Height = 180 @@ -1970,16 +1980,16 @@ object FormPrinc: TFormPrinc end end object GroupBox2: TGroupBox - Left = 505 - Top = 16 + Left = 577 + Top = 104 Width = 265 - Height = 105 + Height = 129 Anchors = [akTop, akRight] Caption = 'Variables CV' TabOrder = 5 object Label3: TLabel Left = 208 - Top = 34 + Top = 42 Width = 14 Height = 13 Caption = 'CV' @@ -1987,7 +1997,7 @@ object FormPrinc: TFormPrinc end object LabelVCV: TLabel Left = 208 - Top = 55 + Top = 71 Width = 47 Height = 13 Caption = 'Valeur CV' @@ -1995,7 +2005,7 @@ object FormPrinc: TFormPrinc end object ButtonEcrCV: TButton Left = 8 - Top = 16 + Top = 24 Width = 153 Height = 33 Hint = 'Ecriture CV en mode direct sur voie de programmation' @@ -2006,7 +2016,7 @@ object FormPrinc: TFormPrinc end object ButtonLitCV: TButton Left = 8 - Top = 64 + Top = 80 Width = 153 Height = 33 Hint = 'Lecture CV en mode direct sur voie de programmation' @@ -2018,19 +2028,37 @@ object FormPrinc: TFormPrinc end object EditCV: TEdit Left = 168 - Top = 32 + Top = 40 Width = 33 Height = 21 TabOrder = 2 end object EditVal: TEdit Left = 168 - Top = 52 + Top = 68 Width = 33 Height = 21 TabOrder = 3 end end + object PanelBouton: TPanel + Left = 952 + Top = 200 + Width = 64 + Height = 67 + BorderStyle = bsSingle + Color = clGreen + TabOrder = 6 + Visible = False + object SpeedButton1: TSpeedButton + Left = 0 + Top = 0 + Width = 57 + Height = 57 + Caption = 'bouton maison' + Flat = True + end + end end object MSCommCde1: TMSComm Left = 1064 diff --git a/UnitPrinc.pas b/UnitPrinc.pas index 40d53b8..bd64b6d 100644 --- a/UnitPrinc.pas +++ b/UnitPrinc.pas @@ -1,5 +1,5 @@ Unit UnitPrinc; -// 29/12 10h +// 5/1 9h (******************************************** Programme signaux complexes Graphique Lenz Delphi 7 + activeX Tmscomm + clientSocket @@ -44,6 +44,15 @@ Unit UnitPrinc; // si on bouge un aiguillage à la raquette, on récupère bien sa position par XpressNet. // Une loco sur un détecteur au lancement ne renvoie pas son état statique. Seuls les changements // d'état sont renvoyés par la centrale. +// +// Notes pour compilation sous Embarcadero : -------------------------------------------------- +// Pour compilation avec Rad Studio (Delphi11): Projet / Options // Application / Apparence / +// Embarcadero technologies / carbon ou Auric +// +// Pour le mode sombre sous embarcadero, il faut sélectionner: +// Projet / Options // Application / manifeste / fichier manifeste : personnaliser +// à la sauvegarde, ce champ appraitra sous "générer automatiquement" +// et : décocher "activer les thèmes d'exécution" //{$Q-} // pas de vérification du débordement des opérations de calcul //{$R-} // pas de vérification des limites d'index du tableau et des variables @@ -218,6 +227,8 @@ type Copierltatdesaiguillageseninitialisation1: TMenuItem; ServerSocket: TServerSocket; Listedesclientsconnects1: TMenuItem; + PanelBouton: TPanel; + SpeedButton1: TSpeedButton; procedure FormCreate(Sender: TObject); procedure MSCommUSBInterfaceComm(Sender: TObject); @@ -401,6 +412,7 @@ const_inconnu=9; // position inconnue IdClients=10; // Index maxi de clients NbCouleurTrain=8; MaxCdeDccpp=20; +couleurTexte=$A0FFFF; clRose=$AAAAFF; clCyan=$FFA0A0; clviolet=$FF00FF; @@ -566,7 +578,7 @@ var AvecDemandeInterfaceUSB,AvecDemandeInterfaceEth,aff_acc,affiche_aigdcc,modeStkRetro, retEtatDet,roulage,init_aig_cours,affevt,placeAffiche,clicComboTrain,clicAdrTrain, avec_splitter,fichier_module_cdm,Diffusion,cdmDevant,avecRESA,serveurIPCDM_Touche, - Z21 : boolean; + Z21,sombre,serveur_ouvert : boolean; tick,Premier_tick : longint; @@ -702,7 +714,7 @@ var end; tablo_CV : array [1..255] of integer; - couleur : Tcolor; + couleur,Couleurfond : Tcolor; // modélisations des fichiers config branche : array [1..MaxBranches] of string; @@ -850,12 +862,16 @@ procedure mosaiqueH; procedure mosaiqueV; function InfoSignal(adresse : integer) : string; procedure det_prec_signal(adresse : integer;var tabloDet : TTabloDet); +procedure composant(c : tComponent;fond,texte : tColor); +procedure maj_couleurs; + implementation uses UnitDebug, UnitPilote, UnitSimule, UnitTCO, UnitConfig, Unitplace, verif_version , UnitCDF, UnitAnalyseSegCDM, UnitConfigCellTCO, - UnitConfigTCO; + UnitConfigTCO, + UnitSR; { procedure menu_interface(MA : TMA); @@ -879,11 +895,35 @@ begin inc(etape); end; -procedure Tformprinc.DoHint(Sender : Tobject); -var s: string; +procedure Tformprinc.DoHint(Sender : Tobject); // le sender est tApplication +var s,nomForm: string; + c : tcomponent; + FormeTCO : boolean; begin - s:=Application.Hint; + s:=Application.Hint; // texte du hint StatusBar1.Panels[0].text:=s; + + // détection d'un hint provoqué dans formtco + NomForm:=uppercase(Screen.activeform.Name); + formeTCO:=copy(NomForm,1,7)='FORMTCO'; + + // dessine les encadrés de colonne/ligne dans le tco suivant sélection du popup menu, en fonction du hint qu'on accroche + if formeTCO then + begin + // hints des colonnes + if (s=s101) or (s=s93) or (s=s94) then + begin + if not(colonneAffiche) then encadre_colonne; + end + else if colonneAffiche then encadre_colonne; + + // hints des lignes + if (s=s90) or (s=s91) or (s=s100) then + begin + if not(ligneAffiche) then encadre_ligne; + end + else if ligneAffiche then encadre_ligne; + end; end; // fonctions sur les bits @@ -2284,16 +2324,16 @@ begin //if Signaux[rang].aspect=5 then cercle(Picture.Bitmap.Canvas,13,22,6,ClYellow); refresh; Picture.Bitmap.Modified:=True; - end; - // créée le label pour afficher son adresse Signaux[rang].Lbl:=Tlabel.create(Formprinc.ScrollBox1); with Signaux[rang].Lbl do begin + Name:='LabelFeu'+intToSTR(Signaux[rang].adresse); caption:='@'+IntToSTR(Signaux[rang].adresse); Parent:=Formprinc.ScrollBox1; + font.color:=clBlack; width:=100;height:=20; Top:=HtImg+((HtImg+EspY+20)*((rang-1) div NbreImagePLigne)); Left:=10+ (LargImg+5)*((rang-1) mod (NbreImagePLigne)); @@ -2311,6 +2351,7 @@ begin Hint:='Feu blanc'; Name:='CheckBoxFB'+intToSTR(adresse); // affecter l'adresse du feu pour pouvoir le retrouver dans la procédure caption:='dem FB'; + font.color:=clBlack; Parent:=Formprinc.ScrollBox1; width:=100;height:=15; Top:=HtImg+15+((HtImg+EspY+20)*((rang-1) div NbreImagePLigne)); @@ -7357,6 +7398,17 @@ begin 3: begin prec:=Signaux[i].Adr_det3; actuel:=Signaux[i].Adr_el_suiv3; TypeElActuel:=Signaux[i].Btype_suiv3; end; 4: begin prec:=Signaux[i].Adr_det4; actuel:=Signaux[i].Adr_el_suiv4; TypeElActuel:=Signaux[i].Btype_suiv4; end; end; + if (prec=0) then + begin + s:='Erreur 780 : détecteur nul déclaré sur signal '+intToSTR(adresse); + Affiche(s,clred); + affichedebug(s,clred); + result:=0; + reserveTrainTiers:=false; + AdrTrain:=0; + exit; + end; + TypeElPrec:=Det; end else @@ -7519,7 +7571,7 @@ begin TypePrec:=det; if prec=0 then begin - Affiche('Msg 601 - feu '+intToSTR(prec)+' détecteur non renseigné ',clOrange); + Affiche('Msg 601 - Signal '+intToSTR(prec)+' détecteur non renseigné ',clOrange); if NivDebug=3 then AfficheDebug('Msg 602 - détecteur '+intToSTR(prec)+' non renseigné ',clOrange); signal_suivant_det:=0; if debug=3 then formprinc.Caption:=''; @@ -10672,8 +10724,8 @@ begin begin if aiguillage[index].position=const_inconnu then begin - Affiche('Attention : position de l''aiguillage '+IntToSTR(i)+' inconnue',clred); - AfficheDebug('Attention : position de l''aiguillage '+IntToSTR(i)+' inconnue',clred); + Affiche('Attention : position de l''aiguillage '+IntToSTR(i)+' inconnue',ClOrange); + AfficheDebug('Attention : position de l''aiguillage '+IntToSTR(i)+' inconnue',ClOrange); end; end; end; @@ -12634,6 +12686,7 @@ begin end; // positionne les composants de la fenêtre principale +// i : position X du splitter procedure positionne_elements(i : integer); begin with formprinc do @@ -12642,7 +12695,7 @@ begin GroupBox2.Left:=i+12; GroupBox3.Left:=i+12; ScrollBox1.Left:=i+12; - ScrollBox1.width:=GrandPanel.Width-i-5; + ScrollBox1.width:=GrandPanel.Width-i-20; Panel1.Left:=GroupBox1.Left+GroupBox1.Width+5; Panel1.top:=9; GroupBox1.Top:=5; @@ -12652,6 +12705,144 @@ begin end; end; +procedure composant(c : tComponent;fond,texte : tColor); +var cGB : TGroupBox; + cTE : tEdit; + cCB : tComboBox; + cPa : tPanel; + cLa : tLabel; + cSc : tScrollBox; + cSB : tcheckBox; + cSh : tShape; + cMe : tMemo; + cBu : Tbutton; + cRa : tRadioGroup; + cRb : tRadioButton; +begin + if c is Tshape then + begin + csH:=c as tShape; + csH.Brush.Color:=fond; + exit; + end; + if c is TGroupBox then + begin + cGB:=c as TgroupBox; + cGB.color:=fond; + cGB.font.color:=texte; + exit; + end; + if c is TRadioGroup then + begin + cRa:=c as TRadioGroup; + cRa.color:=fond; + cRa.font.color:=texte; + exit; + end; + if c is TRadioButton then + begin + cRb:=c as tRadioButton; + cRb.color:=fond; + cRb.font.color:=texte; + exit; + end; + if c is TMemo then + begin + cMe:=c as TMemo; + cMe.color:=fond; + cMe.font.color:=texte; + exit; + end; + if c is TGroupBox then + begin + cGB:=c as TgroupBox; + cGB.color:=fond; + cGB.font.color:=texte; + cGB.Repaint; + exit; + end; + if c is TEdit then + begin + cTE:=c as tEdit; + cTE.color:=fond; + cTE.Font.Color:=texte; + exit; + end; + if c is tComboBox then + begin + cCB:=c as tComboBox; + cCB.color:=fond; + cCb.Font.Color:=clWhite; + exit; + end; + if c is tPanel then + begin + cPa:=c as tPanel; + cPA.Color:=fond; + cPA.Font.Color:=texte; + exit; + end; + if c is tLabel then + begin + cLa:=c as tLabel; + cLa.Color:=fond; + cLa.Font.Color:=texte; + exit; + end; + if c is tCheckBox then + begin + cSb:=c as tCheckBox; + cSb.Color:=fond; + cSB.Font.Color:=texte; + exit; + end; +end; + +procedure couleurs_Princ; +var + fond,texte : tColor; + i : integer; + c : Tcomponent; + cSc: tScrollBox; +begin + fond:=couleurFond; + texte:=couleurTexte; + if sombre then + begin + formprinc.Color:=fond; + for i:=0 to formprinc.ComponentCount-1 do + begin + c:=formprinc.Components[i]; + //Affiche(c.Name,clyellow); + composant(c,fond,texte); + end; + + cSc:=Formprinc.FindComponent('ScrollBox1') as tScrollBox; + if assigned(cSc) then + begin + texte:=clBlack; + fond:=Formprinc.ScrollBox1.Color; + for i:=0 to formprinc.ScrollBox1.ComponentCount-1 do + begin + c:=formprinc.ScrollBox1.Components[i]; + //Affiche(c.Name,clLime); + composant(c,fond,texte); + end; + end; + end; +end; + +procedure maj_couleurs; +begin + couleurs_princ; + Couleurs_config; + couleurs_debug; + couleurs_SR; + couleurs_cdf; + couleurs_place; + couleurs_pilote; +end; + // démarrage principal du programme signaux_complexes procedure TFormPrinc.FormCreate(Sender: TObject); var n,t,i,index,OrgMilieu : integer; @@ -12668,6 +12859,7 @@ begin protocole:=1; filtrageDet0:=3; cdmHd:=0; + CouleurFond:=$404040 ; // services commIP CDM par défaut Srvc_Aig:=true; @@ -12721,6 +12913,7 @@ begin formatY:=-1; avecResa:=false; // réservation des aiguillages en mode normal serveurIPCDM_Touche:=false; + sombre:=false; AvecInit:=true; // &&&& avec initialisation des aiguillages ou pas Diffusion:=AvecInit; // mode diffusion publique + debug mise au point etc roulage1.visible:=false; @@ -12790,9 +12983,15 @@ begin procetape('Lecture de la configuration'); lit_config; + serveur_ouvert:=true; serverSocket.Port:=PortServeur; - ServerSocket.Open; - ServerSocket.Active:=true; + try + ServerSocket.Open; + except + serveur_ouvert:=false; + Affiche('Serveur signaux_complexes non ouvert, le port '+intToSTR(PortServeur)+' est utilisé',clred); + end; + if serveur_ouvert then ServerSocket.Active:=true; Menu_tco(NbreTCO); procetape('Lecture du TCO'); @@ -12816,7 +13015,6 @@ begin EditEnvoi.Visible:=true; end; - Application.ProcessMessages; // Initialisation des images des signaux procetape('Création des signaux'); @@ -12829,7 +13027,7 @@ begin if debug=1 then affiche('Création du signal '+intToSTR(i)+' ----------',clLime); cree_image(i); // et initialisation tableaux signaux end; - + Tempo_init:=5; // démarre les initialisation des signaux et des aiguillages dans 0,5 s if debug=1 then Affiche('Création TCO',clLime); @@ -12869,11 +13067,10 @@ begin //Align:=AlLeft; // si on ne met pas AlignLeft, alors le splitter n'est pas accrochable top:=formprinc.LabelTitre.top+formprinc.LabelTitre.Height+4;; width:=formprinc.width-30; - height:=formprinc.Height-StatusBar1.Height-LabelTitre.Height-63; + height:=formprinc.Height-StatusBar1.Height-LabelTitre.Height-66; Anchors:=[akLeft,akTop,akRight,akBottom]; end; - if avec_splitter then begin with Fenrich do @@ -12900,10 +13097,9 @@ begin Parent:=GrandPanel; Anchors:=[akTop,akRight,akBottom]; width:=GrandPanel.Width-SplitterV.Width-5; - height:=GrandPanel.Height-groupBox3.height-groupBox3.top-25; + height:=GrandPanel.Height-groupBox3.height-groupBox3.top-10; top:=GroupBox3.Top+GroupBox3.Height+5; end; - positionne_elements(splitterV.left); end @@ -12931,7 +13127,6 @@ begin end; end; - if (PosSplitter>0) and (PosSPlitter0) or (adr<0) then exit; + //if not(portCommOuvert) and not(parSocketLenz) and not(CDM_Connecte) then exit; + s:=editVitesse.Text; + val(s,vit,erreur); + if (erreur<>0) or (vit<-100) or (vit>100) then exit; + i:=0;s:=''; + if combotrains.itemindex<>-1 then + begin + s:=combotrains.Items[combotrains.itemindex]; + i:=index_train_nom(s); + end; + + //Affiche('Commande vitesse train '+s+' ('+intToSTR(adr)+') à '+IntToSTR(vit)+'%',cllime); + sens:=vit>0; + vitesse_loco(s,i,adr,vit,sens,true); + if s='' then s:=intToSTR(adr); end; procedure TFormPrinc.EditVitesseChange(Sender: TObject); @@ -17094,6 +17312,8 @@ begin if n>1 then affiche(intToSTR(n)+' clients connectés',clyellow); end; + + end. diff --git a/UnitSR.pas b/UnitSR.pas index cae9c66..125d991 100644 --- a/UnitSR.pas +++ b/UnitSR.pas @@ -126,6 +126,7 @@ var FormSR: TFormSR; Adr,IndexSig : integer; +procedure couleurs_SR; implementation @@ -464,8 +465,24 @@ begin maj_db; end; +procedure couleurs_SR; +var i : integer; + c : tComponent; +begin + if sombre then with formSR do + begin + color:=couleurfond; + for i:=0 to ComponentCount-1 do + begin + c:=Components[i]; + composant(c,couleurFond,couleurTexte); + end; + end; +end; + procedure TFormSR.FormCreate(Sender: TObject); var i : integer; + c : tcomponent; begin for i:=0 to 19 do begin @@ -486,6 +503,7 @@ begin ComboBoxAdr15.items.add(etats[i]); ComboBoxAdr16.items.add(etats[i]); end; + couleurs_SR; end; procedure TFormSR.BitBtnokClick(Sender: TObject); diff --git a/UnitTCO.dfm b/UnitTCO.dfm index 6ade91e..717c0d7 100644 --- a/UnitTCO.dfm +++ b/UnitTCO.dfm @@ -1,8 +1,8 @@ object FormTCO: TFormTCO - Left = 89 - Top = 111 + Left = 104 + Top = 226 Width = 1212 - Height = 580 + Height = 661 VertScrollBar.Visible = False Caption = 'c' Color = clBtnFace @@ -23,8 +23,8 @@ object FormTCO: TFormTCO OnKeyPress = FormKeyPress OnMouseWheel = FormMouseWheel DesignSize = ( - 1196 - 521) + 1204 + 610) PixelsPerInch = 96 TextHeight = 13 object LabelZoom: TLabel @@ -59,7 +59,7 @@ object FormTCO: TFormTCO Left = 10 Top = 15 Width = 687 - Height = 266 + Height = 347 HorzScrollBar.Smooth = True HorzScrollBar.Tracking = True VertScrollBar.Smooth = True @@ -71,12 +71,12 @@ object FormTCO: TFormTCO TabOrder = 1 DesignSize = ( 683 - 262) + 343) object ImageTCO: TImage Left = 120 Top = 41 Width = 486 - Height = 176 + Height = 257 Anchors = [akLeft, akTop, akRight, akBottom] AutoSize = True ParentShowHint = False @@ -108,7 +108,7 @@ object FormTCO: TFormTCO end object Panel1: TPanel Left = 2 - Top = 332 + Top = 413 Width = 1143 Height = 185 Anchors = [akLeft, akRight, akBottom] @@ -1227,7 +1227,7 @@ object FormTCO: TFormTCO end object PopupMenu1: TPopupMenu OnPopup = PopupMenu1Popup - Left = 368 + Left = 944 Top = 8 object MenuCouper: TMenuItem Caption = 'Couper' @@ -1245,7 +1245,7 @@ object FormTCO: TFormTCO Caption = '-' end object Annulercouper: TMenuItem - Caption = 'Annuler ctrl+Z' + Caption = 'Annuler ctrl+Z' OnClick = AnnulercouperClick end object N1: TMenuItem @@ -1285,7 +1285,7 @@ object FormTCO: TFormTCO Caption = '-' end object Toutslectionner1: TMenuItem - Caption = 'Tout s'#233'lectionner' + Caption = 'Tout s'#233'lectionner ctrl+A' OnClick = Toutslectionner1Click end object Inserer: TMenuItem @@ -1297,6 +1297,7 @@ object FormTCO: TFormTCO end object LigneDessous: TMenuItem Caption = 'Ligne en dessous' + Hint = 'ins'#232're une ligne en dessous' OnClick = LigneDessousClick end object N7: TMenuItem @@ -1304,10 +1305,12 @@ object FormTCO: TFormTCO end object Colonnegauche1: TMenuItem Caption = 'Colonne '#224' gauche' + Hint = 'ins'#232're une colonne '#224' gauche' OnClick = Colonnegauche1Click end object Colonnedroite1: TMenuItem Caption = 'Colonne '#224' droite' + Hint = 'ins'#232're une colonne '#224' droite' OnClick = Colonnedroite1Click end end @@ -1315,10 +1318,12 @@ object FormTCO: TFormTCO Caption = 'Supprimer' object SupprimeLigne: TMenuItem Caption = 'Ligne' + Hint = 'supprime la ligne point'#233'e' OnClick = SupprimeLigneClick end object Colonne: TMenuItem Caption = 'Colonne' + Hint = 'supprime la colonne point'#233'e' OnClick = ColonneClick end end @@ -1337,17 +1342,17 @@ object FormTCO: TFormTCO Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] - Left = 264 - Top = 408 + Left = 880 + Top = 8 end object ColorDialog1: TColorDialog OnShow = ColorDialog1Show - Left = 448 - Top = 432 + Left = 848 + Top = 8 end object MainMenuTCO: TMainMenu - Left = 1000 - Top = 48 + Left = 912 + Top = 8 object MenuTCO: TMenuItem Caption = 'TCO' object SauvegarderleTCO1: TMenuItem diff --git a/UnitTCO.pas b/UnitTCO.pas index 164f739..11edbdf 100644 --- a/UnitTCO.pas +++ b/UnitTCO.pas @@ -422,8 +422,8 @@ type procedure Mosaqueverticale1Click(Sender: TObject); procedure AfficherSignauxComplexes1Click(Sender: TObject); procedure Signalvertical180Click(Sender: TObject); - - private + + private { Déclarations privées } function index_TCOMainMenu : integer; public @@ -508,18 +508,18 @@ var TamponAffecte,TCO_modifie,clicsouris,prise_N, clicTCO,piloteAig,BandeauMasque,eval_format,sauve_tco,prise_droit,prise_haut, - prise_bas,prise_gauche,prise_NE,prise_NO,prise_SE,prise_SO, + prise_bas,prise_gauche,prise_NE,prise_NO,prise_SE,prise_SO,ligneAffiche,colonneAffiche, drag,TCOActive,TCOCree,ancienok,dbleClicTCO,auto_tcurs,EvtClicDet : boolean; - HtImageTCO,LargImageTCO,XminiSel,YminiSel,XCoupe,Ycoupe,Temposouris, + HtImageTCO,LargImageTCO,XminiSel,YminiSel,XCoupe,Ycoupe,Temposouris,ligne_supprime, XmaxiSel,YmaxiSel,AncienXMiniSel,AncienXMaxiSel,AncienYMiniSel,AncienYMaxiSel, Xclic,Yclic,XClicCellInserer,YClicCellInserer,RatioC,ModeCouleurCanton, AncienXClicCell,AncienYClicCell,TCODrag,epaisseur_voies,Ax,Ay,TpsBougeSouris, Epaisseur,oldX,oldY,offsetSourisY,offsetSourisX,AvecVerifIconesTCO,indexTrace,IndexTCOCourant, ancienTraceX,ancienTraceY,rangUndo,NbreTCO,IndexTCOCreate,deltaXrect,deltaYrect, - CellX,CellY : integer; + CellX,CellY,AncienXclic,AncienYclic,xCadre1,yCadre1,xCadre2,yCadre2,colonne_supprime : integer; - titre_Fonte : string; + titre_Fonte,s90,s91,s93,s94,s100,s101 : string; // structure de tous les tco TCO : array[1..10] of @@ -599,6 +599,8 @@ procedure init_tampon_copiercoller; procedure efface_trajet(det,train : integer); Procedure Texte_aig_fond(adresse : integer); procedure Maj_Aig_TCO(indexTCO : integer); +procedure encadre_ligne; +procedure encadre_colonne; implementation @@ -7019,7 +7021,6 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; moveto(xf,yf);lineto(xc,yc); if testbit(ep,1) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; lineto(xc,y0); - end; end; @@ -7100,48 +7101,47 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position,ep : integer; r : Trect; fond : tcolor; -procedure trajet_droit; - begin - couleur:=clvoies[indexTCO]; - if mode>0 then - begin - if position=const_droit then - begin - if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; - end; - end; + procedure trajet_droit; + begin + couleur:=clvoies[indexTCO]; + if mode>0 then + begin + if position=const_droit then + begin + if mode=1 then couleur:=clcanton[indexTCO]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; + end; + end; - with canvas do - begin - pen.color:=couleur; - if testbit(ep,0) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; - moveto(x0,y0);lineto(xc,yc); - if testbit(ep,4) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; - lineto(xf,yf); - end; - end; + with canvas do + begin + pen.color:=couleur; + if testbit(ep,0) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; + moveto(x0,y0);lineto(xc,yc); + if testbit(ep,4) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; + lineto(xf,yf); + end; + end; - procedure trajet_devie; - begin - couleur:=clvoies[indexTCO]; - if mode>0 then - begin - if position=const_devie then - begin - if mode=1 then couleur:=clcanton[indexTCO]; - if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; - end; - end; - - with canvas do - begin - pen.color:=couleur; - if testbit(ep,1) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; - Arc(x1,y1,x2,y2,x3,y3,x4,y4); //courbe - end; - end; + procedure trajet_devie; + begin + couleur:=clvoies[indexTCO]; + if mode>0 then + begin + if position=const_devie then + begin + if mode=1 then couleur:=clcanton[indexTCO]; + if mode=2 then couleur:=couleurTrain[TCO[IndexTCO,x,y].train]; + end; + end; + with canvas do + begin + pen.color:=couleur; + if testbit(ep,1) then pen.Width:=epaisseur div 2 else pen.Width:=epaisseur; + Arc(x1,y1,x2,y2,x3,y3,x4,y4); //courbe + end; + end; begin x0:=(x-1)*LargeurCell[indexTCO]; // x origine @@ -8792,9 +8792,12 @@ procedure TFormTCO.FormCreate(Sender: TObject); var s : string; begin if affevt or (debug=1) then Affiche('FormTCO'+intToSTR(indexTCOCreate)+' create',clyellow); + //Screen.OnActiveControlChange := ActiveControlChanged; offsetSourisY:=-10; // permet de tenir l'icone au milieu quand on fait un glisser offsetSourisX:=-10; RadioGroupSel.ItemIndex:=0; + ligne_supprime:=0; + colonne_supprime:=0; auto_tcurs:=true; TCO_modifie:=false; rangUndo:=1; @@ -8885,6 +8888,21 @@ begin ImagePalette23.Hint:=s;ImagePalette23.ShowHint:=true; ImagePalette25.Hint:=s;ImagePalette25.ShowHint:=true; + s90:='Insère une ligne au dessus'; + popupMenu1.Items[9][0].Hint:=s90; + s91:='Insère une ligne en dessous'; + popupMenu1.Items[9][1].Hint:=s91; + + s93:='Insère une colonne à gauche'; + popupMenu1.Items[9][3].Hint:=s93; + s94:='Insère une colonne à droite'; + popupMenu1.Items[9][4].Hint:=s94; + + s100:='Supprime la ligne pointée'; + popupMenu1.Items[10][0].Hint:=s100; + s101:='Supprime la colonne pointée'; + popupMenu1.Items[10][1].Hint:=s101; + tcoCree:=true; if debug=1 then Affiche('Fin création fenêtre TCO',clLime); end; @@ -9063,11 +9081,12 @@ end; // allume ou éteint (mode=0 ou 1) la voie du train "train", zone de det1 à det2 sur le TCO +// det1 et det2 doivent être consécutifs sur le TCO, mais peuvent être séparés par des aiguillages // si mode=0 : éteint // =1 : couleur détecteur allumé // =2 : couleur de l'index train // Ne nécessite pas que les aiguillages aoient bien positionnés entre det1 et det2 -// procédure récursive quand on passe par un aiguillage pour explorer les éléments opposés d'ou on vient si on l'aborde en pointe +// procédure récursive quand on passe par un aiguillage en pointe pour explorer les éléments opposés procedure zone_tco(indexTCO,det1,det2,train,mode: integer); var i,ir,adresse,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteration,indexIr : integer; memtrouve,sortir,casok,indextrouve : boolean; @@ -9099,342 +9118,341 @@ var i,ir,adresse,Bimage,direction,ancienX,ancienY,x,y,xn,yn,Xdet1,yDet1,iteratio y:=yn; end; -// El_Tco : trouve l'élément en x,y et constuit la route à l'élément de destination suivant, suivant -// les variables ancienX et ancienY -// x, y et ir sont locales pour des récursivités différentes, donc on les passe en paramètre pour transmettre à la -// récursivité suivante leur valeur, mais elles reprennent leur valeurs initiales à la remontée vers la résursivité appellante. -Procedure El_tco(x,y,train : integer; ir : integer); -var mdl : Tequipement; - i,j :integer; - sortir : boolean; -begin - // répète la route depuis un aiguillage - inc(iteration); - if DebugTCO then AfficheDebug('El_TCO',clorange); + // El_Tco : trouve l'élément en x,y et constuit la route à l'élément de destination suivant, suivant + // les variables ancienX et ancienY + // x, y et ir sont locales pour des récursivités différentes, donc on les passe en paramètre pour transmettre à la + // récursivité suivante leur valeur, mais elles reprennent leur valeurs initiales à la remontée vers la résursivité appellante. + Procedure El_tco(x,y,train : integer; ir : integer); + var mdl : Tequipement; + i,j :integer; + sortir : boolean; + begin + // répète la route depuis un aiguillage + inc(iteration); + if DebugTCO then AfficheDebug('El_TCO',clorange); - i:=0; - repeat - maj_route(indextco,x,y,train,ir); - adresse:=tco[indextco,x,y].Adresse ; - Bimage:=tco[indextco,x,y].Bimage; - if debugTCO then - begin - s:='X='+intToSTR(x)+' y='+intToSTR(y)+' Elément='+intToSTR(Bimage); - if adresse<>0 then s:=s+' Adresse='+intToSTR(adresse); - AfficheDebug(s,clyellow); - end; - casok:=false; - // vers case suivante: trouver le trajet pour rejoindre det1 à det2 + i:=0; + repeat + maj_route(indextco,x,y,train,ir); + adresse:=tco[indextco,x,y].Adresse ; + Bimage:=tco[indextco,x,y].Bimage; + if debugTCO then + begin + s:='X='+intToSTR(x)+' y='+intToSTR(y)+' Elément='+intToSTR(Bimage); + if adresse<>0 then s:=s+' Adresse='+intToSTR(adresse); + AfficheDebug(s,clyellow); + end; + casok:=false; + // vers case suivante: trouver le trajet pour rejoindre det1 à det2 - case Bimage of - // voie - 1 : begin - if debugTCO then - begin - s:='El 1';if adresse<>0 then s:=s+'adr='+intToStr(adresse); - AfficheDebug(s,clyellow); - end; - yn:=y; - if ancienXy) then begin xn:=x+1;xn:=x+1;end; - if (ancienX>x) and (ancienY=Y) then - begin - //pris en pointe - ancienX:=x; - ancienY:=y; - x:=x-1; - el_tco(x,y,train,ir); // essaye droit - // essayer dévié - if not(memtrouve) then + case Bimage of + // voie + 1 : begin + if debugTCO then begin - AncienY:=y; - AncienX:=x+1; - y:=y+1; - x:=x; - el_tco(x,y,train,ir); // nouvelle itération + s:='El 1';if adresse<>0 then s:=s+'adr='+intToStr(adresse); + AfficheDebug(s,clyellow); end; + yn:=y; + if ancienXx) and (ancienY<=Y) then begin xn:=x-1;end; - if (ancienXy) then begin xn:=x+1;xn:=x+1;end; + if (ancienX>x) and (ancienY=Y) then begin - AncienY:=y; - AncienX:=x-1; - y:=y-1; - x:=x; - el_tco(x,y,train,ir); // nouvelle itération - end; - end; - end; - - 4 : begin - //if debugTCO then AfficheDebug('El 4',clyellow); - if (ancienX>x) and (ancienY=Y) then begin xn:=x-1;end; - if (ancienX>x) and (ancienY>y) then begin xn:=x-1;end; - if (ancienXx) and (ancienY=Y) then - begin - // pris en pointe pos droite - ancienx:=x;ancieny:=y; - x:=x-1;y:=y; - el_tco(x,y,train,ir); - if not(memtrouve) then - begin - // essai dévié - AncienY:=y; - AncienX:=x+1; - y:=y-1;x:=x; - el_tco(x,y,train,ir); - end; - end; - end; - 6 : if ancienXx) and (ancienY>=Y) then begin xn:=x-1;yn:=y-1;end; - if (ancienX=Y) then begin xn:=x+1;yn:=y-1;end; - if (ancienX>x) and (ancienYx) and (ancienY>y) then - begin - // pris en pointe droit - ancienX:=x;ancienY:=y; - x:=x-1;y:=y-1; - el_tco(x,y,train,ir); - if not(memtrouve) then - begin - // essai dévié - AncienY:=y+1; - AncienX:=x+1; - y:=y+1;x:=x; - el_tco(x,y,train,ir); - end; - end; - end; - 15 : begin - if (ancienX>x) and (ancienY<=Y) then begin xn:=x-1;yn:=y+1;end; - if (ancienXY) then - begin - // aiguillage pris en pointe - ancienX:=x;ancienY:=y; - x:=x+1;y:=y-1; - // essayer droit - el_tco(x,y,train,ir); + //pris en pointe + ancienX:=x; + ancienY:=y; + x:=x-1; + el_tco(x,y,train,ir); // essaye droit // essayer dévié if not(memtrouve) then begin - AncienY:=y+1; - AncienX:=x-1; + AncienY:=y; + AncienX:=x+1; y:=y+1; x:=x; el_tco(x,y,train,ir); // nouvelle itération end; end; - - end; - 16 : if ancienXx) and (ancienY<=Y) then begin xn:=x-1;end; + if (ancienX0 then s:=s+'adr='+intToStr(adresse); - AfficheDebug(s,clyellow); + // aiguillage pris en pointe + // essayer droit + ancienX:=x;AncienY:=y; + x:=x+1; + el_tco(x,y,train,ir); + // essayer dévié + if not(memtrouve) then + begin + AncienY:=y; + AncienX:=x-1; + y:=y-1; + x:=x; + el_tco(x,y,train,ir); // nouvelle itération + end; end; - xn:=x; - casok:=true; - if (ancienY0 then - begin - j:=Index_Aig(adresse); - mdl:=aiguillage[j].modele; - if (mdl=tjs) or (mdl=tjd) then - begin - // tjd ou tjs - if ancienXx) and (ancienY=Y) then begin xn:=x-1;end; + if (ancienX>x) and (ancienY>y) then begin xn:=x-1;end; + if (ancienXx) and (ancienY=Y) then + begin + // pris en pointe pos droite + ancienx:=x;ancieny:=y; + x:=x-1;y:=y; + el_tco(x,y,train,ir); + if not(memtrouve) then + begin + // essai dévié + AncienY:=y; + AncienX:=x+1; + y:=y-1;x:=x; + el_tco(x,y,train,ir); + end; + end; + end; + 6 : if ancienXx) and (ancienY>=Y) then begin xn:=x-1;yn:=y-1;end; + if (ancienX=Y) then begin xn:=x+1;yn:=y-1;end; + if (ancienX>x) and (ancienYx) and not(Memtrouve) then // on va à gauche - begin - // essayer vers O - ancienX:=x;ancienY:=y; - x:=x-1; - el_tco(x,y,train,ir); - if not(memtrouve) then - begin - // essai vers SO - AncienY:=y; - AncienX:=x+1; - y:=y+1;x:=x; - el_tco(x,y,train,ir); - end; end; end; end; - - if (adresse=0) or (mdl=crois) then - // croisement - begin - if DebugTCO then AfficheDebug('Croisement',clyellow); - if (ancienXx) and (ancienY=Y) then begin xn:=x-1;yn:=y;end; - if (ancienXY) then begin xn:=x+1;yn:=y-1;end; - if (ancienX>x) and (ancienY0 then - begin - j:=Index_Aig(adresse); - mdl:=aiguillage[j].modele; - if (mdl=tjs) or (mdl=tjd) then + 14 : begin + if (ancienXx) and (ancienY>y) then begin - // tjd ou tjs - if ancienXx) and not(Memtrouve) then // on va à gauche - begin - // essayer vers O - ancienX:=x;ancienY:=y; - x:=x-1; - el_tco(x,y,train,ir); - if not(memtrouve) then - begin - // essai vers NO - AncienY:=y; - AncienX:=x+1; - y:=y-1;x:=x; - el_tco(x,y,train,ir); - end; end; end; end; + 15 : begin + if (ancienX>x) and (ancienY<=Y) then begin xn:=x-1;yn:=y+1;end; + if (ancienXY) then + begin + // aiguillage pris en pointe + ancienX:=x;ancienY:=y; + x:=x+1;y:=y-1; + // essayer droit + el_tco(x,y,train,ir); + // essayer dévié + if not(memtrouve) then + begin + AncienY:=y+1; + AncienX:=x-1; + y:=y+1; + x:=x; + el_tco(x,y,train,ir); // nouvelle itération + end; + end; + end; + 16 : if ancienX0 then s:=s+'adr='+intToStr(adresse); + AfficheDebug(s,clyellow); + end; + xn:=x; + casok:=true; + if (ancienY0 then + begin + j:=Index_Aig(adresse); + mdl:=aiguillage[j].modele; + if (mdl=tjs) or (mdl=tjd) then + begin + // tjd ou tjs + if ancienXx) and not(Memtrouve) then // on va à gauche + begin + // essayer vers O + ancienX:=x;ancienY:=y; + x:=x-1; + el_tco(x,y,train,ir); + if not(memtrouve) then + begin + // essai vers SO + AncienY:=y; + AncienX:=x+1; + y:=y+1;x:=x; + el_tco(x,y,train,ir); + end; + end; + end; + end; - if (adresse=0) or (mdl=crois) then - // croisement - begin - if DebugTCO then AfficheDebug('croisement',clyellow); - if (ancienXx) and (ancienY=Y) then begin casok:=true;xn:=x-1;end; - if (ancienX>x) and (ancienY>Y) then begin casok:=true;xn:=x-1;yn:=y-1;end; - if (ancienXx) and (ancienY=Y) then begin xn:=x-1;yn:=y;end; + if (ancienXY) then begin xn:=x+1;yn:=y-1;end; + if (ancienX>x) and (ancienY0 then + begin + j:=Index_Aig(adresse); + mdl:=aiguillage[j].modele; + if (mdl=tjs) or (mdl=tjd) then + begin + // tjd ou tjs + if ancienXx) and not(Memtrouve) then // on va à gauche + begin + // essayer vers O + ancienX:=x;ancienY:=y; + x:=x-1; + el_tco(x,y,train,ir); + if not(memtrouve) then + begin + // essai vers NO + AncienY:=y; + AncienX:=x+1; + y:=y-1;x:=x; + el_tco(x,y,train,ir); + end; + end; + end; + end; + + if (adresse=0) or (mdl=crois) then + // croisement + begin + if DebugTCO then AfficheDebug('croisement',clyellow); + if (ancienXx) and (ancienY=Y) then begin casok:=true;xn:=x-1;end; + if (ancienX>x) and (ancienY>Y) then begin casok:=true;xn:=x-1;yn:=y-1;end; + if (ancienX200) or (iteration>200) then sortir:=true; Maj_coords(AncienX,AncienY,x,y); until sortir or memtrouve; - if DebugTCO and not(memtrouve) then AfficheDebug('Fin de boucle',clOrange); + if DebugTCO and not(memtrouve) then AfficheDebug('Fin de boucle dét '+intToSTR(det2)+' non trouvé',clOrange); //mémoriser l'index de route si on a trouvé det2, et uniquement sur la première itération quand on l'a trouvé if memTrouve and not(indextrouve) then @@ -9752,7 +9770,7 @@ begin end; if i>200 then Affiche('Erreur 487 : limite d''itérations TCO',clred); if iteration>200 then Affiche('Erreur 488 : limite de récursivité TCO',clred); -end; + end; // Début de la procédure zone_tco @@ -10921,18 +10939,84 @@ begin result:=res; end; +// efface le contenu de la cellule, sauf le fond +procedure raz_cellule(indexTCO,x,y : integer); +begin + tco[indextco,x,y].Adresse:=0; + tco[indextco,x,y].Mode:=0; + tco[indextco,x,y].Trajet:=0; + tco[indextco,x,y].inverse:=false; + tco[indextco,x,y].repr:=0; + tco[indextco,x,y].Bimage:=0; + tco[indextco,x,y].liaisons:=0; + tco[indextco,x,y].epaisseurs:=0; + tco[indextco,x,y].buttoir:=0; + tco[indextco,x,y].pont:=0; + tco[indextco,x,y].sortie:=0; + tco[indextco,x,y].Texte:=''; + tco[indextco,x,y].Fonte:=''; + tco[indextco,x,y].FontStyle:=''; + tco[indextco,x,y].CoulFonte:=0; + // tco[indextco,x,y].CouleurFond:=0; + tco[indextco,x,y].PiedFeu:=0; + tco[indextco,x,y].x:=0; + tco[indextco,x,y].y:=0; + tco[indextco,x,y].xUndo:=0; + tco[indextco,x,y].yUndo:=0; + tco[indextco,x,y].FeuOriente:=0; +end; + +procedure insere_colonne(indexTCO,colonne : integer); +var x,y : integer; +begin + if NbreCellX[indexTCO]>=MaxCellX then exit; + for x:=NbreCellX[indexTCO] downto colonne do + begin + for y:=1 to NbreCellY[indexTCO] do tco[indextco,x+1,y]:=tco[indextco,x,y]; + end; + for y:=1 to NbreCellY[indexTCO] do + begin + raz_cellule(indextco,colonne,y); + tco[indextco,colonne,y].Couleurfond:=Clfond[IndexTCO]; + end; + inc(NbreCellX[indexTCO]); + tco_modifie:=true; +end; + +procedure insere_ligne(indexTCO,ligne : integer); +var x,y : integer; +begin + if NbreCellY[indexTCO]>=MaxCellY then exit; + for y:=NbreCellY[indexTCO] downto ligne do + for x:=1 to NbreCellX[indexTCO] do tco[indextco,x,y+1]:=tco[indextco,x,y]; + + for x:=1 to NbreCellX[indexTCO] do + begin + raz_cellule(indextco,x,ligne); + tco[indextco,x,ligne].Couleurfond:=Clfond[IndexTCO]; + end; + inc(NbreCellY[indexTCO],1); + tco_modifie:=true; +end; + procedure Annule(indextco : integer); var x,y,xu,yu,Xplace,yplace,adresse,i : integer; begin + if (TamponTCO_org.numTCO<>indexTCO) then exit; + + if ligne_supprime<>0 then insere_ligne(indexTCO,ligne_Supprime); + if colonne_supprime<>0 then insere_colonne(indexTCO,colonne_Supprime); + if TamponAffecte then begin - if (xCoupe<>0) and (ycoupe<>0) and (TamponTCO_org.numTCO=indexTCO) then + if (xCoupe<>0) and (ycoupe<>0) then begin for y:=TamponTCO_Org.y1 to TamponTCO_Org.y2 do // rectangle de la sélection for x:=TamponTCO_Org.x1 to TamponTCO_Org.x2 do begin xPlace:=xCoupe+x-TamponTCO_Org.x1; // destination yPlace:=yCoupe+y-TamponTCO_Org.y1; + if (xPlace<=NbreCellX[indexTCO]) and (yPlace<=NbreCellY[indexTCO]) then begin tco[indextco,xPlace,yPlace]:=tampontco[x,y]; @@ -10944,7 +11028,10 @@ begin end; end; Affiche_TCO(indextco); + tco_modifie:=true; tamponaffecte:=false; + ligne_supprime:=0; + colonne_supprime:=0; exit; end; @@ -10959,6 +11046,7 @@ begin if (xu<=NbreCellX[indexTCO]) and (yu<=NbreCellY[indexTCO]) then tco[indextco,xu,yu]:=undo[rangUndo].element[i]; end; Affiche_tco(indexTCO); + tco_modifie:=true; exit; end; end; @@ -10993,6 +11081,7 @@ begin moveto(x*LargeurCell[indexTCO],1); LineTo(x*LargeurCell[indexTCO],hauteurCell[indexTCO]*NbreCelly[indexTCO]); end; + // lignes horizontales for y:=1 to NbreCelly[indexTCO] do begin moveto(1,y*hauteurCell[indexTCO]); @@ -11001,32 +11090,6 @@ begin end; end; -// efface le contenu de la cellule, sauf le fond -procedure raz_cellule(indexTCO,x,y : integer); -begin - tco[indextco,x,y].Adresse:=0; - tco[indextco,x,y].Mode:=0; - tco[indextco,x,y].Trajet:=0; - tco[indextco,x,y].inverse:=false; - tco[indextco,x,y].repr:=0; - tco[indextco,x,y].Bimage:=0; - tco[indextco,x,y].liaisons:=0; - tco[indextco,x,y].epaisseurs:=0; - tco[indextco,x,y].buttoir:=0; - tco[indextco,x,y].pont:=0; - tco[indextco,x,y].sortie:=0; - tco[indextco,x,y].Texte:=''; - tco[indextco,x,y].Fonte:=''; - tco[indextco,x,y].FontStyle:=''; - tco[indextco,x,y].CoulFonte:=0; - // tco[indextco,x,y].CouleurFond:=0; - tco[indextco,x,y].PiedFeu:=0; - tco[indextco,x,y].x:=0; - tco[indextco,x,y].y:=0; - tco[indextco,x,y].xUndo:=0; - tco[indextco,x,y].yUndo:=0; - tco[indextco,x,y].FeuOriente:=0; -end; procedure copier(indexTCO : integer); var x,y : integer; @@ -11051,6 +11114,12 @@ end; procedure couper(indexTCO: integer); var x,y,XCell1,YCell1,xCell2,yCell2 : integer; begin + if (XclicCell[indexTCO]=0) or (YclicCell[indexTCO]=0) then exit; + //Affiche(intToSTR(ancienXclic)+' '+intToSTR(XclicCell[indexTCO]),clred); + if (AncienXclic=XclicCell[indexTCO]) and (AncienYclic=YclicCell[indexTCO]) then exit; + AncienXclic:=XclicCell[indexTCO]; + AncienYclic:=YclicCell[indexTCO]; + with formTCO[indexTCO] do begin EditAdrElement.Text:=''; @@ -11080,7 +11149,8 @@ begin TamponTCO_org.x2:=XclicCell[indexTCO];TamponTCO_org.y2:=YclicCell[indexTCO]; raz_cellule(indextco,XclicCell[indexTCO],YClicCell[indexTCO]); - + + TamponTCO_org.numTCO:=indexTCO; efface_entoure(indexTCO); efface_cellule(indexTCO,formTCO[indexTCO].ImageTCO.Canvas,XclicCell[indexTCO],YClicCell[indexTCO],PmCopy); TamponAffecte:=true; @@ -11159,6 +11229,26 @@ begin SelectionAffichee[indexTCO]:=true; end; +procedure selec_tout(indexTCO : integer); +begin + if indexTCO<0 then exit; + xminiSel:=0; + yminiSel:=0; + xMaxiSel:=(NbreCellX[indexTCO]-1)*LargeurCell[indexTCO]; + yMaxiSel:=(NbreCellY[indexTCO]-1)*hauteurCell[indexTCO]; + rAncien:=rect(xminiSel,YminiSel,xmaxiSel+LargeurCell[indexTCO],YMaxiSel+hauteurCell[indexTCO]); + + SelectionAffichee[indexTCO]:=true; + with formTCO[indexTCO].imageTCO.Canvas do + begin + Pen.Mode:=PmXor; + Pen.color:=clGrille[IndexTCO]; + Brush.Color:=clblue; + Rectangle(rAncien); + end; +end; + + // pour avoir les evts keydown, il faut dévalider les propriétés tabstop des boutons de la form. procedure TFormTCO.FormKeyDown(Sender: TObject; var Key: Word;Shift: TShiftState); var s,d,indexTCO,x,y : integer; @@ -11306,9 +11396,12 @@ begin end; end; - if (ssCtrl in Shift) and (Key = Ord('Z')) then + if (ssCtrl in Shift) then begin - annule(indexTCO); + case char(Key) of + 'Z' : annule(indexTCO); + 'A' : selec_tout(indexTCO); + end; exit; end; @@ -11322,51 +11415,6 @@ begin clicTCO:=false; end; end; -{ -procedure Elmentdroit1Click(Sender: TObject); -var indexTCO : integer; -begin - indexTCO:=Index_tco(sender); - dessin_1(indexTCO,FormTCO[indexTCO].ImageTCO.canvas,XClicCellInserer,YClicCellInserer,0); - FormTCO[indexTCO].EditAdrElement.Text:=IntToSTR(tco[indextco,XClicCellInserer,YClicCellInserer].Adresse); -end; - -procedure Courbegaucheversdroite1Click(Sender: TObject); -var Position: TPoint; - indexTCO : integer; -begin - indexTCO:=Index_tco(sender); - dessin_9(indexTCO,FormTCO[indexTCO].ImageTCO.canvas,XClicCellInserer,YClicCellInserer,0); - GetCursorPos(Position); -end; - -procedure Courbedroiteversgauche1Click(Sender: TObject); -var Position: TPoint; - indexTCO : integer; -begin - indexTCO:=Index_tco(sender); - dessin_8(indexTCO,FormTCO[indexTCO].ImageTCO.canvas,XClicCellInserer,YClicCellInserer,0); - GetCursorPos(Position); -end; - -procedure CourbeSupD1Click(Sender: TObject); -var Position: TPoint; - indexTCO : integer; -begin - indexTCO:=Index_tco(sender); - dessin_7(indexTCO,FormTCO[indexTCO].ImageTCO.canvas,XClicCellInserer,YClicCellInserer,0); - GetCursorPos(Position); -end; - -procedure CourbeSupG1Click(Sender: TObject); -var Position: TPoint; - indexTCO : integer; -begin - indexTCO:=Index_tco(sender); - dessin_6(indexTCO,FormTCO[indexTCO].ImageTCO.canvas,XClicCellInserer,YClicCellInserer,0); - GetCursorPos(Position); -end; -} procedure debut_drag(image : TImage); var h,l,indexTCO : integer; @@ -11677,7 +11725,6 @@ begin end_drag(12,x,y,Sender,Target); end; - procedure TFormTCO.ImagePalette13EndDrag(Sender, Target: TObject; X,Y: Integer); begin end_drag(13,x,y,Sender,Target); @@ -11754,6 +11801,8 @@ begin end; Affiche_TCO(indexTCO); TCO_modifie:=true; + ligne_supprime:=0; + colonne_supprime:=0; end; end; @@ -11766,6 +11815,8 @@ begin c:=c.GetParentComponent; // formTCO indexTCO:=index_tco(c); copier(indexTCO); + ligne_supprime:=0; + colonne_supprime:=0; end; // supprimer la sélection @@ -11778,6 +11829,8 @@ begin c:=c.GetParentComponent; // formTCO indexTCO:=index_tco(c); couper(indexTCO); + ligne_supprime:=0; + colonne_supprime:=0; end; @@ -12032,7 +12085,6 @@ begin if premier then result:=15; if not(premier) and not(dernier) then result:=21; end; - end; 16 : begin @@ -12240,24 +12292,21 @@ begin indexTCO:=index_tco(sender); GetCursorPos(Position); Position:=ImageTCO.screenToCLient(Position); - Xclic:=position.X; - YClic:=position.Y; - // coordonnées grille - Xclic:=Xclic div LargeurCell[indexTCO] + 1; - Yclic:=Yclic div hauteurCell[indexTCO] + 1; - XclicCell[indexTCO]:=Xclic; - YclicCell[indexTCO]:=Yclic; + Xclic:=position.X div LargeurCell[indexTCO] + 1; + Yclic:=position.Y div hauteurCell[indexTCO] + 1; + if button=mbLeft then begin if affEvt then Affiche('TCO Souris clicG enfoncée',clYellow); if dbleClicTCO then begin dbleClicTCO:=false;exit;end; - if not(clicSouris) then - begin - // front montant souris + // coordonnées grille + AncienXclic:=XclicCell[indexTCO]; + AncienYclic:=YclicCell[indexTCO]; - end; + XclicCell[indexTCO]:=Xclic; + YclicCell[indexTCO]:=Yclic; auto_tcurs:=true; clicsouris:=true; @@ -13155,7 +13204,7 @@ begin aiguillage[Index_Aig(117)].position:=const_devie; //debugTco:=true; - zone_tco(1,518,514,1,1); + zone_tco(1,527,519,1,1); // zone_tco(518,515,1); //zone_tco(522,514,1); @@ -13611,6 +13660,7 @@ begin c:=c.GetParentComponent; // scrollBox c:=c.GetParentComponent; // formTCO indexTCO:=index_tco(c); + indexTCOcourant:=indexTCO; PopUpMenu1.Items[9][0].Caption:='Ligne au dessus de la '+intToSTR(YclicCell[indexTCO]); PopUpMenu1.Items[9][1].Caption:='Ligne en dessous de la '+intToSTR(YclicCell[indexTCO]); @@ -13671,6 +13721,41 @@ begin PopUpMenu1.Items[6].Enabled:=false; end; +// encadre la ligne cliquée du tco courant +procedure encadre_ligne; +var ligneY : integer; +begin + ligneY:=YClicCell[indexTCOcourant]; + xCadre1:=1;yCadre1:=(ligneY-1)*HauteurCell[IndexTcoCourant]; + xCadre2:=NbreCellX[IndexTCOCourant]*LargeurCell[IndexTCOCourant] ; yCadre2:=(ligneY)*HauteurCell[IndexTcoCourant]; + with PcanvasTCO[indexTCOCourant] do + begin + pen.Mode:=pmXor; + pen.width:=5; + pen.Color:=clred; + Brush.Color:=clblack; + Rectangle(xCadre1,yCadre1,xCadre2,yCadre2); + ligneAffiche:=not(ligneAffiche); + end; +end; + +// encadre la colonne cliquée du tco courant +procedure encadre_colonne; +var ligneY : integer; +begin + ligneY:=XClicCell[indexTCOcourant]; + xCadre1:=(ligneY-1)*HauteurCell[IndexTcoCourant];yCadre1:=1; + xCadre2:=(ligneY)*HauteurCell[IndexTcoCourant]; yCadre2:=NbreCellY[IndexTCOCourant]*HauteurCell[IndexTcoCourant]; + with PcanvasTCO[indexTCOCourant] do + begin + pen.Mode:=pmXor; + pen.width:=5; + pen.Color:=clred; + Brush.color:=clBlack; + Rectangle(xCadre1,yCadre1,xCadre2,yCadre2); + colonneAffiche:=not(colonneAffiche); + end; +end; procedure TFormTCO.N3Click(Sender: TObject); var c : Tcomponent; @@ -13686,119 +13771,55 @@ begin actualise(IndexTCO); // actualiser après avoir affiché formConfCellTCO end; +procedure TFormTCO.LigneDessousClick(Sender: TObject); +var x,y,indexTCO : integer; + c : tcomponent; +begin + c:=popupmenu1.PopupComponent ; // imageTCO + c:=c.GetParentComponent; // scrollBox + c:=c.GetParentComponent; // formTCO + indexTCO:=index_tco(c); + + if NbreCellY[indexTCO]>=MaxCellY then exit; + TamponAffecte:=false; + init_tampon_copiercoller; + ligne_Supprime:=YClicCell[indexTCO]+1; // variable globale + insere_ligne(indexTCO,ligne_Supprime); + affiche_TCO(indexTCO); +end; - procedure TFormTCO.LigneDessusClick(Sender: TObject); - var x,y,indexTCO : integer; - c : tcomponent; +procedure TFormTCO.LigneDessusClick(Sender: TObject); +var c : tcomponent; + indexTCO : integer; begin c:=popupmenu1.PopupComponent ; // imageTCO c:=c.GetParentComponent; // scrollBox c:=c.GetParentComponent; // formTCO indexTCO:=index_tco(c); + if NbreCellY[indexTCO]>=MaxCellY then exit; TamponAffecte:=false; init_tampon_copiercoller; - - for y:=NbreCellY[indexTCO]-1 downto YClicCell[indexTCO] do - for x:=1 to NbreCellX[indexTCO] do tco[indextco,x,y+1]:=tco[indextco,x,y]; - - for x:=1 to NbreCellX[indexTCO] do - begin - raz_cellule(indextco,x,YClicCell[indexTCO]); - end; - inc(NbreCellY[indexTCO]); - affiche_TCO(indexTCO); -end; - -procedure TFormTCO.LigneDessousClick(Sender: TObject); -var x,y,indexTCO : integer; - c : tcomponent; -begin - c:=popupmenu1.PopupComponent ; // imageTCO - c:=c.GetParentComponent; // scrollBox - c:=c.GetParentComponent; // formTCO - indexTCO:=index_tco(c); - if NbreCellY[indexTCO]>=MaxCellY then exit; - TamponAffecte:=false; - init_tampon_copiercoller; - - for y:=NbreCellY[indexTCO] downto YClicCell[indexTCO]+1 do - begin - for x:=1 to NbreCellX[indexTCO] do tco[indextco,x,y+1]:=tco[indextco,x,y]; - end; - for x:=1 to NbreCellX[indexTCO] do - begin - raz_cellule(indextco,x,YClicCell[indexTCO]); - end; - inc(NbreCellY[indexTCO]); - affiche_TCO(indexTCO); -end; - -procedure TFormTCO.SupprimeLigneClick(Sender: TObject); -var x,y,indexTCO : integer; - c : tcomponent; -begin - c:=popupmenu1.PopupComponent ; // imageTCO - c:=c.GetParentComponent; // scrollBox - c:=c.GetParentComponent; // formTCO - indexTCO:=index_tco(c); - if NbreCellY[indexTCO]<=1 then exit; - TamponAffecte:=false; - // tampon de sauvegarde - TamponTCO_org.numTCO:=indexTCO; - TamponTCO_Org.NbreCellX:=NbreCellX[indexTCO]; - TamponTCO_Org.NbreCellY:=NbreCellY[indexTCO]; - TamponTCO_Org.x1:=1; - TamponTCO_Org.x2:=NbreCellX[indexTCO]; - TamponTCO_Org.y1:=YClicCell[indexTCO]; - TamponTCO_Org.y2:=YClicCell[indexTCO]; - xcoupe:=1;ycoupe:=1; - for y:=TamponTCO_Org.y1 to TamponTCO_Org.y2 do - for x:=TamponTCO_Org.x1 to TamponTCO_Org.x2 do - begin - //Affiche(intToSTR(x)+' '+intToSTR(y),clyellow); - tampontco[x,y]:=tco[indextco,x,y]; - end; - TamponAffecte:=true; - - - // supression ligne - for y:=YClicCell[indexTCO] to NbreCellY[indexTCO]-1 do - begin - for x:=1 to NbreCellX[indexTCO] do tco[indextco,x,y]:=tco[indextco,x,y+1]; - end; - for x:=1 to NbreCellX[indexTCO] do - begin - raz_cellule(indextco,x,NbreCellY[indexTCO]); - tco[indextco,x,NbreCellY[indexTCO]].Couleurfond:=Clfond[IndexTCO]; - end; - dec(NbreCellY[indexTCO]); - + ligne_Supprime:=YClicCell[indexTCO]; // variable globale + insere_ligne(indexTCO,ligne_Supprime); affiche_TCO(indexTCO); end; +// insersion colonne procedure TFormTCO.Colonnegauche1Click(Sender: TObject); - var x,y,indexTCO : integer; - c : tcomponent; +var indexTCO : integer; + c : tcomponent; begin c:=popupmenu1.PopupComponent ; // imageTCO c:=c.GetParentComponent; // scrollBox c:=c.GetParentComponent; // formTCO indexTCO:=index_tco(c); if NbreCellX[indexTCO]>=MaxCellX then exit; + TamponAffecte:=false; init_tampon_copiercoller; - - for x:=NbreCellX[indexTCO] downto XClicCell[indexTCO] do - begin - for y:=1 to NbreCellY[indexTCO] do tco[indextco,x+1,y]:=tco[indextco,x,y]; - end; - for y:=1 to NbreCellY[indexTCO] do - begin - raz_cellule(indextco,XClicCell[indexTCO],y); - tco[indextco,XClicCell[indexTCO],y].Couleurfond:=Clfond[IndexTCO]; - end; - inc(NbreCellX[indexTCO]); + colonne_supprime:=XClicCell[indexTCO]; + insere_colonne(indexTCO,colonne_supprime); affiche_TCO(indexTCO); end; @@ -13811,23 +13832,65 @@ begin c:=c.GetParentComponent; // formTCO indexTCO:=index_tco(c); if NbreCellX[indexTCO]>=MaxCellX then exit; + TamponAffecte:=false; - init_tampon_copiercoller; - - for x:=NbreCellX[indexTCO] downto XClicCell[indexTCO]+1 do - begin - for y:=1 to NbreCellY[indexTCO] do tco[indextco,x+1,y]:=tco[indextco,x,y]; - end; - for y:=1 to NbreCellY[indexTCO] do - begin - raz_cellule(indextco,XClicCell[indexTCO]+1,y); - tco[indextco,XClicCell[indexTCO]+1,y].Couleurfond:=Clfond[IndexTCO]; - end; - inc(NbreCellX[indexTCO]); + colonne_supprime:=XClicCell[indexTCO]+1; + insere_colonne(indexTCO,colonne_supprime); affiche_TCO(indexTCO); end; + +procedure TFormTCO.SupprimeLigneClick(Sender: TObject); +var x,y,indexTCO : integer; + c : tcomponent; +begin + c:=popupmenu1.PopupComponent ; // imageTCO + c:=c.GetParentComponent; // scrollBox + c:=c.GetParentComponent; // formTCO + indexTCO:=index_tco(c); + if NbreCellY[indexTCO]<=1 then exit; + TamponAffecte:=true; + ligne_supprime:=YClicCell[indexTCO]; + // tampon de sauvegarde + + TamponTCO_org.numTCO:=indexTCO; + TamponTCO_Org.NbreCellX:=NbreCellX[indexTCO]; + TamponTCO_Org.NbreCellY:=NbreCellY[indexTCO]; + TamponTCO_Org.x1:=1; + TamponTCO_Org.y1:=ligne_supprime; + TamponTCO_Org.x2:=NbreCellX[indexTCO]; + TamponTCO_Org.y2:=ligne_supprime; + + // case de destination + xcoupe:=1; + ycoupe:=ligne_supprime; + + // remplir tempon de sauvegarde + for y:=TamponTCO_Org.y1 to TamponTCO_Org.y2 do + for x:=TamponTCO_Org.x1 to TamponTCO_Org.x2 do + begin + //Affiche(intToSTR(x)+' '+intToSTR(y),clyellow); + tampontco[x,y]:=tco[indextco,x,y]; + end; + + // supression ligne + for y:=YClicCell[indexTCO] to NbreCellY[indexTCO]-1 do + begin + for x:=1 to NbreCellX[indexTCO] do tco[indextco,x,y]:=tco[indextco,x,y+1]; + end; + for x:=1 to NbreCellX[indexTCO] do + begin + raz_cellule(indextco,x,NbreCellY[indexTCO]); + tco[indextco,x,NbreCellY[indexTCO]].Couleurfond:=Clfond[IndexTCO]; + end; + dec(NbreCellY[indexTCO]); + TCO_modifie:=true; + affiche_TCO(indexTCO); +end; + + + // suppression colonne procedure TFormTCO.ColonneClick(Sender: TObject); var x,y,indexTCO : integer; @@ -13838,21 +13901,27 @@ begin c:=c.GetParentComponent; // formTCO indexTCO:=index_tco(c); if NbreCellX[indexTCO]<=1 then exit; - TamponAffecte:=false; + TamponAffecte:=true; + colonne_supprime:=XClicCell[indexTCO]; + // tampon de sauvegarde + TamponTCO_org.numTCO:=indexTCO; TamponTCO_Org.NbreCellX:=NbreCellX[indexTCO]; TamponTCO_Org.NbreCellY:=NbreCellY[indexTCO]; - TamponTCO_Org.x1:=xClicCell[indexTCO]; - TamponTCO_Org.x2:=xClicCell[indexTCO]; + TamponTCO_Org.x1:=colonne_supprime; + TamponTCO_Org.x2:=colonne_supprime; TamponTCO_Org.y1:=1; TamponTCO_Org.y2:=NbreCellY[indexTCO]; - xcoupe:=1;ycoupe:=1; + + // cellule de destination + xcoupe:=colonne_supprime; + ycoupe:=1; + for y:=TamponTCO_Org.y1 to TamponTCO_Org.y2 do for x:=TamponTCO_Org.x1 to TamponTCO_Org.x2 do tampontco[x,y]:=tco[indextco,x,y]; - TamponAffecte:=true; - - // supression colonne + + // supression colonne for x:=xClicCell[indexTCO] to NbreCellx[indexTCO]-1 do begin for y:=1 to NbreCelly[indexTCO] do @@ -13866,7 +13935,7 @@ begin tco[indextco,NbreCellx[indexTCO],y].CouleurFond:=Clfond[IndexTCO]; end; dec(NbreCellX[indexTCO]); - + TCO_modifie:=true; affiche_TCO(indexTCO); end; @@ -13917,7 +13986,10 @@ begin {GetCursorPos(Position); x:=position.x div LargeurCell[indexTCO] +1 ; y:=position.Y div hauteurCell[indexTCO] +1 ; - } + ScrollBox.HorzScrollBar.position:=x; + ScrollBox.VertScrollBar.position:=y; + exit;} + maxi:=ScrollBox.HorzScrollBar.Range-ScrollBox.ClientWidth; i:=round(xClicCell[indexTCO]*maxi/NbreCellx[indexTCO]); ScrollBox.HorzScrollBar.position:=i; @@ -14034,34 +14106,25 @@ begin affiche_cellule(indexTCO,XClicCell[indexTCO],YClicCell[indexTCO]); end; + procedure TFormTCO.Toutslectionner1Click(Sender: TObject); -var c: tcomponent; - indextco : integer; +var c: tComponent; + indexTCO : integer; begin c:=popupmenu1.PopupComponent ; // imageTCO c:=c.GetParentComponent; // scrollBox c:=c.GetParentComponent; // formTCO indexTCO:=index_tco(c); - xminiSel:=0; - yminiSel:=0; - xMaxiSel:=(NbreCellX[indexTCO]-1)*LargeurCell[indexTCO]; - yMaxiSel:=(NbreCellY[indexTCO]-1)*hauteurCell[indexTCO]; - rAncien:=rect(xminiSel,YminiSel,xmaxiSel+LargeurCell[indexTCO],YMaxiSel+hauteurCell[indexTCO]); - - SelectionAffichee[indexTCO]:=true; - with formTCO[indexTCO].imageTCO.Canvas do - begin - Pen.Mode:=PmXor; - Pen.color:=clGrille[IndexTCO]; - Brush.Color:=clblue; - Rectangle(rAncien); - end; + selec_tout(indexTCO); end; procedure dessinerTCO(indexTCO : integer); begin if not(modetrace[indexTCO]) then begin + tamponAffecte:=false; + ligne_supprime:=0; + colonne_supprime:=0; modetrace[indexTCO]:=true; indexTrace:=0; traceXY[1].x:=0; @@ -14232,7 +14295,6 @@ begin auto_tcurs:=false; end; - procedure TFormTCO.ImagePalette52DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); begin @@ -14352,5 +14414,6 @@ begin end; end; + end. diff --git a/Unitplace.pas b/Unitplace.pas index 7b6e58e..dcf84ef 100644 --- a/Unitplace.pas +++ b/Unitplace.pas @@ -83,6 +83,8 @@ type var FormPlace: TFormPlace; +procedure couleurs_place; + implementation uses UnitConfig, UnitTCO; @@ -529,9 +531,27 @@ begin placement[6].detdir:=i; end; +procedure couleurs_place; +var i : integer; + c : tComponent; +begin + if sombre then with formPlace do + begin + color:=couleurFond; + for i:=0 to ComponentCount-1 do + begin + c:=Components[i]; + composant(c,couleurFond,couleurTexte); + end; + end; +end; + procedure TFormPlace.FormCreate(Sender: TObject); +var c : tcomponent; + i : integer; begin PlaceAffiche:=true; + couleurs_place; end; procedure TFormPlace.BitBtn1Click(Sender: TObject); diff --git a/verif_version.pas b/verif_version.pas index 2b70ee6..899017b 100644 --- a/verif_version.pas +++ b/verif_version.pas @@ -25,7 +25,7 @@ var verifVersion,notificationVersion : boolean; date_creation,nombre_tel : string; -Const Version='8.35'; // sert à la comparaison de la version publiée +Const Version='8.36'; // sert à la comparaison de la version publiée SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace function GetCurrentProcessEnvVar(const VariableName: string): string; diff --git a/versions.txt b/versions.txt index 3cb7a5f..ebf218c 100644 --- a/versions.txt +++ b/versions.txt @@ -219,4 +219,6 @@ version 8.34 : Correction signal Unisemaf. version 8.35 : Correction ajout de signaux et d'aiguillages. Renforcement de la vérification de la cohérence. Amélioration de l'édition des TJD. +version 8.36 : Création d'un mode de fond sombre modifiable pour l'affichage. + Amélioration édition des lignes et colonnes du TCO.