⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu.c

📁 EVD测试仪开发源码含测试图片及部分GUI开发源码
💻 C
📖 第 1 页 / 共 3 页
字号:
		44, 
		40, 
		0);
	ExpFunBtnRedraw3();
	Display();
}


/*******************************************************************

the following functions are the response of key when in the time setup

*******************************************************************/
void ExpFunHHMMSSOnOk(void)
{
	OnOK_YMD(0);
	CursorLocation=CursorLocationPop();
	ExpFunBtnRedraw2();
}

void ExpFunYYMMDDOnOk(void)
{
	OnOK_YMD(1);
	CursorLocation=CursorLocationPop();
	ExpFunBtnRedraw2();
}

void ExpFunHHMMSSOnPre(void)
{
	OnPre_YMD(0);
	Display();
}

void ExpFunYYMMDDOnPre(void)
{
	OnPre_YMD(1);
	Display();
}

void ExpFunHHMMSSOnNxt(void)
{
	OnNxt_YMD(0);
//	CursorLocation=CursorLocationPop();
	Display();
}

void ExpFunYYMMDDOnNxt(void)
{
	OnNxt_YMD(1);
	Display();
}


/*******************************************************************

the following function ---------->redraw button

********************************************************************/


/*********************************************************************
	Description:重绘按钮
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunBtnRedraw1(void)
{
	GUI_DrawButton(&btn1, "设置", 4, 62, 27, 15);
	GUI_DrawButton(&btn2, "测试", 35, 62, 27, 15);
	GUI_DrawButton(&btn3, "复位", 66, 62, 27, 15);
	GUI_DrawButton(&btn4, "打印", 97, 62, 27, 15);
}

void ExpFunBtnRedraw2(void)
{
	GUI_DrawButton(&btn1, "确定", 4, 62, 27, 15);
	GUI_DrawButton(&btn2, "向上", 35, 62, 27, 15);
	GUI_DrawButton(&btn3, "向下", 66, 62, 27, 15);
	GUI_DrawButton(&btn4, "退出", 97, 62, 27, 15);
}

void ExpFunBtnRedraw3(void)
{
	GUI_DrawButton(&btn1, "确定", 4, 62, 27, 15);
	GUI_DrawButton(&btn2, "增加", 35, 62, 27, 15);
	GUI_DrawButton(&btn3, "移位", 66, 62, 27, 15);
	GUI_DrawButton(&btn4, "退出", 97, 62, 27, 15);
}


void ExpFunBtnRedraw4(void)
{
	GUI_DrawButton(&btn1, "确定", 4, 62, 27, 15);
	GUI_DrawButton(&btn2, "向左", 35, 62, 27, 15);
	GUI_DrawButton(&btn3, "向右", 66, 62, 27, 15);
	GUI_DrawButton(&btn4, "退出", 97, 62, 27, 15);
}

void ExpFunBtnRedraw5(void)
{
	GUI_DrawButton(&btn1, "确定", 4, 62, 27, 15);
	GUI_DrawButton(&btn2, "空空", 35, 62, 27, 15);
	GUI_DrawButton(&btn3, "空空", 66, 62, 27, 15);
	GUI_DrawButton(&btn4, "退出", 97, 62, 27, 15);
}

void ExpFunBtnRedraw6(void)
{
	GUI_DrawButton(&btn1, "确定", 4, 62, 27, 15);
	GUI_DrawButton(&btn2, "终止", 35, 62, 27, 15);
	GUI_DrawButton(&btn3, "空空", 66, 62, 27, 15);
	GUI_DrawButton(&btn4, "退出", 97, 62, 27, 15);
}


/*********************************************************************
	Description:进入设置
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunEnterSetMode(void)
{
	TIMER0_CLOSE;
	FlagTimeRefresh=0;
	ExpFunBtnRedraw2();
	CursorLocationPush(CursorLocation);
}


/*********************************************************************
	Description:空函数
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunNop(void)
{

}


/*********************************************************************
	Description:系统参数查看返回
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunSysInfoBack(void)
{
	//CursorLocation=CursorLocationPop();
	ExpFunBtnRedraw2();
}


/*********************************************************************
	Description:进入查看系统参数
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunSysInfoEnter(void)
{
	CursorLocationPush(CursorLocation);
	FocusIndex=MenuTable[FocusIndex].KeyOkIndex;
	GUI_ClearRect(2,	 124, 1, 43);
	GUI_DispLine_(MenuTable[FocusIndex].p_Text, 40, 30);
	ExpFunBtnRedraw5();
	Display();
}


/*********************************************************************
	Description:系统复位
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunSysReset(void)
{
	SysPara.FlagNewMachine=0xff;
	FlashPacketSysWr(&SysPara);
	(*((void (*)(void))(0)))();
}


/*********************************************************************
	Description:系统参数查看响应OK键
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunSysInfoOk(void)
{
	CursorLocation=CursorLocationPop();
	ExpFunBtnRedraw2();
}


/*********************************************************************
	Description:进入密码设置
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunCodeSetEnter(void)
{
	CursorLocationPush(CursorLocation);
	FocusIndex=MenuTable[FocusIndex].KeyOkIndex;
	GUI_ClearRect(2,	 124, 1, 43);
	Gui_CharacterStyle_Set12_6();
//	DataSetTmp=0;
	CreateStpLabel_Int(MenuTable[FocusIndex].p_Text, 28,20,&SysPara.SysCode,51,40,4);
	ExpFunBtnRedraw3();
	Display();
}


/*********************************************************************
	Description:进入待机时间设置
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunTimeSetForSleepEnter(void)
{
	CursorLocationPush(CursorLocation);
	FocusIndex=MenuTable[FocusIndex].KeyOkIndex;
	GUI_ClearRect(2,	 124, 1, 43);
	Gui_CharacterStyle_Set12_6();
	CreateStpLabel_Int(MenuTable[FocusIndex].p_Text, 23,20,&SysPara.TimeForSleep,51,40,4);
	ExpFunBtnRedraw3();
	Display();
}


/*********************************************************************
	Description:密码设置OK
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunCodeSetOnOk(void)
{
	struct StpLabelBlk_Int *pTmp;

	pTmp=(struct StpLabelBlk_Int *)p_S_L_B;

	OnOk_Int();

	//to add:para store function
	SysPara.SysCode=pTmp->Dat_Temp;
	FlashPacketSysWr(&SysPara);

	CursorLocation=CursorLocationPop();
	ExpFunBtnRedraw2();
}

/*********************************************************************
	Description:休眠时间设置OK
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunTimeSetForSleepOnOk(void)
{
	struct StpLabelBlk_Int *pTmp;

	pTmp=(struct StpLabelBlk_Int *)p_S_L_B;

	OnOk_Int();

	//to add:para store function
	SysPara.TimeForSleep=pTmp->Dat_Temp;
	FlashPacketSysWr(&SysPara);

	CursorLocation=CursorLocationPop();
	ExpFunBtnRedraw2();
}


/*********************************************************************
	Description:进入数据查询
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunDataSearchEnter(void)
{
	CursorLocationPush(CursorLocation);
	FocusIndex=MenuTable[FocusIndex].KeyOkIndex;
	GUI_ClearRect(2,	 124, 1, 43);
	Gui_CharacterStyle_Set12_6();
	DataIndexTmp=1;
	CreateStpLabel_Int(MenuTable[FocusIndex].p_Text, 16,15,&DataIndexTmp,96,15,4);
	ExpFunBtnRedraw3();
	Display();
}


/*********************************************************************
	Description:进入数据选择清除
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunDataClearSelEnter(void)
{
	ExpFunDataSearchEnter();
	//show the first data
	Display();
}


/*********************************************************************
	Description:向上键按键响应,加一
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunDataSearchOnPre(void)
{
	OnPre_Int();
}


/*********************************************************************
	Description:向上键按键响应,加一
	
	Input:
	
	Output:

	Return:

	Gloable:	

	Calls:

	Called By:

	Others:

	Modify Record:
	
*********************************************************************/
void ExpFunDataClearSelOnPre(void)
{
	//show the data
	OnPre_Int();
}


/*********************************************************************
	Description:查询OK
	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -