//--------------------------------------------------------------------------- #include #pragma hdrstop #include "Exception.h" #include "AddFileName_F.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TAddFileNameForm *AddFileNameForm; //--------------------------------------------------------------------------- __fastcall TAddFileNameForm::TAddFileNameForm(TComponent* Owner) : TForm(Owner) { Label1->Caption = IDS_MESSAGE_INPUTFILE; } //--------------------------------------------------------------------------- void __fastcall TAddFileNameForm::InitForm(Char *name) { fileName = name; } //--------------------------------------------------------------------------- void __fastcall TAddFileNameForm::SpeedButton1Click(TObject *Sender) { fileName = Edit1->Text; Close(); } //--------------------------------------------------------------------------- void __fastcall TAddFileNameForm::SpeedButton2Click(TObject *Sender) { fileName = ""; Close(); } //--------------------------------------------------------------------------- void __fastcall TAddFileNameForm::Edit1KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if (Key == VK_RETURN && Edit1->Text.Length()) { fileName = Edit1->Text; Close(); } } //---------------------------------------------------------------------------