Bjr à tous,

La bascule fiche / unité est inopérante sur certaines fiches.
Avez-vous été confronté à ce problème gonflant ++++ ?

Fiche LFM:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
 
object frmCalculette: TfrmCalculette
  Left = -1659
  Height = 716
  Top = 188
  Width = 1051
  Caption = 'frmCalculette'
  ClientHeight = 716
  ClientWidth = 1051
  Font.CharSet = ANSI_CHARSET
  Font.Color = clBlack
  Font.Height = -13
  Font.Name = 'Arial'
  Font.Pitch = fpVariable
  Font.Quality = fqDraft
  Font.Style = [fsBold]
  OnClose = FormClose
  OnCloseQuery = FormCloseQuery
  Position = poScreenCenter
  LCLVersion = '2.0.0.4'
  object BitBtn1: TBitBtn
    Left = 805
    Height = 26
    Top = 686
    Width = 120
    Anchors = [akRight, akBottom]
    DefaultCaption = True
    Font.CharSet = ANSI_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Arial'
    Font.Pitch = fpVariable
    Font.Quality = fqDraft
    Font.Style = [fsBold]
    Kind = bkOK
    ModalResult = 1
    ParentFont = False
    TabOrder = 2
  end
  object BitBtn2: TBitBtn
    Left = 929
    Height = 26
    Top = 686
    Width = 120
    Anchors = [akRight, akBottom]
    Cancel = True
    DefaultCaption = True
    Font.CharSet = ANSI_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Arial'
    Font.Pitch = fpVariable
    Font.Quality = fqDraft
    Font.Style = [fsBold]
    Kind = bkCancel
    ModalResult = 2
    ParentFont = False
    TabOrder = 0
  end
  object Panel1: TPanel
    Left = 0
    Height = 680
    Top = 4
    Width = 1045
    Anchors = [akTop, akLeft, akRight, akBottom]
    BevelOuter = bvLowered
    ClientHeight = 680
    ClientWidth = 1045
    Font.CharSet = ANSI_CHARSET
    Font.Color = clBlack
    Font.Height = -13
    Font.Name = 'Arial'
    Font.Pitch = fpVariable
    Font.Quality = fqDraft
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 1
    inline CdrCalculette1: TCdrCalculette
      Left = 1
      Height = 678
      Top = 1
      Width = 1043
      ClientHeight = 678
      ClientWidth = 1043
      DesignLeft = 136
      DesignTop = 408
      inherited PageControl1: TPageControl
        Height = 678
        Width = 1043
        inherited tabShtCalculatrice: TTabSheet
          inherited Panel8: TPanel
            inherited SpeedButton1: TSpeedButton
              Flat = False
            end
          end
        end
        inherited tabShtConvertisseur: TTabSheet
          inherited PairSplitter2: TPairSplitter
            inherited PairSplitterSide3: TPairSplitterSide
              inherited Panel7: TPanel
                inherited SpeedButton2: TSpeedButton
                  Flat = False
                end
              end
              inherited Panel1: TPanel
                inherited SpeedButton3: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton4: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton17: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton9: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton33: TSpeedButton
                  Flat = False
                end
              end
              inherited Panel11: TPanel
                inherited SpeedButton6: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton28: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton8: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton7: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton5: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton14: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton16: TSpeedButton
                  Flat = False
                end
              end
            end
            inherited PairSplitterSide4: TPairSplitterSide
              inherited Panel6: TPanel
                inherited grbxAdditionalLayers: TGroupBox
                  inherited SpeedButton23: TSpeedButton
                    Flat = False
                  end
                  inherited SpeedButton26: TSpeedButton
                    Flat = False
                  end
                  inherited SpeedButton27: TSpeedButton
                    Flat = False
                  end
                  inherited SpeedButton29: TSpeedButton
                    Flat = False
                  end
                  inherited SpeedButton30: TSpeedButton
                    Flat = False
                  end
                  inherited SpeedButton31: TSpeedButton
                    Flat = False
                  end
                  inherited SpeedButton32: TSpeedButton
                    Flat = False
                  end
                end
              end
            end
          end
        end
        inherited tabShtGenerateurQRCode: TTabSheet
          ClientHeight = 649
          ClientWidth = 1035
          inherited Panel10: TPanel
            Height = 622
            Width = 1153
            ClientHeight = 622
            ClientWidth = 1153
            inherited PairSplitter7: TPairSplitter
              Height = 618
              Width = 1149
              inherited PairSplitterSide13: TPairSplitterSide
                Height = 618
                ClientHeight = 618
                inherited SpeedButton15: TSpeedButton
                  Flat = False
                end
                inherited SpeedButton18: TSpeedButton
                  Flat = False
                end
                inherited btnCreateGUID: TButton
                  Top = 494
                end
                inherited editGUID: TEdit
                  Top = 494
                end
                inherited lbPosCursorSynEdit: TStaticText
                  Top = 457
                end
                inherited editTextToEncodeQR: TMemo
                  Height = 386
                end
              end
              inherited PairSplitterSide14: TPairSplitterSide
                Height = 618
                Width = 728
                ClientWidth = 728
                ClientHeight = 618
                inherited pnlQRCode: TPanel
                  Height = 618
                  Width = 728
                  Align = alClient
                  ClientHeight = 618
                  ClientWidth = 728
                  inherited VueQRCode: TBarcodeQR
                    Height = 614
                    Width = 724
                  end
                end
              end
            end
          end
        end
        inherited tabShtPascalScript: TTabSheet
          ClientHeight = 649
          ClientWidth = 1156
          inherited CdrPascalScript1: TCdrPascalScript
            Height = 649
            Width = 1156
            ClientHeight = 649
            ClientWidth = 1156
            inherited pnlEditor: TPanel
              Height = 593
              Width = 1148
              ClientHeight = 593
              ClientWidth = 1148
              inherited PairSplitter4: TPairSplitter
                Height = 591
                Width = 1146
                inherited PairSplitterSide7: TPairSplitterSide
                  Width = 1146
                  ClientWidth = 1146
                  inherited PairSplitter6: TPairSplitter
                    Width = 1146
                    inherited PairSplitterSide12: TPairSplitterSide
                      Width = 853
                      ClientWidth = 853
                      inherited editPascalScript: TSynEdit
                        Width = 853
                      end
                    end
                  end
                end
                inherited PairSplitterSide8: TPairSplitterSide
                  Height = 281
                  Width = 1146
                  ClientWidth = 1146
                  ClientHeight = 281
                  inherited PageControlMsgsOutputs: TPageControl
                    Height = 281
                    Width = 1146
                    inherited tabShtCompiloMessages: TTabSheet
                      ClientHeight = 252
                      ClientWidth = 1138
                      inherited lsbPSMessages: TListBox
                        Height = 252
                        Width = 1138
                      end
                    end
                    inherited tabShtConsoleOutput: TTabSheet
                      ClientHeight = 252
                      ClientWidth = 1138
                      inherited editPSOutPut: TSynEdit
                        Height = 249
                        Width = 1095
                      end
                      inherited Panel2: TPanel
                        Left = 1096
                        Height = 248
                        ClientHeight = 248
                        inherited SpeedButton11: TSpeedButton
                          Flat = False
                        end
                      end
                    end
                  end
                end
              end
            end
            inherited pnlButtons: TPanel
              inherited SpeedButton1: TSpeedButton
                Flat = False
              end
              inherited SpeedButton2: TSpeedButton
                Flat = False
              end
              inherited SpeedButton3: TSpeedButton
                Flat = False
              end
              inherited SpeedButton4: TSpeedButton
                Flat = False
              end
              inherited SpeedButton7: TSpeedButton
                Flat = False
              end
            end
            inherited lbStatusPSScript: TStaticText
              Left = 1016
            end
          end
        end
        inherited tabShtDeclimag: TTabSheet
          inherited Panel3: TPanel
            inherited SpeedButton13: TSpeedButton
              Flat = False
            end
          end
          inherited pnlTableauDeclimag: TPanel
            inherited SpeedButton11: TSpeedButton
              Flat = False
            end
            inherited SpeedButton12: TSpeedButton
              Flat = False
            end
          end
        end
        inherited tabShtInerties: TTabSheet
          inherited Panel2: TPanel
            inherited PageControl2: TPageControl
              inherited TabSheet1: TTabSheet
                inherited CdrDGCDrawingContext1: TCdrDGCDrawingContext
                  Height = 657
                  Width = 749
                  ClientHeight = 657
                  ClientWidth = 749
                  DesignTop = 201
                  inherited pnlVue: TPanel
                    Height = 621
                    Width = 718
                    ClientHeight = 621
                    ClientWidth = 718
                    inherited Vue: TPaintBox
                      Height = 619
                      Width = 716
                    end
                  end
                  inherited lbMousePosition: TStaticText
                    Top = 626
                    Width = 614
                  end
                  inherited SpeedButton12: TSpeedButton
                    Left = 717
                    Flat = False
                  end
                  inherited SpeedButton13: TSpeedButton
                    Left = 717
                    Flat = False
                  end
                  inherited SpeedButton14: TSpeedButton
                    Left = 717
                    Flat = False
                  end
                  inherited SpeedButton15: TSpeedButton
                    Left = 717
                    Flat = False
                  end
                  inherited SpeedButton16: TSpeedButton
                    Left = 717
                    Flat = False
                  end
                  inherited SpeedButton17: TSpeedButton
                    Left = 717
                    Flat = False
                  end
                  inherited SpeedButton18: TSpeedButton
                    Left = 717
                    Top = 591
                    Flat = False
                  end
                  inherited SpeedButton19: TSpeedButton
                    Left = 654
                    Top = 625
                    Flat = False
                  end
                  inherited SpeedButton20: TSpeedButton
                    Left = 686
                    Top = 625
                    Flat = False
                  end
                  inherited SpeedButton21: TSpeedButton
                    Left = 717
                    Top = 625
                  end
                  inherited SpeedButton22: TSpeedButton
                    Left = 622
                    Top = 625
                    Flat = False
                  end
                end
              end
              inherited TabSheet2: TTabSheet
                inherited CdrDGCDrawingContext2: TCdrDGCDrawingContext
                  Height = 657
                  Width = 751
                  ClientHeight = 657
                  ClientWidth = 751
                  DesignTop = 201
                  inherited pnlVue: TPanel
                    Height = 621
                    Width = 720
                    ClientHeight = 621
                    ClientWidth = 720
                    inherited Vue: TPaintBox
                      Height = 619
                      Width = 718
                    end
                  end
                  inherited lbMousePosition: TStaticText
                    Top = 626
                    Width = 616
                  end
                  inherited SpeedButton12: TSpeedButton
                    Left = 719
                    Flat = False
                  end
                  inherited SpeedButton13: TSpeedButton
                    Left = 719
                    Flat = False
                  end
                  inherited SpeedButton14: TSpeedButton
                    Left = 719
                    Flat = False
                  end
                  inherited SpeedButton15: TSpeedButton
                    Left = 719
                    Flat = False
                  end
                  inherited SpeedButton16: TSpeedButton
                    Left = 719
                    Flat = False
                  end
                  inherited SpeedButton17: TSpeedButton
                    Left = 719
                    Flat = False
                  end
                  inherited SpeedButton18: TSpeedButton
                    Left = 719
                    Top = 591
                    Flat = False
                  end
                  inherited SpeedButton19: TSpeedButton
                    Left = 656
                    Top = 625
                    Flat = False
                  end
                  inherited SpeedButton20: TSpeedButton
                    Left = 688
                    Top = 625
                    Flat = False
                  end
                  inherited SpeedButton21: TSpeedButton
                    Left = 719
                    Top = 625
                  end
                  inherited SpeedButton22: TSpeedButton
                    Left = 624
                    Top = 625
                    Flat = False
                  end
                end
              end
            end
          end
        end
        inherited tabShtTextures: TTabSheet
          inherited CdrTextures1: TCdrTextures
            Height = 703
            Width = 1222
            ClientHeight = 703
            ClientWidth = 1222
            inherited Panel2: TPanel
              Left = 811
            end
            inherited Panel3: TPanel
              Left = 811
            end
            inherited Panel4: TPanel
              Left = 811
            end
            inherited Panel1: TPanel
              Width = 802
              ClientWidth = 802
              inherited PaintBox1: TPaintBox
                Width = 800
              end
            end
            inherited Panel6: TPanel
              Left = 811
            end
            inherited editCodePascalTexture: TSynEdit
              Height = 531
              Width = 801
            end
          end
        end
      end
    end
  end
  object lbDocTopoName: TStaticText
    Left = 2
    Height = 21
    Top = 689
    Width = 552
    Anchors = [akLeft, akBottom]
    BorderStyle = sbsSunken
    Caption = 'lbDocTopoName'
    TabOrder = 3
  end
end
Unité:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
 
// 25/11/2013: Déplacement du code de la calculette dans un cadre CadreCalculette.pas
unit dlgCalculette;
{$INCLUDE CompilationParameters.inc}
interface
uses
  {$INCLUDE SelectionLangues.inc} // insère les unités en fonction de la langue
  Common,
  StructuresDonnees,
  CadreCalculette,
  {$ifdef CALCULETTE_EMBEDDED_IN_GHTOPO}
  UnitClasseMaillage,
  ToporobotClasses2012,
  UnitEntitesExtended,
  {$endif CALCULETTE_EMBEDDED_IN_GHTOPO}
  Classes, SysUtils,
  Forms, Controls, Graphics, Dialogs, Buttons,
  ExtCtrls, StdCtrls, SynHighlighterPas, Types;
type  { TfrmCalculette }
  TfrmCalculette = class(TForm)
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    CdrCalculette1: TCdrCalculette;
    Panel1: TPanel;
    lbDocTopoName: TStaticText;
    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
  private
    FMyTabIndex: integer;
    {$ifdef CALCULETTE_EMBEDDED_IN_GHTOPO}
    FDocuTopo: TToporobotStructure2012;
    FBDDEntites: TBDDEntites;
    FMaillage: TMaillage;
    //FLassoDeSelection: TGeoPolygon2D;
    {$endif CALCULETTE_EMBEDDED_IN_GHTOPO}
 
  public
    {$ifdef CALCULETTE_EMBEDDED_IN_GHTOPO}
    function Initialiser(const QTabIndex: integer;
                         const QDocTopo: TToporobotStructure2012;
                         const QBDDEntites: TBDDEntites;
                         const QMaillage: TMaillage): boolean;
    {$ELSE}
    function Initialiser(cconst QTabIndex: integer): boolean;
    {$endif CALCULETTE_EMBEDDED_IN_GHTOPO}
    { public declarations }
    procedure SetDefaultExpression(const S: string);
    procedure SetCoordonnees(const P: TPoint2Df);
    function GetCoordonnees(): TPoint2Df;
    function GetDeclimag(): double;
    function GetResultatCalcul(): double;
    function GetCodeEPSG(): TLabelSystemesCoordsEPSG;
    procedure SetTabIndex(const Idx: integer);
  end;
 
var
  frmCalculette: TfrmCalculette;
 
implementation
uses
  CallDialogsStdVersion,
  DGCDummyUnit;
{$R *.lfm}
{$ifdef CALCULETTE_EMBEDDED_IN_GHTOPO}
function TfrmCalculette.Initialiser(const QTabIndex: integer;
                     const QDocTopo: TToporobotStructure2012;
                     const QBDDEntites: TBDDEntites;
                     const QMaillage: TMaillage): boolean;
{$ELSE}
function TfrmCalculette.Initialiser(cconst QTabIndex: integer): boolean;
{$endif CALCULETTE_EMBEDDED_IN_GHTOPO}
var
  MH, MV: Integer;
begin
  result := false;
  MH := 40;
  MV := 40;
  self.Top := MV;
  self.Left:= MH;
  self.Width    := Screen.Width  - 2 * MH;
  self.Height   := Screen.Height - 5 * MV;
  self.Position := poScreenCenter;
  self.Caption := GetResourceString(rsDLG_CALC_TITLE);
  {$IFDEF CALCULETTE_EMBEDDED_IN_GHTOPO}
  FDocuTopo   := QDocTopo;
  FBDDEntites := QBDDEntites;
  FMaillage   := QMaillage;
  //FLassoDeSelection := L;
  if (Not CdrCalculette1.Initialiser(FMyTabIndex, FDocuTopo, FBDDEntites, FMaillage)) then
  begin
    ShowMessage('Calculette inoperante');
    self.Close;
  end;
  lbDocTopoName.Caption := IIF(Assigned(FDocuTopo), 'Classe du document: ' + FDocuTopo.ClassName, '---');
  {$ELSE CALCULETTE_EMBEDDED_IN_GHTOPO}
  if (Not CdrCalculette1.Initialiser(0)) then
  begin
    ShowMessage('Calculette inoperante');
    self.Close;
  end;
  lbDocTopoName.Caption := '---';
  {$ENDIF CALCULETTE_EMBEDDED_IN_GHTOPO}
  result := True;
end;
 
{ TfrmCalculette }
procedure TfrmCalculette.SetDefaultExpression(const S: string);
begin
  CdrCalculette1.SetDefaultExpressionA(S);
end;
 
procedure TfrmCalculette.SetTabIndex(const Idx: integer);
begin
  FMyTabIndex := Idx;
end;
 
procedure TfrmCalculette.SetCoordonnees(const P: TPoint2Df);
begin
  CdrCalculette1.SetCoordonneesA(P);
end;
function TfrmCalculette.GetResultatCalcul(): double;
begin
  Result := CdrCalculette1.GetResultatCalculA();
end;
function TfrmCalculette.GetDeclimag(): double;
begin
  Result := CdrCalculette1.GetDeclimagA();
end;
 
function TfrmCalculette.GetCoordonnees(): TPoint2Df;
begin
  Result := CdrCalculette1.GetCoordonneesA();
end;
 
 
 
 
function TfrmCalculette.GetCodeEPSG(): TLabelSystemesCoordsEPSG;
begin
  Result := CdrCalculette1.GetCurrentCodeEPSGNomSysteme();
end;
 
 
 
procedure TfrmCalculette.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
  try
    CdrCalculette1.Finaliser;
  finally
  end;
end;
 
 
 
procedure TfrmCalculette.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
  CanClose := false;
  if (GHTopoQuestionOuiNon('Fermer')) then CanClose := True;
end;
 
 
 
 
 
 
end.