⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sjbm.cpp

📁 电话银行菜单编辑器
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "SJBM.h"
#include "SelectJB.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSJBMForm *SJBMForm;
//---------------------------------------------------------------------------
__fastcall TSJBMForm::TSJBMForm(TComponent* Owner)
    : TForm(Owner)
{

}
//---------------------------------------------------------------------------
void __fastcall TSJBMForm::Edit1KeyPress(TObject *Sender, char &Key)
{
    if (Key == '\r')
    {
        Key = 0;
       SelectNext(ActiveControl, true, true);
       Edit2->SetFocus();
    }
    else if(!(isdigit(Key)||iscntrl(Key)))
     {
        Application->MessageBox("您的输入错误,请输入0-9之间的数!", "错误",MB_OK |MB_ICONERROR);
        Edit1->SetFocus();
     }
}
//---------------------------------------------------------------------------
void __fastcall TSJBMForm::BitBtn1Click(TObject *Sender)
{
    if(Edit1->Text=="" )
    {
        Application->MessageBox("您没有输入JB结构编码,请重新输入!", "提示", MB_OK | MB_ICONQUESTION);
        Edit1->SetFocus();
    }
    else   if(Edit2->Text=="" )
    {
        Application->MessageBox("您没有输入JB结构编码的名称,请重新输入!", "提示", MB_OK | MB_ICONQUESTION);
        Edit2->SetFocus();
    }
    else
    {
    IsAdd = true;
    Close();
    }
}
//---------------------------------------------------------------------------
void __fastcall TSJBMForm::Edit2KeyPress(TObject *Sender, char &Key)
{
    if (Key == '\r')
    {
        Key = 0;
       SelectNext(ActiveControl, true, true);
       BitBtn1->SetFocus();
    }
}
//---------------------------------------------------------------------------

void __fastcall TSJBMForm::FormShow(TObject *Sender)
{
    IsAdd = false;
    Edit1->SetFocus();
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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