-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsethost.cpp
55 lines (47 loc) · 1.69 KB
/
sethost.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
45
46
47
48
49
50
51
52
53
54
55
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "..\work-functions\MyFunc.h"
#include "main.h"
#include "sethost.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSetHostAppForm *SetHostAppForm;
extern TELIExtIDEForm *ELIExtIDEForm;
extern String HostApplication;
extern TStringList *HostApplicationList;
//---------------------------------------------------------------------------
__fastcall TSetHostAppForm::TSetHostAppForm(TComponent* Owner)
: TForm(Owner)
{
Left = ELIExtIDEForm->ClientWidth / 2 - ClientWidth / 2;
Top = ELIExtIDEForm->ClientHeight / 2 - ClientHeight / 2;
HostAppList->Items->Clear();
HostAppList->Items->AddStrings(HostApplicationList);
HostAppList->ItemIndex = 0;
}
//---------------------------------------------------------------------------
void __fastcall TSetHostAppForm::ApplyClick(TObject *Sender)
{
HostApplication = HostAppList->Text;
HostApplicationList->Clear();
HostApplicationList->AddStrings(HostAppList->Items);
Close();
}
//---------------------------------------------------------------------------
void __fastcall TSetHostAppForm::CancelClick(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TSetHostAppForm::SetHostAppClick(TObject *Sender)
{
OpenHostApp->FileName = "";
if (OpenHostApp->Execute())
{
HostAppList->Items->Add(OpenHostApp->FileName);
HostAppList->ItemIndex = HostAppList->Items->IndexOf(OpenHostApp->FileName);
}
}
//---------------------------------------------------------------------------