📄 roomstatus.~h
字号:
//---------------------------------------------------------------------------
#ifndef RoomStatusH
#define RoomStatusH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <DB.hpp>
#include <DBTables.hpp>
#include <ExtCtrls.hpp>
#include <ImgList.hpp>
#include <Graphics.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
class TfmRoomStatus : public TForm
{
__published: // IDE-managed Components
TGroupBox *GroupBox1;
TGroupBox *GroupBox2;
TButton *btUpdateStatus;
TButton *btSetStatus;
TLabel *Label1;
TGroupBox *GroupBox3;
TImage *imEmpty;
TRadioButton *rbEmpty;
TRadioButton *rbNoEmpty;
TRadioButton *rbSelf;
TRadioButton *rbMaintain;
TRadioButton *rbArrive;
TRadioButton *rbLeave;
TImage *imNoEmpty;
TImage *imSelf;
TImage *imMaintain;
TImage *imArrive;
TImage *imLeave;
TStringGrid *StringGrid1;
void __fastcall btUpdateStatusClick(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall StringGrid1DrawCell(TObject *Sender, int ACol,
int ARow, TRect &Rect, TGridDrawState State);
void __fastcall StringGrid1SelectCell(TObject *Sender, int ACol,
int ARow, bool &CanSelect);
void __fastcall btSetStatusClick(TObject *Sender);
void __fastcall StringGrid1DblClick(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
private: // User declarations
// 保存StringGrid各个Cell对应的客房编号,供文字输出时使用
AnsiString szCellCode[100][100];
// 当前选择的行和列,对应选择的客房
int m_nCurCol;
int m_nCurRow;
public: // User declarations
__fastcall TfmRoomStatus(TComponent* Owner);
// 窗体状态,0为选择客房,不可编辑房态,1为可以进行维护
int m_SelectRoom;
// 设置窗体状态的函数
void SetSelect(int nSel)
{
m_SelectRoom = nSel;
if(m_SelectRoom == 0) // 选择客房,不可编辑
btSetStatus->Enabled = false;
};
// 选择的客房编号
AnsiString m_RoomCode;
// 初始化客房的类型,只显示相应的类型
AnsiString m_RoomType;
};
//---------------------------------------------------------------------------
extern PACKAGE TfmRoomStatus *fmRoomStatus;
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -