//---------------------------------------------------------------------------

#include <vcl.h>
#include "ITSDbF.h"
#include "ITSLangTransF.h"
#pragma hdrstop

#include "FrmResourceF.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxContainer"
#pragma link "cxControls"
#pragma link "cxEdit"
#pragma link "cxGraphics"
#pragma link "cxLabel"
#pragma link "cxLookAndFeelPainters"
#pragma link "cxLookAndFeels"
#pragma link "dxSkinBlack"
#pragma link "dxSkinBlue"
#pragma link "dxSkinsCore"
#pragma link "cxButtons"
#pragma link "dxSkinMcSkin"
#pragma resource "*.dfm"
TFrmLang *FrmLang;
//---------------------------------------------------------------------------
__fastcall TFrmLang::TFrmLang(TComponent* Owner)
    : TForm(Owner)
{
    LangTrans->Translate(this, ITSDb_GetConnection());
    //Show();
}
//---------------------------------------------------------------------------
void TFrmLang::ITSSkin_ButtonClick(TcxButton *ASearch, TcxButton *AEdit, TcxButton *AAdd, TcxButton *ADel, TcxButton *AApply)
{
    if (!AEdit) return;

    if (AEdit->Down)
    {
        // 편집모드 시작
        AEdit->Glyph->Assign(BtnEdit2->Glyph);

#if 0
        if (g_sLang == "KR")
            AEdit->Hint = "데이터 편집 종료/취소";
        else
            AEdit->Hint = "Data editing termination / cancellation";
#else
        AEdit->Hint = lblEditHint1->Caption;
#endif

        if (ASearch) ASearch->Enabled = false;
        if (AAdd)    AAdd->Enabled    = true;
        if (ADel)    ADel->Enabled    = true;
        if (AApply)  AApply->Enabled  = true;
    }
    else
    {
        // 편집모드 종료
        AEdit->Glyph->Assign(BtnEdit1->Glyph);

#if 0
        if (g_sLang == "KR")
            AEdit->Hint = "데이터 편집";
        else
            AEdit->Hint = "Editing Data";
#else
        AEdit->Hint = lblEditHint2->Caption;
#endif

        if (ASearch) ASearch->Enabled = true;
        if (AAdd)    AAdd->Enabled    = false;
        if (ADel)    ADel->Enabled    = false;
        if (AApply)  AApply->Enabled  = false;
    }
}
//---------------------------------------------------------------------------
