📄 aphearsayset.c
字号:
// (UINT8*)MAKE_ID(APHSSET_IDB));
//写选择栏
bInfinite = FALSE;
#ifdef APHS_IFINITE_CYCLE_SET
if (g_aHSSetting.hTimes == APHS_IFINITE_CYCLE )
{
bInfinite = TRUE;
}
#endif
if (bInfinite)
{
GraphDrawText(SET_ICON_TX, SET_ICON_TY,0,0,(UINT8*)"无限次");
}
else
{
sprintf((char*)tip,(const char*) " %d 次", g_aHSSetting.hTimes);
GraphDrawText(SET_ICON_TX, SET_ICON_TY,0, 0, (UINT8*)tip);
}
GraphDrawLine(4,LCD_SCREEN_HEIGHT-AP_STATEBAR_HEIGHT+1,LCD_SCREEN_WIDTH-4,LCD_SCREEN_HEIGHT-AP_STATEBAR_HEIGHT+1);
GraphSetPenStyle(PS_DOT);
GraphDrawLine(4,LCD_SCREEN_HEIGHT-AP_STATEBAR_HEIGHT+3,LCD_SCREEN_WIDTH-4,LCD_SCREEN_HEIGHT-AP_STATEBAR_HEIGHT+3);
GraphSetPenStyle(PS_SOLID);
GraphEnableRefresh();
return 1;
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_KeyUp( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* DESCRIPTION:听说教程处理向上按键 */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理向上按键事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_KeyUp( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
#ifdef HS_MODE_SET
if( (--pGui->nCtrlParam1) < 0)
{
pGui->nCtrlParam1= 0;
}
DrawCurrentAp();
#else
HearSaySetEvent_KeyRight(pGui,uEvent, uParam );
#endif
return 1;
}
/****************************************************************************/
/* FUNCTION: INT HearSayEvent_KeyDown( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* DESCRIPTION:听说教程处理向下按键 */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理向下按键事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_KeyDown( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
#ifdef HS_MODE_SET
if((++pGui->nCtrlParam1) > 1)
{
pGui->nCtrlParam1 = 1;
}
DrawCurrentAp();
#else
HearSaySetEvent_KeyLeft(pGui,uEvent, uParam );
#endif
return 1;
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_KeyLeft( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* DESCRIPTION:听说教程处理向左按键 */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理向左按键事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_KeyLeft( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
if( pGui->nCtrlParam1 == 0)
{
g_aHSSetting.hAuto = (g_aHSSetting.hAuto ^ 1);
}
else
{
g_aHSSetting.hTimes --;
if((int)g_aHSSetting.hTimes < APHS_MIN_CYCLE)
{
g_aHSSetting.hTimes = APHS_IFINITE_CYCLE;
}
}
DrawCurrentAp();
return 1;
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_KeyRight( APGUI_STRUCT *pGui */
/* UINT uEvent, UINT uParam ) */
/* DESCRIPTION:听说教程处理向右按键 */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理向右按键事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_KeyRight( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
if( pGui->nCtrlParam1 == 0)
{
g_aHSSetting.hAuto = g_aHSSetting.hAuto ^ 1;
}
else
{
g_aHSSetting.hTimes ++;
if(g_aHSSetting.hTimes > APHS_IFINITE_CYCLE)
{
g_aHSSetting.hTimes = APHS_MIN_CYCLE;
}
}
DrawCurrentAp();
return 1;
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_KeyEnter( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* DESCRIPTION:听说教程处理回车键 */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理回车键事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_KeyEnter( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
return HearSaySetEvent_Sure( pGui, uEvent, uParam );
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_C1L( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理Command to K11事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_C1L ( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
pGui->nCtrlParam1 = 0;
return HearSaySetEvent_KeyLeft(pGui,EVENT_KEY,MVK_LEFT);
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_C1R( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理Command to K12事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_C1R ( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
pGui->nCtrlParam1 = 0;
return HearSaySetEvent_KeyRight(pGui,EVENT_KEY,MVK_RIGHT);
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_C2L( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理Command to K21事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_C2L ( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
pGui->nCtrlParam1 = 1;
return HearSaySetEvent_KeyLeft(pGui,EVENT_KEY,MVK_LEFT);
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_C2R( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理Command to K22事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_C2R ( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
pGui->nCtrlParam1 = 0;
return HearSaySetEvent_KeyRight(pGui,EVENT_KEY,MVK_RIGHT);
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_Sure ( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理Make sure changing Command to K31事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_Sure ( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
EditSaveSetting();
ExitAp(EXIT_CODE_NORMAL);
return 1;
}
/****************************************************************************/
/* FUNCTION: INT HearSaySetEvent_Cancel( APGUI_STRUCT *pGui, */
/* UINT uEvent, UINT uParam ) */
/* INPUTS: NONE */
/* OUTPUTS: NONE */
/* RETURN: 处理Make sure changing Command to K32事件的返回值 */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-10 V1.00B */
/****************************************************************************/
INT HearSaySetEvent_Cancel ( APGUI_STRUCT *pGui, UINT uEvent, UINT uParam )
{
ExitAp(EXIT_CODE_NORMAL);
return 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -