#include "RecoverAll.h" #include "Runtime.h" extern "C"{ #include "user_norflash.h" #include "user_eeprom.h" #include "uart_key_drv.h" } #define dWdClr clSkyBlue #define dWdDisabelClr clNearWhite #define dWWidth 24 #define dWHeigh 24 #define dRoundR 7 static const int xFirst = 10; void TRecoverAll::Init() { CtlIndex = 0; IsShowing = 0; PermissionCmd =0; IsPermission =0; } void TRecoverAll::sDelayMs(unsigned int aMs) { volatile unsigned int mTick; volatile unsigned int Tick; for(Tick=0; Tick恢复出厂设置"); TextRender_string24(Lv.Grid.Left[0] + 10, Lv.Grid.Top[0] +6, clNearWhite, "恢复出厂设置"); TRoundRect::sDrawBySize(xFirst, Lv.Grid.Top[0] + 36, 72, 30, 7, clBlue, "确定", 12, clNearWhite); }else{ TextRender_string24(Lv.Caption.Left + 10, Lv.Caption.Top +4, clNearWhite, CaptionColor, "Advanced Setup->Factory Reset"); TextRender_string24(Lv.Grid.Left[0] + 10, Lv.Grid.Top[0] +6, clNearWhite, "Factory Reset"); TRoundRect::sDrawBySize(xFirst, Lv.Grid.Top[0] + 36, 72, 30, 7, clBlue, "Reset", 6, clNearWhite); } } void TRecoverAll::DrawSelf(void) { RenderBackGround(); RectFillRender(Lv.Caption.Left, Lv.Caption.Top, Lv.Caption.Right, Lv.Caption.Bottom, CaptionColor); for(int i=0; i 2){ PermissionCmdGO(); }else{ IsPermission = 1; if(LanguageEnCn==0) TRoundRect::sDrawBySize(xFirst, Lv.Grid.Top[0] + 36, 72, 30, 7, clNearWhite, "确定", 12, clNearBlack); else TRoundRect::sDrawBySize(xFirst, Lv.Grid.Top[0] + 36, 72, 30, 7, clNearWhite, "Reset", 6, clNearBlack); PmsIntervene4Gui.Show4Gui(100, Lv.Grid.Bottom[0] + 40, 600 , 120, 3); } } break; case VK_RETURN: IsShowing = 0; aMsg = guiMsgReturn; break; } } return aMsg; } int TRecoverAll::ExtRequst(unsigned char Prm) { IsShowing =0; return 0; } void TRecoverAll::Task1000Ms() { }