📄 pgipcfg.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: ipcfgdef.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 "gen_act.h"
#include "pgipcfg.h"
#include "eng_io.h"
#include "piipcfg.h"
#include "pimsg.h"
// assign label
DIRECT_MEMTYPE_CODE SFixLabel aSFixLabelIpConf[] = {
{{ 2,32}, g_strIpConf, 0},
{{ 3,32}, "=", 16},
{{ 7,26}, "MAC Address:", 0},
{{ 9,26}, "IP Address:", 0},
{{11,26}, "Subnet Mask:", 0},
{{13,26}, "Default Gateway:", 0},
{{24, 2}, g_strHelpMsg, 0}
};
// assign item
DIRECT_MEMTYPE_CODE SItemString aSIStringIpConf[] = {
{g_pSIpConfPageCfg->szIp, IP_STRING_LEN},
{g_pSIpConfPageCfg->szSubnet, IP_STRING_LEN},
{g_pSIpConfPageCfg->szGateway, IP_STRING_LEN},
{g_pSIpConfPageCfg->szMac, MAC_STRING_LEN},
};
// all items
DIRECT_MEMTYPE_CODE SVarLabel aSVarLabelMac[] = {
{{ 7,43}, aSIStringIpConf+3, "", ITEM_STRING, REPEAT_TYPE_NONE, LINK_TYPE_NONE}
};
DIRECT_MEMTYPE_CODE SItem aSItemIpConf[] = {
{{ 9,43}, aSIStringIpConf, "", ITEM_STRING, REPEAT_TYPE_NONE, LINK_TYPE_NONE},
{{11,43}, aSIStringIpConf+1, "", ITEM_STRING, REPEAT_TYPE_NONE, LINK_TYPE_NONE},
{{13,43}, aSIStringIpConf+2, "", ITEM_STRING, REPEAT_TYPE_NONE, LINK_TYPE_NONE},
};
// action
DIRECT_MEMTYPE_CODE SActItem aSActionIpConf[] = {
{{22, 12}, g_strActionQuit, PAACT_bQuit},
{{22, 22}, g_strActionEdit, PAACT_bEdit},
{{22, 32}, g_strActionSave, PAIPCONF_bSaveCfg},
};
// assign page
DIRECT_MEMTYPE_CODE SPage g_SPageIpConf = {
aSFixLabelIpConf, 7,
aSVarLabelMac, 1,
aSItemIpConf, 3,
aSActionIpConf, 3,
PAIPCONF_bLoadCfg
};
//////////////////////////////////////////////////////////////////////////////
// load config
BOOL PAIPCONF_bLoadCfg(void) DIRECT_FUNTYPE_REENT
{
PIIPCONF_vInitPage(g_pSIpConfPageCfg);
return DONT_RELOAD_PAGE;
}
// save config
BOOL PAIPCONF_bSaveCfg(void) DIRECT_FUNTYPE_REENT
{
BYTE byErrCode;
PIMSG_vPutSavingMsg();
byErrCode = PIIPCONF_bySavePage(g_pSIpConfPageCfg);
PIMSG_vPutMsgThenPause(byErrCode);
if (byErrCode == OP_OK)
g_bDataDirty = 0;
return DONT_RELOAD_PAGE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -