-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unit2.pas
127 lines (97 loc) · 2.5 KB
/
Unit2.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
unit Unit2;
{$MODE Delphi}
interface
uses
LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls,AST_SUN,AST_GEN;
type
TForm2 = class(TForm)
Button1: TButton;
Label1: TLabel;
Edit1: TEdit;
Button2: TButton;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form2: TForm2;
implementation
uses Unit1;
{$R *.lfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
Form2.Hide;
Form1.Show
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
label2.visible:=false;
label3.visible:=false;
label4.visible:=false;
label5.visible:=false;
label6.visible:=false;
label7.visible:=false;
label8.visible:=false;
label9.visible:=false;
label10.visible:=false;
edit1.text:=FormatDateTime('dd/mm/yyyy hh:mm:ss',Now);
end;
procedure TForm2.Button2Click(Sender: TObject);
var
heure : string[8];
alpha : string[8];
date : string[10];
delta,rayon,p,b0,l0,num_crn,parallaxe,angsize,secondes : real;
chaine : string;
degres,minutes : word;
begin
date:=copy(edit1.text,1,10);
heure:=copy(edit1.text,12,8);
chap15(date,heure,alpha,delta,rayon,p,b0,l0,parallaxe,angsize);
num_crn:=numero_crn(date,heure);
angsize:=angsize/2;
conversion_angle(angsize,degres,minutes,secondes);
label2.visible:=true;
label3.visible:=true;
label4.visible:=true;
label5.visible:=true;
label6.visible:=true;
label7.visible:=true;
label8.visible:=true;
label9.visible:=true;
label10.visible:=true;
label2.caption:= 'Alpha = ' + alpha;
str(delta:8:2,chaine);
label3.caption:='Delta = ' + chaine;
str(rayon:8:5,chaine);
label4.caption:='Rayon = '+ chaine + ' UA ';
str(P:5:2,chaine);
label5.caption:='P = ' + chaine +' °';
str(B0:5:2,chaine);
label6.caption:='b0 = ' + chaine +' °';
str(L0:6:2,chaine);
label7.caption:='l0 = ' + chaine +' °';
str(num_crn:5:1,chaine);
label8.caption:='CRN = ' + chaine;
str(3600*parallaxe:5:2,chaine);
label9.caption:='Parall= '+ chaine +' secondes';
str(minutes:2,chaine);
label10.caption:='Demi Diam.App.= ' + chaine + ' min.' ;
str(secondes:5:2,chaine);
label10.caption:=label10.caption+chaine+'"';
end;
end.