-
Notifications
You must be signed in to change notification settings - Fork 140
/
ipsEverDlg.pas
60 lines (48 loc) · 1.13 KB
/
ipsEverDlg.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
unit ipsEverDlg;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TipsEverFrm = class(TForm)
ipsBox: TMemo;
resetBtn: TButton;
totalLbl: TLabel;
editBtn: TButton;
procedure resetBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure editBtnClick(Sender: TObject);
private
{ Private declarations }
public
procedure refreshData();
{ Public declarations }
end;
var
ipsEverFrm: TipsEverFrm;
implementation
{$R *.dfm}
uses
main, utilLib;
procedure TipsEverFrm.resetBtnClick(Sender: TObject);
begin
ipsEverConnected.clear();
refreshData();
end;
procedure TipsEverFrm.editBtnClick(Sender: TObject);
var
fn: string;
begin
fn:=saveTempFile(ipsEverConnected.text);
if renameFile(fn, fn+'.txt') then exec(fn+'.txt')
else msgDlg(MSG_NO_TEMP, MB_ICONERROR);
end;
procedure TipsEverFrm.FormShow(Sender: TObject);
begin refreshData() end;
procedure TipsEverFrm.refreshData();
begin
ipsBox.text:=ipsEverConnected.text;
totalLbl.caption:=format('Total: %d', [ipsEverConnected.count]);
repaintTray();
end; // refreshData
end.