www.pudn.com > MGCPropertySheet.zip > MGCPropertySheet.cpp
// MGCPropertySheet.cpp : implementation file
//
#include "stdafx.h"
#include "admin.h"
#include "MGCPropertySheet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMGCPropertySheet
IMPLEMENT_DYNAMIC(CMGCPropertySheet, CPropertySheet)
CMGCPropertySheet::CMGCPropertySheet(int MGCId, CWnd* pParentWnd, UINT iSelectPage)
: CPropertySheet(IDS_MGC_PROPERTIES_TITLE, pParentWnd, iSelectPage)
, m_ipPhonesPage(IDS_IP_PHONES, false)
, m_ipGatewaysPage(IDS_IP_GATEWAYS, true)
{
AddPages(MGCId);
}
CMGCPropertySheet::~CMGCPropertySheet()
{
}
BEGIN_MESSAGE_MAP(CMGCPropertySheet, CPropertySheet)
//{{AFX_MSG_MAP(CMGCPropertySheet)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMGCPropertySheet message handlers
void CMGCPropertySheet::AddPages(int MGCId)
{
try {
m_hubsPage.m_MGC = *DataCache.GetMGC(MGCId);
m_ipPhonesPage.m_MGC = *DataCache.GetMGC(MGCId);
m_ipGatewaysPage.m_MGC = *DataCache.GetMGC(MGCId);
m_generalPage.m_MGC = *DataCache.GetMGC(MGCId);
}
catch (CDataCacheException e) {
}
AddPage(&m_generalPage);
AddPage(&m_hubsPage);
AddPage(&m_ipPhonesPage);
AddPage(&m_ipGatewaysPage);
}