📄 pgmisc.c
字号:
/*
* Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
* All rights reserved.
*
* This software is copyrighted by and is the sole property of
* VIA Networking Technologies, Inc. This software may only be used
* in accordance with the corresponding license agreement. Any unauthorized
* use, duplication, transmission, distribution, or disclosure of this
* software is expressly forbidden.
*
* This software is provided by VIA Networking Technologies, Inc. "as is"
* and any express or implied warranties, including, but not limited to, the
* implied warranties of merchantability and fitness for a particular purpose
* are disclaimed. In no event shall VIA Networking Technologies, Inc.
* be liable for any direct, indirect, incidental, special, exemplary, or
* consequential damages.
*
*
* File: miscdef.c
*
* Purpose: Misc module UI definitions
*
* Author: Jenda Jao
*
* Date: Jan 08, 2002
*
* Functions:
*
* Revision History:
*
*/
#include "ttyio.h"
#include "engine.h"
#include "eng_act.h"
#include "allpages.h"
#include "pigencfg.h"
#include "cfgstr.h"
#include "pgmisc.h"
#include "gen_act.h"
#include "pimsg.h"
#include "str.h"
#include "eng_io.h"
#include "pimisc.h"
// misc menu page
DIRECT_MEMTYPE_CODE SFixLabel aSFixLabelMiscMenu[] = {
{{2,33}, g_strMiscOpr, 0},
{{3,33}, "=", 14},
{{24,2}, g_strHelpMsg, 0}
};
DIRECT_MEMTYPE_CODE SItemPageSel aSIPageSelMisc[] = {
{g_strAdvCfg, PAGE_MISC},
{g_strPasswdSet, PAGE_ADMIN_EBL},
{"Restore System Default Setting", PAGE_DEFAULT},
{"Reboot System", PAGE_RESTART},
{g_strSysInfo, PAGE_VERSION},
#ifdef __MODULE_WEB_SMART
{g_strIpConf, PAGE_IP_CONF},
#endif
{g_strRtnToMain, PAGE_MAIN_MENU},
};
DIRECT_MEMTYPE_CODE SItem aSItemMiscMenu[] = {
{{5,24}, aSIPageSelMisc, "", ITEM_MENU_PAGESEL, REPEAT_TYPE_NONE, LINK_TYPE_EDITPAGE},
{{5+2,24}, aSIPageSelMisc+1, "", ITEM_MENU_PAGESEL, REPEAT_TYPE_NONE, LINK_TYPE_EDITPAGE},
{{5+4,24}, aSIPageSelMisc+2, "", ITEM_MENU_PAGESEL, REPEAT_TYPE_NONE, LINK_TYPE_EDITPAGE},
{{5+6,24}, aSIPageSelMisc+3, "", ITEM_MENU_PAGESEL, REPEAT_TYPE_NONE, LINK_TYPE_EDITPAGE},
{{5+8,24}, aSIPageSelMisc+4, "", ITEM_MENU_PAGESEL, REPEAT_TYPE_NONE, LINK_TYPE_EDITPAGE},
{{5+10,24}, aSIPageSelMisc+5, "", ITEM_MENU_PAGESEL, REPEAT_TYPE_NONE, LINK_TYPE_EDITPAGE},
#ifdef __MODULE_WEB_SMART
{{5+12,24}, aSIPageSelMisc+6, "", ITEM_MENU_PAGESEL, REPEAT_TYPE_NONE, LINK_TYPE_EDITPAGE},
#endif
};
DIRECT_MEMTYPE_CODE SPage g_SPageMiscMenu = {
aSFixLabelMiscMenu, 3,
NULL, 0,
#ifdef __MODULE_WEB_SMART
aSItemMiscMenu, 7,
#else
aSItemMiscMenu, 6,
#endif
};
// assign label
DIRECT_MEMTYPE_CODE SFixLabel aSFixLabelMisc[] = {
{{ 2,26}, g_strAdvCfg, 0},
{{ 3,26}, "=", 29},
{{ 7,24}, "Broadcast Storm Filter :", 0},
{{ 9,24}, "Collision Retry Forever :", 0},
{{11,24}, "MAC Table Auto-Aging :", 0},
{{13,24}, "MAC Table Hashing :", 0},
{{15,24}, "Console Auto Logout Time :", 0},
#ifdef __MODULE_WEB_SMART
{{17,24}, "Web Auto Logout Time :", 0},
#endif
{{24, 2}, g_strHelpMsg, 0}
};
// assign item
DIRECT_MEMTYPE_CODE SItemListbox aSIListboxMisc[] = {
{g_pSMiscPageCfg, 0, 1, 0, g_aszBSFMode, 4},
{g_pSMiscPageCfg, 2, 2, 0, g_aszEnDisCfg, 2},
{g_pSMiscPageCfg, 3, 4, 0, g_aszAutoAging, 4},
{g_pSMiscPageCfg, 5, 5, 0, g_aszMacHashMode, 2},
{g_pSMiscPageCfg, 6, 7, 0, g_aszAutoLogoutTime, 4},
#ifdef __MODULE_WEB_SMART
{g_pSMiscPageCfg, 8, 9, 0, g_aszAutoLogoutTime+1, 3},
#endif
};
// all items
DIRECT_MEMTYPE_CODE SItem aSItemMisc[] = {
{{ 7,51}, aSIListboxMisc, "", ITEM_LISTBOX, REPEAT_TYPE_NONE, LINK_TYPE_NONE},
{{ 9,51}, aSIListboxMisc+1, "", ITEM_LISTBOX, REPEAT_TYPE_NONE, LINK_TYPE_NONE},
{{11,51}, aSIListboxMisc+2, "", ITEM_LISTBOX, REPEAT_TYPE_NONE, LINK_TYPE_NONE},
{{13,51}, aSIListboxMisc+3, "", ITEM_LISTBOX, REPEAT_TYPE_NONE, LINK_TYPE_NONE},
{{15,51}, aSIListboxMisc+4, "", ITEM_LISTBOX, REPEAT_TYPE_NONE, LINK_TYPE_NONE},
#ifdef __MODULE_WEB_SMART
{{17,51}, aSIListboxMisc+5, "", ITEM_LISTBOX, REPEAT_TYPE_NONE, LINK_TYPE_NONE},
#endif
};
// action
DIRECT_MEMTYPE_CODE SActItem aSActionMisc[] = {
{{22, 12}, g_strActionQuit, PAACT_bQuit},
{{22, 22}, g_strActionEdit, PAACT_bEdit},
{{22, 32}, g_strActionSave, PAMISC_bSaveMiscCfg},
};
// assign page
DIRECT_MEMTYPE_CODE SPage g_SPageMisc = {
#ifdef __MODULE_WEB_SMART
aSFixLabelMisc, 9,
NULL, 0,
aSItemMisc, 6,
#else
aSFixLabelMisc, 8,
NULL, 0,
aSItemMisc, 5,
#endif
aSActionMisc, 3,
PAMISC_bLoadMiscCfg
};
///////////////////////////////////////////////////////////////////////////////////////
// load config
BOOL PAMISC_bLoadMiscCfg(void) DIRECT_FUNTYPE_REENT
{
PIMISC_vInitPage(g_pSMiscPageCfg);
return DONT_RELOAD_PAGE;
}
// save config
BOOL PAMISC_bSaveMiscCfg(void) DIRECT_FUNTYPE_REENT
{
PIMSG_vPutSavingMsg();
PIMISC_vSavePage(g_pSMiscPageCfg);
PIMSG_vPutMsgThenPause(OP_OK);
g_bDataDirty = 0;
return DONT_RELOAD_PAGE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -