-
Notifications
You must be signed in to change notification settings - Fork 0
/
SvcConfigEssential.pas
65 lines (50 loc) · 1.53 KB
/
SvcConfigEssential.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
{ ************************************************************************
NetTime is copyrighted by Graham Mainwaring. Permission is hereby
granted to use, modify, redistribute and create derivative works
provided this attribution is not removed. I also request that if you
make any useful changes, please e-mail the diffs to [email protected]
so that I can include them in an 'official' release.
************************************************************************ }
unit SvcConfigEssential;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ServiceConfigFrm, StdCtrls;
type
TfrmEssentialConfig = class(TfrmSvcConfig)
Button1: TButton;
Button2: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmEssentialConfig: TfrmEssentialConfig;
implementation
uses SvcConfigYesNo, Options;
{$R *.DFM}
procedure TfrmEssentialConfig.Button1Click(Sender: TObject);
var
opt: TfrmOptions;
begin
inherited;
opt := TfrmOptions.Create(Application);
opt.ReadFromRegistry;
opt.cbxServiceAutoStart.Checked := true;
opt.cbxShowInTray.Checked := true;
opt.ShowModal;
opt.Release;
if opt.cbxShowInTray.Checked then
WinExec(pchar(InstDir+'NetTime.exe /NOSPLASH'),SW_SHOW);
Application.Terminate;
end;
procedure TfrmEssentialConfig.Button2Click(Sender: TObject);
begin
inherited;
Application.Terminate;
end;
end.