-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfindForm.pas
77 lines (66 loc) · 1.82 KB
/
findForm.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
unit findForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfrmFind = class(TForm)
Label1: TLabel;
cbFindText: TComboBox;
GroupBox1: TGroupBox;
cbMatchCase: TCheckBox;
cbWholeWord: TCheckBox;
btnFind: TButton;
btnCancel: TButton;
GroupBox2: TGroupBox;
rbForward: TRadioButton;
rbBackward: TRadioButton;
GroupBox3: TGroupBox;
rbGlobal: TRadioButton;
rbSelectedOnly: TRadioButton;
GroupBox4: TGroupBox;
rbFromCursor: TRadioButton;
rbEntireScope: TRadioButton;
procedure btnFindClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
FNextStep: Integer;
public
{ Public declarations }
end;
var
frmFind: TfrmFind;
const
SectionName = 'frmFind';
implementation
{$R *.dfm}
uses inifiles, UnConstants, UnUDBFunctions;
procedure TfrmFind.btnFindClick(Sender: TObject);
begin
cbFindText.Items.Add( cbFindText.Text );
end;
procedure TfrmFind.FormCreate(Sender: TObject);
var IniFile: TIniFile;
TempStr: string;
begin
IniFile:=TIniFile.Create('UnCalckLang.lan');
try
self.Font.Name:=UnConstants.DefaultFontName;
self.Font.Charset:=UnConstants.DefaultCharSet;
//TempStr:=DeconvertString(IniFile.ReadString(Self.Name, Self.Name, ''));
TempStr:=DeconvertString(IniFile.ReadString(SectionName, SectionName, ''));
if TempStr = '' then
begin
if Self.Caption <> '' then
IniFile.WriteString(SectionName, SectionName, ConvertString(Self.Caption));
//IniFile.WriteString(Self.Name, Self.Name, ConvertString(Self.Caption));
end
else
Self.Caption:=TempStr;
FNextStep:=1;
// CheckLanguige(FNextStep, IniFile, Self, SectionName);
finally
IniFile.Free;
end;
end;
end.