~ubuntu-branches/ubuntu/trusty/dozzaqueux/trusty

« back to all changes in this revision

Viewing changes to .pc/20-fhs.patch/unit1.pas

  • Committer: Package Import Robot
  • Author(s): Georges Khaznadar
  • Date: 2014-01-05 16:33:24 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20140105163324-0qqtf22rqs1oy3x5
Tags: 3.33-1
* created a working watch file and added a script to make the new package
* upgraded to the newest upstream version
* upgraded Version-Standards to 3.9.5
* removed the redundant gpl.txt.gz file

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
  PrintersDlgs,MonImprimante,MonPNG,MonJPEG,MonBitmap,Unit21,Unit23,Unit27,Unit18,Unit16,Unit20,UnitGPL,Unit15,LCLType,
14
14
  UChaines,LazHelpHTML,gettext,translations,Unit17,UnitScaleFont,
15
15
  Clipbrd,UnitSaisieTailleImage,UTF8Process,saisie_options_indicateur,lclintf,FPImage,GraphUtil
16
 
  {$ifdef windows},windows{$endif},charencstreams;
 
16
  {$ifdef windows},windows,shellapi,registry{$endif},charencstreams,Unit_dilution,LCLproc;
17
17
 
18
18
 type
19
19
indicateur_colore=object
40
40
 
41
41
  TForm1 = class(TForm)
42
42
    BitBtn1: TBitBtn;
 
43
    SpeedButton17: TBitBtn;
 
44
    SpeedButton16: TBitBtn;
 
45
    SpeedButton15: TBitBtn;
 
46
    SpeedButton14: TBitBtn;
 
47
    SpeedButton13: TBitBtn;
 
48
    SpeedButton12: TBitBtn;
 
49
    SpeedButton10: TBitBtn;
 
50
    SpeedButtonunites: TBitBtn;
 
51
    SpeedButton5: TBitBtn;
 
52
    SpeedButtonfermer: TBitBtn;
 
53
    SpeedButtoncalculer: TBitBtn;
 
54
    SpeedButtontoutdecocher: TBitBtn;
 
55
    SpeedButtontoutcocher: TBitBtn;
 
56
    bitbtn9: TBitBtn;
 
57
    SpeedButtontoutsupprimer: TBitBtn;
 
58
    BitBtn8: TBitBtn;
43
59
    BitBtn1_: TBitBtn;
44
60
    BitBtn2: TBitBtn;
45
61
    BitBtn3: TBitBtn;
115
131
    MenuItem14: TMenuItem;
116
132
    MenuItem15: TMenuItem;
117
133
    MenuItem16: TMenuItem;
 
134
    MenuItemRaffineRW3: TMenuItem;
 
135
    MenuItemRaffineCSV: TMenuItem;
 
136
    MenuItem_save_brut_rw3: TMenuItem;
 
137
    MenuItem_sauve_brut_csv: TMenuItem;
 
138
    MenuItem_charger_personnel: TMenuItem;
 
139
    MenuItem_charger_exemples: TMenuItem;
118
140
    MenuItem3: TMenuItem;
119
141
    MenuItem5: TMenuItem;
120
142
    LicenseGPL1: TMenuItem;
129
151
    PageControl1_: TPageControl;
130
152
    PageControl2_: TPageControl;
131
153
    PageControl3_: TPageControl;
 
154
    PopupMenuRaffine: TPopupMenu;
 
155
    PopupMenubrut: TPopupMenu;
132
156
    PopupMenu_copie_resultats_1_point: TPopupMenu;
133
157
    PopupMenu_image: TPopupMenu;
134
158
    PrintDialog1: TPrintDialog;
137
161
    Radioechellehorizontale: TRadioGroup;
138
162
    Radioechelleverticaledroite: TRadioGroup;
139
163
    Radioechelleverticalegauche: TRadioGroup;
140
 
    SpeedButton10: TSpeedButton;
141
 
    bitbtn9: TSpeedButton;
142
 
    bitbtn8: TSpeedButton;
143
 
    SpeedButtontoutsupprimer: TSpeedButton;
144
 
    SpeedButtonfermer: TSpeedButton;
145
 
    SpeedButtoncalculer: TSpeedButton;
146
 
    SpeedButton17: TSpeedButton;
147
 
    SpeedButton16: TSpeedButton;
148
 
    SpeedButton15: TSpeedButton;
149
 
    SpeedButton14: TSpeedButton;
150
 
    SpeedButton13: TSpeedButton;
151
 
    SpeedButton12: TSpeedButton;
 
164
    SpeedButton_dilution_: TSpeedButton;
 
165
    SpeedButton_dilution: TSpeedButton;
152
166
    SpeedButton4: TSpeedButton;
153
 
    SpeedButton5: TSpeedButton;
154
167
    SpeedButton9: TSpeedButton;
155
 
    SpeedButtonunites: TSpeedButton;
156
 
    SpeedButtontoutcocher: TSpeedButton;
157
 
    SpeedButtontoutdecocher: TSpeedButton;
158
168
    SpeedButtonviderburette: TSpeedButton;
159
169
    SpeedButtonx10_: TSpeedButton;
160
170
    SpeedButton_10_: TSpeedButton;
284
294
    TabSheetchoisir: TTabSheet;
285
295
     Memo1:tmemo;
286
296
     Memo2:tmemo;
 
297
     procedure EditabscisseKeyPress(Sender: TObject; var Key: char);
 
298
     procedure EditpourcentageKeyPress(Sender: TObject; var Key: char);
 
299
     procedure EdittemperatureKeyPress(Sender: TObject; var Key: char);
 
300
     procedure EditvolumeChange(Sender: TObject);
 
301
     procedure EditvolumeKeyPress(Sender: TObject; var Key: char);
 
302
     procedure EditvolumeppKeyPress(Sender: TObject; var Key: char);
 
303
     procedure Editvolume_buretteKeyPress(Sender: TObject; var Key: char);
 
304
     procedure editxmaxKeyPress(Sender: TObject; var Key: char);
 
305
     procedure EditxminKeyPress(Sender: TObject; var Key: char);
 
306
     procedure EditymaxdroiteKeyPress(Sender: TObject; var Key: char);
 
307
     procedure EditymaxgaucheKeyPress(Sender: TObject; var Key: char);
 
308
     procedure EditymindroiteKeyPress(Sender: TObject; var Key: char);
 
309
     procedure editymingaucheKeyPress(Sender: TObject; var Key: char);
 
310
     procedure Jouerunfilmdesimulation(Sender: TObject; repertoire:string);
287
311
    procedure AideDozzzaqueux1Click(Sender: TObject);
288
312
    procedure Apropos1Click(Sender: TObject);
289
313
    procedure Autoriserractionsredox1Click(Sender: TObject);
344
368
    procedure MenuItem14Click(Sender: TObject);
345
369
    procedure MenuItem15Click(Sender: TObject);
346
370
    procedure MenuItem16Click(Sender: TObject);
 
371
    procedure MenuItem8Click(Sender: TObject);
347
372
    procedure MenuItem9Click(Sender: TObject);
 
373
    procedure MenuItemRaffineCSVClick(Sender: TObject);
 
374
    procedure MenuItemRaffineRW3Click(Sender: TObject);
 
375
    procedure MenuItem_charger_exemplesClick(Sender: TObject);
 
376
    procedure MenuItem_charger_personnelClick(Sender: TObject);
348
377
    procedure MenuItem_jpgClick(Sender: TObject);
349
378
    procedure MenuItem_pngClick(Sender: TObject);
 
379
    procedure MenuItem_sauve_brut_csvClick(Sender: TObject);
 
380
    procedure MenuItem_save_brut_rw3Click(Sender: TObject);
350
381
    procedure Nombredepointsdecalcul1Click(Sender: TObject);
351
382
    procedure Nouvellesimulation1Click(Sender: TObject);
352
383
    procedure PageControl4Change(Sender: TObject);
387
418
    procedure SpeedButtonx10_Click(Sender: TObject);
388
419
    procedure SpeedButton_10Click(Sender: TObject);
389
420
    procedure SpeedButton_10_Click(Sender: TObject);
 
421
    procedure SpeedButton_dilutionClick(Sender: TObject);
 
422
    procedure SpeedButton_dilution_Click(Sender: TObject);
390
423
 
391
424
    procedure SpinEdit0001pourcentClick(Sender: TObject; Button: TUDBtnType);
392
425
 
395
428
    procedure SpinEdit01pourcentClick(Sender: TObject; Button: TUDBtnType);
396
429
 
397
430
    procedure SpinEdit1pourcentClick(Sender: TObject; Button: TUDBtnType);
 
431
    procedure StringGridanionssimplesCompareCells(Sender: TObject; ACol, ARow,
 
432
      BCol, BRow: Integer; var Result: integer);
398
433
    procedure StringGridanionssimplesmousedown(Sender: TObject;
399
434
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
435
    procedure StringGridanionssimples_CompareCells(Sender: TObject; ACol, ARow,
 
436
      BCol, BRow: Integer; var Result: integer);
400
437
    procedure StringGridanionssimples_mousedown(Sender: TObject;
401
438
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
439
    procedure StringGridaqueuxabCompareCells(Sender: TObject; ACol, ARow, BCol,
 
440
      BRow: Integer; var Result: integer);
 
441
 
402
442
    procedure StringGridaqueuxabmousedown(Sender: TObject; Button: TMouseButton;
403
443
      Shift: TShiftState; X, Y: Integer);
 
444
    procedure StringGridaqueuxab_CompareCells(Sender: TObject; ACol, ARow,
 
445
      BCol, BRow: Integer; var Result: integer);
404
446
    procedure StringGridaqueuxab_mousedown(Sender: TObject; Button: TMouseButton;
405
447
      Shift: TShiftState; X, Y: Integer);
 
448
    procedure StringGridaqueuxcomplexesCompareCells(Sender: TObject; ACol,
 
449
      ARow, BCol, BRow: Integer; var Result: integer);
406
450
    procedure StringGridaqueuxcomplexesmousedown(Sender: TObject;
407
451
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
452
    procedure StringGridaqueuxcomplexes_CompareCells(Sender: TObject; ACol,
 
453
      ARow, BCol, BRow: Integer; var Result: integer);
408
454
    procedure StringGridaqueuxcomplexes_mousedown(Sender: TObject;
409
455
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
456
    procedure StringGridcationssimplesCompareCells(Sender: TObject; ACol, ARow,
 
457
      BCol, BRow: Integer; var Result: integer);
410
458
    procedure StringGridcationssimplesmousedown(Sender: TObject;
411
459
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
460
    procedure StringGridcationssimples_CompareCells(Sender: TObject; ACol,
 
461
      ARow, BCol, BRow: Integer; var Result: integer);
412
462
    procedure StringGridcationssimples_mousedown(Sender: TObject;
413
463
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
414
464
    procedure stringgridgazeuxmousedown(Sender: TObject; Button: TMouseButton;
415
465
      Shift: TShiftState; X, Y: Integer);
416
466
    procedure stringgridgazeux_mousedown(Sender: TObject; Button: TMouseButton;
417
467
      Shift: TShiftState; X, Y: Integer);
 
468
    procedure StringGridIonsCompareCells(Sender: TObject; ACol, ARow, BCol,
 
469
      BRow: Integer; var Result: integer);
418
470
    procedure StringGridIonsmousedown(Sender: TObject; Button: TMouseButton;
419
471
      Shift: TShiftState; X, Y: Integer);
 
472
    procedure StringGridIons_CompareCells(Sender: TObject; ACol, ARow, BCol,
 
473
      BRow: Integer; var Result: integer);
420
474
    procedure StringGridIons_mousedown(Sender: TObject; Button: TMouseButton;
421
475
      Shift: TShiftState; X, Y: Integer);
 
476
    procedure stringgridminerauxCompareCells(Sender: TObject; ACol, ARow, BCol,
 
477
      BRow: Integer; var Result: integer);
422
478
    procedure stringgridminerauxmousedown(Sender: TObject; Button: TMouseButton;
423
479
      Shift: TShiftState; X, Y: Integer);
 
480
    procedure stringgridmineraux_CompareCells(Sender: TObject; ACol, ARow,
 
481
      BCol, BRow: Integer; var Result: integer);
424
482
    procedure stringgridmineraux_mousedown(Sender: TObject; Button: TMouseButton;
425
483
      Shift: TShiftState; X, Y: Integer);
 
484
    procedure StringGridMoleculesCompareCells(Sender: TObject; ACol, ARow,
 
485
      BCol, BRow: Integer; var Result: integer);
426
486
    procedure StringGridMoleculesmousedown(Sender: TObject; Button: TMouseButton;
427
487
      Shift: TShiftState; X, Y: Integer);
 
488
    procedure StringGridMolecules_CompareCells(Sender: TObject; ACol, ARow,
 
489
      BCol, BRow: Integer; var Result: integer);
428
490
    procedure StringGridMolecules_mousedown(Sender: TObject;
429
491
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
430
492
    procedure StringGridordonneesDrawCell(Sender: TObject; aCol, aRow: Integer;
431
493
      aRect: TRect; aState: TGridDrawState);
432
494
    procedure StringGridordonneesmousedown(Sender: TObject; Button: TMouseButton;
433
495
      Shift: TShiftState; X, Y: Integer);
 
496
    procedure StringGridorganiques_acideCompareCells(Sender: TObject; ACol,
 
497
      ARow, BCol, BRow: Integer; var Result: integer);
 
498
 
 
499
 
434
500
    procedure StringGridorganiques_acidemousedown(Sender: TObject;
435
501
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
502
    procedure StringGridorganiques_acide_CompareCells(Sender: TObject; ACol,
 
503
      ARow, BCol, BRow: Integer; var Result: integer);
436
504
    procedure StringGridorganiques_acide_mousedown(Sender: TObject;
437
505
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
506
    procedure StringGridorganiques_alcCompareCells(Sender: TObject; ACol, ARow,
 
507
      BCol, BRow: Integer; var Result: integer);
438
508
    procedure StringGridorganiques_alcmousedown(Sender: TObject;
439
509
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
510
    procedure StringGridorganiques_alcoolCompareCells(Sender: TObject; ACol,
 
511
      ARow, BCol, BRow: Integer; var Result: integer);
440
512
    procedure StringGridorganiques_alcoolmousedown(Sender: TObject;
441
513
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
514
    procedure StringGridorganiques_alcool_CompareCells(Sender: TObject; ACol,
 
515
      ARow, BCol, BRow: Integer; var Result: integer);
442
516
    procedure StringGridorganiques_alcool_mousedown(Sender: TObject;
443
517
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
518
    procedure StringGridorganiques_alc_CompareCells(Sender: TObject; ACol,
 
519
      ARow, BCol, BRow: Integer; var Result: integer);
444
520
    procedure StringGridorganiques_alc_mousedown(Sender: TObject;
445
521
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
522
    procedure StringGridorganiques_aldehyd_cetoneCompareCells(Sender: TObject;
 
523
      ACol, ARow, BCol, BRow: Integer; var Result: integer);
446
524
    procedure StringGridorganiques_aldehyd_cetonemousedown(Sender: TObject;
447
525
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
526
    procedure StringGridorganiques_aldehyd_cetone_CompareCells(Sender: TObject;
 
527
      ACol, ARow, BCol, BRow: Integer; var Result: integer);
448
528
    procedure StringGridorganiques_aldehyd_cetone_mousedown(Sender: TObject;
449
529
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
530
    procedure StringGridorganiques_amid_aminCompareCells(Sender: TObject; ACol,
 
531
      ARow, BCol, BRow: Integer; var Result: integer);
450
532
    procedure StringGridorganiques_amid_aminmousedown(Sender: TObject;
451
533
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
534
    procedure StringGridorganiques_amid_amin_CompareCells(Sender: TObject;
 
535
      ACol, ARow, BCol, BRow: Integer; var Result: integer);
452
536
    procedure StringGridorganiques_amid_amin_mousedown(Sender: TObject;
453
537
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
538
    procedure StringGridorganiques_aminoacideCompareCells(Sender: TObject;
 
539
      ACol, ARow, BCol, BRow: Integer; var Result: integer);
454
540
    procedure StringGridorganiques_aminoacidemousedown(Sender: TObject;
455
541
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
542
    procedure StringGridorganiques_aminoacide_CompareCells(Sender: TObject;
 
543
      ACol, ARow, BCol, BRow: Integer; var Result: integer);
456
544
    procedure StringGridorganiques_aminoacide_mousedown(Sender: TObject;
457
545
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
546
    procedure StringGridorganiques_benzeneCompareCells(Sender: TObject; ACol,
 
547
      ARow, BCol, BRow: Integer; var Result: integer);
458
548
    procedure StringGridorganiques_benzenemousedown(Sender: TObject;
459
549
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
550
    procedure StringGridorganiques_benzene_CompareCells(Sender: TObject; ACol,
 
551
      ARow, BCol, BRow: Integer; var Result: integer);
460
552
    procedure StringGridorganiques_benzene_mousedown(Sender: TObject;
461
553
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
554
    procedure StringGridorganiques_complexeCompareCells(Sender: TObject; ACol,
 
555
      ARow, BCol, BRow: Integer; var Result: integer);
462
556
    procedure StringGridorganiques_complexemousedown(Sender: TObject;
463
557
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
558
    procedure StringGridorganiques_complexe_CompareCells(Sender: TObject; ACol,
 
559
      ARow, BCol, BRow: Integer; var Result: integer);
464
560
    procedure StringGridorganiques_complexe_mousedown(Sender: TObject;
465
561
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
466
562
    procedure stringgridreactifs_bechermousedown(Sender: TObject;
467
563
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
468
564
    procedure stringgridreactifs_burettemousedown(Sender: TObject;
469
565
      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 
566
    procedure StringGridReactionsKeyPress(Sender: TObject; var Key: char);
470
567
    procedure StringGridReactionsSetEditText(Sender: TObject; ACol,
471
568
      ARow: Integer; const Value: string);
472
569
    procedure TabSheetchoisirResize(Sender: TObject);
497
594
 procedure RemoveLine(AStringGrid: TStringGrid; ALine: Integer);
498
595
  function isnanorinfinite(x:float):boolean;
499
596
 procedure HSV_RGB( H,S,V:extended; var R,G,B:integer);
 
597
 function EnleveAccents(AText : String) : string;
500
598
 
501
599
var
502
600
 mc:tmonbitmap;
633
731
        stockage_liste_echelles:array of arraytypeechelle;
634
732
       {ajout version 1.02 pour la superposition>}
635
733
 
636
 
    repertoire_executable,repertoire_exemples,repertoire_aide,nomexecutable:string;
 
734
    repertoire_executable,repertoire_exemples,repertoire_aide,nomexecutable,repertoire_config_perso,
 
735
    repertoire_dosage_perso,chemin_po:string;
637
736
 ensemble_atomes:tableauentier;
638
737
          old_index:integer;
639
738
          liste_langues:tstringlist;
644
743
     ordonnee_gauche_est_ph, ordonnee_droite_est_ph,abscisse_est_v:boolean;
645
744
      largeur_bande_indic,abscisse_centre_bande_indic,ordonnee_centre_bande_indic:extended;
646
745
      degrade_vertical,debut_translation,debut_elargissement:boolean;
 
746
       Search:sysutils.TSearchRec;
 
747
        ID_lang,nom_ini_file:string;   PODirectory: String;
 
748
          f_ini:textfile;
647
749
 
648
750
 
649
751
 
650
752
implementation
651
753
 uses Unit6;
652
754
 
 
755
  label 1888;
 
756
 
 
757
 
 
758
 Function MyGetAppConfigDirUTF8: String;
 
759
{il est necessaire de modifier GetAppConfigDir car sur les systemes
 
760
windows renvoie local setting\application data au lieu de application data}
 
761
var
 
762
  I: Integer;
 
763
  EnvVars: TStringList;
 
764
begin
 
765
{$ifndef windows}
 
766
result:=systoutf8(SysUtils.GetAppConfigDir(false));
 
767
{$endif}
 
768
 {$ifdef windows}
 
769
  EnvVars := TStringList.Create;
 
770
try
 
771
       for I := 0 to GetEnvironmentVariableCount - 1 do
 
772
      EnvVars.Add(GetEnvironmentString(I));
 
773
        result:=systoutf8(AppendPathDelim(EnvVars.Values['APPDATA'])+'dozzzaqueux\');
 
774
 
 
775
  finally
 
776
    EnvVars.Free;
 
777
  end;
 
778
  {$endif}
 
779
end;
 
780
 
 
781
 
 
782
Function ExpandEnvironmentString(s: String): String;
 
783
    Var i, k: Integer;
 
784
        sl: TStringList;
 
785
        s2: String;
 
786
        bP, bD: Boolean;
 
787
    Begin
 
788
      Result := s;
 
789
      bP := Pos('%', s) > 0;
 
790
      bD := Pos('$', s) > 0;
 
791
      If Not(bP Or bD) Then Exit; // Nichts zu konvertieren
 
792
      sl := TStringList.Create;
 
793
      sl.Sorted := bD;
 
794
      For i := GetEnvironmentVariableCount - 1 DownTo 0 Do // Alle Variablen in eine Liste merken
 
795
      Begin
 
796
        s2 := GetEnvironmentStringUTF8(i);
 
797
        If Length(s2) >= 2 Then
 
798
          If s2[1] <> '=' Then // Bei Windows kommt sowas auch vor, daher wegoptimieren
 
799
            sl.Add(s2);
 
800
      end;
 
801
 
 
802
      k := 0;
 
803
      Repeat // Durchlaufe so oft bis alle Env-Variablen aufgelöst sind
 
804
        s2 := Result;
 
805
        For i := sl.Count - 1 DownTo 0 Do
 
806
        Begin
 
807
          If bP Then
 
808
          Begin
 
809
            Result := StringReplace(Result, '%' + sl.Names[i] + '%', sl.ValueFromIndex[i], [rfReplaceAll, rfIgnoreCase]);
 
810
            If Pos('%', Result) = 0 Then bP := False;
 
811
          end;
 
812
          If bD Then
 
813
          Begin
 
814
            Result := StringReplace(Result, '$' + sl.Names[i], sl.ValueFromIndex[i], [rfReplaceAll]);
 
815
            If Pos('$', Result) = 0 Then bD := False;
 
816
          end;
 
817
          If Not(bP Or bD) Then Break;
 
818
        end;
 
819
        If Not(bP Or bD) Then Break;
 
820
        If SameText(s2, Result) Then Break; // % $ nicht konvertierbar, da im System nicht vorhanden
 
821
        Inc(k);
 
822
        If k > sl.Count - 2 Then Break; // Max Durchläufe
 
823
      Until True;
 
824
      sl.Free;
 
825
    end;
 
826
 
 
827
 
 
828
 
 
829
 
 
830
 {$ifdef windows}
 
831
Function MyGetMesDocumentsUTF8: String;
 
832
var
 
833
    Reg: TRegistry;
 
834
 
 
835
begin
 
836
 
 
837
  Reg := TRegistry.Create;
 
838
  try
 
839
    Reg.RootKey := HKEY_CURRENT_USER;
 
840
    Reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\'
 
841
      + 'Explorer\User Shell Folders\', False);
 
842
    result:=ExpandEnvironmentString(Reg.ReadString('Personal'));
 
843
  finally
 
844
    Reg.Free;
 
845
 
 
846
  end;
 
847
    end;
 
848
     {$endif}
 
849
 
653
850
 procedure HSV_RGB( H,S,V:extended; var R,G,B:integer);
654
851
  var var_h,var_i,var_r,var_g,var_b,var_1,var_2,var_3:extended;
655
852
  begin
783
980
 end;
784
981
 
785
982
 procedure TForm1.MenuItem9Click(Sender: TObject);
786
 
var n:integer; nom_ini_file:string; f:textfile;
 
983
var n:integer; f:textfile;
787
984
begin
788
985
n:=(Sender as TComponent).Tag;
789
986
if n<=1000 then exit;
791
988
 
792
989
application.MessageBox('Pour prendre en compte le changement de langue de l''interface, Dozzzaqueux doit maintenant être arrété. Puis relancez le.','Changement de langue',mb_ok);
793
990
 
794
 
  nom_ini_file:=extractfilepath(application.ExeName)+'dozzzaqueux.ini';
795
 
              assignfile(f,nom_ini_file);
 
991
 
 
992
               assignfile(f,UTF8ToSys(nom_ini_file));
796
993
        rewrite(f);
797
994
        writeln(f,liste_langues[n-1000-1]+'_'+uppercase(liste_langues[n-1000-1]));
798
995
               writeln(f,liste_langues[n-1000-1]);
801
998
 application.Terminate;
802
999
end;
803
1000
 
 
1001
procedure TForm1.MenuItemRaffineCSVClick(Sender: TObject);
 
1002
 var f:textfile; ns,ligne,dede:string;
 
1003
 i,j,k:integer;
 
1004
 
 
1005
 begin
 
1006
  savedialog1.FileName:='';
 
1007
  savedialog1.InitialDir:=repertoire_dosage_perso;
 
1008
 SaveDialog1.DefaultExt := rsCsv;
 
1009
    SaveDialog1.Filter := rsTableurTexte2;
 
1010
 
 
1011
 if  not(savedialog1.Execute) then exit else
 
1012
 ns:=savedialog1.FileName;
 
1013
 
 
1014
 assignfile(f,utf8tosys(ns));
 
1015
 try
 
1016
 rewrite(f);
 
1017
 except
 
1018
 application.MessageBox(pchar(rsImpossibleDe),
 
1019
 pchar(rsMaisEuhhhh), mb_ok);
 
1020
 tabsheettracecourbes.Refresh;
 
1021
 exit;
 
1022
 end;
 
1023
 
 
1024
 
 
1025
 
 
1026
 {sauvegarde format tableur texte}
 
1027
     if  ((lowercase(extractfileext(ns))='.csv') or
 
1028
     (lowercase(extractfileext(ns))='.txt')) then begin
 
1029
  ligne:=expression_abscisse_explicite;
 
1030
    for k:=1 to nombre_ordonnees do
 
1031
     ligne:=ligne+separateur_csv+expression_ordonnees_explicites[k-1];
 
1032
     writeln(f,ligne);
 
1033
    for i:=1 to nombre_points_calcul+1 do begin
 
1034
    if not(isnanorinfinite(tableau_grandeurs_tracees[i-1,0])) then
 
1035
    ligne:=remplace_point_decimal(floattostr(tableau_grandeurs_tracees[i-1,0]))
 
1036
    else
 
1037
    ligne:='NAN';
 
1038
    for j:=1 to nombre_ordonnees do
 
1039
    if not(isnanorinfinite(tableau_grandeurs_tracees[i-1,j])) then
 
1040
    ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_grandeurs_tracees[i-1,j])) else
 
1041
    ligne:=ligne+separateur_csv+'NAN';
 
1042
    writeln(f,ligne);
 
1043
    end;
 
1044
    end;
 
1045
 closefile(f);
 
1046
 
 
1047
 
 
1048
 
 
1049
end;
 
1050
 
 
1051
procedure TForm1.MenuItemRaffineRW3Click(Sender: TObject);
 
1052
 var f:textfile; ns,ligne,dede:string;
 
1053
 i,j,k:integer;
 
1054
 
 
1055
 begin
 
1056
  savedialog1.FileName:='';
 
1057
  savedialog1.InitialDir:=repertoire_dosage_perso;
 
1058
  SaveDialog1.DefaultExt := '.rw3';
 
1059
    SaveDialog1.Filter := 'Regressi (*.rw3)|.rw3';
 
1060
 if  not(savedialog1.Execute) then exit else
 
1061
 ns:=savedialog1.FileName;
 
1062
 
 
1063
 assignfile(f,utf8tosys(ns));
 
1064
 try
 
1065
 rewrite(f);
 
1066
 except
 
1067
 application.MessageBox(pchar(rsImpossibleDe),
 
1068
 pchar(rsMaisEuhhhh), mb_ok);
 
1069
 tabsheettracecourbes.Refresh;
 
1070
 exit;
 
1071
 end;
 
1072
 
 
1073
 {sauvagarde format regressi}
 
1074
   if  (lowercase(extractfileext(ns))='.rw3') then begin
 
1075
   writeln(f,'EVARISTE REGRESSI WINDOWS 1.0');
 
1076
   writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' NOM VAR');
 
1077
   writeln(f,'abscisse');
 
1078
   for i:=1 to nombre_ordonnees do
 
1079
   writeln(f,'ord'+inttostr(i));
 
1080
   writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' GENRE VAR');
 
1081
   for i:=1 to nombre_ordonnees+1 do writeln(f,'0');
 
1082
   writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' UNITE VAR');
 
1083
    for i:=1 to nombre_ordonnees+1 do writeln(f);
 
1084
   writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' INCERTITUDE');
 
1085
   for i:=1 to nombre_ordonnees+1 do writeln(f);
 
1086
   writeln(f,chr(163)+'1 TRIGO');
 
1087
   writeln(f,'0');
 
1088
   writeln(f,chr(163)+'1 LOG');
 
1089
   writeln(f,'0');
 
1090
   writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' MEMO GRANDEURS');
 
1091
   writeln(f,'''abscisse: '+expression_abscisse_explicite);
 
1092
   for i:=1 to nombre_ordonnees do
 
1093
   writeln(f,'''ord'+inttostr(i)+': '+expression_ordonnees_explicites[i-1]);
 
1094
   writeln(f,chr(163)+'2 ACQUISITION');
 
1095
   writeln(f,'CLAVIER');
 
1096
   writeln(f);
 
1097
   writeln(f,chr(163)+'0 GRAPHE VAR');
 
1098
   writeln(f,'&5 X');
 
1099
   writeln(f,'abscisse');
 
1100
   writeln(f);
 
1101
   writeln(f);
 
1102
   writeln(f);
 
1103
   writeln(f);
 
1104
   writeln(f,'&5 Y');
 
1105
   writeln(f,'ord1');
 
1106
   writeln(f);
 
1107
   writeln(f);
 
1108
   writeln(f);
 
1109
   writeln(f);
 
1110
   writeln(f,'&5 MONDE');
 
1111
   writeln(f,'1');
 
1112
   writeln(f,'1');
 
1113
   writeln(f,'1');
 
1114
   writeln(f,'1');
 
1115
   writeln(f,'1');
 
1116
   writeln(f,'&2 GRADUATION');
 
1117
   writeln(f,'0');
 
1118
   writeln(f,'0');
 
1119
   writeln(f,'&2 ZERO');
 
1120
   writeln(f,'0');
 
1121
   writeln(f,'0');
 
1122
   writeln(f,'&5 OPTIONS');
 
1123
   writeln(f,'8');
 
1124
   writeln(f,'0');
 
1125
   writeln(f,'1');
 
1126
   writeln(f,'3');
 
1127
   writeln(f,'4');
 
1128
   writeln(f,chr(163)+'1 PAGE COMMENT');
 
1129
   writeln(f);
 
1130
   writeln(f,'&'+inttostr(nombre_points_calcul+1)+' VALEUR VAR');
 
1131
   for i:=1 to nombre_points_calcul+1 do begin
 
1132
   ligne:='';
 
1133
       for j:=0 to nombre_ordonnees do
 
1134
       if not(isnanorinfinite(tableau_grandeurs_tracees[i-1,j])) then
 
1135
       ligne:=ligne+floattostr( tableau_grandeurs_tracees[i-1,j])+' ' else
 
1136
        ligne:=ligne+'0 ';
 
1137
    writeln(f, ligne);
 
1138
    end;  end;
 
1139
    {sauvegarde format regressi}
 
1140
 
 
1141
 
 
1142
 
 
1143
 closefile(f);
 
1144
 
 
1145
 tabsheettracecourbes.Refresh;
 
1146
 
 
1147
end;
 
1148
 
 
1149
 
 
1150
 
 
1151
procedure TForm1.MenuItem_charger_exemplesClick(Sender: TObject);
 
1152
begin
 
1153
  Form1.Jouerunfilmdesimulation(Sender,repertoire_exemples);
 
1154
end;
 
1155
 
 
1156
procedure TForm1.MenuItem_charger_personnelClick(Sender: TObject);
 
1157
begin
 
1158
 Form1.Jouerunfilmdesimulation(Sender,repertoire_dosage_perso);
 
1159
end;
 
1160
 
804
1161
 procedure tform1.vire_grandeurs_a_tracer;
805
1162
var i:integer;
806
1163
begin
1084
1441
 
1085
1442
 
1086
1443
   end;
 
1444
 
 
1445
 
 
1446
 
1087
1447
procedure RemoveLine(AStringGrid: TStringGrid; ALine: Integer);
1088
1448
var
1089
1449
  i: Integer;
1504
1864
 
1505
1865
end;
1506
1866
 
 
1867
procedure TForm1.SpeedButton_dilutionClick(Sender: TObject);
 
1868
label 666;
 
1869
  var repmode,i:integer;
 
1870
begin
 
1871
  666: Form_dilution:=tForm_dilution.create(self);
 
1872
with Form_dilution
 
1873
do begin
 
1874
if screen.width>width then left:=(screen.width-width) div 2 else left:=0;
 
1875
if screen.height>height then top:=(screen.height-height) div 2 else top:=0;
 
1876
end;
 
1877
Form_dilution.Caption:=rsDilutionPour;
 
1878
repmode:=Form_dilution.ShowModal;
 
1879
if repmode=mrcancel then exit;
 
1880
if repmode=mrretry then goto 666;
 
1881
case action_dilution of
 
1882
 multiplier_concentrations: begin
 
1883
  etape:=choisir_becher;
 
1884
  if stringgridreactifs_becher.RowCount>1 then
 
1885
  for i:=1 to stringgridreactifs_becher.RowCount-1 do
 
1886
  if stringgridreactifs_becher.Cells[2,i]<>'' then
 
1887
  stringgridreactifs_becher.Cells[2,i]:=floattostr(
 
1888
 facteur*strtofloat(stringgridreactifs_becher.Cells[2,i]));
 
1889
 end;
 
1890
 ajouter_eau: begin
 
1891
 try
 
1892
 strtofloat(editvolume.text);
 
1893
except
 
1894
     application.MessageBox(pchar(rsLAncienVolum),
 
1895
     pchar(rsAttention2), mb_ok);
 
1896
exit;
 
1897
end;
 
1898
  etape:=choisir_becher;
 
1899
  if stringgridreactifs_becher.RowCount>1 then
 
1900
  for i:=1 to stringgridreactifs_becher.RowCount-1 do
 
1901
  if stringgridreactifs_becher.Cells[2,i]<>'' then
 
1902
  stringgridreactifs_becher.Cells[2,i]:=floattostr(
 
1903
 strtofloat(editvolume.text)/(strtofloat(editvolume.text)+facteur)*strtofloat(stringgridreactifs_becher.Cells[2,i]));
 
1904
 editvolume.text:=floattostr(strtofloat(editvolume.text)+facteur);
 
1905
 end;
 
1906
 imposer_volume_total: begin
 
1907
  try
 
1908
 strtofloat(editvolume.text);
 
1909
except
 
1910
     application.MessageBox(pchar(rsLAncienVolum),
 
1911
     pchar(rsAttention2), mb_ok);
 
1912
exit;
 
1913
end;
 
1914
  etape:=choisir_becher;
 
1915
  if stringgridreactifs_becher.RowCount>1 then
 
1916
  for i:=1 to stringgridreactifs_becher.RowCount-1 do
 
1917
  if stringgridreactifs_becher.Cells[2,i]<>'' then
 
1918
  stringgridreactifs_becher.Cells[2,i]:=floattostr(
 
1919
 strtofloat(editvolume.text)/(facteur)*strtofloat(stringgridreactifs_becher.Cells[2,i]));
 
1920
 editvolume.text:=floattostr(facteur);
 
1921
 
 
1922
 end;
 
1923
 end;
 
1924
end;
 
1925
 
 
1926
procedure TForm1.SpeedButton_dilution_Click(Sender: TObject);
 
1927
label 666;
 
1928
  var repmode,i:integer;
 
1929
begin
 
1930
  666: Form_dilution:=tForm_dilution.create(self);
 
1931
with Form_dilution
 
1932
do begin
 
1933
if screen.width>width then left:=(screen.width-width) div 2 else left:=0;
 
1934
if screen.height>height then top:=(screen.height-height) div 2 else top:=0;
 
1935
end;
 
1936
Form_dilution.Caption:=rsDilutionPour2;
 
1937
repmode:=Form_dilution.ShowModal;
 
1938
if repmode=mrcancel then exit;
 
1939
if repmode=mrretry then goto 666;
 
1940
case action_dilution of
 
1941
 multiplier_concentrations: begin
 
1942
  etape:=choisir_burette;
 
1943
  if stringgridreactifs_burette.RowCount>1 then
 
1944
  for i:=1 to stringgridreactifs_burette.RowCount-1 do
 
1945
  if stringgridreactifs_burette.Cells[2,i]<>'' then
 
1946
  stringgridreactifs_burette.Cells[2,i]:=floattostr(
 
1947
 facteur*strtofloat(stringgridreactifs_burette.Cells[2,i]));
 
1948
 end;
 
1949
 ajouter_eau: begin
 
1950
 try
 
1951
 strtofloat(editvolume_burette.text);
 
1952
except
 
1953
     application.MessageBox(pchar(rsLAncienVolum),
 
1954
     pchar(rsAttention2), mb_ok);
 
1955
exit;
 
1956
end;
 
1957
  etape:=choisir_burette;
 
1958
  if stringgridreactifs_burette.RowCount>1 then
 
1959
  for i:=1 to stringgridreactifs_burette.RowCount-1 do
 
1960
  if stringgridreactifs_burette.Cells[2,i]<>'' then
 
1961
  stringgridreactifs_burette.Cells[2,i]:=floattostr(
 
1962
 strtofloat(editvolume_burette.text)/(strtofloat(editvolume_burette.text)+facteur)*strtofloat(stringgridreactifs_burette.Cells[2,i]));
 
1963
 editvolume_burette.text:=floattostr(strtofloat(editvolume_burette.text)+facteur);
 
1964
 end;
 
1965
 imposer_volume_total: begin
 
1966
  try
 
1967
 strtofloat(editvolume_burette.text);
 
1968
except
 
1969
     application.MessageBox(pchar(rsLAncienVolum),
 
1970
     pchar(rsAttention2), mb_ok);
 
1971
exit;
 
1972
end;
 
1973
  etape:=choisir_burette;
 
1974
  if stringgridreactifs_burette.RowCount>1 then
 
1975
  for i:=1 to stringgridreactifs_burette.RowCount-1 do
 
1976
  if stringgridreactifs_burette.Cells[2,i]<>'' then
 
1977
  stringgridreactifs_burette.Cells[2,i]:=floattostr(
 
1978
 strtofloat(editvolume_burette.text)/(facteur)*strtofloat(stringgridreactifs_burette.Cells[2,i]));
 
1979
 editvolume_burette.text:=floattostr(facteur);
 
1980
 
 
1981
 end;
 
1982
 end;
 
1983
 
 
1984
end;
 
1985
 
1507
1986
 
1508
1987
 
1509
1988
    procedure TForm1.SpinEdit0001pourcentClick(Sender: TObject;
1612
2091
SpinEdit1pourcent.Position:=0;
1613
2092
  end;
1614
2093
 
 
2094
procedure TForm1.StringGridanionssimplesCompareCells(Sender: TObject; ACol,
 
2095
  ARow, BCol, BRow: Integer; var Result: integer);
 
2096
 
 
2097
   var res:extended;
 
2098
begin
 
2099
   if acol<4 then begin
 
2100
    result:=UTF8CompareText(StringGridanionssimples.Cells[ACol, ARow],StringGridanionssimples.Cells[BCol, BRow]);
 
2101
 end;
 
2102
  if acol=4 then begin
 
2103
    res:=StrToFloatDef(StringGridanionssimples.Cells[ACol, ARow],0)-StrToFloatDef(StringGridanionssimples.Cells[BCol, BRow],0);
 
2104
    if res>0 then result:=1 else
 
2105
      if res<0 then result:=-1
 
2106
      else result:=0;
 
2107
 end;
 
2108
  if StringGridanionssimples.SortOrder = soDescending then
 
2109
    result := -result;
 
2110
end;
 
2111
 
1615
2112
 procedure TForm1.StringGridanionssimplesmousedown(Sender: TObject;
1616
2113
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1617
2114
 
1709
2206
end;
1710
2207
end;
1711
2208
 
 
2209
procedure TForm1.StringGridanionssimples_CompareCells(Sender: TObject; ACol,
 
2210
  ARow, BCol, BRow: Integer; var Result: integer);
 
2211
   var res:extended;
 
2212
  begin
 
2213
     if acol<4 then begin
 
2214
      result:=UTF8CompareText(StringGridanionssimples_.Cells[ACol, ARow],StringGridanionssimples_.Cells[BCol, BRow]);
 
2215
   end;
 
2216
    if acol=4 then begin
 
2217
      res:=StrToFloatDef(StringGridanionssimples_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridanionssimples_.Cells[BCol, BRow],0);
 
2218
      if res>0 then result:=1 else
 
2219
        if res<0 then result:=-1
 
2220
        else result:=0;
 
2221
   end;
 
2222
    if StringGridanionssimples_.SortOrder = soDescending then
 
2223
      result := -result;
 
2224
 
 
2225
end;
 
2226
 
1712
2227
 procedure TForm1.StringGridanionssimples_mousedown(Sender: TObject;
1713
2228
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1714
2229
 
1806
2321
end;
1807
2322
end;
1808
2323
 
 
2324
procedure TForm1.StringGridaqueuxabCompareCells(Sender: TObject; ACol, ARow,
 
2325
  BCol, BRow: Integer; var Result: integer);
 
2326
 
 
2327
   var res:extended;
 
2328
begin
 
2329
   if acol<4 then begin
 
2330
    result:=UTF8CompareText(StringGridaqueuxab.Cells[ACol, ARow],StringGridaqueuxab.Cells[BCol, BRow]);
 
2331
 end;
 
2332
  if acol=4 then begin
 
2333
    res:=StrToFloatDef(StringGridaqueuxab.Cells[ACol, ARow],0)-StrToFloatDef(StringGridaqueuxab.Cells[BCol, BRow],0);
 
2334
    if res>0 then result:=1 else
 
2335
      if res<0 then result:=-1
 
2336
      else result:=0;
 
2337
 end;
 
2338
  if StringGridaqueuxab.SortOrder = soDescending then
 
2339
    result := -result;
 
2340
 
 
2341
end;
 
2342
 
 
2343
 function EnleveAccents(AText : String) : string;
 
2344
const
 
2345
  Char_Accents      = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ';
 
2346
  Char_Sans_Accents = 'AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn';
 
2347
var
 
2348
  I : Integer;
 
2349
  sTemp : String;
 
2350
begin
 
2351
  sTemp := AText;
 
2352
  For i := 1 to Length(Char_Accents) do
 
2353
    //sTemp := FastReplace(sTemp, Char_Accents[i], Char_Sans_Accents[i]);
 
2354
    sTemp := StringReplace(sTemp,Char_Accents[i],Char_Sans_Accents[i],[rfReplaceAll]);
 
2355
  Result := sTemp;
 
2356
end;
 
2357
 
 
2358
 
 
2359
 
1809
2360
 
1810
2361
 
1811
2362
 
1909
2460
end;
1910
2461
end;
1911
2462
 
 
2463
procedure TForm1.StringGridaqueuxab_CompareCells(Sender: TObject; ACol, ARow,
 
2464
  BCol, BRow: Integer; var Result: integer);
 
2465
 
 
2466
   var res:extended;
 
2467
begin
 
2468
   if acol<4 then begin
 
2469
    result:=UTF8CompareText(StringGridaqueuxab_.Cells[ACol, ARow],StringGridaqueuxab_.Cells[BCol, BRow]);
 
2470
 end;
 
2471
  if acol=4 then begin
 
2472
    res:=StrToFloatDef(StringGridaqueuxab_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridaqueuxab_.Cells[BCol, BRow],0);
 
2473
    if res>0 then result:=1 else
 
2474
      if res<0 then result:=-1
 
2475
      else result:=0;
 
2476
 end;
 
2477
  if StringGridaqueuxab_.SortOrder = soDescending then
 
2478
    result := -result;
 
2479
 
 
2480
end;
 
2481
 
1912
2482
 procedure TForm1.StringGridaqueuxab_mousedown(Sender: TObject;
1913
2483
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1914
2484
 
2005
2575
end;
2006
2576
end;
2007
2577
 
 
2578
procedure TForm1.StringGridaqueuxcomplexesCompareCells(Sender: TObject; ACol,
 
2579
  ARow, BCol, BRow: Integer; var Result: integer);
 
2580
   var res:extended;
 
2581
  begin
 
2582
     if acol<4 then begin
 
2583
      result:=UTF8CompareText(StringGridaqueuxcomplexes.Cells[ACol, ARow],StringGridaqueuxcomplexes.Cells[BCol, BRow]);
 
2584
   end;
 
2585
    if acol=4 then begin
 
2586
      res:=StrToFloatDef(StringGridaqueuxcomplexes.Cells[ACol, ARow],0)-StrToFloatDef(StringGridaqueuxcomplexes.Cells[BCol, BRow],0);
 
2587
      if res>0 then result:=1 else
 
2588
        if res<0 then result:=-1
 
2589
        else result:=0;
 
2590
   end;
 
2591
    if StringGridaqueuxcomplexes.SortOrder = soDescending then
 
2592
      result := -result;
 
2593
 
 
2594
end;
 
2595
 
2008
2596
 
2009
2597
 
2010
2598
 procedure TForm1.StringGridaqueuxcomplexesmousedown(Sender: TObject;
2103
2691
 
2104
2692
end;
2105
2693
 
 
2694
procedure TForm1.StringGridaqueuxcomplexes_CompareCells(Sender: TObject; ACol,
 
2695
  ARow, BCol, BRow: Integer; var Result: integer);
 
2696
   var res:extended;
 
2697
    begin
 
2698
       if acol<4 then begin
 
2699
        result:=UTF8CompareText(StringGridaqueuxcomplexes_.Cells[ACol, ARow],StringGridaqueuxcomplexes_.Cells[BCol, BRow]);
 
2700
     end;
 
2701
      if acol=4 then begin
 
2702
        res:=StrToFloatDef(StringGridaqueuxcomplexes_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridaqueuxcomplexes_.Cells[BCol, BRow],0);
 
2703
        if res>0 then result:=1 else
 
2704
          if res<0 then result:=-1
 
2705
          else result:=0;
 
2706
     end;
 
2707
      if StringGridaqueuxcomplexes_.SortOrder = soDescending then
 
2708
        result := -result;
 
2709
 
 
2710
end;
 
2711
 
2106
2712
 procedure TForm1.StringGridaqueuxcomplexes_mousedown(Sender: TObject;
2107
2713
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
2108
2714
var  i,coco,roro:integer;
2200
2806
 
2201
2807
end;
2202
2808
 
 
2809
procedure TForm1.StringGridcationssimplesCompareCells(Sender: TObject; ACol,
 
2810
  ARow, BCol, BRow: Integer; var Result: integer);
 
2811
  var res:extended;
 
2812
begin
 
2813
   if acol<4 then begin
 
2814
    result:=UTF8CompareText(StringGridcationssimples.Cells[ACol, ARow],StringGridcationssimples.Cells[BCol, BRow]);
 
2815
 end;
 
2816
  if acol=4 then begin
 
2817
    res:=StrToFloatDef(StringGridcationssimples.Cells[ACol, ARow],0)-StrToFloatDef(StringGridcationssimples.Cells[BCol, BRow],0);
 
2818
    if res>0 then result:=1 else
 
2819
      if res<0 then result:=-1
 
2820
      else result:=0;
 
2821
 end;
 
2822
  if StringGridcationssimples.SortOrder = soDescending then
 
2823
    result := -result;
 
2824
end;
 
2825
 
 
2826
 
2203
2827
 
2204
2828
 
2205
2829
 
2306
2930
 
2307
2931
 end;
2308
2932
 
 
2933
procedure TForm1.StringGridcationssimples_CompareCells(Sender: TObject; ACol,
 
2934
  ARow, BCol, BRow: Integer; var Result: integer);
 
2935
var res:extended;
 
2936
begin
 
2937
  if acol<4 then begin
 
2938
   result:=UTF8CompareText(StringGridcationssimples_.Cells[ACol, ARow],StringGridcationssimples_.Cells[BCol, BRow]);
 
2939
end;
 
2940
 if acol=4 then begin
 
2941
   res:=StrToFloatDef(StringGridcationssimples_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridcationssimples_.Cells[BCol, BRow],0);
 
2942
   if res>0 then result:=1 else
 
2943
     if res<0 then result:=-1
 
2944
     else result:=0;
 
2945
end;
 
2946
 if StringGridcationssimples_.SortOrder = soDescending then
 
2947
   result := -result;
 
2948
 
 
2949
end;
 
2950
 
2309
2951
 procedure TForm1.StringGridcationssimples_mousedown(Sender: TObject;
2310
2952
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
2311
2953
 
2597
3239
 
2598
3240
end;
2599
3241
 
 
3242
procedure TForm1.StringGridIonsCompareCells(Sender: TObject; ACol, ARow, BCol,
 
3243
  BRow: Integer; var Result: integer);
 
3244
var res:extended;
 
3245
begin
 
3246
   if acol<4 then begin
 
3247
    result:=UTF8CompareText(StringGridIons.Cells[ACol, ARow],StringGridIons.Cells[BCol, BRow]);
 
3248
 end;
 
3249
  if acol=4 then begin
 
3250
    res:=StrToFloatDef(StringGridIons.Cells[ACol, ARow],0)-StrToFloatDef(StringGridIons.Cells[BCol, BRow],0);
 
3251
    if res>0 then result:=1 else
 
3252
      if res<0 then result:=-1
 
3253
      else result:=0;
 
3254
 end;
 
3255
  if StringGridIons.SortOrder = soDescending then
 
3256
    result := -result;
 
3257
 
 
3258
end;
 
3259
 
2600
3260
 
2601
3261
 
2602
3262
 
2697
3357
end;
2698
3358
 end;
2699
3359
 
 
3360
procedure TForm1.StringGridIons_CompareCells(Sender: TObject; ACol, ARow, BCol,
 
3361
  BRow: Integer; var Result: integer);
 
3362
var res:extended;
 
3363
begin
 
3364
   if acol<4 then begin
 
3365
    result:=UTF8CompareText(StringGridIons_.Cells[ACol, ARow],StringGridIons_.Cells[BCol, BRow]);
 
3366
 end;
 
3367
  if acol=4 then begin
 
3368
    res:=StrToFloatDef(StringGridIons_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridIons_.Cells[BCol, BRow],0);
 
3369
    if res>0 then result:=1 else
 
3370
      if res<0 then result:=-1
 
3371
      else result:=0;
 
3372
 end;
 
3373
  if StringGridIons_.SortOrder = soDescending then
 
3374
    result := -result;
 
3375
 
 
3376
end;
 
3377
 
2700
3378
  procedure TForm1.StringGridIons_mousedown(Sender: TObject;
2701
3379
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
2702
3380
var  i,coco,roro:integer;
2795
3473
end;
2796
3474
 end;
2797
3475
 
 
3476
procedure TForm1.stringgridminerauxCompareCells(Sender: TObject; ACol, ARow,
 
3477
  BCol, BRow: Integer; var Result: integer);
 
3478
var res:extended;
 
3479
 begin
 
3480
    if acol<>1 then begin
 
3481
     result:=UTF8CompareText(stringgridmineraux.Cells[ACol, ARow],stringgridmineraux.Cells[BCol, BRow]);
 
3482
  end;
 
3483
   if acol=1 then begin
 
3484
     res:=StrToFloatDef(stringgridmineraux.Cells[ACol, ARow],0)-StrToFloatDef(stringgridmineraux.Cells[BCol, BRow],0);
 
3485
     if res>0 then result:=1 else
 
3486
       if res<0 then result:=-1
 
3487
       else result:=0;
 
3488
  end;
 
3489
   if stringgridmineraux.SortOrder = soDescending then
 
3490
     result := -result;
 
3491
 
 
3492
end;
 
3493
 
2798
3494
 
2799
3495
 
2800
3496
 procedure TForm1.stringgridminerauxmousedown(Sender: TObject;
2900
3596
 
2901
3597
end;
2902
3598
 
 
3599
procedure TForm1.stringgridmineraux_CompareCells(Sender: TObject; ACol, ARow,
 
3600
  BCol, BRow: Integer; var Result: integer);
 
3601
var res:extended;
 
3602
 begin
 
3603
    if acol<>1 then begin
 
3604
     result:=UTF8CompareText(stringgridmineraux_.Cells[ACol, ARow],stringgridmineraux_.Cells[BCol, BRow]);
 
3605
  end;
 
3606
   if acol=1 then begin
 
3607
     res:=StrToFloatDef(stringgridmineraux_.Cells[ACol, ARow],0)-StrToFloatDef(stringgridmineraux_.Cells[BCol, BRow],0);
 
3608
     if res>0 then result:=1 else
 
3609
       if res<0 then result:=-1
 
3610
       else result:=0;
 
3611
  end;
 
3612
   if stringgridmineraux_.SortOrder = soDescending then
 
3613
     result := -result;
 
3614
 
 
3615
end;
 
3616
 
2903
3617
 procedure TForm1.stringgridmineraux_mousedown(Sender: TObject;
2904
3618
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
2905
3619
var  i,coco,roro:integer;
3003
3717
 
3004
3718
end;
3005
3719
 
 
3720
procedure TForm1.StringGridMoleculesCompareCells(Sender: TObject; ACol, ARow,
 
3721
  BCol, BRow: Integer; var Result: integer);
 
3722
var res:extended;
 
3723
 begin
 
3724
    if acol<4 then begin
 
3725
     result:=UTF8CompareText(StringGridMolecules.Cells[ACol, ARow],StringGridMolecules.Cells[BCol, BRow]);
 
3726
  end;
 
3727
   if acol=4 then begin
 
3728
     res:=StrToFloatDef(StringGridMolecules.Cells[ACol, ARow],0)-StrToFloatDef(StringGridMolecules.Cells[BCol, BRow],0);
 
3729
     if res>0 then result:=1 else
 
3730
       if res<0 then result:=-1
 
3731
       else result:=0;
 
3732
  end;
 
3733
   if StringGridMolecules.SortOrder = soDescending then
 
3734
     result := -result;
 
3735
end;
 
3736
 
3006
3737
 
3007
3738
 procedure TForm1.StringGridMoleculesmousedown(Sender: TObject;
3008
3739
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3104
3835
 
3105
3836
end;
3106
3837
 
 
3838
procedure TForm1.StringGridMolecules_CompareCells(Sender: TObject; ACol, ARow,
 
3839
  BCol, BRow: Integer; var Result: integer);
 
3840
var res:extended;
 
3841
 begin
 
3842
    if acol<4 then begin
 
3843
     result:=UTF8CompareText(StringGridMolecules_.Cells[ACol, ARow],StringGridMolecules_.Cells[BCol, BRow]);
 
3844
  end;
 
3845
   if acol=4 then begin
 
3846
     res:=StrToFloatDef(StringGridMolecules_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridMolecules_.Cells[BCol, BRow],0);
 
3847
     if res>0 then result:=1 else
 
3848
       if res<0 then result:=-1
 
3849
       else result:=0;
 
3850
  end;
 
3851
   if StringGridMolecules_.SortOrder = soDescending then
 
3852
     result := -result;
 
3853
 
 
3854
end;
 
3855
 
3107
3856
 procedure TForm1.StringGridMolecules_mousedown(Sender: TObject;
3108
3857
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3109
3858
 
3397
4146
 
3398
4147
 end;
3399
4148
 
 
4149
procedure TForm1.StringGridorganiques_acideCompareCells(Sender: TObject; ACol,
 
4150
  ARow, BCol, BRow: Integer; var Result: integer);
 
4151
 
 
4152
  var res:extended;
 
4153
begin
 
4154
   if acol<4 then begin
 
4155
    result:=UTF8CompareText(StringGridorganiques_acide.Cells[ACol, ARow],StringGridorganiques_acide.Cells[BCol, BRow]);
 
4156
 end;
 
4157
  if acol=4 then begin
 
4158
    res:=StrToFloatDef(StringGridorganiques_acide.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_acide.Cells[BCol, BRow],0);
 
4159
    if res>0 then result:=1 else
 
4160
      if res<0 then result:=-1
 
4161
      else result:=0;
 
4162
 end;
 
4163
  if StringGridorganiques_acide.SortOrder = soDescending then
 
4164
    result := -result;
 
4165
end;
 
4166
 
 
4167
 
 
4168
 
 
4169
 
3400
4170
 
3401
4171
 procedure TForm1.StringGridorganiques_acidemousedown(Sender: TObject;
3402
4172
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3497
4267
 
3498
4268
    end;
3499
4269
 
 
4270
procedure TForm1.StringGridorganiques_acide_CompareCells(Sender: TObject; ACol,
 
4271
  ARow, BCol, BRow: Integer; var Result: integer);
 
4272
  var res:extended;
 
4273
  begin
 
4274
     if acol<4 then begin
 
4275
      result:=UTF8CompareText(StringGridorganiques_acide_.Cells[ACol, ARow],StringGridorganiques_acide_.Cells[BCol, BRow]);
 
4276
   end;
 
4277
    if acol=4 then begin
 
4278
      res:=StrToFloatDef(StringGridorganiques_acide_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_acide_.Cells[BCol, BRow],0);
 
4279
      if res>0 then result:=1 else
 
4280
        if res<0 then result:=-1
 
4281
        else result:=0;
 
4282
   end;
 
4283
    if StringGridorganiques_acide_.SortOrder = soDescending then
 
4284
      result := -result;
 
4285
 
 
4286
end;
 
4287
 
3500
4288
    procedure TForm1.StringGridorganiques_acide_mousedown(Sender: TObject;
3501
4289
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3502
4290
 
3596
4384
 
3597
4385
    end;
3598
4386
 
 
4387
procedure TForm1.StringGridorganiques_alcCompareCells(Sender: TObject; ACol,
 
4388
  ARow, BCol, BRow: Integer; var Result: integer);
 
4389
  var res:extended;
 
4390
 begin
 
4391
    if acol<4 then begin
 
4392
     result:=UTF8CompareText(StringGridorganiques_alc.Cells[ACol, ARow],StringGridorganiques_alc.Cells[BCol, BRow]);
 
4393
  end;
 
4394
   if acol=4 then begin
 
4395
     res:=StrToFloatDef(StringGridorganiques_alc.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_alc.Cells[BCol, BRow],0);
 
4396
     if res>0 then result:=1 else
 
4397
       if res<0 then result:=-1
 
4398
       else result:=0;
 
4399
  end;
 
4400
   if StringGridorganiques_alc.SortOrder = soDescending then
 
4401
     result := -result;
 
4402
 
 
4403
end;
 
4404
 
3599
4405
 
3600
4406
 
3601
4407
 procedure TForm1.StringGridorganiques_alcmousedown(Sender: TObject;
3695
4501
 
3696
4502
end;
3697
4503
 
 
4504
procedure TForm1.StringGridorganiques_alcoolCompareCells(Sender: TObject; ACol,
 
4505
  ARow, BCol, BRow: Integer; var Result: integer);
 
4506
  var res:extended;
 
4507
 begin
 
4508
    if acol<4 then begin
 
4509
     result:=UTF8CompareText(StringGridorganiques_alcool.Cells[ACol, ARow],StringGridorganiques_alcool.Cells[BCol, BRow]);
 
4510
  end;
 
4511
   if acol=4 then begin
 
4512
     res:=StrToFloatDef(StringGridorganiques_alcool.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_alcool.Cells[BCol, BRow],0);
 
4513
     if res>0 then result:=1 else
 
4514
       if res<0 then result:=-1
 
4515
       else result:=0;
 
4516
  end;
 
4517
   if StringGridorganiques_alcool.SortOrder = soDescending then
 
4518
     result := -result;
 
4519
 
 
4520
end;
 
4521
 
3698
4522
 
3699
4523
 
3700
4524
 procedure TForm1.StringGridorganiques_alcoolmousedown(Sender: TObject;
3793
4617
 
3794
4618
end;
3795
4619
 
 
4620
procedure TForm1.StringGridorganiques_alcool_CompareCells(Sender: TObject;
 
4621
  ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
4622
  var res:extended;
 
4623
  begin
 
4624
     if acol<4 then begin
 
4625
      result:=UTF8CompareText(StringGridorganiques_alcool_.Cells[ACol, ARow],StringGridorganiques_alcool_.Cells[BCol, BRow]);
 
4626
   end;
 
4627
    if acol=4 then begin
 
4628
      res:=StrToFloatDef(StringGridorganiques_alcool_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_alcool_.Cells[BCol, BRow],0);
 
4629
      if res>0 then result:=1 else
 
4630
        if res<0 then result:=-1
 
4631
        else result:=0;
 
4632
   end;
 
4633
    if StringGridorganiques_alcool_.SortOrder = soDescending then
 
4634
      result := -result;
 
4635
 
 
4636
end;
 
4637
 
3796
4638
 procedure TForm1.StringGridorganiques_alcool_mousedown(Sender: TObject;
3797
4639
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3798
4640
var  i,coco,roro:integer;
3891
4733
 
3892
4734
end;
3893
4735
 
 
4736
procedure TForm1.StringGridorganiques_alc_CompareCells(Sender: TObject; ACol,
 
4737
  ARow, BCol, BRow: Integer; var Result: integer);
 
4738
  var res:extended;
 
4739
  begin
 
4740
     if acol<4 then begin
 
4741
      result:=UTF8CompareText(StringGridorganiques_alc_.Cells[ACol, ARow],StringGridorganiques_alc_.Cells[BCol, BRow]);
 
4742
   end;
 
4743
    if acol=4 then begin
 
4744
      res:=StrToFloatDef(StringGridorganiques_alc_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_alc_.Cells[BCol, BRow],0);
 
4745
      if res>0 then result:=1 else
 
4746
        if res<0 then result:=-1
 
4747
        else result:=0;
 
4748
   end;
 
4749
    if StringGridorganiques_alc_.SortOrder = soDescending then
 
4750
      result := -result;
 
4751
 
 
4752
end;
 
4753
 
3894
4754
 procedure TForm1.StringGridorganiques_alc_mousedown(Sender: TObject;
3895
4755
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3896
4756
var  i,coco,roro:integer;
3989
4849
 
3990
4850
end;
3991
4851
 
 
4852
procedure TForm1.StringGridorganiques_aldehyd_cetoneCompareCells(
 
4853
  Sender: TObject; ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
4854
  var res:extended;
 
4855
  begin
 
4856
     if acol<4 then begin
 
4857
      result:=UTF8CompareText(StringGridorganiques_aldehyd_cetone.Cells[ACol, ARow],StringGridorganiques_aldehyd_cetone.Cells[BCol, BRow]);
 
4858
   end;
 
4859
    if acol=4 then begin
 
4860
      res:=StrToFloatDef(StringGridorganiques_aldehyd_cetone.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_aldehyd_cetone.Cells[BCol, BRow],0);
 
4861
      if res>0 then result:=1 else
 
4862
        if res<0 then result:=-1
 
4863
        else result:=0;
 
4864
   end;
 
4865
    if StringGridorganiques_aldehyd_cetone.SortOrder = soDescending then
 
4866
      result := -result;
 
4867
 
 
4868
end;
 
4869
 
3992
4870
 
3993
4871
 
3994
4872
 
4091
4969
 
4092
4970
end;
4093
4971
 
 
4972
procedure TForm1.StringGridorganiques_aldehyd_cetone_CompareCells(
 
4973
  Sender: TObject; ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
4974
  var res:extended;
 
4975
   begin
 
4976
      if acol<4 then begin
 
4977
       result:=UTF8CompareText(StringGridorganiques_aldehyd_cetone_.Cells[ACol, ARow],StringGridorganiques_aldehyd_cetone_.Cells[BCol, BRow]);
 
4978
    end;
 
4979
     if acol=4 then begin
 
4980
       res:=StrToFloatDef(StringGridorganiques_aldehyd_cetone_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_aldehyd_cetone_.Cells[BCol, BRow],0);
 
4981
       if res>0 then result:=1 else
 
4982
         if res<0 then result:=-1
 
4983
         else result:=0;
 
4984
    end;
 
4985
     if StringGridorganiques_aldehyd_cetone_.SortOrder = soDescending then
 
4986
       result := -result;
 
4987
 
 
4988
end;
 
4989
 
4094
4990
 procedure TForm1.StringGridorganiques_aldehyd_cetone_mousedown(
4095
4991
  Sender: TObject; Button: TMouseButton; Shift: TShiftState; X,
4096
4992
  Y: Integer);
4189
5085
 
4190
5086
end;
4191
5087
 
 
5088
procedure TForm1.StringGridorganiques_amid_aminCompareCells(Sender: TObject;
 
5089
  ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
5090
  var res:extended;
 
5091
 begin
 
5092
    if acol<4 then begin
 
5093
     result:=UTF8CompareText(StringGridorganiques_amid_amin.Cells[ACol, ARow],StringGridorganiques_amid_amin.Cells[BCol, BRow]);
 
5094
  end;
 
5095
   if acol=4 then begin
 
5096
     res:=StrToFloatDef(StringGridorganiques_amid_amin.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_amid_amin.Cells[BCol, BRow],0);
 
5097
     if res>0 then result:=1 else
 
5098
       if res<0 then result:=-1
 
5099
       else result:=0;
 
5100
  end;
 
5101
   if StringGridorganiques_amid_amin.SortOrder = soDescending then
 
5102
     result := -result;
 
5103
 
 
5104
end;
 
5105
 
4192
5106
 
4193
5107
 
4194
5108
 
4290
5204
 
4291
5205
end;
4292
5206
 
 
5207
procedure TForm1.StringGridorganiques_amid_amin_CompareCells(Sender: TObject;
 
5208
  ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
5209
  var res:extended;
 
5210
   begin
 
5211
      if acol<4 then begin
 
5212
       result:=UTF8CompareText(StringGridorganiques_amid_amin_.Cells[ACol, ARow],StringGridorganiques_amid_amin_.Cells[BCol, BRow]);
 
5213
    end;
 
5214
     if acol=4 then begin
 
5215
       res:=StrToFloatDef(StringGridorganiques_amid_amin_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_amid_amin_.Cells[BCol, BRow],0);
 
5216
       if res>0 then result:=1 else
 
5217
         if res<0 then result:=-1
 
5218
         else result:=0;
 
5219
    end;
 
5220
     if StringGridorganiques_amid_amin_.SortOrder = soDescending then
 
5221
       result := -result;
 
5222
 
 
5223
end;
 
5224
 
4293
5225
 procedure TForm1.StringGridorganiques_amid_amin_mousedown(Sender: TObject;
4294
5226
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4295
5227
var  i,coco,roro:integer;
4387
5319
 
4388
5320
end;
4389
5321
 
 
5322
procedure TForm1.StringGridorganiques_aminoacideCompareCells(Sender: TObject;
 
5323
  ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
5324
  var res:extended;
 
5325
  begin
 
5326
     if acol<4 then begin
 
5327
      result:=UTF8CompareText(StringGridorganiques_aminoacide.Cells[ACol, ARow],StringGridorganiques_aminoacide.Cells[BCol, BRow]);
 
5328
   end;
 
5329
    if acol=4 then begin
 
5330
      res:=StrToFloatDef(StringGridorganiques_aminoacide.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_aminoacide.Cells[BCol, BRow],0);
 
5331
      if res>0 then result:=1 else
 
5332
        if res<0 then result:=-1
 
5333
        else result:=0;
 
5334
   end;
 
5335
    if StringGridorganiques_aminoacide.SortOrder = soDescending then
 
5336
      result := -result;
 
5337
 
 
5338
end;
 
5339
 
4390
5340
 
4391
5341
 procedure TForm1.StringGridorganiques_aminoacidemousedown(Sender: TObject;
4392
5342
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4485
5435
 
4486
5436
end;
4487
5437
 
 
5438
procedure TForm1.StringGridorganiques_aminoacide_CompareCells(Sender: TObject;
 
5439
  ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
5440
  var res:extended;
 
5441
   begin
 
5442
      if acol<4 then begin
 
5443
       result:=UTF8CompareText(StringGridorganiques_aminoacide_.Cells[ACol, ARow],StringGridorganiques_aminoacide_.Cells[BCol, BRow]);
 
5444
    end;
 
5445
     if acol=4 then begin
 
5446
       res:=StrToFloatDef(StringGridorganiques_aminoacide_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_aminoacide_.Cells[BCol, BRow],0);
 
5447
       if res>0 then result:=1 else
 
5448
         if res<0 then result:=-1
 
5449
         else result:=0;
 
5450
    end;
 
5451
     if StringGridorganiques_aminoacide_.SortOrder = soDescending then
 
5452
       result := -result;
 
5453
 
 
5454
end;
 
5455
 
4488
5456
 procedure TForm1.StringGridorganiques_aminoacide_mousedown(Sender: TObject;
4489
5457
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4490
5458
var  i,coco,roro:integer;
4583
5551
 
4584
5552
end;
4585
5553
 
 
5554
procedure TForm1.StringGridorganiques_benzeneCompareCells(Sender: TObject;
 
5555
  ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
5556
  var res:extended;
 
5557
begin
 
5558
   if acol<4 then begin
 
5559
    result:=UTF8CompareText(StringGridorganiques_benzene.Cells[ACol, ARow],StringGridorganiques_benzene.Cells[BCol, BRow]);
 
5560
 end;
 
5561
  if acol=4 then begin
 
5562
    res:=StrToFloatDef(StringGridorganiques_benzene.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_benzene.Cells[BCol, BRow],0);
 
5563
    if res>0 then result:=1 else
 
5564
      if res<0 then result:=-1
 
5565
      else result:=0;
 
5566
 end;
 
5567
  if StringGridorganiques_benzene.SortOrder = soDescending then
 
5568
    result := -result;
 
5569
 
 
5570
end;
 
5571
 
4586
5572
 
4587
5573
 
4588
5574
 
4683
5669
 
4684
5670
end;
4685
5671
 
 
5672
procedure TForm1.StringGridorganiques_benzene_CompareCells(Sender: TObject;
 
5673
  ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
5674
  var res:extended;
 
5675
 begin
 
5676
    if acol<4 then begin
 
5677
     result:=UTF8CompareText(StringGridorganiques_benzene_.Cells[ACol, ARow],StringGridorganiques_benzene_.Cells[BCol, BRow]);
 
5678
  end;
 
5679
   if acol=4 then begin
 
5680
     res:=StrToFloatDef(StringGridorganiques_benzene_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_benzene_.Cells[BCol, BRow],0);
 
5681
     if res>0 then result:=1 else
 
5682
       if res<0 then result:=-1
 
5683
       else result:=0;
 
5684
  end;
 
5685
   if StringGridorganiques_benzene_.SortOrder = soDescending then
 
5686
     result := -result;
 
5687
 
 
5688
end;
 
5689
 
4686
5690
 procedure TForm1.StringGridorganiques_benzene_mousedown(Sender: TObject;
4687
5691
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4688
5692
var  i,coco,roro:integer;
4781
5785
 
4782
5786
end;
4783
5787
 
 
5788
procedure TForm1.StringGridorganiques_complexeCompareCells(Sender: TObject;
 
5789
  ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
5790
 
 
5791
  var res:extended;
 
5792
begin
 
5793
   if acol<4 then begin
 
5794
    result:=UTF8CompareText(StringGridorganiques_complexe.Cells[ACol, ARow],StringGridorganiques_complexe.Cells[BCol, BRow]);
 
5795
 end;
 
5796
  if acol=4 then begin
 
5797
    res:=StrToFloatDef(StringGridorganiques_complexe.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_complexe.Cells[BCol, BRow],0);
 
5798
    if res>0 then result:=1 else
 
5799
      if res<0 then result:=-1
 
5800
      else result:=0;
 
5801
 end;
 
5802
  if StringGridorganiques_complexe.SortOrder = soDescending then
 
5803
    result := -result;
 
5804
end;
 
5805
 
4784
5806
 
4785
5807
 
4786
5808
 
4881
5903
 
4882
5904
end;
4883
5905
 
 
5906
procedure TForm1.StringGridorganiques_complexe_CompareCells(Sender: TObject;
 
5907
  ACol, ARow, BCol, BRow: Integer; var Result: integer);
 
5908
 
 
5909
  var res:extended;
 
5910
begin
 
5911
   if acol<4 then begin
 
5912
    result:=UTF8CompareText(StringGridorganiques_complexe_.Cells[ACol, ARow],StringGridorganiques_complexe_.Cells[BCol, BRow]);
 
5913
 end;
 
5914
  if acol=4 then begin
 
5915
    res:=StrToFloatDef(StringGridorganiques_complexe_.Cells[ACol, ARow],0)-StrToFloatDef(StringGridorganiques_complexe_.Cells[BCol, BRow],0);
 
5916
    if res>0 then result:=1 else
 
5917
      if res<0 then result:=-1
 
5918
      else result:=0;
 
5919
 end;
 
5920
  if StringGridorganiques_complexe_.SortOrder = soDescending then
 
5921
    result := -result;
 
5922
 
 
5923
end;
 
5924
 
4884
5925
 procedure TForm1.StringGridorganiques_complexe_mousedown(Sender: TObject;
4885
5926
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4886
5927
var  i,coco,roro:integer;
5089
6130
 
5090
6131
 end;
5091
6132
 
 
6133
procedure TForm1.StringGridReactionsKeyPress(Sender: TObject; var Key: char);
 
6134
begin
 
6135
   if key=',' then key:='.';
 
6136
end;
 
6137
 
5092
6138
  procedure TForm1.StringGridReactionsSetEditText(Sender: TObject; ACol,
5093
6139
   ARow: Integer; const Value: string);
5094
6140
begin
5112
6158
       label1.Top:=label7.Top+label7.height+10;
5113
6159
        speedbuttonx10.Top:=label1.Top+label1.height+20;
5114
6160
   speedbutton_10.Top:=speedbuttonx10.Top;
 
6161
   speedbutton_dilution.Top:=speedbuttonx10.Top;
 
6162
   speedbutton_dilution.Left:= speedbutton_10.Left+ speedbutton_10.Width+10;
5115
6163
   stringgridreactifs_becher.Left:=tabsheetchoisir.clientRect.left+10; ;
5116
 
    stringgridreactifs_becher.Top:=speedbuttonx10.Top+speedbuttonx10.height+20;
 
6164
    stringgridreactifs_becher.Top:=speedbutton_dilution.Top+speedbutton_dilution.height+20;
5117
6165
  stringgridreactifs_becher.Height:=bitbtn4.Top-stringgridreactifs_becher.Top-10;
5118
6166
                  pagecontrol1.Top:=label11.Top+label11.height+20;
5119
6167
              pagecontrol1.Left:=stringgridreactifs_becher.Left+
5136
6184
            label1_.Top:=label16.Top+label16.height+10;
5137
6185
              speedbuttonx10_.Top:=label1_.Top+label1_.height+20;
5138
6186
speedbutton_10_.Top:=speedbuttonx10_.Top;
 
6187
 speedbutton_dilution_.Top:=speedbuttonx10_.Top;
 
6188
   speedbutton_dilution_.Left:= speedbutton_10_.Left+ speedbutton_10_.Width+10;
 
6189
 
5139
6190
  stringgridreactifs_burette.Left:=tabsheetchoisir_.ClientRect.left+10;;
5140
 
 stringgridreactifs_burette.Top:=speedbuttonx10_.top+speedbuttonx10_.height+20;
 
6191
 stringgridreactifs_burette.Top:=speedbutton_dilution_.Top+speedbutton_dilution_.height+20;
5141
6192
  stringgridreactifs_burette.Height:=bitbtn4_.Top-stringgridreactifs_burette.Top-10;
5142
6193
         pagecontrol1_.Top:=label11_.Top+label11_.height+20;
5143
6194
             pagecontrol1_.Left:=stringgridreactifs_burette.Left+
5344
6395
       try
5345
6396
     li_ph:=tstringlist.Create;
5346
6397
 
5347
 
         li_ph.LoadFromFile(extractfilepath(application.ExeName)+'indic_ph.xml');
 
6398
         li_ph.LoadFromFile(utf8tosys(extractfilepath(application.ExeName)+'indic_ph.xml'));
5348
6399
        decimalseparator:='.';
5349
6400
             nbe_indic_ph:=strtoint(li_ph[1]);
5350
6401
 setlength(liste_indic_ph,nbe_indic_ph);
5403
6454
     application.MessageBox('Fichier des indicateurs colorés introuvable !','Attention',mb_ok);
5404
6455
       end;
5405
6456
  combobox1.ItemIndex:=0;
5406
 
        liste_langues:=tstringlist.create;
5407
 
 
5408
 
          {$IFDEF MSWINDOWS}
5409
 
         chemin_po:=extractfilepath(application.ExeName)+'languages\';
5410
 
        {$ELSE}
5411
 
           chemin_po:=extractfilepath(application.ExeName)+'languages/';
5412
 
        {$ENDIF}
5413
 
         If sysutils.FindFirst(Chemin_po+'dozzzaqueux.*.po',faAnyFile,S)=0
5414
 
  Then Begin
5415
 
    Repeat
5416
 
                liste_langues.Add(copy(s.name,length(s.name)-4,2));
5417
 
               Until sysutils.FindNext(S)<>0;
5418
 
    sysutils.FindClose(S);
5419
 
  End;
5420
 
 
5421
 
 
5422
 
 
5423
 
 
 
6457
 
 
6458
 
 
6459
 
 
6460
 
 
6461
 
 
6462
 
 
6463
 
 
6464
  editvolume.Hint:=rsChangerCette;
 
6465
  editvolume_burette.Hint:=rsChangerCette;
5424
6466
  Caption := rsDozzzaqueux;
5425
6467
 
5426
6468
    menuitem11.Caption:=rsindicateurcolore;
5428
6470
    Label14.Caption := rsBCher;
5429
6471
    SpeedButtonviderbecher.Caption := rsVider;
5430
6472
    SpeedButtonx10.Caption := rsX10;
 
6473
    speedbutton_dilution.Caption:=rsDilution;
 
6474
    speedbutton_dilution_.Caption:=rsDilution;
5431
6475
     SpeedButton_10.Caption := rs10;
5432
6476
     Label5.Caption := rsVolumeInitia;
5433
6477
     Label6.Caption := rsML2;
5528
6572
 
5529
6573
 
5530
6574
     BitBtn7.Caption:= rsValiderEtTra;
5531
 
     TabSheettracecourbes.Hint:= rsExporterLesR;
 
6575
    // TabSheettracecourbes.Hint:= rsExporterLesR;
5532
6576
     TabSheettracecourbes.Caption:= rsTracDesCourb;
5533
6577
     SpeedButtonfermer.Caption:= rsFermer;
5534
6578
     Label21.Caption:= rsV;
5556
6600
        SpeedButton14.Hint:= rsCopierDansLe;
5557
6601
        SpeedButton14.Caption:= rsCopier;
5558
6602
        SpeedButton15.Caption:= rsPointParticu;
 
6603
        SpeedButton15.Hint:=rsCalculerLesV;
5559
6604
        SpeedButton16.Hint:=
5560
6605
        rsEntrerSortir;
5561
6606
        SpeedButton16.Caption:= rsFaisceau;
5562
6607
        SpeedButton17.Caption := rsSuperposer;
 
6608
         SpeedButton17.Hint:=rsSuperposerLa;
5563
6609
         SpinEdit1pourcent.Hint:= rs1DuVolumeMax;
5564
6610
         SpinEdit01pourcent.Hint:= rs01DuVolumeMa;
5565
6611
         SpinEdit001pourcent.Hint:= rs001DuVolumeM;
5566
6612
          SpinEdit0001pourcent.Hint:= rs0001DuVolume;
5567
6613
            Fichier1.Caption:= rsFichier;
5568
6614
            Nouvellesimulation1.Caption := rsNouvelleSimu;
 
6615
            MenuItem_charger_exemples.Caption:=rsDuRPertoireE;
 
6616
            MenuItem_charger_personnel.Caption:=rsDeMonRPertoi;
 
6617
 
5569
6618
            menuitem9.Caption:=rsLangue;
5570
6619
            menuitem12.Caption:=rsSiteWeb;
5571
6620
            menuitem14.Caption:=rsHistoriqueDe;
5595
6644
           Versiondelabase1.Caption := rsVersionDeLaB;
5596
6645
           Apropos1.Caption := rsAPropos;
5597
6646
           OpenDialog2.Filter := rsFilmSimulati;
 
6647
            OpenDialog2.DefaultExt:='.doz';
5598
6648
           OpenDialog3.Filter := rsTableurTexte;
5599
6649
           SaveDialog1.Title := rsEnregistrer;
5600
6650
           SaveDialog1.DefaultExt := rsCsv;
8146
9196
end;
8147
9197
 
8148
9198
procedure TForm1.BitBtn5Click(Sender: TObject);
8149
 
var f:textfile; ns,ligne:string;
8150
 
i,j:integer;
8151
9199
begin
8152
 
if  not(savedialog1.Execute) then exit else
8153
 
ns:=savedialog1.FileName;
8154
 
assignfile(f,ns);
8155
 
try
8156
 
rewrite(f);
8157
 
except
8158
 
application.MessageBox(pchar(rsImpossibleDe),
8159
 
pchar(rsMaisEuhhhh), mb_ok);
8160
 
exit;
8161
 
end;
8162
 
 
8163
 
{sauvagarde format regressi}
8164
 
  if  (lowercase(extractfileext(ns))='.rw3') then begin
8165
 
  writeln(f,'EVARISTE REGRESSI WINDOWS 1.0');
8166
 
   {<ajout version 1.10}
8167
 
   if not(calcul_derivees) then
8168
 
  if not(debye_0) then
8169
 
  writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0)+' NOM VAR') else
8170
 
    writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' NOM VAR')
8171
 
     else
8172
 
  if not(debye_0) then
8173
 
  writeln(f,chr(163)+inttostr(1+2*nombre_solutes_0+2*nombre_precipites_0)+' NOM VAR') else
8174
 
    writeln(f,chr(163)+inttostr(1+4*nombre_solutes_0+2*nombre_precipites_0)+' NOM VAR');
8175
 
    {ajout version 1.10>}
8176
 
 
8177
 
  writeln(f,'V');
8178
 
  for i:=1 to nombre_solutes_0 do
8179
 
  writeln(f,'conc'+inttostr(i));
8180
 
   for i:=1 to nombre_precipites_0 do
8181
 
  writeln(f,'nmoles'+inttostr(i));
8182
 
  if debye_0 then
8183
 
   for i:=1 to nombre_solutes_0 do
8184
 
  writeln(f,'activ'+inttostr(i));
8185
 
 
8186
 
  {<ajout version 1.10}
8187
 
  if calcul_derivees then begin
8188
 
   for i:=1 to nombre_solutes_0 do
8189
 
  writeln(f,'dc'+inttostr(i)+'dV');
8190
 
   for i:=1 to nombre_precipites_0 do
8191
 
  writeln(f,'dn'+inttostr(i)+'dV');
8192
 
  if debye_0 then
8193
 
   for i:=1 to nombre_solutes_0 do
8194
 
  writeln(f,'da'+inttostr(i)+'dV');
8195
 
    end;
8196
 
  {ajout version 1.10>}
8197
 
 
8198
 
   {<ajout version 1.10}
8199
 
   if not(calcul_derivees) then
8200
 
  if not(debye_0) then
8201
 
  writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0)+' GENRE VAR') else
8202
 
   writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' GENRE VAR')
8203
 
   else
8204
 
   if not(debye_0) then
8205
 
  writeln(f,chr(163)+inttostr(1+2*nombre_solutes_0+2*nombre_precipites_0)+' GENRE VAR') else
8206
 
   writeln(f,chr(163)+inttostr(1+4*nombre_solutes_0+2*nombre_precipites_0)+' GENRE VAR');
8207
 
    {ajout version 1.10>}
8208
 
 
8209
 
    {<ajout version 1.10}
8210
 
   if not(calcul_derivees) then
8211
 
  if not(debye_0) then
8212
 
  for i:=1 to 1+nombre_solutes_0+nombre_precipites_0 do writeln(f,'0')
8213
 
   else
8214
 
   for i:=1 to 1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0 do writeln(f,'0')
8215
 
   else
8216
 
    if not(debye_0) then
8217
 
  for i:=1 to 1+2*nombre_solutes_0+2*nombre_precipites_0 do writeln(f,'0')
8218
 
   else
8219
 
   for i:=1 to 1+4*nombre_solutes_0+2*nombre_precipites_0 do writeln(f,'0');
8220
 
    {ajout version 1.10>}
8221
 
 
8222
 
 
8223
 
   {<ajout version 1.10}
8224
 
   if not(calcul_derivees) then
8225
 
   if not(debye_0) then
8226
 
   writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0)+' UNITE VAR') else
8227
 
    writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' UNITE VAR')
8228
 
    else
8229
 
   if not(debye_0) then
8230
 
   writeln(f,chr(163)+inttostr(1+2*nombre_solutes_0+2*nombre_precipites_0)+' UNITE VAR') else
8231
 
    writeln(f,chr(163)+inttostr(1+4*nombre_solutes_0+2*nombre_precipites_0)+' UNITE VAR');
8232
 
    {ajout version 1.10>}
8233
 
 
8234
 
  writeln(f,'mL');
8235
 
   for i:=1 to nombre_solutes_0 do writeln(f,'mol/L');
8236
 
     for i:=1 to nombre_precipites_0 do writeln(f,'mol');
8237
 
     if debye_0 then
8238
 
     for i:=1 to nombre_solutes_0 do writeln(f);
8239
 
 
8240
 
      {<ajout version 1.10}
8241
 
       if calcul_derivees then begin
8242
 
        for i:=1 to nombre_solutes_0 do writeln(f,'mol/L²');
8243
 
     for i:=1 to nombre_precipites_0 do writeln(f,'mol/L');
8244
 
     if debye_0 then
8245
 
     for i:=1 to nombre_solutes_0 do writeln(f,'1/L');
8246
 
     end;
8247
 
             {ajout version 1.10>}
8248
 
 
8249
 
  {<ajout version 1.10}
8250
 
       if not(calcul_derivees) then
8251
 
       if not(debye_0) then
8252
 
  writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0)+' INCERTITUDE') else
8253
 
   writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' INCERTITUDE')
8254
 
   else
8255
 
   if not(debye_0) then
8256
 
  writeln(f,chr(163)+inttostr(1+2*nombre_solutes_0+2*nombre_precipites_0)+' INCERTITUDE') else
8257
 
   writeln(f,chr(163)+inttostr(1+4*nombre_solutes_0+2*nombre_precipites_0)+' INCERTITUDE');
8258
 
      {ajout version 1.10>}
8259
 
 
8260
 
      {<ajout version 1.10}
8261
 
       if not(calcul_derivees) then
8262
 
  if not(debye_0) then
8263
 
  for i:=1 to 1+nombre_solutes_0+nombre_precipites_0 do writeln(f) else
8264
 
   for i:=1 to 1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0 do writeln(f)
8265
 
   else
8266
 
   if not(debye_0) then
8267
 
  for i:=1 to 1+2*nombre_solutes_0+2*nombre_precipites_0 do writeln(f) else
8268
 
   for i:=1 to 1+4*nombre_solutes_0+2*nombre_precipites_0 do writeln(f);
8269
 
    {ajout version 1.10>}
8270
 
 
8271
 
  writeln(f,chr(163)+'1 TRIGO');
8272
 
  writeln(f,'0');
8273
 
  writeln(f,chr(163)+'1 LOG');
8274
 
  writeln(f,'0');
8275
 
 
8276
 
  {<ajout version 1.10}
8277
 
       if not(calcul_derivees) then
8278
 
  if not(debye_0) then
8279
 
  writeln(f,chr(163)+inttostr(nombre_solutes_0+nombre_precipites_0)+' MEMO GRANDEURS') else
8280
 
  writeln(f,chr(163)+inttostr(nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' MEMO GRANDEURS')
8281
 
  else
8282
 
   if not(debye_0) then
8283
 
  writeln(f,chr(163)+inttostr(2*nombre_solutes_0+2*nombre_precipites_0)+' MEMO GRANDEURS') else
8284
 
  writeln(f,chr(163)+inttostr(4*nombre_solutes_0+2*nombre_precipites_0)+' MEMO GRANDEURS');
8285
 
    {ajout version 1.10>}
8286
 
 
8287
 
  for i:=1 to nombre_solutes_0 do
8288
 
  writeln(f,'''conc'+inttostr(i)+': concentration en '+noms_solutes_0[i-1]);
8289
 
   for i:=1 to nombre_precipites_0 do
8290
 
  writeln(f,'''nmoles'+inttostr(i)+': nombre de moles de '+noms_precipites_0[i-1]);
8291
 
  if debye_0 then for i:=1 to nombre_solutes_0 do
8292
 
  writeln(f,'''activ'+inttostr(i)+': activite de: '+noms_solutes_0[i-1]);
8293
 
  {<ajout version 1.10}
8294
 
       if calcul_derivees then   begin
8295
 
      for i:=1 to nombre_solutes_0 do
8296
 
  writeln(f,'''dc'+inttostr(i)+'dV: dérivée de la concentration en '+noms_solutes_0[i-1]+'par rapport à V');
8297
 
   for i:=1 to nombre_precipites_0 do
8298
 
  writeln(f,'''dn'+inttostr(i)+'dV: dérivée du nombre de moles de '+noms_precipites_0[i-1]+'par rapport à V');
8299
 
   if debye_0 then for i:=1 to nombre_solutes_0 do
8300
 
  writeln(f,'''da'+inttostr(i)+'dV: dérivée de l''activite de: '+noms_solutes_0[i-1]+'par rapport à V');
8301
 
  end;
8302
 
      {ajout version 1.10>}
8303
 
 
8304
 
  writeln(f,chr(163)+'2 ACQUISITION');
8305
 
  writeln(f,'CLAVIER');
8306
 
  writeln(f);
8307
 
  writeln(f,chr(163)+'0 GRAPHE VAR');
8308
 
  writeln(f,'&5 X');
8309
 
  writeln(f,'V');
8310
 
  writeln(f);
8311
 
  writeln(f);
8312
 
  writeln(f);
8313
 
  writeln(f);
8314
 
  writeln(f,'&5 Y');
8315
 
  writeln(f,'conc1');
8316
 
  writeln(f);
8317
 
  writeln(f);
8318
 
  writeln(f);
8319
 
  writeln(f);
8320
 
  writeln(f,'&5 MONDE');
8321
 
  writeln(f,'1');
8322
 
  writeln(f,'1');
8323
 
  writeln(f,'1');
8324
 
  writeln(f,'1');
8325
 
  writeln(f,'1');
8326
 
  writeln(f,'&2 GRADUATION');
8327
 
  writeln(f,'0');
8328
 
  writeln(f,'0');
8329
 
  writeln(f,'&2 ZERO');
8330
 
  writeln(f,'0');
8331
 
  writeln(f,'0');
8332
 
  writeln(f,'&5 OPTIONS');
8333
 
  writeln(f,'8');
8334
 
  writeln(f,'0');
8335
 
  writeln(f,'1');
8336
 
  writeln(f,'3');
8337
 
  writeln(f,'4');
8338
 
  writeln(f,chr(163)+'1 PAGE COMMENT');
8339
 
  writeln(f);
8340
 
  writeln(f,'&'+inttostr(nombre_points_calcul+1)+' VALEUR VAR');
8341
 
  for i:=1 to nombre_points_calcul+1 do begin
8342
 
  ligne:=floattostr(tableau_resultats[i-1,0])+' ';
8343
 
 
8344
 
   {<ajout version 1.10}
8345
 
       if not(calcul_derivees) then
8346
 
  if not(debye_0) then
8347
 
   for j:=1 to nombre_solutes_0+nombre_precipites_0 do
8348
 
   if not(isnanorinfinite(tableau_resultats[i-1,j])) then
8349
 
   ligne:=ligne+floattostr(tableau_resultats[i-1,j])+' '
8350
 
   else
8351
 
   ligne:=ligne+' 0';
8352
 
   if debye_0 then
8353
 
   for j:=1 to nombre_solutes_0+nombre_precipites_0+nombre_solutes_0 do
8354
 
   if not(isnanorinfinite(tableau_resultats[i-1,j])) then
8355
 
   ligne:=ligne+floattostr(tableau_resultats[i-1,j])+' '
8356
 
   else
8357
 
   ligne:=ligne+' 0'
8358
 
   else
8359
 
 
8360
 
     if not(debye_0) then
8361
 
   for j:=1 to nombre_solutes_0+nombre_precipites_0 do
8362
 
   if not(isnanorinfinite(tableau_resultats[i-1,j])) then
8363
 
   ligne:=ligne+floattostr(tableau_resultats[i-1,j])+' '
8364
 
   else
8365
 
   ligne:=ligne+' 0';
8366
 
    for j:=1 to nombre_solutes_0+nombre_precipites_0 do
8367
 
   if not(isnanorinfinite(tableau_resultats[i-1,j+2*nombre_solutes_0+nombre_precipites_0])) then
8368
 
   ligne:=ligne+floattostr(tableau_resultats[i-1,j+2*nombre_solutes_0+nombre_precipites_0])+' '
8369
 
   else
8370
 
   ligne:=ligne+' 0';
8371
 
   if debye_0 then
8372
 
   for j:=1 to 4*nombre_solutes_0+2*nombre_precipites_0 do
8373
 
   if not(isnanorinfinite(tableau_resultats[i-1,j])) then
8374
 
   ligne:=ligne+floattostr(tableau_resultats[i-1,j])+' '
8375
 
   else
8376
 
   ligne:=ligne+' 0';
8377
 
   {ajout version 1.10>}
8378
 
      writeln(f,ligne);
8379
 
   end;  end;
8380
 
   {sauvegarde format regressi}
8381
 
 
8382
 
 
8383
 
 {sauvegarde format tableur texte}
8384
 
 if  ((lowercase(extractfileext(ns))='.csv') or
8385
 
    (lowercase(extractfileext(ns))='.txt')) then begin
8386
 
 ligne:='Volume';
8387
 
if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
8388
 
 ligne:=ligne+separateur_csv+noms_solutes_0[i-1];
8389
 
if nombre_precipites_0>0 then  for i:=1 to nombre_precipites_0 do
8390
 
 ligne:=ligne+separateur_csv+noms_precipites_0[i-1];
8391
 
 if debye_0 then
8392
 
 if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
8393
 
 ligne:=ligne+separateur_csv+noms_solutes_0[i-1];
8394
 
 {<ajout version 1.10}
8395
 
       if calcul_derivees then begin
8396
 
 if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
8397
 
 ligne:=ligne+separateur_csv+noms_solutes_0[i-1];
8398
 
  if nombre_precipites_0>0 then  for i:=1 to nombre_precipites_0 do
8399
 
 ligne:=ligne+separateur_csv+noms_precipites_0[i-1];
8400
 
  if debye_0 then
8401
 
 if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
8402
 
 ligne:=ligne+separateur_csv+noms_solutes_0[i-1];
8403
 
   end;
8404
 
   {ajout version 1.10>}
8405
 
 writeln(f,ligne);
8406
 
 ligne:='mL';
8407
 
 if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
8408
 
 ligne:=Format(rsConcMolL2, [ligne+separateur_csv]);
8409
 
  if nombre_precipites_0>0 then  for i:=1 to nombre_precipites_0 do
8410
 
 ligne:=Format(rsQuantitMol, [ligne+separateur_csv]);
8411
 
if debye_0 then
8412
 
 if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
8413
 
 ligne:=Format(rsActivit2, [ligne+separateur_csv]);
8414
 
 
8415
 
 {<ajout version 1.10}
8416
 
       if calcul_derivees then begin
8417
 
 if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
8418
 
 ligne:=Format(rsDC_dVMolL, [ligne+separateur_csv]);
8419
 
  if nombre_precipites_0>0 then  for i:=1 to nombre_precipites_0 do
8420
 
 ligne:=Format(rsDN_dVMolL, [ligne+separateur_csv]);
8421
 
if debye_0 then
8422
 
 if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
8423
 
 ligne:=Format(rsDa_dV1L, [ligne+separateur_csv]);
8424
 
          end;
8425
 
   {ajout version 1.10>}
8426
 
 
8427
 
 
8428
 
   writeln(f,ligne);
8429
 
 
8430
 
   for i:=1 to nombre_points_calcul+1 do begin
8431
 
   ligne:=remplace_point_decimal(floattostr(tableau_resultats[i-1,0]));
8432
 
   {<ajout version 1.10}
8433
 
 
8434
 
   if (not(debye_0) and not(calcul_derivees)) then
8435
 
   for j:=1 to nombre_solutes_0+nombre_precipites_0 do
8436
 
   if not(isnanorinfinite(tableau_resultats[i-1,j])) then
8437
 
   ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_resultats[i-1,j]))
8438
 
   else ligne:=ligne+' 0';
8439
 
 
8440
 
   if ((debye_0) and not(calcul_derivees)) then
8441
 
     for j:=1 to 2*nombre_solutes_0+nombre_precipites_0 do
8442
 
   if not(isnanorinfinite(tableau_resultats[i-1,j])) then
8443
 
   ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_resultats[i-1,j]))
8444
 
   else ligne:=ligne+' 0' ;
8445
 
 
8446
 
    if (not(debye_0) and (calcul_derivees)) then
8447
 
    for j:=1 to 2*nombre_solutes_0+2*nombre_precipites_0 do
8448
 
   if not(isnanorinfinite(tableau_resultats[i-1,j])) then
8449
 
   ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_resultats[i-1,j]))
8450
 
   else ligne:=ligne+' 0' ;
8451
 
 
8452
 
   if ((debye_0) and (calcul_derivees)) then
8453
 
    for j:=1 to 4*nombre_solutes_0+2*nombre_precipites_0 do
8454
 
   if not(isnanorinfinite(tableau_resultats[i-1,j])) then
8455
 
   ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_resultats[i-1,j]))
8456
 
   else ligne:=ligne+' 0' ;
8457
 
 
8458
 
 
8459
 
 
8460
 
   writeln(f,ligne);
8461
 
   end; end;
8462
 
   {sauvegarde tableur texte}
8463
 
closefile(f);
 
9200
 popupmenubrut.PopUp;
8464
9201
end;
8465
9202
 
8466
9203
 procedure TForm1.BitBtn6Click(Sender: TObject);
9523
10260
end;
9524
10261
 
9525
10262
178:
 
10263
savedialog3.InitialDir:=repertoire_dosage_perso;
 
10264
savedialog3.FileName:='';
9526
10265
if  not(savedialog3.Execute) then exit else
9527
10266
ns:=savedialog3.FileName;
9528
10267
if lowercase(extractfileext(ns))<>'.doz' then
9532
10271
application.MessageBox(pchar(rsEcraserLeFic), pchar(rsCeNomDeFichi),
9533
10272
mb_okcancel)=idcancel then goto 178;
9534
10273
 
9535
 
assignfile(f,ns);
 
10274
assignfile(f,utf8tosys(ns));
9536
10275
try
9537
10276
rewrite(f);
9538
10277
except
9787
10526
novar:array of string;   boubou:integer;
9788
10527
i,j:integer; valeurs:array of float;
9789
10528
begin
 
10529
opendialog3.InitialDir:=repertoire_dosage_perso;
 
10530
opendialog3.FileName:='';
9790
10531
if not(opendialog3.Execute) then exit;
9791
10532
ns:=opendialog3.FileName;
9792
 
assignfile(f,ns);
 
10533
assignfile(f,utf8tosys(ns));
9793
10534
try
9794
10535
reset(f);
9795
10536
except
10045
10786
  if creation then begin
10046
10787
creation:=false;
10047
10788
if parametre_ligne_commande then
10048
 
Jouerunfilmdesimulation1Click(Sender);
 
10789
Jouerunfilmdesimulation(Sender,'');
10049
10790
end;
10050
10791
end;
10051
10792
 
10448
11189
end;
10449
11190
 
10450
11191
procedure TForm1.Jouerunfilmdesimulation1Click(Sender: TObject);
 
11192
begin
 
11193
 
 
11194
end;
 
11195
 
 
11196
procedure TForm1.Jouerunfilmdesimulation(Sender: TObject; repertoire:string);
10451
11197
var  ns,s3,s1,s2,s,s4:string;
10452
11198
iii,i,nono:integer; rere:float;  toto:TCharEncStream; liste_lignes_fichier_doz:tstringlist;
10453
11199
begin
10455
11201
 même si on n'a rien mis...}
10456
11202
  {$IFNDEF DARWIN}
10457
11203
  if not(parametre_ligne_commande) then begin  {$ENDIF}
10458
 
opendialog2.InitialDir:=repertoire_exemples;
 
11204
opendialog2.InitialDir:=repertoire;
 
11205
  opendialog2.FileName:='';
10459
11206
if not(opendialog2.Execute) then exit;
10460
11207
 ns:=opendialog2.FileName;
10461
11208
 {$IFNDEF DARWIN} end else begin
10466
11213
 
10467
11214
 toto:=TCharEncStream.create;
10468
11215
     try
10469
 
       toto.LoadFromFile(ns);
 
11216
       toto.LoadFromFile(utf8tosys(ns));
10470
11217
      except
10471
11218
    application.MessageBox(pchar('Impossible de charger '+ns),
10472
11219
    'Hélas...',mb_ok);
10993
11740
 
10994
11741
end;
10995
11742
 
 
11743
procedure TForm1.EditvolumeKeyPress(Sender: TObject; var Key: char);
 
11744
begin
 
11745
    if key=',' then key:='.';
 
11746
end;
 
11747
 
 
11748
procedure TForm1.EditvolumeppKeyPress(Sender: TObject; var Key: char);
 
11749
begin
 
11750
   if key=',' then key:='.';
 
11751
end;
 
11752
 
 
11753
procedure TForm1.Editvolume_buretteKeyPress(Sender: TObject; var Key: char);
 
11754
begin
 
11755
    if key=',' then key:='.';
 
11756
end;
 
11757
 
 
11758
procedure TForm1.editxmaxKeyPress(Sender: TObject; var Key: char);
 
11759
begin
 
11760
   if key=',' then key:='.';
 
11761
end;
 
11762
 
 
11763
procedure TForm1.EditxminKeyPress(Sender: TObject; var Key: char);
 
11764
begin
 
11765
   if key=',' then key:='.';
 
11766
end;
 
11767
 
 
11768
procedure TForm1.EditymaxdroiteKeyPress(Sender: TObject; var Key: char);
 
11769
begin
 
11770
   if key=',' then key:='.';
 
11771
end;
 
11772
 
 
11773
procedure TForm1.EditymaxgaucheKeyPress(Sender: TObject; var Key: char);
 
11774
begin
 
11775
   if key=',' then key:='.';
 
11776
end;
 
11777
 
 
11778
procedure TForm1.EditymindroiteKeyPress(Sender: TObject; var Key: char);
 
11779
begin
 
11780
   if key=',' then key:='.';
 
11781
end;
 
11782
 
 
11783
procedure TForm1.editymingaucheKeyPress(Sender: TObject; var Key: char);
 
11784
begin
 
11785
   if key=',' then key:='.';
 
11786
end;
 
11787
 
 
11788
procedure TForm1.EdittemperatureKeyPress(Sender: TObject; var Key: char);
 
11789
begin
 
11790
    if key=',' then key:='.';
 
11791
end;
 
11792
 
 
11793
procedure TForm1.EditpourcentageKeyPress(Sender: TObject; var Key: char);
 
11794
begin
 
11795
   if key=',' then key:='.';
 
11796
end;
 
11797
 
 
11798
procedure TForm1.EditabscisseKeyPress(Sender: TObject; var Key: char);
 
11799
begin
 
11800
   if key=',' then key:='.';
 
11801
end;
 
11802
 
 
11803
procedure TForm1.EditvolumeChange(Sender: TObject);
 
11804
begin
 
11805
 
 
11806
end;
 
11807
 
10996
11808
procedure TForm1.LicenseGPL1Click(Sender: TObject);
10997
11809
begin
10998
11810
  formgpl:=tformgpl.create(self);
10999
 
formgpl.memo1.lines.loadfromfile(extractfilepath(application.ExeName)+'gpl.txt');
 
11811
formgpl.memo1.lines.loadfromfile(utf8tosys(extractfilepath(application.ExeName)+'gpl.txt'));
11000
11812
//application.messagebox(pchar( extractfilepath(application.ExeName)+'gpl.txt'),'',mb_ok);
11001
11813
with  formgpl do
11002
11814
begin
11093
11905
 memo_resultats_point_particulier.CopyToClipboard;
11094
11906
end;
11095
11907
 
 
11908
procedure TForm1.MenuItem8Click(Sender: TObject);
 
11909
begin
 
11910
 
 
11911
end;
 
11912
 
11096
11913
 
11097
11914
 
11098
11915
 
11116
11933
 
11117
11934
 begin
11118
11935
   savedialog2.Filter:='JPEG|*.jpg';
 
11936
    savedialog2.FileName:='';
 
11937
  savedialog2.InitialDir:=repertoire_dosage_perso;
 
11938
  SaveDialog2.DefaultExt := '.jpg';
 
11939
 
11119
11940
         if not SaveDialog2.execute then exit;
11120
11941
    nom_f := SaveDialog2.Filename;
11121
11942
 
11706
12527
 
11707
12528
 
11708
12529
 
11709
 
         image_jpeg_pour_export.SaveToFile(nom_f);
 
12530
         image_jpeg_pour_export.SaveToFile(utf8tosys(nom_f));
11710
12531
    image_jpeg_pour_export.Free;
11711
12532
 
11712
12533
   {*******************************************************}
11730
12551
 
11731
12552
 begin
11732
12553
 savedialog2.Filter:='Portable Network Graphic (PNG)|*.png';
11733
 
 
 
12554
    savedialog2.FileName:='';
 
12555
  savedialog2.InitialDir:=repertoire_dosage_perso;
 
12556
  SaveDialog2.DefaultExt := '.png';
11734
12557
         if not SaveDialog2.execute then exit;
11735
12558
    nom_f := SaveDialog2.Filename;
11736
12559
 
12321
13144
 
12322
13145
 
12323
13146
 
12324
 
         image_pour_export.SaveToFile(nom_f);
 
13147
         image_pour_export.SaveToFile(utf8tosys(nom_f));
12325
13148
    image_pour_export.Free;
12326
13149
 
12327
13150
   {*******************************************************}
12329
13152
 
12330
13153
end;
12331
13154
 
 
13155
procedure TForm1.MenuItem_sauve_brut_csvClick(Sender: TObject);
 
13156
 var f:textfile; ns,ligne:string;
 
13157
 i,j:integer;
 
13158
 begin
 
13159
 savedialog1.FileName:='';
 
13160
 savedialog1.InitialDir:=repertoire_dosage_perso;
 
13161
 SaveDialog1.DefaultExt := rsCsv;
 
13162
    SaveDialog1.Filter := rsTableurTexte2;
 
13163
 if  not(savedialog1.Execute) then exit else
 
13164
 ns:=savedialog1.FileName;
 
13165
 assignfile(f,utf8tosys(ns));
 
13166
 try
 
13167
 rewrite(f);
 
13168
 except
 
13169
 application.MessageBox(pchar(rsImpossibleDe),
 
13170
 pchar(rsMaisEuhhhh), mb_ok);
 
13171
 exit;
 
13172
 end;
 
13173
 
 
13174
 
 
13175
  {sauvegarde format tableur texte}
 
13176
  if  ((lowercase(extractfileext(ns))='.csv') or
 
13177
     (lowercase(extractfileext(ns))='.txt')) then begin
 
13178
  ligne:='Volume';
 
13179
 if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
 
13180
  ligne:=ligne+separateur_csv+noms_solutes_0[i-1];
 
13181
 if nombre_precipites_0>0 then  for i:=1 to nombre_precipites_0 do
 
13182
  ligne:=ligne+separateur_csv+noms_precipites_0[i-1];
 
13183
  if debye_0 then
 
13184
  if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
 
13185
  ligne:=ligne+separateur_csv+noms_solutes_0[i-1];
 
13186
  {<ajout version 1.10}
 
13187
        if calcul_derivees then begin
 
13188
  if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
 
13189
  ligne:=ligne+separateur_csv+noms_solutes_0[i-1];
 
13190
   if nombre_precipites_0>0 then  for i:=1 to nombre_precipites_0 do
 
13191
  ligne:=ligne+separateur_csv+noms_precipites_0[i-1];
 
13192
   if debye_0 then
 
13193
  if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
 
13194
  ligne:=ligne+separateur_csv+noms_solutes_0[i-1];
 
13195
    end;
 
13196
    {ajout version 1.10>}
 
13197
  writeln(f,ligne);
 
13198
  ligne:='mL';
 
13199
  if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
 
13200
  ligne:=Format(rsConcMolL2, [ligne+separateur_csv]);
 
13201
   if nombre_precipites_0>0 then  for i:=1 to nombre_precipites_0 do
 
13202
  ligne:=Format(rsQuantitMol, [ligne+separateur_csv]);
 
13203
 if debye_0 then
 
13204
  if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
 
13205
  ligne:=Format(rsActivit2, [ligne+separateur_csv]);
 
13206
 
 
13207
  {<ajout version 1.10}
 
13208
        if calcul_derivees then begin
 
13209
  if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
 
13210
  ligne:=Format(rsDC_dVMolL, [ligne+separateur_csv]);
 
13211
   if nombre_precipites_0>0 then  for i:=1 to nombre_precipites_0 do
 
13212
  ligne:=Format(rsDN_dVMolL, [ligne+separateur_csv]);
 
13213
 if debye_0 then
 
13214
  if nombre_solutes_0>0 then for i:=1 to nombre_solutes_0 do
 
13215
  ligne:=Format(rsDa_dV1L, [ligne+separateur_csv]);
 
13216
           end;
 
13217
    {ajout version 1.10>}
 
13218
 
 
13219
 
 
13220
    writeln(f,ligne);
 
13221
 
 
13222
    for i:=1 to nombre_points_calcul+1 do begin
 
13223
    ligne:=remplace_point_decimal(floattostr(tableau_resultats[i-1,0]));
 
13224
    {<ajout version 1.10}
 
13225
 
 
13226
    if (not(debye_0) and not(calcul_derivees)) then
 
13227
    for j:=1 to nombre_solutes_0+nombre_precipites_0 do
 
13228
    if not(isnanorinfinite(tableau_resultats[i-1,j])) then
 
13229
    ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_resultats[i-1,j]))
 
13230
    else ligne:=ligne+' 0';
 
13231
 
 
13232
    if ((debye_0) and not(calcul_derivees)) then
 
13233
      for j:=1 to 2*nombre_solutes_0+nombre_precipites_0 do
 
13234
    if not(isnanorinfinite(tableau_resultats[i-1,j])) then
 
13235
    ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_resultats[i-1,j]))
 
13236
    else ligne:=ligne+' 0' ;
 
13237
 
 
13238
     if (not(debye_0) and (calcul_derivees)) then
 
13239
     for j:=1 to 2*nombre_solutes_0+2*nombre_precipites_0 do
 
13240
    if not(isnanorinfinite(tableau_resultats[i-1,j])) then
 
13241
    ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_resultats[i-1,j]))
 
13242
    else ligne:=ligne+' 0' ;
 
13243
 
 
13244
    if ((debye_0) and (calcul_derivees)) then
 
13245
     for j:=1 to 4*nombre_solutes_0+2*nombre_precipites_0 do
 
13246
    if not(isnanorinfinite(tableau_resultats[i-1,j])) then
 
13247
    ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_resultats[i-1,j]))
 
13248
    else ligne:=ligne+' 0' ;
 
13249
 
 
13250
 
 
13251
 
 
13252
    writeln(f,ligne);
 
13253
    end; end;
 
13254
    {sauvegarde tableur texte}
 
13255
 closefile(f);
 
13256
 
 
13257
 
 
13258
end;
 
13259
 
 
13260
procedure TForm1.MenuItem_save_brut_rw3Click(Sender: TObject);
 
13261
 var f:textfile; ns,ligne:string;
 
13262
 i,j:integer;
 
13263
 begin
 
13264
  savedialog1.FileName:='';
 
13265
  savedialog1.InitialDir:=repertoire_dosage_perso;
 
13266
  SaveDialog1.DefaultExt := '.rw3';
 
13267
    SaveDialog1.Filter := 'Regressi (*.rw3)|.rw3';
 
13268
 if  not(savedialog1.Execute) then exit else
 
13269
 ns:=savedialog1.FileName;
 
13270
 assignfile(f,utf8tosys(ns));
 
13271
 try
 
13272
 rewrite(f);
 
13273
 except
 
13274
 application.MessageBox(pchar(rsImpossibleDe),
 
13275
 pchar(rsMaisEuhhhh), mb_ok);
 
13276
 exit;
 
13277
 end;
 
13278
 
 
13279
 
 
13280
   writeln(f,'EVARISTE REGRESSI WINDOWS 1.0');
 
13281
    {<ajout version 1.10}
 
13282
    if not(calcul_derivees) then
 
13283
   if not(debye_0) then
 
13284
   writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0)+' NOM VAR') else
 
13285
     writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' NOM VAR')
 
13286
      else
 
13287
   if not(debye_0) then
 
13288
   writeln(f,chr(163)+inttostr(1+2*nombre_solutes_0+2*nombre_precipites_0)+' NOM VAR') else
 
13289
     writeln(f,chr(163)+inttostr(1+4*nombre_solutes_0+2*nombre_precipites_0)+' NOM VAR');
 
13290
     {ajout version 1.10>}
 
13291
 
 
13292
   writeln(f,'V');
 
13293
   for i:=1 to nombre_solutes_0 do
 
13294
   writeln(f,'conc'+inttostr(i));
 
13295
    for i:=1 to nombre_precipites_0 do
 
13296
   writeln(f,'nmoles'+inttostr(i));
 
13297
   if debye_0 then
 
13298
    for i:=1 to nombre_solutes_0 do
 
13299
   writeln(f,'activ'+inttostr(i));
 
13300
 
 
13301
   {<ajout version 1.10}
 
13302
   if calcul_derivees then begin
 
13303
    for i:=1 to nombre_solutes_0 do
 
13304
   writeln(f,'dc'+inttostr(i)+'dV');
 
13305
    for i:=1 to nombre_precipites_0 do
 
13306
   writeln(f,'dn'+inttostr(i)+'dV');
 
13307
   if debye_0 then
 
13308
    for i:=1 to nombre_solutes_0 do
 
13309
   writeln(f,'da'+inttostr(i)+'dV');
 
13310
     end;
 
13311
   {ajout version 1.10>}
 
13312
 
 
13313
    {<ajout version 1.10}
 
13314
    if not(calcul_derivees) then
 
13315
   if not(debye_0) then
 
13316
   writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0)+' GENRE VAR') else
 
13317
    writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' GENRE VAR')
 
13318
    else
 
13319
    if not(debye_0) then
 
13320
   writeln(f,chr(163)+inttostr(1+2*nombre_solutes_0+2*nombre_precipites_0)+' GENRE VAR') else
 
13321
    writeln(f,chr(163)+inttostr(1+4*nombre_solutes_0+2*nombre_precipites_0)+' GENRE VAR');
 
13322
     {ajout version 1.10>}
 
13323
 
 
13324
     {<ajout version 1.10}
 
13325
    if not(calcul_derivees) then
 
13326
   if not(debye_0) then
 
13327
   for i:=1 to 1+nombre_solutes_0+nombre_precipites_0 do writeln(f,'0')
 
13328
    else
 
13329
    for i:=1 to 1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0 do writeln(f,'0')
 
13330
    else
 
13331
     if not(debye_0) then
 
13332
   for i:=1 to 1+2*nombre_solutes_0+2*nombre_precipites_0 do writeln(f,'0')
 
13333
    else
 
13334
    for i:=1 to 1+4*nombre_solutes_0+2*nombre_precipites_0 do writeln(f,'0');
 
13335
     {ajout version 1.10>}
 
13336
 
 
13337
 
 
13338
    {<ajout version 1.10}
 
13339
    if not(calcul_derivees) then
 
13340
    if not(debye_0) then
 
13341
    writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0)+' UNITE VAR') else
 
13342
     writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' UNITE VAR')
 
13343
     else
 
13344
    if not(debye_0) then
 
13345
    writeln(f,chr(163)+inttostr(1+2*nombre_solutes_0+2*nombre_precipites_0)+' UNITE VAR') else
 
13346
     writeln(f,chr(163)+inttostr(1+4*nombre_solutes_0+2*nombre_precipites_0)+' UNITE VAR');
 
13347
     {ajout version 1.10>}
 
13348
 
 
13349
   writeln(f,'mL');
 
13350
    for i:=1 to nombre_solutes_0 do writeln(f,'mol/L');
 
13351
      for i:=1 to nombre_precipites_0 do writeln(f,'mol');
 
13352
      if debye_0 then
 
13353
      for i:=1 to nombre_solutes_0 do writeln(f);
 
13354
 
 
13355
       {<ajout version 1.10}
 
13356
        if calcul_derivees then begin
 
13357
         for i:=1 to nombre_solutes_0 do writeln(f,'mol/L²');
 
13358
      for i:=1 to nombre_precipites_0 do writeln(f,'mol/L');
 
13359
      if debye_0 then
 
13360
      for i:=1 to nombre_solutes_0 do writeln(f,'1/L');
 
13361
      end;
 
13362
              {ajout version 1.10>}
 
13363
 
 
13364
   {<ajout version 1.10}
 
13365
        if not(calcul_derivees) then
 
13366
        if not(debye_0) then
 
13367
   writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0)+' INCERTITUDE') else
 
13368
    writeln(f,chr(163)+inttostr(1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' INCERTITUDE')
 
13369
    else
 
13370
    if not(debye_0) then
 
13371
   writeln(f,chr(163)+inttostr(1+2*nombre_solutes_0+2*nombre_precipites_0)+' INCERTITUDE') else
 
13372
    writeln(f,chr(163)+inttostr(1+4*nombre_solutes_0+2*nombre_precipites_0)+' INCERTITUDE');
 
13373
       {ajout version 1.10>}
 
13374
 
 
13375
       {<ajout version 1.10}
 
13376
        if not(calcul_derivees) then
 
13377
   if not(debye_0) then
 
13378
   for i:=1 to 1+nombre_solutes_0+nombre_precipites_0 do writeln(f) else
 
13379
    for i:=1 to 1+nombre_solutes_0+nombre_precipites_0+nombre_solutes_0 do writeln(f)
 
13380
    else
 
13381
    if not(debye_0) then
 
13382
   for i:=1 to 1+2*nombre_solutes_0+2*nombre_precipites_0 do writeln(f) else
 
13383
    for i:=1 to 1+4*nombre_solutes_0+2*nombre_precipites_0 do writeln(f);
 
13384
     {ajout version 1.10>}
 
13385
 
 
13386
   writeln(f,chr(163)+'1 TRIGO');
 
13387
   writeln(f,'0');
 
13388
   writeln(f,chr(163)+'1 LOG');
 
13389
   writeln(f,'0');
 
13390
 
 
13391
   {<ajout version 1.10}
 
13392
        if not(calcul_derivees) then
 
13393
   if not(debye_0) then
 
13394
   writeln(f,chr(163)+inttostr(nombre_solutes_0+nombre_precipites_0)+' MEMO GRANDEURS') else
 
13395
   writeln(f,chr(163)+inttostr(nombre_solutes_0+nombre_precipites_0+nombre_solutes_0)+' MEMO GRANDEURS')
 
13396
   else
 
13397
    if not(debye_0) then
 
13398
   writeln(f,chr(163)+inttostr(2*nombre_solutes_0+2*nombre_precipites_0)+' MEMO GRANDEURS') else
 
13399
   writeln(f,chr(163)+inttostr(4*nombre_solutes_0+2*nombre_precipites_0)+' MEMO GRANDEURS');
 
13400
     {ajout version 1.10>}
 
13401
 
 
13402
   for i:=1 to nombre_solutes_0 do
 
13403
   writeln(f,'''conc'+inttostr(i)+': concentration en '+noms_solutes_0[i-1]);
 
13404
    for i:=1 to nombre_precipites_0 do
 
13405
   writeln(f,'''nmoles'+inttostr(i)+': nombre de moles de '+noms_precipites_0[i-1]);
 
13406
   if debye_0 then for i:=1 to nombre_solutes_0 do
 
13407
   writeln(f,'''activ'+inttostr(i)+': activite de: '+noms_solutes_0[i-1]);
 
13408
   {<ajout version 1.10}
 
13409
        if calcul_derivees then   begin
 
13410
       for i:=1 to nombre_solutes_0 do
 
13411
   writeln(f,'''dc'+inttostr(i)+'dV: dérivée de la concentration en '+noms_solutes_0[i-1]+'par rapport à V');
 
13412
    for i:=1 to nombre_precipites_0 do
 
13413
   writeln(f,'''dn'+inttostr(i)+'dV: dérivée du nombre de moles de '+noms_precipites_0[i-1]+'par rapport à V');
 
13414
    if debye_0 then for i:=1 to nombre_solutes_0 do
 
13415
   writeln(f,'''da'+inttostr(i)+'dV: dérivée de l''activite de: '+noms_solutes_0[i-1]+'par rapport à V');
 
13416
   end;
 
13417
       {ajout version 1.10>}
 
13418
 
 
13419
   writeln(f,chr(163)+'2 ACQUISITION');
 
13420
   writeln(f,'CLAVIER');
 
13421
   writeln(f);
 
13422
   writeln(f,chr(163)+'0 GRAPHE VAR');
 
13423
   writeln(f,'&5 X');
 
13424
   writeln(f,'V');
 
13425
   writeln(f);
 
13426
   writeln(f);
 
13427
   writeln(f);
 
13428
   writeln(f);
 
13429
   writeln(f,'&5 Y');
 
13430
   writeln(f,'conc1');
 
13431
   writeln(f);
 
13432
   writeln(f);
 
13433
   writeln(f);
 
13434
   writeln(f);
 
13435
   writeln(f,'&5 MONDE');
 
13436
   writeln(f,'1');
 
13437
   writeln(f,'1');
 
13438
   writeln(f,'1');
 
13439
   writeln(f,'1');
 
13440
   writeln(f,'1');
 
13441
   writeln(f,'&2 GRADUATION');
 
13442
   writeln(f,'0');
 
13443
   writeln(f,'0');
 
13444
   writeln(f,'&2 ZERO');
 
13445
   writeln(f,'0');
 
13446
   writeln(f,'0');
 
13447
   writeln(f,'&5 OPTIONS');
 
13448
   writeln(f,'8');
 
13449
   writeln(f,'0');
 
13450
   writeln(f,'1');
 
13451
   writeln(f,'3');
 
13452
   writeln(f,'4');
 
13453
   writeln(f,chr(163)+'1 PAGE COMMENT');
 
13454
   writeln(f);
 
13455
   writeln(f,'&'+inttostr(nombre_points_calcul+1)+' VALEUR VAR');
 
13456
   for i:=1 to nombre_points_calcul+1 do begin
 
13457
   ligne:=floattostr(tableau_resultats[i-1,0])+' ';
 
13458
 
 
13459
    {<ajout version 1.10}
 
13460
 
 
13461
   if  not(calcul_derivees)  and not(debye_0) then
 
13462
   begin
 
13463
    for j:=1 to nombre_solutes_0+nombre_precipites_0 do
 
13464
    if not(isnanorinfinite(tableau_resultats[i-1,j])) then
 
13465
    ligne:=ligne+floattostr(tableau_resultats[i-1,j])+' '
 
13466
    else
 
13467
    ligne:=ligne+' 0';
 
13468
    end;
 
13469
 
 
13470
    if  not(calcul_derivees)  and debye_0 then  begin
 
13471
    for j:=1 to nombre_solutes_0+nombre_precipites_0+nombre_solutes_0 do
 
13472
    if not(isnanorinfinite(tableau_resultats[i-1,j])) then
 
13473
    ligne:=ligne+floattostr(tableau_resultats[i-1,j])+' '
 
13474
    else
 
13475
    ligne:=ligne+' 0'
 
13476
    end;
 
13477
 
 
13478
 
 
13479
 
 
13480
      if  (calcul_derivees)  and not(debye_0) then  begin
 
13481
    for j:=1 to nombre_solutes_0+nombre_precipites_0 do
 
13482
    if not(isnanorinfinite(tableau_resultats[i-1,j])) then
 
13483
    ligne:=ligne+floattostr(tableau_resultats[i-1,j])+' '
 
13484
    else
 
13485
    ligne:=ligne+' 0';
 
13486
 
 
13487
     for j:=1 to nombre_solutes_0+nombre_precipites_0 do
 
13488
    if not(isnanorinfinite(tableau_resultats[i-1,j+2*nombre_solutes_0+nombre_precipites_0])) then
 
13489
    ligne:=ligne+floattostr(tableau_resultats[i-1,j+2*nombre_solutes_0+nombre_precipites_0])+' '
 
13490
    else
 
13491
    ligne:=ligne+' 0';
 
13492
     end;
 
13493
 
 
13494
 
 
13495
    if  (calcul_derivees)  and debye_0 then begin
 
13496
    for j:=1 to 4*nombre_solutes_0+2*nombre_precipites_0 do
 
13497
    if not(isnanorinfinite(tableau_resultats[i-1,j])) then
 
13498
    ligne:=ligne+floattostr(tableau_resultats[i-1,j])+' '
 
13499
    else
 
13500
    ligne:=ligne+' 0';
 
13501
    end;
 
13502
    {ajout version 1.10>}
 
13503
       writeln(f,ligne);
 
13504
    end;
 
13505
 
 
13506
 closefile(f);
 
13507
 
 
13508
 
 
13509
end;
 
13510
 
12332
13511
 
12333
13512
 
12334
13513
procedure TForm1.Nombredepointsdecalcul1Click(Sender: TObject);
12498
13677
end;
12499
13678
end;
12500
13679
 
 
13680
 
 
13681
 
 
13682
 
12501
13683
procedure TForm1.SpeedButton10Click(Sender: TObject);
12502
 
var f:textfile; ns,ligne,dede:string;
12503
 
i,j,k:integer;
12504
 
 
12505
13684
begin
12506
 
if  not(savedialog1.Execute) then exit else
12507
 
ns:=savedialog1.FileName;
12508
 
 
12509
 
assignfile(f,ns);
12510
 
try
12511
 
rewrite(f);
12512
 
except
12513
 
application.MessageBox(pchar(rsImpossibleDe),
12514
 
pchar(rsMaisEuhhhh), mb_ok);
12515
 
tabsheettracecourbes.Refresh;
12516
 
exit;
12517
 
end;
12518
 
 
12519
 
{sauvagarde format regressi}
12520
 
  if  (lowercase(extractfileext(ns))='.rw3') then begin
12521
 
  writeln(f,'EVARISTE REGRESSI WINDOWS 1.0');
12522
 
  writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' NOM VAR');
12523
 
  writeln(f,'abscisse');
12524
 
  for i:=1 to nombre_ordonnees do
12525
 
  writeln(f,'ord'+inttostr(i));
12526
 
  writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' GENRE VAR');
12527
 
  for i:=1 to nombre_ordonnees+1 do writeln(f,'0');
12528
 
  writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' UNITE VAR');
12529
 
   for i:=1 to nombre_ordonnees+1 do writeln(f);
12530
 
  writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' INCERTITUDE');
12531
 
  for i:=1 to nombre_ordonnees+1 do writeln(f);
12532
 
  writeln(f,chr(163)+'1 TRIGO');
12533
 
  writeln(f,'0');
12534
 
  writeln(f,chr(163)+'1 LOG');
12535
 
  writeln(f,'0');
12536
 
  writeln(f,chr(163)+inttostr(1+nombre_ordonnees)+' MEMO GRANDEURS');
12537
 
  writeln(f,'''abscisse: '+expression_abscisse_explicite);
12538
 
  for i:=1 to nombre_ordonnees do
12539
 
  writeln(f,'''ord'+inttostr(i)+': '+expression_ordonnees_explicites[i-1]);
12540
 
  writeln(f,chr(163)+'2 ACQUISITION');
12541
 
  writeln(f,'CLAVIER');
12542
 
  writeln(f);
12543
 
  writeln(f,chr(163)+'0 GRAPHE VAR');
12544
 
  writeln(f,'&5 X');
12545
 
  writeln(f,'abscisse');
12546
 
  writeln(f);
12547
 
  writeln(f);
12548
 
  writeln(f);
12549
 
  writeln(f);
12550
 
  writeln(f,'&5 Y');
12551
 
  writeln(f,'ord1');
12552
 
  writeln(f);
12553
 
  writeln(f);
12554
 
  writeln(f);
12555
 
  writeln(f);
12556
 
  writeln(f,'&5 MONDE');
12557
 
  writeln(f,'1');
12558
 
  writeln(f,'1');
12559
 
  writeln(f,'1');
12560
 
  writeln(f,'1');
12561
 
  writeln(f,'1');
12562
 
  writeln(f,'&2 GRADUATION');
12563
 
  writeln(f,'0');
12564
 
  writeln(f,'0');
12565
 
  writeln(f,'&2 ZERO');
12566
 
  writeln(f,'0');
12567
 
  writeln(f,'0');
12568
 
  writeln(f,'&5 OPTIONS');
12569
 
  writeln(f,'8');
12570
 
  writeln(f,'0');
12571
 
  writeln(f,'1');
12572
 
  writeln(f,'3');
12573
 
  writeln(f,'4');
12574
 
  writeln(f,chr(163)+'1 PAGE COMMENT');
12575
 
  writeln(f);
12576
 
  writeln(f,'&'+inttostr(nombre_points_calcul+1)+' VALEUR VAR');
12577
 
  for i:=1 to nombre_points_calcul+1 do begin
12578
 
  ligne:='';
12579
 
      for j:=0 to nombre_ordonnees do
12580
 
      if not(isnanorinfinite(tableau_grandeurs_tracees[i-1,j])) then
12581
 
      ligne:=ligne+floattostr( tableau_grandeurs_tracees[i-1,j])+' ' else
12582
 
       ligne:=ligne+'0 ';
12583
 
   writeln(f, ligne);
12584
 
   end;  end;
12585
 
   {sauvegarde format regressi}
12586
 
 
12587
 
 
12588
 
{sauvegarde format tableur texte}
12589
 
    if  ((lowercase(extractfileext(ns))='.csv') or
12590
 
    (lowercase(extractfileext(ns))='.txt')) then begin
12591
 
 ligne:=expression_abscisse_explicite;
12592
 
   for k:=1 to nombre_ordonnees do
12593
 
    ligne:=ligne+separateur_csv+expression_ordonnees_explicites[k-1];
12594
 
    writeln(f,ligne);
12595
 
   for i:=1 to nombre_points_calcul+1 do begin
12596
 
   if not(isnanorinfinite(tableau_grandeurs_tracees[i-1,0])) then
12597
 
   ligne:=remplace_point_decimal(floattostr(tableau_grandeurs_tracees[i-1,0]))
12598
 
   else
12599
 
   ligne:='NAN';
12600
 
   for j:=1 to nombre_ordonnees do
12601
 
   if not(isnanorinfinite(tableau_grandeurs_tracees[i-1,j])) then
12602
 
   ligne:=ligne+separateur_csv+remplace_point_decimal(floattostr(tableau_grandeurs_tracees[i-1,j])) else
12603
 
   ligne:=ligne+separateur_csv+'NAN';
12604
 
   writeln(f,ligne);
12605
 
   end;
12606
 
   end;
12607
 
closefile(f);
12608
 
 
 
13685
    popupmenuraffine.PopUp;
12609
13686
tabsheettracecourbes.Refresh;
12610
13687
 
12611
13688
end;
15516
16593
longueurmax,i_acide,i_aminoacide,i_alc,
15517
16594
i_alcool,i_benzene,i_complexe,
15518
16595
i_aldehyd_cetone,i_amid_amin:integer;    sasa:string;
15519
 
nas,ncs,nc,nab:longint;
 
16596
nas,ncs,nc,nab,indice_ligne_h,indice_ligne_oh:longint;
15520
16597
begin
15521
16598
 
15522
16599
 stringgridcationssimples.ColCount:=5;
15635
16712
stringgridaqueuxcomplexes.cells[4,i]:=floattostr(tableau_complexes[i-1].masse_molaire);
15636
16713
            end;
15637
16714
 
15638
 
 
 
16715
   StringGridaqueuxab.SortColRow(true,0);
 
16716
indice_ligne_h:=StringGridaqueuxab.Cols[0].IndexOf('H[+]');
 
16717
if   indice_ligne_h>1 then
 
16718
        StringGridaqueuxab.MoveColRow(false,indice_ligne_h,1);
 
16719
 
 
16720
indice_ligne_oh:=StringGridaqueuxab.Cols[0].IndexOf('OH[-]');
 
16721
if   indice_ligne_oh>1 then
 
16722
        StringGridaqueuxab.MoveColRow(false,indice_ligne_oh,2);
 
16723
 
 
16724
              stringgridcationssimples.SortOrder:=soAscending;
15639
16725
            stringgridcationssimples.SortColRow(true,0);
 
16726
 
 
16727
                  stringgridanionssimples.SortOrder:=soAscending;
15640
16728
              stringgridanionssimples.SortColRow(true,0);
 
16729
 
 
16730
              stringgridions.SortOrder:=soAscending;
15641
16731
                   stringgridions.SortColRow(true,0);
 
16732
 
 
16733
                   stringgridmolecules.SortOrder:=soAscending;
15642
16734
                       stringgridmolecules.SortColRow(true,0);
 
16735
 
 
16736
 
15643
16737
                    stringgridcationssimples.AutoSizeColumns;
15644
16738
                      stringgridanionssimples.AutoSizeColumns;
15645
16739
                        stringgridions.AutoSizeColumns;
15854
16948
end;
15855
16949
 
15856
16950
 stringgridorganiques_acide.AutoSizeColumns;
 
16951
  stringgridorganiques_acide.SortOrder:=soAscending;
 
16952
 stringgridorganiques_acide.SortColRow(true,0);
 
16953
 
15857
16954
stringgridorganiques_aminoacide.AutoSizeColumns;
 
16955
stringgridorganiques_aminoacide.SortOrder:=soAscending;
 
16956
 stringgridorganiques_aminoacide.SortColRow(true,0);
 
16957
 
15858
16958
stringgridorganiques_alc.AutoSizeColumns;
 
16959
stringgridorganiques_alc.SortOrder:=soAscending;
 
16960
 stringgridorganiques_alc.SortColRow(true,0);
 
16961
 
15859
16962
stringgridorganiques_alcool.AutoSizeColumns;
 
16963
stringgridorganiques_alcool.SortOrder:=soAscending;
 
16964
 stringgridorganiques_alcool.SortColRow(true,0);
 
16965
 
15860
16966
stringgridorganiques_amid_amin.AutoSizeColumns;
 
16967
stringgridorganiques_amid_amin.SortOrder:=soAscending;
 
16968
 stringgridorganiques_amid_amin.SortColRow(true,0);
 
16969
 
15861
16970
stringgridorganiques_benzene.AutoSizeColumns;
 
16971
stringgridorganiques_benzene.SortOrder:=soAscending;
 
16972
 stringgridorganiques_benzene.SortColRow(true,0);
 
16973
 
15862
16974
stringgridorganiques_complexe.AutoSizeColumns;
 
16975
stringgridorganiques_complexe.SortOrder:=soAscending;
 
16976
 stringgridorganiques_complexe.SortColRow(true,0);
 
16977
 
15863
16978
stringgridorganiques_aldehyd_cetone.AutoSizeColumns;
 
16979
stringgridorganiques_aldehyd_cetone.SortOrder:=soAscending;
 
16980
 stringgridorganiques_aldehyd_cetone.SortColRow(true,0);
15864
16981
 {pour la burette}
15865
16982
 
15866
16983
  stringgridcationssimples_.ColCount:=5;
15975
17092
stringgridaqueuxcomplexes_.cells[4,i]:=floattostr(tableau_complexes[i-1].masse_molaire);
15976
17093
            end;
15977
17094
 
 
17095
 
 
17096
   StringGridaqueuxab_.SortColRow(true,0);
 
17097
indice_ligne_h:=StringGridaqueuxab_.Cols[0].IndexOf('H[+]');
 
17098
if   indice_ligne_h>1 then
 
17099
        StringGridaqueuxab_.MoveColRow(false,indice_ligne_h,1);
 
17100
 
 
17101
indice_ligne_oh:=StringGridaqueuxab_.Cols[0].IndexOf('OH[-]');
 
17102
if   indice_ligne_oh>1 then
 
17103
        StringGridaqueuxab_.MoveColRow(false,indice_ligne_oh,2);
 
17104
 
 
17105
 
 
17106
                    stringgridcationssimples_.SortOrder:=soAscending;
15978
17107
    stringgridcationssimples_.SortColRow(true,0);
 
17108
 
 
17109
    stringgridanionssimples_.SortOrder:=soAscending;
15979
17110
              stringgridanionssimples_.SortColRow(true,0);
 
17111
 
 
17112
              stringgridions_.SortOrder:=soAscending;
15980
17113
                   stringgridions_.SortColRow(true,0);
 
17114
 
 
17115
                   stringgridmolecules_.SortOrder:=soAscending;
15981
17116
                       stringgridmolecules_.SortColRow(true,0);
 
17117
 
 
17118
 
15982
17119
                        stringgridcationssimples_.AutoSizeColumns;
15983
17120
                      stringgridanionssimples_.AutoSizeColumns;
15984
17121
                        stringgridions_.AutoSizeColumns;
16073
17210
 stringgridorganiques_aldehyd_cetone_.Cells[j,i]:=stringgridorganiques_aldehyd_cetone.Cells[j,i];
16074
17211
 
16075
17212
   stringgridorganiques_acide_.AutoSizeColumns;
 
17213
   stringgridorganiques_acide_.SortOrder:=soAscending;
 
17214
 stringgridorganiques_acide_.SortColRow(true,0);
 
17215
 
16076
17216
stringgridorganiques_aminoacide_.AutoSizeColumns;
 
17217
stringgridorganiques_aminoacide_.SortOrder:=soAscending;
 
17218
 stringgridorganiques_aminoacide_.SortColRow(true,0);
 
17219
 
16077
17220
stringgridorganiques_alc_.AutoSizeColumns;
 
17221
stringgridorganiques_alc_.SortOrder:=soAscending;
 
17222
 stringgridorganiques_alc_.SortColRow(true,0);
 
17223
 
16078
17224
stringgridorganiques_alcool_.AutoSizeColumns;
 
17225
stringgridorganiques_alcool_.SortOrder:=soAscending;
 
17226
 stringgridorganiques_alcool_.SortColRow(true,0);
 
17227
 
16079
17228
stringgridorganiques_amid_amin_.AutoSizeColumns;
 
17229
stringgridorganiques_amid_amin_.SortOrder:=soAscending;
 
17230
 stringgridorganiques_amid_amin_.SortColRow(true,0);
 
17231
 
16080
17232
stringgridorganiques_benzene_.AutoSizeColumns;
 
17233
stringgridorganiques_benzene_.SortOrder:=soAscending;
 
17234
 stringgridorganiques_benzene_.SortColRow(true,0);
 
17235
 
16081
17236
stringgridorganiques_complexe_.AutoSizeColumns;
 
17237
stringgridorganiques_complexe_.SortOrder:=soAscending;
 
17238
 stringgridorganiques_complexe_.SortColRow(true,0);
 
17239
 
16082
17240
stringgridorganiques_aldehyd_cetone_.AutoSizeColumns;
 
17241
stringgridorganiques_aldehyd_cetone_.SortOrder:=soAscending;
 
17242
 stringgridorganiques_aldehyd_cetone_.SortColRow(true,0);
16083
17243
{fin burette}
16084
17244
 
16085
17245
 
18041
19201
 
18042
19202
initialization
18043
19203
  {$I unit1.lrs}
 
19204
   {$ifndef darwin} application.UpdateFormatSettings:=false; {$endif}
 
19205
  DefaultFormatSettings.DecimalSeparator:='.';
18044
19206
  etape:=choisir_becher;
18045
19207
    maxiter_0:=300;
18046
19208
    nom_solvant_0:= 'H2O';
18088
19250
          nombre_points_exp:=0;
18089
19251
         mode_experience:=false;
18090
19252
         mode_superposition:=false;
18091
 
        repertoire_executable:=extractfilepath(application.ExeName);
 
19253
        repertoire_executable:=AppendPathDelim(extractfilepath(Application.ExeName));
18092
19254
           nomexecutable:=extractfilename(Application.ExeName);
18093
 
 
18094
 
       {$IFDEF MSWINDOWS}
18095
 
        repertoire_exemples:=repertoire_executable+'exemples\';
18096
 
        repertoire_aide:=repertoire_executable+'aide\';
18097
 
        {$ELSE}
18098
 
      repertoire_exemples:=repertoire_executable+'Exemples/';
18099
 
        repertoire_aide:=repertoire_executable+'Aide/';
18100
 
        {$ENDIF}
 
19255
         repertoire_exemples:=AppendPathDelim(repertoire_executable+'Exemples');
 
19256
         repertoire_aide:=AppendPathDelim(repertoire_executable+'Aide');
 
19257
          repertoire_config_perso:=AppendPathDelim(MyGetAppConfigDirUTF8);
 
19258
 
 
19259
          {$ifdef windows}
 
19260
  repertoire_dosage_perso:=AppendPathDelim(AppendPathDelim(MyGetMesDocumentsUTF8)+'MesDosages');
 
19261
   {$endif}
 
19262
   {$ifndef windows}
 
19263
    repertoire_dosage_perso:=AppendPathDelim({repertoire_config_perso}GetUserDir+'MesDosages');
 
19264
     {$endif}
 
19265
 
 
19266
     if not(directoryexistsUTF8(repertoire_config_perso)) then   try
 
19267
    forcedirectories(UTF8ToSys(repertoire_config_perso));
 
19268
   except; end;
 
19269
      if not(directoryexistsUTF8(repertoire_dosage_perso)) then   try
 
19270
    forcedirectories(UTF8ToSys(repertoire_dosage_perso));
 
19271
   except; end;
 
19272
 
 
19273
 
 
19274
 
 
19275
 
 
19276
 
 
19277
    liste_langues:=tstringlist.create;
 
19278
         chemin_po:=AppendPathDelim(repertoire_executable+'languages');
 
19279
 
 
19280
          If FindFirstutf8(Chemin_po+'dozzzaqueux.*.po',faAnyFile,Search)=0
 
19281
 Then Begin
 
19282
   Repeat
 
19283
      if (Search.Name='.') or (Search.Name='..') or (Search.Name='')
 
19284
        then continue;
 
19285
              { liste_langues.Add(copy(Search.name,length(Search.name)-4,2)); }
 
19286
              ID_lang:=copy(Search.name,length('dozzzaqueux.')+1,
 
19287
                 length(Search.Name)-length('dozzzaqueux..po'));
 
19288
              if (ID_lang<>'') and (Pos('.',ID_lang)<1) and (liste_langues.IndexOf(ID_lang)<0)
 
19289
      then liste_langues.Add(ID_lang);
 
19290
              Until FindNextutf8(Search)<>0;
 
19291
   FindCloseutf8(Search);
 
19292
 End;
 
19293
 
 
19294
 
 
19295
      lang:='';  FallbackLang:='';
 
19296
 
 
19297
    nom_ini_file:=repertoire_config_perso+'dozzzaqueux.ini';
 
19298
     if not(fileexistsutf8(nom_ini_file)) then begin
 
19299
       GetLanguageIDs(lang,FallbackLang);
 
19300
             if ((liste_langues.indexof(uppercase(lang))=-1) and
 
19301
            (liste_langues.indexof(uppercase(FallbackLang))=-1)) then
 
19302
          begin
 
19303
        Lang:='fr_FR';  FallbackLang:='fr';
 
19304
               end;
 
19305
       goto 1888;
 
19306
       end;
 
19307
        assignfile(f_ini,UTF8ToSys(nom_ini_file));
 
19308
       reset(f_ini);
 
19309
       readln(f_ini,lang);
 
19310
              readln(f_ini,FallbackLang);
 
19311
       closefile(f_ini);
 
19312
 
 
19313
 
 
19314
      //GetLanguageIDs(Lang, FallbackLang); // dans l'unité gettext
 
19315
 
 
19316
 
 
19317
 
 
19318
      1888:
 
19319
PODirectory:=IncludeTrailingPathDelimiter(
 
19320
                        IncludeTrailingPathDelimiter(
 
19321
                         ExtractFilePath(Application.ExeName))+'languages');
 
19322
      TranslateUnitResourceStrings('LCLStrConsts', PODirectory + 'lclstrconsts.%s.po', Lang, FallbackLang);
 
19323
      TranslateUnitResourceStrings('UChaines', PODirectory + 'dozzzaqueux.%s.po', Lang, FallbackLang);
 
19324
 
 
19325
 
18101
19326
         nombre_chiffres_constantes:=3;
18102
19327
         nombre_chiffres_resultats:=3;
18103
19328