📄 setup.c
字号:
case V_KEY_2:
case V_KEY_3:
case V_KEY_4:
case V_KEY_5:
case V_KEY_6:
case V_KEY_7:
case V_KEY_8:
case V_KEY_9:
PSWChoiceKeyNum(key-V_KEY_0);
break;
#endif
case V_KEY_ENTER:
PSWChoiceKeyEnter();
break;
case V_KEY_CLEAR:
PSWChoiceKeyClear();
break;
default:
break;
}
}
/*added by xianzhong to down size. Aug.3.2004*/
void Active_OBJ_VERIRY_CHOICE_ITEM()
{
if(Setup_g_Var.bActiveObj == OBJ_VERIRY_CHOICE_ITEM)
{
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->wItemChoiceIDs[0] = bCountryCode[bCurValueInCurChoice[0]].First;
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->wItemChoiceIDs[1] = bCountryCode[bCurValueInCurChoice[0]].Last[bCurValueInCurChoice[1]];
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange = 2;
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,COUNTRY_CODE);
}
else
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],Setup_g_Var.bCurItem,CHOICE_ALIGN);
}
/*added by xianzhong to down size. Aug.3.2004*/
void _PSWChoiceKeyUpOrDown(BOOL bUp)
{
CHOICETYPE ChoiceType;
if(Setup_g_Var.bCurMenu == 1)
{
Item_CommonKeyUpOrDown(bUp, TRUE);
if(bUp)
{
Active_OBJ_VERIRY_CHOICE_ITEM();
}
else
{
if(Setup_g_Var.bActiveObj == OBJ_PASSWORD_ITEM)
{
if(OSD_Setup_Parameter.bPwdNotDefine)
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->wItemChoiceIDs[0] = RS_SETUP_LOCK_NEW;
else
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->wItemChoiceIDs[0] = RS_SETUP_LOCK_CHANGE;
}
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],Setup_g_Var.bCurItem,CHOICE_ALIGN);
}
}
else
{
if(Setup_g_Var.BIsNeedInputPW)
{
Setup_g_Var.BIsNeedInputPW = FALSE;
PassCnt = 0;
Setup_g_Var.bCurMenu = 1;
ShowPassword(PSW_CANCEL, 0);
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
ShowRatingChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
/*
if(Setup_g_Var.bCurChoice == 0)
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,UNLOCK);
else
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,LOCK);
*/
ShowHelpWindow(HELP_LEVEL2);
}
else
{
ChoiceType = GetChoiceType(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice,OBJ_PSW_CHOICE_ITEM);
HighlightRatingChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, ChoiceType, HL_OFF);
if(bUp) decrease_by_step(&(Setup_g_Var.bCurChoice), Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange);
else increase_by_step(&(Setup_g_Var.bCurChoice), Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange);
#if 0
if(Setup_g_Var.bCurChoice == 0)
Setup_g_Var.bCurChoice = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1;
else
Setup_g_Var.bCurChoice --;
#endif
ChoiceType = GetChoiceType(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice,OBJ_PSW_CHOICE_ITEM);
HighlightRatingChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, ChoiceType, HL_ON);
}
}
}
void PSWChoiceKeyUp(void)
{/*modify by xianzhong to down size. Aug.3.2004*/
_PSWChoiceKeyUpOrDown(TRUE);
#if 0
CHOICETYPE ChoiceType;
if(Setup_g_Var.bCurMenu == 1)
{
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_OFF);
if(Setup_g_Var.bCurItem == 0)
Setup_g_Var.bCurItem = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->bItemNums -1;
else
Setup_g_Var.bCurItem --;
Setup_g_Var.bActiveObj = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bObjectType;
Setup_g_Var.bCurChoice = GetCurChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
if(Setup_g_Var.bActiveObj == OBJ_VERIRY_CHOICE_ITEM)
{
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->wItemChoiceIDs[0] = bCountryCode[bCurValueInCurChoice[0]].First;
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->wItemChoiceIDs[1] = bCountryCode[bCurValueInCurChoice[0]].Last[bCurValueInCurChoice[1]];
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange = 2;
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,COUNTRY_CODE);
}
else
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],Setup_g_Var.bCurItem,CHOICE_ALIGN);
}
else
{
if(Setup_g_Var.BIsNeedInputPW)
{
Setup_g_Var.BIsNeedInputPW = FALSE;
PassCnt = 0;
Setup_g_Var.bCurMenu = 1;
ShowPassword(PSW_CANCEL, 0);
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
ShowRatingChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
/*
if(Setup_g_Var.bCurChoice == 0)
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,UNLOCK);
else
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,LOCK);
*/
ShowHelpWindow(HELP_LEVEL2);
}
else
{
ChoiceType = GetChoiceType(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice,OBJ_PSW_CHOICE_ITEM);
HighlightRatingChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, ChoiceType, HL_OFF);
if(Setup_g_Var.bCurChoice == 0)
Setup_g_Var.bCurChoice = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1;
else
Setup_g_Var.bCurChoice --;
ChoiceType = GetChoiceType(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice,OBJ_PSW_CHOICE_ITEM);
HighlightRatingChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, ChoiceType, HL_ON);
}
}
#endif
}
void PSWChoiceKeyDown(void)
{/*modify by xianzhong to down size. Aug.3.2004*/
_PSWChoiceKeyUpOrDown(FALSE);
#if 0
CHOICETYPE ChoiceType;
if(Setup_g_Var.bCurMenu == 1)
{
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_OFF);
if(Setup_g_Var.bCurItem == Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->bItemNums-1)
Setup_g_Var.bCurItem = 0;
else
Setup_g_Var.bCurItem ++;
Setup_g_Var.bActiveObj = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bObjectType;
Setup_g_Var.bCurChoice = GetCurChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
if(Setup_g_Var.bActiveObj == OBJ_PASSWORD_ITEM)
{
if(OSD_Setup_Parameter.bPwdNotDefine)
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->wItemChoiceIDs[0] = RS_SETUP_LOCK_NEW;
else
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->wItemChoiceIDs[0] = RS_SETUP_LOCK_CHANGE;
}
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],Setup_g_Var.bCurItem,CHOICE_ALIGN);
}
else
{
if(Setup_g_Var.BIsNeedInputPW)
{
Setup_g_Var.BIsNeedInputPW = FALSE;
PassCnt = 0;
Setup_g_Var.bCurMenu = 1;
ShowPassword(PSW_CANCEL, 0);
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
ShowRatingChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
/*
if(Setup_g_Var.bCurChoice == 0)
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,UNLOCK);
else
ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,LOCK);
*/
ShowHelpWindow(HELP_LEVEL2);
}
else
{
ChoiceType = GetChoiceType(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice,OBJ_PSW_CHOICE_ITEM);
HighlightRatingChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, ChoiceType, HL_OFF);
if(Setup_g_Var.bCurChoice == Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1)
Setup_g_Var.bCurChoice = 0;
else
Setup_g_Var.bCurChoice ++;
ChoiceType = GetChoiceType(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice,OBJ_PSW_CHOICE_ITEM);
HighlightRatingChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, ChoiceType, HL_ON);
}
}
#endif
}
void PSWChoiceKeyLeft(void)
{
CHOICETYPE ChoiceType;
if(Setup_g_Var.bCurMenu == 1)
{/*modify by xianzhong to down size. Aug.3.2004*/
CommonkeyLeft(TRUE);
#if 0
Setup_g_Var.bCurMenu = 0;
HighLightPageIcon(&Setup_Config, Setup_g_Var.bCurPage, HL_ON);
ShowSubMenu(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]);
ShowHelpWindow(HELP_LEVEL1);
#endif
}
else
{
if(Setup_g_Var.BIsNeedInputPW)
{
if(PassCnt>0)
{
PassCnt--;
if(PassCnt == 0)
ShowPassword(PSW_CLEARING_ALL, PassCnt);
else
ShowPassword(PSW_CLEARING_ONE, PassCnt-1);
if(PassCnt ==0)
ShowHelpWindow(HELP_PSW_INPUT);
else if(PassCnt == 3)
ShowHelpWindow(HELP_PSW_NEW);
}
else
{
Setup_g_Var.BIsNeedInputPW = FALSE;
PassCnt = 0;
Setup_g_Var.bCurMenu = 1;
ShowPassword(PSW_CANCEL, 0);
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
ShowRatingChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
//if(Setup_g_Var.bCurChoice == 0)
// ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,UNLOCK);
//else
// ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,LOCK);
ShowHelpWindow(HELP_LEVEL2);
}
}
else
{
Setup_g_Var.bCurMenu = 1;
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
if(*(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara) == 0&&Setup_g_Var.bCurChoice!=0)
{
HighlightRatingChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], 0, UNLOCK, HL_OFF);
}
ChoiceType = GetChoiceType(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice,OBJ_PSW_CHOICE_ITEM);
HighlightRatingChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, ChoiceType, HL_OFF);
ShowHelpWindow(HELP_LEVEL2);
}
}
}
void PSWChoiceKeyRight(void)
{
if(Setup_g_Var.bCurMenu == 1)
{
//added by xianzhong for setup rating bug
Setup_g_Var.bCurChoice = GetCurChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
Setup_g_Var.bCurMenu = 2;
Setup_g_Var.BIsNeedInputPW = TRUE;
bRecordInputPswTime = 0;
HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_CHECK);
PassCnt = 0;
if(OSD_Setup_Parameter.bPwdNotDefine)
{
ShowPassword(PSW_NEW, 0);
ShowHelpWindow(HELP_PSW_INPUT);
}
else
{
ShowPassword(PSW_INPUT, 0);
ShowHelpWindow(HELP_PSW_INPUT);
}
}
else
return;
}
void PSWChoiceKeyNum(int msg)
{
if(Setup_g_Var.bCurMenu == 1)
return;
else if(!Setup_g_Var.BIsNeedInputPW)
return;
else
{
PassCnt++;
if(PassCnt >4)
{
PassCnt = 4;
return;
}
if(PassCnt == 4)
ShowHelpWindow(HELP_PSW_VERVIFY);
else if(PassCnt ==1)
ShowHelpWindow(HELP_PSW_NEW);
InputPass[PassCnt-1] = (BYTE)'0' + msg;
ShowPassword(PSW_INPUTING, PassCnt-1);
}
}
void PSWChoiceKeyEnter(void)
{
//SETUP_ITEM CurItem;
LPBYTE lpTmpPara;
CHOICETYPE ChoiceType;
lpTmpPara = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara;
if(Setup_g_Var.bCurMenu == 1)
return;
else
{
if(!Setup_g_Var.BIsNeedInputPW)
{
*lpTmpPara = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bFuncCmds[Setup_g_Var.bCurChoice];
Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Se
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -