-
Notifications
You must be signed in to change notification settings - Fork 0
/
fSearchBar.cpp
42 lines (39 loc) · 1.24 KB
/
fSearchBar.cpp
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
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "fSearchBar.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSearchBar *SearchBar;
//---------------------------------------------------------------------------
__fastcall TSearchBar::TSearchBar(TComponent* Owner)
: TForm(Owner)
{
success = false;
}
//---------------------------------------------------------------------------
void __fastcall TSearchBar::Button2Click(TObject *Sender)
{
success = true;
forward = true;
cases = CheckBox1->Checked;
text = Edit1->Text;
this->Close();
}
//---------------------------------------------------------------------------
void __fastcall TSearchBar::Button1Click(TObject *Sender)
{
success = true;
forward = false;
cases = CheckBox1->Checked;
text = Edit1->Text;
this->Close();
}
//---------------------------------------------------------------------------
void __fastcall TSearchBar::Edit1KeyPress(TObject *Sender, wchar_t &Key)
{
if(Key == VK_RETURN)
Button2->Click();
}
//---------------------------------------------------------------------------