forked from Frieve-A/Frieve-Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfoedittext.cpp
More file actions
45 lines (37 loc) · 1.29 KB
/
Copy pathfoedittext.cpp
File metadata and controls
45 lines (37 loc) · 1.29 KB
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 "foedittext.h"
#include "setting.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFo_EditText *Fo_EditText;
//---------------------------------------------------------------------------
void TFo_EditText::ApplyLanguageSetting()
{
if (!FileExists(LanguageFileName())){
return;
}
TFastIni *Ini = new TFastIni(LanguageFileName());
Bu_OK->Caption = Ini->ReadString("Dialog", "Bu_OK", Bu_OK->Caption);
Bu_Cancel->Caption = Ini->ReadString("Dialog", "Bu_Cancel", Bu_Cancel->Caption);
delete Ini;
}
//---------------------------------------------------------------------
__fastcall TFo_EditText::TFo_EditText(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFo_EditText::Bu_CancelClick(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TFo_EditText::FormShow(TObject *Sender)
{
ApplyLanguageSetting();
Ed_Text->SelectAll();
}
//---------------------------------------------------------------------------