2016-01-27 09:11:59 +00:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
|
|
#include "SettingsPage.h"
|
|
|
|
|
|
|
|
CConfigSettingSection::CConfigSettingSection(LPCWSTR PageTitle) :
|
2022-09-21 05:16:07 +00:00
|
|
|
m_PageTitle(PageTitle)
|
2016-01-27 09:11:59 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
CConfigSettingSection::~CConfigSettingSection()
|
|
|
|
{
|
2022-09-21 05:16:07 +00:00
|
|
|
for (size_t i = 0; i < m_Pages.size(); i++)
|
|
|
|
{
|
|
|
|
CSettingsPage * Page = m_Pages[i];
|
|
|
|
delete Page;
|
|
|
|
}
|
|
|
|
m_Pages.clear();
|
2016-01-27 09:11:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CConfigSettingSection::AddPage(CSettingsPage * Page)
|
|
|
|
{
|
2022-09-21 05:16:07 +00:00
|
|
|
m_Pages.push_back(Page);
|
2016-01-27 09:11:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CSettingsPage * CConfigSettingSection::GetPage(int PageNo)
|
|
|
|
{
|
2022-09-21 05:16:07 +00:00
|
|
|
if (PageNo < 0 || PageNo >= (int)m_Pages.size())
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
return m_Pages[PageNo];
|
2016-01-27 09:11:59 +00:00
|
|
|
}
|