/
frmBreakpointConditionUnit.pas
executable file
·96 lines (70 loc) · 1.91 KB
/
frmBreakpointConditionUnit.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
unit frmBreakpointConditionUnit;
{$mode delphi}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ComCtrls, betterControls;
type
{ TfrmBreakpointCondition }
TfrmBreakpointCondition = class(TForm)
Button1: TButton;
Button2: TButton;
edtEasy: TEdit;
Label1: TLabel;
Label2: TLabel;
mComplex: TMemo;
PageControl1: TPageControl;
rbEasy: TRadioButton;
rbComplex: TRadioButton;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure rbEasyChange(Sender: TObject);
private
{ private declarations }
loadedFormPosition: boolean;
public
{ public declarations }
end;
implementation
uses CEFuncProc, math;
{ TfrmBreakpointCondition }
procedure TfrmBreakpointCondition.FormCreate(Sender: TObject);
var i: integer;
begin
for i:=0 to pagecontrol1.PageCount-1 do
pagecontrol1.Pages[i].TabVisible:=false;
loadedFormPosition:=LoadFormPosition(self);
end;
procedure TfrmBreakpointCondition.FormDestroy(Sender: TObject);
begin
SaveFormPosition(self);
end;
procedure TfrmBreakpointCondition.FormShow(Sender: TObject);
var
minh: integer;
minw: integer;
begin
if loadedFormPosition=false then
begin
autosize:=false;
minh:=canvas.TextHeight(label1.Caption)*15;
minw:=canvas.TextWidth(label1.Caption+' ');
if clientwidth<minw then
clientwidth:=minw;
if clientheight<minh then
clientheight:=minh;
end;
end;
procedure TfrmBreakpointCondition.rbEasyChange(Sender: TObject);
begin
if rbEasy.checked then
pagecontrol1.ActivePageIndex:=0
else
pagecontrol1.ActivePageIndex:=1;
end;
initialization
{$I frmBreakpointConditionUnit.lrs}
end.