📄 enguardroleunit.h
字号:
//---------------------------------------------------------------------------
#ifndef EnguardRoleUnitH
#define EnguardRoleUnitH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "BaseInputUnit.h"
#include <Buttons.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include "EnguardCommon.h"
#include <CheckLst.hpp>
#include "DBAccessUnit.h"
#include <Graphics.hpp>
//---------------------------------------------------------------------------
class TEnguardRoleFrm : public TBaseDataInputFrm
{
__published: // IDE-managed Components
TRadioGroup *rgRoleType;
TPageControl *pcRole;
TTabSheet *TabSheet1;
TTabSheet *tsPeriod1;
TTabSheet *tsPeriod2;
TTabSheet *tsWeekend;
TTabSheet *tsHolidays;
TPanel *Panel2;
TPageControl *pcHalfYear1;
TTabSheet *tsMonth_1;
TTabSheet *tsMonth_2;
TTabSheet *tsMonth_3;
TTabSheet *tsMonth_4;
TLabel *Label1;
TTabSheet *tsMonth_5;
TTabSheet *tsMonth_6;
TPageControl *pcHalfYear2;
TTabSheet *tsMonth_7;
TTabSheet *tsMonth_8;
TTabSheet *tsMonth_9;
TTabSheet *tsMonth_10;
TTabSheet *tsMonth_11;
TTabSheet *tsMonth_12;
TPanel *plMonth2;
TPanel *Panel7;
TSpeedButton *spbnDay_52;
TSpeedButton *spbnDay_53;
TSpeedButton *spbnDay_54;
TSpeedButton *spbnDay_55;
TSpeedButton *spbnDay_56;
TSpeedButton *spbnDay_57;
TSpeedButton *spbnDay_58;
TSpeedButton *spbnDay_59;
TSpeedButton *spbnDay_60;
TSpeedButton *spbnDay_61;
TPanel *Panel8;
TSpeedButton *spbnDay_42;
TSpeedButton *spbnDay_43;
TSpeedButton *spbnDay_44;
TSpeedButton *spbnDay_45;
TSpeedButton *spbnDay_46;
TSpeedButton *spbnDay_47;
TSpeedButton *spbnDay_48;
TSpeedButton *spbnDay_49;
TSpeedButton *spbnDay_50;
TSpeedButton *spbnDay_51;
TPanel *Panel9;
TSpeedButton *spbnDay_32;
TSpeedButton *spbnDay_33;
TSpeedButton *spbnDay_34;
TSpeedButton *spbnDay_35;
TSpeedButton *spbnDay_36;
TSpeedButton *spbnDay_37;
TSpeedButton *spbnDay_38;
TSpeedButton *spbnDay_39;
TSpeedButton *spbnDay_40;
TSpeedButton *spbnDay_41;
TSpeedButton *spbnDay_62;
TStaticText *StaticText1;
TStaticText *StaticText2;
TDateTimePicker *dtpStartTime1;
TLabel *Label2;
TBevel *Bevel1;
TLabel *Label3;
TDateTimePicker *dtpEndTime1;
TBevel *Bevel2;
TLabel *Label4;
TDateTimePicker *dtpStartTime2;
TLabel *Label5;
TDateTimePicker *dtpEndTime2;
TStaticText *StaticText3;
TStaticText *StaticText4;
TBevel *Bevel3;
TCheckListBox *clbWeek;
TBitBtn *bbtnNewYear;
TImage *Image1;
TPanel *plMonth1;
TPanel *Panel3;
TSpeedButton *spbnDay_21;
TSpeedButton *spbnDay_22;
TSpeedButton *spbnDay_23;
TSpeedButton *spbnDay_24;
TSpeedButton *spbnDay_25;
TSpeedButton *spbnDay_26;
TSpeedButton *spbnDay_27;
TSpeedButton *spbnDay_28;
TSpeedButton *spbnDay_29;
TSpeedButton *spbnDay_30;
TSpeedButton *spbnDay_31;
TPanel *Panel4;
TSpeedButton *spbnDay_11;
TSpeedButton *spbnDay_12;
TSpeedButton *spbnDay_13;
TSpeedButton *spbnDay_14;
TSpeedButton *spbnDay_15;
TSpeedButton *spbnDay_16;
TSpeedButton *spbnDay_17;
TSpeedButton *spbnDay_18;
TSpeedButton *spbnDay_19;
TSpeedButton *spbnDay_20;
TPanel *Panel5;
TSpeedButton *spbnDay_1;
TSpeedButton *spbnDay_2;
TSpeedButton *spbnDay_3;
TSpeedButton *spbnDay_4;
TSpeedButton *spbnDay_5;
TSpeedButton *spbnDay_6;
TSpeedButton *spbnDay_7;
TSpeedButton *spbnDay_8;
TSpeedButton *spbnDay_9;
TSpeedButton *spbnDay_10;
void __fastcall FormCreate(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall rgRoleTypeClick(TObject *Sender);
void __fastcall bbtnOKClick(TObject *Sender);
void __fastcall FormDestroy(TObject *Sender);
void __fastcall bbtnNewYearClick(TObject *Sender);
private: // User declarations
TDBAccess* pDBAccess;
TTabSheet* TabSheetList[12];
TSpeedButton* ButtonDayList[62];
EnguardRole_T EnguardRole;
void IntiMonthTabSheet();
int GetMonthDays(int iYear,int iMonth);
int GetWeekDays(int iYear,int iMonth,int iDay);
bool ShowRole();
void ClearHalfYearCapton(int iIndex);
void SetVisibleTab(int iTabIndex);
void __fastcall OnTabSheetShow(TObject *Sender);
void __fastcall OnSpeedButtonClick(TObject *Sender);
bool GetRoleInfoFromUI();
bool SetRoleInfoToUI();
int SaveRoleData();
void NewHoliday();
void NewYearRoleData();
public:
bool GetRoleInfo(EnguardRole_T& iRole);
bool SetRoleInfo(EnguardRole_T iRole);
__fastcall TEnguardRoleFrm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TEnguardRoleFrm *EnguardRoleFrm;
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -