Develop and Download Open Source Software

Browse Subversion Repository

Contents of /CopalPro/OpenDir.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Thu Jul 28 09:05:52 2011 UTC (12 years, 9 months ago) by kaityo
File MIME type: text/x-c++src
File size: 1131 byte(s)
First Commit
1 //---------------------------------------------------------------------------
2 #include <vcl.h>
3 #pragma hdrstop
4
5 #include "OpenDir.h"
6 //---------------------------------------------------------------------------
7 #pragma package(smart_init)
8 #pragma resource "*.dfm"
9 TFOpenDir *FOpenDir;
10 //---------------------------------------------------------------------------
11 __fastcall TFOpenDir::TFOpenDir(TComponent* Owner)
12 : TForm(Owner) {}
13 //---------------------------------------------------------------------------
14 bool TFOpenDir::Execute(void) {
15 AnsiString DirOld = GetCurrentDir();
16 DirectoryListBox->Directory = DirOld;
17
18 int mr = ShowModal();
19 Dir = DirectoryListBox->Directory;
20
21 if(mr == mrOk) {
22 return true;
23 } else {
24 SetCurrentDir(DirOld);
25 return false;
26 }
27 }
28 //---------------------------------------------------------------------------
29
30 void __fastcall TFOpenDir::FormKeyPress(TObject *Sender, char &Key) {
31 switch(Key) {
32 case VK_ESCAPE:
33 ModalResult = mrCancel;
34 break;
35 }
36 }
37 //---------------------------------------------------------------------------
38

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26