forked from efecanicoz/lad_configurator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unit4.cpp
44 lines (42 loc) · 1.23 KB
/
Unit4.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
43
44
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit4.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TPassInp *PassInp;
//---------------------------------------------------------------------------
__fastcall TPassInp::TPassInp(TComponent* Owner)
: TForm(Owner)
{
Result=false;
Password="";
pass->Text="";
}
//---------------------------------------------------------------------------
void __fastcall TPassInp::Button2Click(TObject *Sender)
{
Password="";
pass->Text="";
Close();
}
//---------------------------------------------------------------------------
void __fastcall TPassInp::Button1Click(TObject *Sender)
{
Password=pass->Text;
pass->Text="";
Result=true;
Close();
}
//---------------------------------------------------------------------------
void __fastcall TPassInp::passKeyPress(TObject *Sender, System::WideChar &Key)
{
if(Key==13) Button1->Click();
}
//---------------------------------------------------------------------------
void __fastcall TPassInp::FormShow(TObject *Sender)
{
pass->SetFocus();
}
//---------------------------------------------------------------------------