blob: 0e8475f5747876355411a7f0682d8a2b374034b4 (
plain) (
tree)
|
|
unit searchdlg;
interface
uses
SWKey, Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TSearchForm = class(TForm)
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
ListBox1: TListBox;
Label1: TLabel;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure ListBox1DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
SearchForm: TSearchForm;
implementation
uses LogoMain;
{$R *.DFM}
procedure TSearchForm.Button2Click(Sender: TObject);
begin
Close;
end;
procedure TSearchForm.Button1Click(Sender: TObject);
var
results:TSWKey;
begin
results := SwordAppForm.mrtWebster.Search(PChar(Edit1.Text));
while (results.Error = 0) do
begin
ListBox1.Items.Add(results.text);
results.Inc;
end;
end;
procedure TSearchForm.ListBox1DblClick(Sender: TObject);
begin
SwordAppForm.vkcommonkey.text := ListBox1.items[listbox1.itemindex];
SwordAppForm.lblTextKeyText.Caption := SwordAppForm.vkCommonKey.Text;
SwordAppForm.edTextBox.Display;
SwordAppForm.edCommentBox.Text := SwordAppForm.mrcMHC.Text;
end;
end.
|