-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAboutFr.pas
178 lines (151 loc) · 5.18 KB
/
AboutFr.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 AboutFr;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ShellAPI, Buttons, ComCtrls, ExtCtrls,
Menus, ImgList, GIFImage,DynamicSkinForm, SkinCtrls,
Registry, SkinTabs, jpeg, spButtonGroup, Vcl.Imaging.GIFImg;
type
TAboutFrm = class(TForm)
spDynamicSkinForm1: TspDynamicSkinForm;
spSkinExPanel1: TspSkinExPanel;
spSkinStdLabel1: TspSkinStdLabel;
spSkinStdLabel2: TspSkinStdLabel;
spSkinStdLabel3: TspSkinStdLabel;
spSkinNotebook1: TspSkinNotebook;
spSkinStdLabel4: TspSkinStdLabel;
spSkinButton1: TspSkinButton;
spSkinButton2: TspSkinButton;
Image2: TImage;
Image3: TImage;
spSkinPageControl1: TspSkinPageControl;
spSkinTabSheet1: TspSkinTabSheet;
spSkinTextLabel1: TspSkinTextLabel;
spSkinTabSheet2: TspSkinTabSheet;
spSkinButtonGroup1: TspSkinButtonGroup;
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ICASA1Click(Sender: TObject);
function Get_MSInfo : String;
procedure spSkinButtonGroup1Items0Click(Sender: TObject);
procedure spSkinButtonGroup1Items1Click(Sender: TObject);
procedure spSkinButtonGroup1Items2Click(Sender: TObject);
procedure spSkinButtonGroup1Items3Click(Sender: TObject);
procedure spSkinButtonGroup1Items4Click(Sender: TObject);
procedure spSkinButtonGroup1Items5Click(Sender: TObject);
procedure spSkinButtonGroup1Items6Click(Sender: TObject);
procedure spSkinButtonGroup1Items7Click(Sender: TObject);
procedure spSkinButtonGroup1Items8Click(Sender: TObject);
procedure ShExe(const s : string);
private
{ Private declarations }
public
{ Public declarations }
end;
var
AboutFrm: TAboutFrm;
implementation
Uses FMXUtils, Main, DataModFr;
{$R *.DFM}
procedure TAboutFrm.ShExe(const s : string);
var
ErrCode : integer;
begin
ErrCode := ShellExecute (Application.Handle, PChar('open'),
PChar (s),PCHar(''),nil,SW_NORMAL);
MainForm.HandleError (ErrCode,s);
end;
procedure TAboutFrm.SpeedButton1Click(Sender: TObject);
begin
ShExe(Get_MSINFO);
end;
function TAboutFrm.Get_MSInfo : String;
var
Regist: TRegistry;
begin
Regist := TRegistry.Create;
Regist.RootKey := HKEY_LOCAL_MACHINE;
if Regist.OpenKeyReadOnly('Software\Microsoft\Shared Tools\MSInfo') then
Result := Regist.ReadString('Path')
else
Result := '';
Regist.CloseKey;
Regist.Free;
end;
procedure TAboutFrm.SpeedButton2Click(Sender: TObject);
begin
Close;
AboutFrm := nil;
end;
procedure TAboutFrm.FormShow(Sender: TObject);
begin
spSkinPageControl1.ActivePageIndex := 0;
spSkinNotebook1.PageIndex := 0;
AboutFrm.Caption := 'About '+ MainForm.rzVersionInfo1.FileDescription;
with spSkinTextLabel1 do
begin
Lines.Clear;
Lines.Add ('');
Lines.Add (MainForm.rzVersionInfo1.FileDescription+' ('+ MainForm.rzVersionInfo1.FileVersion+')');
Lines.Add ('Program executed '+IntToStr(ProgramStarts)+' times.');
Lines.Add ('Legal Copyright © '+ MainForm.rzVersionInfo1.Copyright);
Lines.Add ('Internal Filename: '+MainForm.rzVersionInfo1.InternalName);
Lines.Add ('');
Lines.Add ('DSSAT v4.8 Software');
Lines.Add ('');
Lines.Add ('G. Hoogenboom, C.H. Porter, V. Shelia, K.J. Boote, U. Singh,');
Lines.Add ('J.W. White, W. Pavan, F.A.A. Oliveira, L.P. Moreno-Cadena,');
Lines.Add ('J.I. Lizaso, S. Asseng, D.N.L. Pequeno, B.A. Kimball, P.D. Alderman,');
Lines.Add ('K.R. Thorp, M.R. Jones, S.V. Cuadra, M.S. Vianna, F.J. Villalobos,');
Lines.Add ('T.B. Ferreira, W.D. Batchelor, J. Koo, L.A. Hunt, and J.W. Jones. 2021');
Lines.Add ('');
Lines.Add ('Decision Support System for Agrotechnology Transfer(DSSAT)');
Lines.Add ('Version 4.8 (www.DSSAT.net)');
Lines.Add ('DSSAT Foundation, Gainesville, Florida, USA.');
end;
spSkinStdLabel1.Caption := 'Serial Number '+RegNo;
spSkinStdLabel2.Caption := 'Registered to Company '+Company;
spSkinStdLabel3.Caption := 'Registered to User '+RegUser;
end;
procedure TAboutFrm.ICASA1Click(Sender: TObject);
begin
ShExe('http://www.DSSAT.net/');
end;
procedure TAboutFrm.spSkinButtonGroup1Items0Click(Sender: TObject);
begin
ShExe('http://www.DSSAT.net');
end;
procedure TAboutFrm.spSkinButtonGroup1Items1Click(Sender: TObject);
begin
ShExe('http://www.IFDC.org');
end;
procedure TAboutFrm.spSkinButtonGroup1Items2Click(Sender: TObject);
begin
ShExe('http://www.ifas.ufl.edu/');
end;
procedure TAboutFrm.spSkinButtonGroup1Items3Click(Sender: TObject);
begin
ShExe('http://www.ifpri.org/');
end;
procedure TAboutFrm.spSkinButtonGroup1Items4Click(Sender: TObject);
begin
ShExe('http://www.uoguelph.ca/');
end;
procedure TAboutFrm.spSkinButtonGroup1Items5Click(Sender: TObject);
begin
ShExe('http://www.ctahr.hawaii.edu');
end;
procedure TAboutFrm.spSkinButtonGroup1Items6Click(Sender: TObject);
begin
ShExe('https://blogs.upm.es/agsystems/');
end;
procedure TAboutFrm.spSkinButtonGroup1Items7Click(Sender: TObject);
begin
ShExe('https://www.ars.usda.gov/pacific-west-area/maricopa-arizona/');
end;
procedure TAboutFrm.spSkinButtonGroup1Items8Click(Sender: TObject);
begin
ShExe('https://sasri.org.za/');
end;
end.