-
Notifications
You must be signed in to change notification settings - Fork 0
/
installdlg.pas
85 lines (66 loc) · 1.73 KB
/
installdlg.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
unit installdlg;
{$mode delphi}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ButtonPanel,
ComCtrls, ExtCtrls, StdCtrls, Buttons,opsiconnection;
type
{ TFInstalldlg }
TFInstalldlg= class(TForm)
BitBtnNow: TBitBtn;
BitBtnLater: TBitBtn;
Label1: TLabel;
Memo1: TMemo;
PanelDlgTop: TPanel;
ToolBar1: TToolBar;
procedure BitBtnLaterClick(Sender: TObject);
procedure BitBtnNowClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure Memo1Change(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
SoftwareOnDemand : boolean;
UpdateData: boolean;
end;
var
Finstalldlg: TFInstalldlg;
resourcestring
rsErrorOnDemand = 'opsi is bussy please try it again later. Detailed error message: ';
implementation
{$R *.lfm}
uses
opsiclientkioskgui;
{ TFInstalldlg }
procedure TFInstalldlg.BitBtnNowClick(Sender: TObject);
var
i : integer;
ErrorMessage: string;
begin
try
// fire on demand
//http://wiki.freepascal.org/Cursor#Example_3:_Change_All_Controls_To_An_Hour_Glass.2C_Except_TBitBtn_Controls
screen.Cursor := crHourGlass;
OCKOpsiConnection.DoActionsOnDemand(ErrorMessage);
if ErrorMessage <> '' then ShowMessage(rsErrorOnDemand + ErrorMessage);
finally
screen.Cursor := crDefault;
visible := false;
UpdateData:= true;
FormOpsiClientKiosk.Close;
end;
end;
procedure TFInstalldlg.FormActivate(Sender: TObject);
begin
if not SoftwareOnDemand then BitBtnNow.Enabled:= False;
end;
procedure TFInstalldlg.Memo1Change(Sender: TObject);
begin
end;
procedure TFInstalldlg.BitBtnLaterClick(Sender: TObject);
begin
// nothing to do
visible := false;
end;
end.