?? 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 + -