📄 fwatchproperties.pas
字号:
unit fWatchProperties;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, atScript;
type
TfmWatchProperties = class(TForm)
Label1: TLabel;
edExpression: TEdit;
chEnabled: TCheckBox;
btOk: TBitBtn;
btCancel: TBitBtn;
procedure btOkClick(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
FDebugWatches : TatDebugWatches;
FDebugWatch : TatDebugWatch;
procedure SetDebugWatch(const Value: TatDebugWatch);
public
{ Public declarations }
property DebugWatch: TatDebugWatch read FDebugWatch write SetDebugWatch;
property DebugWatches: TatDebugWatches read FDebugWatches write FDebugWatches;
end;
var
fmWatchProperties: TfmWatchProperties;
implementation
{$R *.DFM}
{ TfmWatchProperties }
procedure TfmWatchProperties.SetDebugWatch(const Value: TatDebugWatch);
begin
FDebugWatch := Value;
if not Assigned(FDebugWatch) then
begin
{ clear watch properties on the form }
edExpression.Text := '';
chEnabled.Checked := True;
end
else
begin
edExpression.Text := FDebugWatch.Expression;
chEnabled.Checked := FDebugWatch.Enabled;
end;
end;
procedure TfmWatchProperties.btOkClick(Sender: TObject);
begin
if not Assigned(FDebugWatch) then
FDebugWatch := FDebugWatches.Add;
{ save properties into debug watch item }
with FDebugWatch do
begin
Expression := edExpression.Text;
Enabled := chEnabled.Checked;
end;
FDebugWatches.Evaluate(FDebugWatch);
end;
procedure TfmWatchProperties.FormShow(Sender: TObject);
begin
edExpression.SetFocus;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -