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

📄 setup.c

📁 M3355的源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
	if((Setup_g_Var.bCurChoice == Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1) && PassCnt>0)
	{/*modify by xianzhong to down size.   Aug.3.2004*/
		Reset_InputNum(0);
		
		Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = 0xff;
              Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = 0xff;
              HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_ON);

		ShowHelpWindow(HELP_LEVEL3);
              
	}
}


/*added by xianzhong to down size.   Aug.3.2004*/
void _MixChoiceKeyUpOrDown(BOOL bUp)
{
   if(Setup_g_Var.bCurMenu == 1)
   {
       Item_CommonKeyUpOrDown(bUp, TRUE);
        
       if(Setup_g_Var.bActiveObj == OBJ_MIXCHOICE_ITEM)
            ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,OTHER);
       else
            ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,NORMAL);
   }
   else
   {
      if(Setup_g_Var.bCurChoice == Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1)
      {
          Passcnt_inputnum();
            
          HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_OFF);
      }
      else
      {
          HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, NORMAL, HL_OFF);
      }

      if(bUp == FALSE) increase_by_step(&(Setup_g_Var.bCurChoice), Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange);
      else Decrease_by_step(&(Setup_g_Var.bCurChoice), Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange);
        
      if(Setup_g_Var.bCurChoice == Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1)
      {
          Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = 0xff;
          Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = 0xff;
            
          HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_ON);
      }
      else
      {
         HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, NORMAL, HL_ON);
      }
   	}
}

void MixChoiceKeyUp(void)
{/*modify by xianzhong to down size.   Aug.3.2004*/
    _MixChoiceKeyUpOrDown(TRUE);
 #if 0
    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_MIXCHOICE_ITEM)
            ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,OTHER);
        else
            ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,NORMAL);
    }
    else
    {

        if(Setup_g_Var.bCurChoice == 0)
        {
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = 0xff;
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = 0xff;
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, NORMAL, HL_OFF);
            Setup_g_Var.bCurChoice = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1;

            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_ON);
            return;
        }
        else
            Setup_g_Var.bCurChoice --;
        if(Setup_g_Var.bCurChoice+1 == Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1)
        {
            if(PassCnt != 4)
            {
                PassCnt = 0;
                InputNum[0] = 0xff;
                InputNum[1] = 0xff;
                InputNum[2] = 0xff;
                InputNum[3] = 0xff;
            }
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = Setup_g_Var.bSLangLetter;
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = Setup_g_Var.bFLangLetter;
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice+1, OTHER, HL_OFF);
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, NORMAL, HL_ON);
        }
        else
        {
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice+1, NORMAL, HL_OFF);
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, NORMAL, HL_ON);
        }
   #endif
}

void MixChoiceKeyDown(void)
{/*modify by xianzhong to down size.   Aug.3.2004*/
    _MixChoiceKeyUpOrDown(FALSE);
 #if 0
    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_MIXCHOICE_ITEM)
            ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,OTHER);
        else
            ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,NORMAL);
    }
    else
    {

        if(Setup_g_Var.bCurChoice == Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1)
        {
            if(PassCnt != 4)
            {
                PassCnt = 0;
                InputNum[0] = 0xff;
                InputNum[1] = 0xff;
                InputNum[2] = 0xff;
                InputNum[3] = 0xff;
            }
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = Setup_g_Var.bSLangLetter;
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = Setup_g_Var.bFLangLetter;
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_OFF);
            Setup_g_Var.bCurChoice = 0;
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, NORMAL, HL_ON);

            return;
        }
        else
            Setup_g_Var.bCurChoice ++;
        if(Setup_g_Var.bCurChoice == Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1)
        {
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = 0xff;
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = 0xff;
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice-1, NORMAL, HL_OFF);
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_ON);
        }
        else
        {
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice-1, NORMAL, HL_OFF);
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, NORMAL, HL_ON);
        }
    }

   #endif
}

void MixChoiceKeyLeft(void)
{/*modify by xianzhong to down size.   Aug.3.2004*/
    if(Setup_g_Var.bCurMenu == 1)
    {
       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
    {
        Setup_g_Var.bCurMenu = 1;
        HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
        Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = Setup_g_Var.bSLangLetter;
        Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = Setup_g_Var.bFLangLetter;

        //ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,NORMAL);
        HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_OFF);

        ShowHelpWindow(HELP_LEVEL2);
    }
}

void MixChoiceKeyRight(void)
{
    if(Setup_g_Var.bCurMenu == 1)
    {
        Setup_g_Var.bCurMenu = 2;
        Setup_g_Var.bCurChoice = GetCurChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
        Setup_g_Var.bFLangLetter = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] ;
        Setup_g_Var.bSLangLetter = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] ;

        /*modify by xianzhong to down size.   Aug.3.2004*/
        Reset_InputNum(0);
            
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = 0xff;
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = 0xff;
        
        	
        HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_CHECK);
        HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_ON);
        ShowHelpWindow(HELP_LEVEL3);
    }
    else
        return;
}

void MixChoiceKeyNum(int msg)
{
    if(Setup_g_Var.bCurMenu == 1)
        return;
    else
    {
        if(Setup_g_Var.bCurChoice != Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1)
            return;
        else
        {
            PassCnt++;
            if(PassCnt >4)
            {
                Reset_InputNum(1);
            }
            if(PassCnt != 1)
            {
                InputNum[3] = InputNum[2];
                InputNum[2] = InputNum[1];
                InputNum[1] = InputNum[0];
            }
            InputNum[0] = (BYTE)'0' + msg;
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = (InputNum[1]<<4)|(InputNum[0]&0x0f);
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = (InputNum[3]<<4)|(InputNum[2]&0x0f);
	     
            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_ON);
        }
    }
}

void MixChoiceKeyEnter(void)
{
    LPBYTE lpTmpPara;
    BYTE tempPara;
    BYTE temChoice;
    BYTE tempRange;
    BYTE bFLetter,bSLetter;
    int iOffSet;
    lpTmpPara = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara;
    tempPara = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[0];
    temChoice = GetCurChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
    iOffSet = Setup_g_Var.bCurChoice-temChoice;
    tempRange = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1;

    if(Setup_g_Var.bCurMenu == 1)
        return;
    else
    {
        if(Setup_g_Var.bCurChoice != Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1)
        {
            Reset_InputNum(0);
            
            *lpTmpPara = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bFuncCmds[Setup_g_Var.bCurChoice];
	     lpTmpPara[1] = 0xff;
	     lpTmpPara[2] = 0xff;
            
            Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->fnItemFunc(lpTmpPara);
            Setup_g_Var.bCurMenu = 1;
            if(iOffSet<=7&&iOffSet>=-7 )
            	HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], temChoice, OTHER, HL_OFF);

            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_OFF);
            HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
            ShowHelpWindow(HELP_LEVEL2);
        }
        else
        {
            if(PassCnt !=4)
                return;
            bFLetter = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] ;
            bSLetter = Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] ;
            if(!CheckIsLangCode(bFLetter,bSLetter))
            {
             	Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[1] = 0xff ;
             	Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->CurPara[2] = 0xff ;
             	HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_ON);
             	ShowHelpWindow(HELP_LEVEL3);

		return;

            }
            *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[Setup_g_Var.bCurItem]->fnItemFunc(lpTmpPara);
            Setup_g_Var.bCurChoice = GetCurChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]);
            if(Setup_g_Var.bCurChoice==INVALID_CHOICE)
                Setup_g_Var.bCurChoice = temChoice;
            Setup_g_Var.bCurMenu = 1;
            ShowHelpWindow(HELP_LEVEL2);
            if(iOffSet<=7&&iOffSet>=-7 )
            	HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], temChoice, OTHER, HL_OFF);

            HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurChoice, OTHER, HL_OFF);
            if(Setup_g_Var.bCurChoice != Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem]->bRange -1)
            {
			lpTmpPara[1] = 0xff;
			lpTmpPara[2] = 0xff;

            		HighLightChoice(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], tempRange, OTHER, HL_OFF);
            }

            //ShowChoices(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem],0,NORMAL);
            HighLightItem(Setup_Config.pSetupPages[Setup_g_Var.bCurPage]->SetupItems[Setup_g_Var.bCurItem], Setup_g_Var.bCurItem, HL_ON);
        }
        Write_UserPara();
    }
}
#endif

/************************OBJ_PSW_CHOICE_ITEM*********************/
void SetupPSWChoiceRespondFPKey(DWORD key)
{/*modify by xianzhong to down size.   Aug.3.2004*/
    if(key >= V_KEY_0 && key <=V_KEY_9) PSWChoiceKeyNum(key-V_KEY_0);
    switch(key)
    {
    case V_KEY_UP:
        PSWChoiceKeyUp();
        break;
    case V_KEY_DOWN:
        PSWChoiceKeyDown();
        break;
    case V_KEY_LEFT:
        PSWChoiceKeyLeft();
        break;
    case V_KEY_RIGHT:
        PSWChoiceKeyRight();
        break;
        #if 0
    case V_KEY_0:
    case V_KEY_1:

⌨️ 快捷键说明

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