Initial commit
This commit is contained in:
137
MyCode/Gui/Maintain.h
Normal file
137
MyCode/Gui/Maintain.h
Normal file
@@ -0,0 +1,137 @@
|
||||
#ifndef MAINTAIN_H_
|
||||
#define MAINTAIN_H_
|
||||
|
||||
#include "gType.h"
|
||||
#include "GraphBase.h"
|
||||
#include "string.h"
|
||||
#include "my_string.h"
|
||||
#include "Device.h"
|
||||
#include "EpDevice.h"
|
||||
#include "StaticText.h"
|
||||
#include "CtlPanel1.h"
|
||||
#include "ProtoInnerCan.h"
|
||||
|
||||
class TMaintain{
|
||||
public:
|
||||
static constexpr unsigned short hList[12] = {36,126,40,32, 32,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 +8),
|
||||
.Grid.Top[1] = (36 + 32 +8) + (2 + hList[0]),
|
||||
.Grid.Top[2] = (36 + 32 +8) + (2 + hList[0]) + (2 + hList[1]),
|
||||
.Grid.Top[3] = (36 + 32 +8) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]),
|
||||
|
||||
.Grid.Bottom[0] = (36 + 32 +8) + hList[0],
|
||||
.Grid.Bottom[1] = (36 + 32 +8) + (2 + hList[0]) + hList[1],
|
||||
.Grid.Bottom[2] = (36 + 32 +8) + (2 + hList[0]) + (2 + hList[1]) + hList[2],
|
||||
.Grid.Bottom[3] = (36 + 32 +8) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + hList[3],
|
||||
|
||||
.Grid.UsingCount = 3,
|
||||
|
||||
.Panel.Active = 0,
|
||||
.Panel.ItemType = piMemo,
|
||||
.PanelSmall.Active = 0,
|
||||
};
|
||||
static constexpr TPoint ResultTipPoint = {
|
||||
.x = Lv.Grid.Left[2] + 340,
|
||||
.y = Lv.Grid.Top[2] + 132,
|
||||
};
|
||||
static constexpr TPoint ResultSavePoint = {
|
||||
.x = Lv.Grid.Left[3] + 40,
|
||||
.y = Lv.Grid.Top[3] + 12,
|
||||
};
|
||||
public:
|
||||
unsigned int OnActive;
|
||||
TCtlPanel1 *aPanel;
|
||||
int IsPermission;
|
||||
int PermissionCmd;
|
||||
public:
|
||||
TStaticText Caption;
|
||||
|
||||
u32 Color;
|
||||
|
||||
|
||||
TRect Bound;
|
||||
TRect Content;
|
||||
|
||||
struct{
|
||||
unsigned char Group;
|
||||
unsigned char Inx0;
|
||||
unsigned char Inx1;
|
||||
unsigned char Dump0;
|
||||
void Reset(){
|
||||
Group = 0;
|
||||
Inx0 = 0;
|
||||
Inx1 = 0;
|
||||
}
|
||||
}Tag;
|
||||
struct{
|
||||
unsigned char IsCustomTime;
|
||||
unsigned char IsHalfYear;
|
||||
unsigned char Dump0;
|
||||
unsigned char Dump1;
|
||||
unsigned char Month[8];
|
||||
unsigned char Day[8];
|
||||
}Setting, ExtLoadSetting;
|
||||
unsigned char ToWriteBytes[20];
|
||||
int SaveSta;
|
||||
int Seconeds;
|
||||
public:
|
||||
TMaintain(){};
|
||||
void Init();
|
||||
|
||||
void RenderBackGround(void);
|
||||
void RenderBackGround(unsigned int aClr);
|
||||
void DrawSelf(void);
|
||||
|
||||
void Show(void);
|
||||
void FullRedraw(int Prm);
|
||||
void ReDraw(void);
|
||||
void ShowMth();
|
||||
void ShowVision();
|
||||
void ShowSound();
|
||||
void ShowIfCustomTime();
|
||||
|
||||
void ClearSelected(void);
|
||||
void Check4Selected(void);
|
||||
|
||||
TGuiMsgReturn KeyIn(unsigned char aKey);
|
||||
|
||||
|
||||
void DecIndex();
|
||||
void IncIndex();
|
||||
void InitPanel();
|
||||
|
||||
void ExtLoadData();
|
||||
void LoadData();
|
||||
void WriteData();
|
||||
static void sRecoverSetDefault();
|
||||
|
||||
void ShowSta();
|
||||
void ShowSta(int aSta);
|
||||
|
||||
void StartUpInit();
|
||||
void DoCheckPerSec();
|
||||
|
||||
void ShowLastMaintain();
|
||||
int WriteLastDate();
|
||||
|
||||
void PermissionCmdReturnDraw();
|
||||
void PermissionCmdGO();
|
||||
|
||||
int ExtRequst(unsigned char Prm){return 0;}
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user