-
Notifications
You must be signed in to change notification settings - Fork 1
/
fmTools.pas
86 lines (70 loc) · 1.84 KB
/
fmTools.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
unit fmTools;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, ExtCtrls;
type
TfrmTools = class(TForm)
pnlToolbar: TPanel;
spdSquare: TSpeedButton;
spdSquareR: TSpeedButton;
spdRect: TSpeedButton;
spdRectR: TSpeedButton;
spdCircle: TSpeedButton;
spdEllipse: TSpeedButton;
spdOpenFile: TSpeedButton;
spdSaveFile: TSpeedButton;
spdNew: TSpeedButton;
lblCount: TLabel;
btnPrint: TSpeedButton;
btnText: TSpeedButton;
btnBarcode: TSpeedButton;
btnImage: TSpeedButton;
spdSelect: TSpeedButton;
btnLine: TSpeedButton;
procedure FormShow(Sender: TObject);
procedure ShapeSelectClick(Sender: TObject);
procedure spdNewClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure spdOpenFileClick(Sender: TObject);
procedure spdSaveFileClick(Sender: TObject);
procedure btnPrintClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmTools: TfrmTools;
implementation
uses fmMain, NikShape;
{$R *.DFM}
procedure TfrmTools.FormShow(Sender: TObject);
begin
ClientWidth := pnlToolbar.Width;
end;
procedure TfrmTools.ShapeSelectClick(Sender: TObject);
begin
frmMain.ObjType := TNikShapeType((Sender as TSpeedButton).Tag);
end;
procedure TfrmTools.spdNewClick(Sender: TObject);
begin
frmMain.DeleteObjects;
end;
procedure TfrmTools.FormClose(Sender: TObject; var Action: TCloseAction);
begin
frmMain.mniToolbar.checked :=False;
end;
procedure TfrmTools.spdOpenFileClick(Sender: TObject);
begin
frmMain.OpenFile(Sender);
end;
procedure TfrmTools.spdSaveFileClick(Sender: TObject);
begin
frmMain.SaveFile(Sender);
end;
procedure TfrmTools.btnPrintClick(Sender: TObject);
begin
frmMain.btnPrintClick(Sender);
end;
end.