#ifndef PROJECTSET_H_ #define PROJECTSET_H_ #include "CtlPanel1.h" #include "DesignPrmSet.h" class TProjectSet{ public: static constexpr unsigned short hList[12] = {36,72,72,72, 72,32,32,32, 32,32,32,32}; static constexpr unsigned short wList[12] = {800,800,800,800, 800,800,800,800, 800,800,800,800}; static constexpr TLv Lv = { .Caption.Left = 0, .Caption.Top = 36, .Caption.Width = 800, .Caption.Heigh = 32, .Caption.Right = 800 -0 -1, .Caption.Bottom = 36 + 32, .Grid.Left = {0,0,0,0, 0,0,0,0, 0,0,0,0}, .Grid.Right = {wList[0]-1,wList[1]-1,wList[2]-1,wList[3]-1, wList[4]-1,wList[5]-1,wList[6]-1,wList[7]-1, wList[8]-1,wList[9]-1,wList[10]-1,wList[11]-1}, .Grid.Top[0] = (36 + 32 +2), .Grid.Top[1] = (36 + 32 +2) + (2 + hList[0]), .Grid.Top[2] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]), .Grid.Top[3] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]), .Grid.Top[4] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 +hList[3]), .Grid.Bottom[0] = (36 + 32 +2) + hList[0], .Grid.Bottom[1] = (36 + 32 +2) + (2 + hList[0]) + hList[1], .Grid.Bottom[2] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + hList[2], .Grid.Bottom[3] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + hList[3], .Grid.Bottom[4] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 +hList[3]) + hList[4], .Grid.UsingCount = 5, .Panel.Active = 0, .Panel.ItemType = piMemo, .PanelSmall.Active = 0, }; static constexpr TPoint InputTipPoint = { .x = Lv.Grid.Left[Lv.Grid.UsingCount -1] + 200, .y = Lv.Grid.Bottom[Lv.Grid.UsingCount -1] + 8, }; static constexpr TPoint ResultTipPoint = { .x = Lv.Grid.Left[Lv.Grid.UsingCount -1] + 4, .y = Lv.Grid.Bottom[Lv.Grid.UsingCount -1] + 8, }; public: TDesignPrmSet *pDpt; u32 Color; class TCtlPanel1 *aPanel; TRect Bound; TRect Content; TRect RectPanel; TEdit vEdit; unsigned char CtlIndex; unsigned char IsExtInput; int Sta; struct{ unsigned char Inx; void Reset(){ Inx = 0; } }Tag; int SubItemActive; char Text[48]; unsigned char IsPermission; unsigned char PermissionCmd; unsigned char IsEditting; public: TProjectSet(){}; void Init(); static void sDelayMs(unsigned int aMs); void RenderBackGround(void); void RenderBackGround(unsigned int aClr); void DrawRecoveCnInput(); void ShowInf(void); void DrawFixText(); void DrawSelf(void); void FullRedraw(int Prm); void DrawCaption(void); void Show(); void ShowSta(); void ShowSta(int aSta); void ClearSelected(void); void Check4Selected(); void InitPanel(); void LoadCfg(); TGuiMsgReturn KeyIn(unsigned char aKey); void Write2Eep(); static void sRecoverSetDefault(); void PermissionCmdReturnDraw(); void PermissionCmdGO(); void ShowDesignedCount(); int ExtRequst(unsigned char Prm){return 0;} }; #endif