📄 unithang.h
字号:
//---------------------------------------------------------------------------
#ifndef UnitHangH
#define UnitHangH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include "TComm32.h"
//---------------------------------------------------------------------------
class TFormHang : public TForm
{
__published: // IDE-managed Components
TLabel *LabelPrompt;
TTimer *TimerHang;
TImage *Image1;
void __fastcall TimerHangTimer(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TFormHang(TComponent* Owner);
__fastcall ~TFormHang();
int __fastcall Hang(TComm32 *lpModem, int Retries);
void __fastcall DoHangProc(void);
void __fastcall CheckResult(void);
void __fastcall FinalOK(void);
void __fastcall FinalError(void);
protected:
TComm32 *Modem;
int iWhatToDo, iRetryTimes, iTotalRetries, iCloseDelay;
private:
class TMsgStrings
{
public:
enum TMsgType
{
MsgHang = 0, //"挂机"
MsgHanging = 1, //"正在挂机, 请稍候……"
MsgCount = 2, //=count=
};
__fastcall TMsgStrings();
__property AnsiString Msg[TMsgType] = { read = fGetMsg };
private:
AnsiString __fastcall fGetMsg(TMsgType mt);
char **_Msg;
static char *_Msg_Chs[MsgCount];
static char *_Msg_Cht[MsgCount];
static char *_Msg_Enu[MsgCount];
};
};
//---------------------------------------------------------------------------
extern PACKAGE TFormHang *FormHang;
extern int RunDialogHang(TComponent* Owner, TComm32 *lpModem, int Retries=3);
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -