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

#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 "dxSkinCaramel"
#pragma link "dxSkinCoffee"
#pragma link "dxSkinDarkRoom"
#pragma link "dxSkinDarkSide"
#pragma link "dxSkinFoggy"
#pragma link "dxSkinGlassOceans"
#pragma link "dxSkiniMaginary"
#pragma link "dxSkinLilian"
#pragma link "dxSkinLiquidSky"
#pragma link "dxSkinLondonLiquidSky"
#pragma link "dxSkinMcSkin"
#pragma link "dxSkinMoneyTwins"
#pragma link "dxSkinOffice2007Black"
#pragma link "dxSkinOffice2007Blue"
#pragma link "dxSkinOffice2007Green"
#pragma link "dxSkinOffice2007Pink"
#pragma link "dxSkinOffice2007Silver"
#pragma link "dxSkinOffice2010Black"
#pragma link "dxSkinOffice2010Blue"
#pragma link "dxSkinOffice2010Silver"
#pragma link "dxSkinSeven"
#pragma link "dxSkinSharp"
#pragma link "dxSkinSilver"
#pragma link "dxSkinStardust"
#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);
        AEdit->Hint = lblEditHint1->Caption;//"데이터 편집 종료/취소";

        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);
        AEdit->Hint = lblEditHint2->Caption;//"데이터 편집";

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