File: unit_indices_milieu_ambiant.pas

package info (click to toggle)
optgeo 2.25-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,948 kB
  • sloc: pascal: 58,877; xml: 63; makefile: 58
file content (102 lines) | stat: -rw-r--r-- 2,904 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
unit Unit_indices_milieu_ambiant;

{$mode objfpc}

interface

uses
  LCLIntf, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, Buttons,{$ifdef windows}shellapi,windows,{$endif }LResources,UnitScaleFont,
  LazHelpHTML,UTF8Process,UChaines,Unit222,LCLType, Spin;

type

  { Tsaisie_indices_milieu_ambiant }

  Tsaisie_indices_milieu_ambiant = class(TForm)
    BitBtn1: TBitBtn;
    Edit_indice_bleu_par_defaut: TEdit;
    Edit_indice_rouge_par_defaut: TEdit;
    Edit_indice_vert_par_defaut: TEdit;
    FloatSpinEditbleu: TFloatSpinEdit;
    FloatSpinEditrouge: TFloatSpinEdit;
    FloatSpinEditvert: TFloatSpinEdit;
    StaticText1: TStaticText;
    StaticText10: TStaticText;
    StaticText2: TStaticText;
    StaticText3: TLabel;
    StaticText4: TLabel;
    StaticText5: TLabel;
    StaticText6: TStaticText;
    StaticText7: TStaticText;
    StaticText8: TStaticText;
    StaticText9: TStaticText;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    encreation:boolean;
    { private declarations }
  public
    { public declarations }
  end; 

var
  saisie_indices_milieu_ambiant: Tsaisie_indices_milieu_ambiant;

implementation

{ Tsaisie_indices_milieu_ambiant }



procedure Tsaisie_indices_milieu_ambiant.BitBtn1Click(Sender: TObject);
begin
    try
    indice_vert_par_defaut:=abs(strtofloat(saisie_indices_milieu_ambiant.Edit_indice_vert_par_defaut.Text));
    except
    application.MessageBox(pchar(rsAttention), pchar(rsValeurIllGal), mb_ok);
    indice_vert_par_defaut:=1;
    end;
    try
    indice_bleu_par_defaut:=abs(strtofloat(saisie_indices_milieu_ambiant.Edit_indice_bleu_par_defaut.Text));
    except
    application.MessageBox(pchar(rsAttention), pchar(rsValeurIllGal2), mb_ok);
    indice_bleu_par_defaut:=1;
    end;
  try
    indice_rouge_par_defaut:=abs(strtofloat(saisie_indices_milieu_ambiant.Edit_indice_rouge_par_defaut.Text));
    except
    application.MessageBox(pchar(rsAttention), pchar(rsValeurIllGal3), mb_ok);
    indice_rouge_par_defaut:=1;
    end;

    longueur_donde_red:=FloatSpinEditrouge.value*1e-9;
     longueur_donde_blue:=FloatSpinEditbleu.value*1e-9;
     longueur_donde_green:=FloatSpinEditvert.value*1e-9;
end;

procedure Tsaisie_indices_milieu_ambiant.FormCreate(Sender: TObject);
begin
    encreation:=true;
    caption:=rsIndicesDuMil2;
 STATICTEXT3.CAPTION:=rsPourLeVert;
STATICTEXT4.CAPTION:=rsPourLeRouge;
STATICTEXT5.CAPTION:=rsPourLeBleu;
STATICTEXT1.CAPTION:=rsLongueurDOnd;
 STATICTEXT2.CAPTION:=rsLongueurDOnd2;
  STATICTEXT6.CAPTION:=rsLongueurDOnd3;
  STATICTEXT7.CAPTION:=rsLesValeursDe;

end;

procedure Tsaisie_indices_milieu_ambiant.FormShow(Sender: TObject);
begin
   //if encreation then begin scalefont(self); encreation:=false; end;
end;

initialization
  {$I unit_indices_milieu_ambiant.lrs}

end.