2012-03-27 21:20:36 +00:00
|
|
|
#pragma once
|
|
|
|
#include "PropertySheetDefs.h"
|
2012-05-06 22:14:03 +00:00
|
|
|
#include "Config.h"
|
2012-03-27 21:20:36 +00:00
|
|
|
|
|
|
|
class CPropertySheetHelper
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CPropertySheetHelper() :
|
|
|
|
m_LastPage(PG_CONFIG),
|
2012-03-31 21:34:02 +00:00
|
|
|
m_bmPages(0),
|
2012-07-08 12:21:15 +00:00
|
|
|
m_bSSNewFilename(false),
|
|
|
|
m_bDoBenchmark(false)
|
2012-03-27 21:20:36 +00:00
|
|
|
{}
|
|
|
|
virtual ~CPropertySheetHelper(){}
|
|
|
|
|
|
|
|
void FillComboBox(HWND window, int controlid, LPCTSTR choices, int currentchoice);
|
|
|
|
void SetSlot4(SS_CARDTYPE NewCardType);
|
|
|
|
void SetSlot5(SS_CARDTYPE NewCardType);
|
2014-08-13 20:30:35 +00:00
|
|
|
std::string BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR* REGVALUE,TCHAR* FILEMASKS);
|
2012-03-27 21:20:36 +00:00
|
|
|
void SaveStateUpdate();
|
|
|
|
int SaveStateSelectImage(HWND hWindow, TCHAR* pszTitle, bool bSave);
|
2012-05-06 22:14:03 +00:00
|
|
|
void PostMsgAfterClose(HWND hWnd, PAGETYPE page);
|
2012-03-27 21:20:36 +00:00
|
|
|
|
2012-05-06 22:14:03 +00:00
|
|
|
void ResetPageMask(void) { m_bmPages = 0; } // Req'd because cancelling doesn't clear the page-mask
|
2012-03-27 21:20:36 +00:00
|
|
|
PAGETYPE GetLastPage(void) { return m_LastPage; }
|
2012-03-31 21:34:02 +00:00
|
|
|
void SetLastPage(PAGETYPE page)
|
|
|
|
{
|
|
|
|
m_LastPage = page;
|
|
|
|
m_bmPages |= 1<<(UINT32)page;
|
|
|
|
}
|
|
|
|
|
2012-05-06 22:14:03 +00:00
|
|
|
void SaveCurrentConfig(void);
|
2012-03-27 21:20:36 +00:00
|
|
|
char* GetSSNewFilename(void) { return &m_szSSNewFilename[0]; }
|
|
|
|
void ClearSSNewDirectory(void) { m_szSSNewDirectory[0] = 0; }
|
2012-05-06 22:14:03 +00:00
|
|
|
// const CConfigNeedingRestart& GetConfigOld(void) { return m_ConfigOld; }
|
|
|
|
CConfigNeedingRestart& GetConfigNew(void) { return m_ConfigNew; }
|
2012-07-08 12:21:15 +00:00
|
|
|
bool IsConfigChanged(void) { return m_ConfigNew != m_ConfigOld; }
|
|
|
|
void SetDoBenchmark(void) { m_bDoBenchmark = true; }
|
2016-03-21 23:48:02 +00:00
|
|
|
void ApplyNewConfig(const CConfigNeedingRestart& ConfigNew, const CConfigNeedingRestart& ConfigOld);
|
2012-03-27 21:20:36 +00:00
|
|
|
|
|
|
|
private:
|
2012-07-08 12:21:15 +00:00
|
|
|
bool IsOkToSaveLoadState(HWND hWnd, const bool bConfigChanged);
|
2012-05-06 22:14:03 +00:00
|
|
|
bool IsOkToRestart(HWND hWnd);
|
|
|
|
void SaveComputerType(eApple2Type NewApple2Type);
|
2016-03-21 23:48:02 +00:00
|
|
|
void SaveCpuType(eCpuType NewCpuType);
|
2012-05-06 22:14:03 +00:00
|
|
|
bool HardwareConfigChanged(HWND hWnd);
|
|
|
|
bool CheckChangesForRestart(HWND hWnd);
|
|
|
|
void ApplyNewConfig(void);
|
|
|
|
void RestoreCurrentConfig(void);
|
|
|
|
std::string GetSlot(const UINT uSlot);
|
|
|
|
std::string GetCardName(const SS_CARDTYPE CardType);
|
2016-03-21 23:48:02 +00:00
|
|
|
void GetDiskBaseNameWithAWS(TCHAR* pszFilename);
|
2012-05-06 22:14:03 +00:00
|
|
|
|
2012-03-27 21:20:36 +00:00
|
|
|
PAGETYPE m_LastPage;
|
2012-03-31 21:34:02 +00:00
|
|
|
UINT32 m_bmPages;
|
2012-03-27 21:20:36 +00:00
|
|
|
char m_szNewFilename[MAX_PATH];
|
|
|
|
bool m_bSSNewFilename;
|
|
|
|
char m_szSSNewDirectory[MAX_PATH];
|
|
|
|
char m_szSSNewFilename[MAX_PATH];
|
2013-12-29 22:09:41 +00:00
|
|
|
char m_szSSNewPathname[MAX_PATH];
|
2012-05-06 22:14:03 +00:00
|
|
|
CConfigNeedingRestart m_ConfigOld;
|
|
|
|
CConfigNeedingRestart m_ConfigNew;
|
2012-07-08 12:21:15 +00:00
|
|
|
bool m_bDoBenchmark;
|
2012-03-27 21:20:36 +00:00
|
|
|
};
|