📄 appinsp.pas
字号:
function TApplicationInterface.GetTitle: string;
begin
Result:=Application.Title;
end;
procedure TApplicationInterface.SetTitle(const Value: string);
begin
Application.Title:=Value;
end;
function TApplicationInterface.GetUpdateFormatSettings: Boolean;
begin
Result:=Application.UpdateFormatSettings;
end;
procedure TApplicationInterface.SetUpdateFormatSettings(
const Value: Boolean);
begin
Application.UpdateFormatSettings:=Value;
end;
function TApplicationInterface.GetUpdateMetricSettings: Boolean;
begin
Result:=Application.UpdateMetricSettings;
end;
procedure TApplicationInterface.SetUpdateMetricSettings(
const Value: Boolean);
begin
Application.UpdateMetricSettings:=Value;
end;
function TApplicationInterface.GetOnActivate: TNotifyEvent;
begin
Result:=Application.OnActivate;
end;
procedure TApplicationInterface.SetOnActivate(const Value: TNotifyEvent);
begin
Application.OnActivate:=Value;
end;
function TApplicationInterface.GetOnDeactivate: TNotifyEvent;
begin
Result:=Application.OnActivate;
end;
procedure TApplicationInterface.SetOnDeactivate(const Value: TNotifyEvent);
begin
Application.OnActivate:=Value;
end;
function TApplicationInterface.GetOnException: TExceptionEvent;
begin
Result:=Application.OnException;
end;
procedure TApplicationInterface.SetOnException(
const Value: TExceptionEvent);
begin
Application.OnException:=Value;
end;
function TApplicationInterface.GetOnHelp: THelpEvent;
begin
Result:=Application.OnHelp;
end;
procedure TApplicationInterface.SetOnHelp(const Value: THelpEvent);
begin
Application.OnHelp:=Value;
end;
function TApplicationInterface.GetOnHint: TNotifyEvent;
begin
Result:=Application.OnHint;
end;
procedure TApplicationInterface.SetOnHint(const Value: TNotifyEvent);
begin
Application.OnHint:=Value;
end;
function TApplicationInterface.GetOnIdle: TIdleEvent;
begin
Result:=Application.OnIdle;
end;
procedure TApplicationInterface.SetOnIdle(const Value: TIdleEvent);
begin
Application.OnIdle:=Value;
end;
function TApplicationInterface.GetOnMessage: TMessageEvent;
begin
Result:=Application.OnMessage;
end;
procedure TApplicationInterface.SetOnMessage(const Value: TMessageEvent);
begin
Application.OnMessage:=Value;
end;
function TApplicationInterface.GetOnMinimize: TNotifyEvent;
begin
Result:=Application.OnMinimize;
end;
procedure TApplicationInterface.SetOnMinimize(const Value: TNotifyEvent);
begin
Application.OnMinimize:=Value;
end;
function TApplicationInterface.GetOnRestore: TNotifyEvent;
begin
Result:=Application.OnRestore;
end;
procedure TApplicationInterface.SetOnRestore(const Value: TNotifyEvent);
begin
Application.OnRestore:=Value;
end;
function TApplicationInterface.GetOnShowHint: TShowHintEvent;
begin
Result:=Application.OnShowHint;
end;
procedure TApplicationInterface.SetOnShowHint(const Value: TShowHintEvent);
begin
Application.OnShowHint:=Value;
end;
{$IFDEF VERSION4}
function TApplicationInterface.GetBiDiMode: TBiDiMode;
begin
Result:=Application.BiDiMode;
end;
procedure TApplicationInterface.SetBiDiMode(const Value: TBiDiMode);
begin
Application.BiDiMode:=Value;
end;
function TApplicationInterface.GetHintShortCuts: Boolean;
begin
Result:=Application.HintShortCuts;
end;
procedure TApplicationInterface.SetHintShortCuts(const Value: Boolean);
begin
Application.HintShortCuts:=Value;
end;
function TApplicationInterface.GetOnActionExecute: TActionEvent;
begin
Result:=Application.OnActionExecute;
end;
procedure TApplicationInterface.SetOnActionExecute(
const Value: TActionEvent);
begin
Application.OnActionExecute:=Value;
end;
function TApplicationInterface.GetOnActionUpdate: TActionEvent;
begin
Result:=Application.OnActionUpdate;
end;
procedure TApplicationInterface.SetOnActionUpdate(const Value: TActionEvent);
begin
Application.OnActionUpdate:=Value;
end;
function TApplicationInterface.GetOnShortCut: TShortCutEvent;
begin
Result:=Application.OnShortCut;
end;
procedure TApplicationInterface.SetOnShortCut(const Value: TShortCutEvent);
begin
Application.OnShortCut:=Value;
end;
{$ENDIF}
{$IFDEF VERSION5}
function TApplicationInterface.GetBiDiKeyboard: string;
begin
Result:=Application.BiDiKeyboard;
end;
procedure TApplicationInterface.SetBiDiKeyboard(const Value: string);
begin
Application.BiDiKeyboard:=Value;
end;
function TApplicationInterface.GetNonBiDiKeyboard: string;
begin
Result:=Application.NonBiDiKeyboard;
end;
procedure TApplicationInterface.SetNonBiDiKeyboard(const Value: string);
begin
Application.NonBiDiKeyboard:=Value;
end;
{$ENDIF}
{$IFDEF VERSION6}
function TApplicationInterface.GetAutoDragDocking: Boolean;
begin
Result:=Application.AutoDragDocking;
end;
procedure TApplicationInterface.SetAutoDragDocking(const Value: Boolean);
begin
Application.AutoDragDocking:=Value;
end;
function TApplicationInterface.GetOnSettingChange: TSettingChangeEvent;
begin
Result:=Application.OnSettingChange;
end;
procedure TApplicationInterface.SetOnSettingChange(const Value: TSettingChangeEvent);
begin
Application.OnSettingChange:=Value;
end;
{$ENDIF}
{$IFDEF VERSION7}
function TApplicationInterface.GetOnModalBegin: TNotifyEvent;
begin
Result:=Application.OnModalBegin;
end;
procedure TApplicationInterface.SetOnModalBegin(const Value: TNotifyEvent);
begin
Application.OnModalBegin:=Value;
end;
function TApplicationInterface.GetOnModalEnd: TNotifyEvent;
begin
Result:=Application.OnModalEnd;
end;
procedure TApplicationInterface.SetOnModalEnd(const Value: TNotifyEvent);
begin
Application.OnModalEnd:=Value;
end;
{$ENDIF}
function TCustomApplicationInspector.GetButtonType(TheIndex: Integer): TButtonType;
var
P: TProperty;
begin
P:=Properties[TheIndex];
if Assigned(P) and (P.Name='HelpFile') then Result:=btDialog
else Result:=inherited GetButtonType(TheIndex);
end;
function TCustomApplicationInspector.GetEnableExternalEditor(TheIndex: Integer): Boolean;
var
P: TProperty;
begin
P:=Properties[TheIndex];
Result:=inherited GetEnableExternalEditor(TheIndex) or Assigned(P) and (P.Name='HelpFile');
end;
function TCustomApplicationInspector.CallEditor(TheIndex: Integer): Boolean;
var
P: TProperty;
begin
P:=Properties[TheIndex];
if Assigned(P) and (P.Name='HelpFile') then
with TOpenDialog.Create(nil) do
try
FileName:=Properties[TheIndex].AsString;
DefaultExt:='hlp';
Filter:='Help Files (*.hlp)|*.hlp';
Result:=Execute;
if Result then Properties[TheIndex].AsString:=FileName;
finally
Free;
end
else Result:=inherited CallEditor(TheIndex);
end;
procedure TCustomApplicationInspector.CreateWnd;
begin
inherited;
FApplicationInterface:=TApplicationInterface.Create(Self);
Instance:=FApplicationInterface;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -