📄 axydm.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "AXYDM.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TAXYDMForm *AXYDMForm;
//---------------------------------------------------------------------------
__fastcall TAXYDMForm::TAXYDMForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TAXYDMForm::Edit1KeyPress(TObject *Sender, char &Key)
{
if (Key == '\r')
{
Key = 0;
SelectNext(ActiveControl, true, true);
Edit2->SetFocus();
}
}
//---------------------------------------------------------------------------
void __fastcall TAXYDMForm::Edit2KeyPress(TObject *Sender, char &Key)
{
if (Key == '\r')
{
Key = 0;
SelectNext(ActiveControl, true, true);
Edit3->SetFocus();
}
}
//---------------------------------------------------------------------------
void __fastcall TAXYDMForm::Edit3KeyPress(TObject *Sender, char &Key)
{
if (Key == '\r')
{
Key = 0;
SelectNext(ActiveControl, true, true);
BitBtn1->SetFocus();
}
}
//---------------------------------------------------------------------------
void __fastcall TAXYDMForm::SpeedButton1Click(TObject *Sender)
{
AXYDMForm->OpenDialog1->Filter = "Wave files (*.vox)|*.VOX";
AXYDMForm->OpenDialog1->Execute();
TAXYDMForm::Edit3->Text=ChangeFileExt(ExtractFileName(AXYDMForm->OpenDialog1->FileName),"");
}
//---------------------------------------------------------------------------
void __fastcall TAXYDMForm::FormShow(TObject *Sender)
{
IsAdd = false;
Edit1->SetFocus();
}
//---------------------------------------------------------------------------
void __fastcall TAXYDMForm::BitBtn1Click(TObject *Sender)
{
if(Edit1->Text=="" )
{
Application->MessageBox("您没有输入响应代码,请重新输入!", "提示", MB_OK | MB_ICONQUESTION);
Edit1->SetFocus();
}
else if(Edit2->Text=="" )
{
Application->MessageBox("您没有输入代码说明,请重新输入!", "提示", MB_OK | MB_ICONQUESTION);
Edit2->SetFocus();
}
else if(Edit3->Text=="" )
{
Application->MessageBox("您没有输入语音文件名称,请重新输入!", "提示", MB_OK | MB_ICONQUESTION);
Edit3->SetFocus();
}
else
{
IsAdd = true;
Close();
}
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -