📄 helpcontext.pas
字号:
unit HelpContext;
interface
uses Windows, Classes, SysUtils;
const
NO_CONTEXTS = 2;
hcAddResourceDialog = 1000;
hcNewImageDialog = 1001;
function HelpLink (context : THelpContext) : string;
implementation
type
THelpLink = record
context : THelpContext;
jump : string;
end;
const
HelpLinks : array [0..NO_CONTEXTS - 1] of THelpLink = (
(context:hcAddResourceDialog; jump:'AddResourceDialog.htm'),
(context:hcNewImageDialog; jump:'NewImage.htm')
);
function HelpLink (context : THelpContext) : string;
function bsearch (s, e : Integer) : string;
var
m : Integer;
begin
if e >= s then
begin
m := s + (e - s) div 2;
if context > HelpLinks [m].context then
result := bsearch (m + 1, e)
else
if context < HelpLinks [m].context then
result := bsearch (s, m - 1)
else
result := HelpLinks [m].jump
end
else
result := 'notfound.htm';
end;
begin
result := bsearch (0, NO_CONTEXTS - 1)
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -