telezoneinfo.cpp

来自「一套BCB6开发的电话管理系统」· C++ 代码 · 共 46 行

CPP
46
字号
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "TeleZoneInfo.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TDlgTeleZoneInfo *DlgTeleZoneInfo;
//---------------------------------------------------------------------------
__fastcall TDlgTeleZoneInfo::TDlgTeleZoneInfo( bool bNew, TeleZone& tz,
        TIniFile *pMessageIniFile, TComponent* Owner)
        : bNew( bNew), tz( tz), pMsgIniFile( pMessageIniFile), TForm(Owner)
{
    int typeIndex;
    if( TryStrToInt( tz.GetType(), typeIndex )) {
        CBType->ItemIndex = typeIndex;
    }
    ETCode->Text = tz.GetCode();
    ETZone->Text = tz.GetZone();
    ETLocation->Text = tz.GetLocation();
    ETPrice->Text = tz.GetPriceStr();
    ETUnit->Text = tz.GetUnitStr();

    if( bNew) {
        ETCode->ReadOnly = false;
        CBType->Enabled = true;
    }
}
//---------------------------------------------------------------------------
void __fastcall TDlgTeleZoneInfo::FormClose(TObject *Sender,
      TCloseAction &Action)
{
    Action = caFree;
    DlgTeleZoneInfo = NULL;
}
//---------------------------------------------------------------------------


void __fastcall TDlgTeleZoneInfo::OKBtnClick(TObject *Sender)
{
    if( ETCode->Text.data() == 0) {
        String Default;
        String Title = pMsgIniFile->ReadString( "TelWarning", "Msg1", Default);
        String Message = pMsgIniFile->ReadString( "TelWarning", "Msg5", Default);//筿杠跋腹ぃ

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?