|
@@ -4,21 +4,24 @@ interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
|
|
- StdCtrls, ExtCtrls;
|
|
|
+ StdCtrls, ExtCtrls, cxGraphics, cxControls, cxLookAndFeels,
|
|
|
+ cxLookAndFeelPainters, cxContainer, cxEdit, dxSkinsCore,
|
|
|
+ dxSkinOffice2016Colorful, Vcl.Menus, cxButtons, cxCheckBox, cxGroupBox,
|
|
|
+ cxTextEdit, cxMaskEdit, cxDropDownEdit, cxRadioGroup;
|
|
|
|
|
|
type
|
|
|
TfrmSearch = class(TForm)
|
|
|
Label1: TLabel;
|
|
|
- cbSearchText: TComboBox;
|
|
|
- rgSearchDirection: TRadioGroup;
|
|
|
- gbSearchOptions: TGroupBox;
|
|
|
- cbSearchCaseSensitive: TCheckBox;
|
|
|
- cbSearchWholeWords: TCheckBox;
|
|
|
- cbSearchFromCursor: TCheckBox;
|
|
|
- cbSearchSelectedOnly: TCheckBox;
|
|
|
- btnOK: TButton;
|
|
|
- btnCancel: TButton;
|
|
|
- cbRegularExpression: TCheckBox;
|
|
|
+ cbSearchText: TcxComboBox;
|
|
|
+ gbSearchOptions: TcxGroupBox;
|
|
|
+ cbSearchCaseSensitive: TcxCheckBox;
|
|
|
+ cbSearchWholeWords: TcxCheckBox;
|
|
|
+ cbSearchFromCursor: TcxCheckBox;
|
|
|
+ cbSearchSelectedOnly: TcxCheckBox;
|
|
|
+ cbRegularExpression: TcxCheckBox;
|
|
|
+ btnOK: TcxButton;
|
|
|
+ btnCancel: TcxButton;
|
|
|
+ rgSearchDirection: TcxRadioGroup;
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
@@ -102,12 +105,13 @@ var
|
|
|
i: integer;
|
|
|
begin
|
|
|
Result := '';
|
|
|
- for i := 0 to cbSearchText.Items.Count - 1 do begin
|
|
|
+ for i := 0 to cbSearchText.Properties.Items.Count - 1 do
|
|
|
+ begin
|
|
|
if i >= 10 then
|
|
|
break;
|
|
|
if i > 0 then
|
|
|
Result := Result + #13#10;
|
|
|
- Result := Result + cbSearchText.Items[i];
|
|
|
+ Result := Result + cbSearchText.Properties.Items[i];
|
|
|
end;
|
|
|
end;
|
|
|
|
|
@@ -143,7 +147,7 @@ end;
|
|
|
|
|
|
procedure TfrmSearch.SetSearchTextHistory(Value: string);
|
|
|
begin
|
|
|
- cbSearchText.Items.Text := Value;
|
|
|
+ cbSearchText.Properties.Items.Text := Value;
|
|
|
end;
|
|
|
|
|
|
procedure TfrmSearch.SetSearchWholeWords(Value: boolean);
|
|
@@ -171,16 +175,19 @@ var
|
|
|
s: string;
|
|
|
i: integer;
|
|
|
begin
|
|
|
- if ModalResult = mrOK then begin
|
|
|
+ if ModalResult = mrOK then
|
|
|
+ begin
|
|
|
s := cbSearchText.Text;
|
|
|
- if s <> '' then begin
|
|
|
- i := cbSearchText.Items.IndexOf(s);
|
|
|
- if i > -1 then begin
|
|
|
- cbSearchText.Items.Delete(i);
|
|
|
- cbSearchText.Items.Insert(0, s);
|
|
|
+ if s <> '' then
|
|
|
+ begin
|
|
|
+ i := cbSearchText.Properties.Items.IndexOf(s);
|
|
|
+ if i > -1 then
|
|
|
+ begin
|
|
|
+ cbSearchText.Properties.Items.Delete(i);
|
|
|
+ cbSearchText.Properties.Items.Insert(0, s);
|
|
|
cbSearchText.Text := s;
|
|
|
end else
|
|
|
- cbSearchText.Items.Insert(0, s);
|
|
|
+ cbSearchText.Properties.Items.Insert(0, s);
|
|
|
end;
|
|
|
end;
|
|
|
end;
|