📄 hint.pas
字号:
unit hint;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls,util, Buttons,filectrl;
type
TForm1Hint = class(TForm)
Memo1: TMemo;
CheckBox1: TCheckBox;
BitBtn1: TBitBtn;
procedure FormShow(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
HintList : array of boolean;
public
{ Public declarations }
HintNumber : integer;
HintTextPath : String;
function HintShown(HintID : integer) : boolean;
end;
var
Form1Hint: TForm1Hint;
implementation
{$R *.DFM}
procedure TForm1Hint.FormShow(Sender: TObject);
begin
if (Length(hintlist)<HintNumber) then
setlength(hintlist,hintnumber);
hintlist[hintnumber-1] := True;
Left := Mouse.CursorPos.x;
Top := Mouse.CursorPos.y;
Memo1.Lines.Clear;
memo1.Text := GetFileLine(HintTextPATH,HintNumber);
end;
procedure TForm1Hint.CheckBox1Click(Sender: TObject);
begin
SavePrmBool(HintNumber,ISOHINT,not checkbox1.checked);
end;
procedure TForm1Hint.BitBtn1Click(Sender: TObject);
begin
SavePrmBool(HintNumber,ISOHINT,not checkbox1.checked);
hide;
end;
function TForm1Hint.HintShown(HintID: integer): boolean;
begin
if (length(hintlist))<HintID then result := false
else
result := hintlist[HintID-1];
if (not result) then
begin
result := LoadPrmBool(HintID,ISOHINT,result);
end;
end;
procedure TForm1Hint.FormCreate(Sender: TObject);
begin
HintTextPath := ExeDirectory + '\hint.txt';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -