-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnit9.pas
178 lines (153 loc) · 4.22 KB
/
Unit9.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
unit Unit9;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, LangLoader, GeoFunctions, GeoFiles, GeoClasses,
ExtCtrls, Geoid;
type
TForm9 = class(TForm)
GroupBox1: TGroupBox;
SpeedButton1: TSpeedButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
SpeedButton2: TSpeedButton;
GroupBox2: TGroupBox;
SpeedButton3: TSpeedButton;
Label11: TLabel;
Label16: TLabel;
GroupBox3: TGroupBox;
SpeedButton4: TSpeedButton;
Label12: TLabel;
Label13: TLabel;
GroupBox4: TGroupBox;
SpeedButton5: TSpeedButton;
Label14: TLabel;
Label15: TLabel;
Label17: TLabel;
LangBox: TComboBox;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
procedure SpeedButton4Click(Sender: TObject);
procedure SpeedButton5Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure LangBoxChange(Sender: TObject);
procedure RefreshLabels;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form9: TForm9;
Inited: boolean = false;
implementation
uses MainForm, Unit3, LocFm, Unit4, Unit5, Unit7;
{$R *.dfm}
procedure TForm9.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Form1.close;
end;
procedure TForm9.FormShow(Sender: TObject);
var I, gk, mkt, loc:Integer;
begin
Form1.Init;
if not Inited then
begin
LangBox.Items := Form1.LangBox.Items;
LangBox.ItemIndex := Form1.LangBox.ItemIndex;
Inited := true;
end;
LoadLang(True);
Form1.ReInit;
RefreshLabels;
Repaint;
end;
procedure TForm9.LangBoxChange(Sender: TObject);
begin
Form1.LangBox.ItemIndex := LangBox.ItemIndex;
Form1.LangBox.OnChange(nil);
RefreshLabels;
end;
procedure TForm9.RefreshLabels;
var I, gk, mkt, loc:Integer;
begin
Label6.Caption := IntToStr(Length(CoordinateSystemList));
gk := 0; mkt:= 0; loc := 0;
for I := 0 to Length(CoordinateSystemList) - 1 do
begin
case CoordinateSystemList[I].ProjectionType of
2: inc(gk);
3,4 : inc(mkt);
end;
if CoordinateSystemList[I].isLocalized then
inc(loc);
end;
Label7.Caption := IntToStr(gk); Label8.Caption := IntToStr(mkt);
Label9.Caption := IntToStr(loc);
Label10.Caption := IntToStr(Length(CoordinateSystemList) - gk - mkt - loc);
Label16.Caption := IntToStr(Length(DatumList));
Label13.Caption := IntToStr(Length(EllipsoidList));
Label15.Caption := IntToStr(Length(GeoidsMetaData));
end;
procedure TForm9.SpeedButton1Click(Sender: TObject);
var I:Integer;
begin
Form3.Combobox1.Clear;
for i := 0 to Length(DatumList)-1 do
Form3.Combobox1.Items.Add(DatumList[i].Caption);
Form3.ComboBox3.Items := Form1.ComboBox1.Items;
Form3.Edit4.Items := Form1.ComboBox1.Items;
Form3.ComboBox3.ItemIndex := 0; // Form1.ComboBox1.ItemIndex;
Form3.ComboBox3.OnChange(nil);
Form3.ListBox1.ItemIndex := Form1.ListBox4.ItemIndex;
Form3.ListBox1.OnClick(nil);
Form3.Showmodal;
FormShow(nil);
LangBox.OnChange(nil);
end;
procedure TForm9.SpeedButton2Click(Sender: TObject);
begin
LocForm.ShowModal;
FormShow(nil);
LangBox.OnChange(nil);
end;
procedure TForm9.SpeedButton3Click(Sender: TObject);
var I:Integer;
begin
Form4.ListBox1.Items := Form1.ListBox1.Items;
Form4.ListBox1.ItemIndex := 0; //Form1.ListBox1.ItemIndex;
Form4.ComboBox1.Clear;
for i := 0 to Length(EllipsoidList)-1 do
Form4.Combobox1.Items.Add(EllipsoidList[i].Caption);
Form4.ListBox1.OnClick(nil);
Form4.Showmodal;
FormShow(nil);
LangBox.OnChange(nil);
end;
procedure TForm9.SpeedButton4Click(Sender: TObject);
begin
Form5.RefreshList;
Form5.ListBox1.ItemIndex := 0; //Form1.ComboBox1.ItemIndex;
Form5.ListBox1.OnClick(nil);
Form5.ShowModal;
FormShow(nil);
LangBox.OnChange(nil);
end;
procedure TForm9.SpeedButton5Click(Sender: TObject);
begin
Form7.Button1.Hide;
Form7.Button2.Hide;
Form7.Showmodal;
LangBox.OnChange(nil);
end;
end.