void UIInstallation::Run(HINSTANCE hInstance, ApplicationExecutor& applicationExecutor) { ApplicationSheetUI sheet; WelcomeModel welcomeModel(&applicationExecutor); WelcomePropertyPageUI welcome(&welcomeModel); ApplicationsModel applicationModel(&applicationExecutor); ApplicationsPropertyPageUI applications(&applicationModel); InstallModel installModel(&applicationExecutor); InstallPropertyPageUI install(&installModel); FinishModel finishModel(&applicationExecutor); FinishPropertyPageUI finish(&finishModel); welcome.setParent(&sheet); welcome.setPageButtons(NextButton); welcome.createPage(hInstance, IDD_WELCOME, IDD_WELCOME_AERO, MAKEINTRESOURCE(IDS_WIZARD_HEADER_WELCOME)); sheet.addPage(&welcome); applicationModel.SetView((IApplicationsPropertyPageUI *)&applications); applications.createPage(hInstance, IDD_APPLICATIONS, IDD_APPLICATIONS_AERO, MAKEINTRESOURCE(IDS_WIZARD_HEADER_APPLICATIONS)); applications.setParent(&sheet); applications.setPageButtons(NextBackButtons); sheet.addPage(&applications); install.setParent(&sheet); install.setPageButtons(CancelButtonOnly); install.StartSlideShowUnpack(); install.createPage(hInstance, IDD_INSTALL, IDD_INSTALL_AERO, MAKEINTRESOURCE(IDS_WIZARD_HEADER_INSTALL)); sheet.addPage(&install); finish.setParent(&sheet); finish.setPageButtons(FinishButtonOnly); finish.createPage(hInstance, IDD_FINISH, IDD_FINISH_AERO, MAKEINTRESOURCE(IDS_WIZARD_HEADER_FINISH)); sheet.addPage(&finish); sheet.runModal(hInstance, NULL, (LPWSTR)IDS_WIZARD_TITLE); }
void CatalanitzadorPerAWindows::_createWizard() { ApplicationSheetUI sheet; WelcomePropertyPageUI welcome; ApplicationsModel applicationModel; ApplicationsPropertyPageUI applications(&applicationModel); InstallPropertyPageUI install; FinishModel finishModel; FinishPropertyPageUI finish(&finishModel); SystemRestore sysRestore; bool bSendStats = true; int systemRestore = TRUE; bool bDialectVariant = false; bool bShowSecDlg = false; #if _DEBUG bSendStats = false; systemRestore = FALSE; #endif if (sysRestore.Init() == false) systemRestore = -1; vector <Action *> acts = m_actions.GetActions(); welcome.setParent(&sheet); welcome.setPageButtons(NextButton); welcome.SetSendStats(&bSendStats); welcome.SetSystemRestore(&systemRestore); welcome.SetActions(&m_actions); welcome.SetShowSecDlg(&bShowSecDlg); welcome.createPage(m_hInstance, IDD_WELCOME, IDD_WELCOME_AERO, MAKEINTRESOURCE(IDS_WIZARD_HEADER_WELCOME)); sheet.addPage(&welcome); applicationModel.SetActions(&acts); applicationModel.SetView((IApplicationsPropertyPageUI *)&applications); applications.createPage(m_hInstance, IDD_APPLICATIONS, IDD_APPLICATIONS_AERO, MAKEINTRESOURCE(IDS_WIZARD_HEADER_APPLICATIONS)); applications.setParent(&sheet); applications.setPageButtons(NextBackButtons); applications.SetActions(&acts); applications.SetDialectVariant(&bDialectVariant); sheet.addPage(&applications); install.setParent(&sheet); install.setPageButtons(CancelButtonOnly); install.SetActions(&acts); install.SetSerializer(&m_serializer); install.SetSystemRestore(&systemRestore); install.StartSlideShowUnpack(); install.createPage(m_hInstance, IDD_INSTALL, IDD_INSTALL_AERO, MAKEINTRESOURCE(IDS_WIZARD_HEADER_INSTALL)); sheet.addPage(&install); finish.setParent(&sheet); finish.setPageButtons(FinishButtonOnly); finishModel.SetSystemRestore(&systemRestore); finishModel.SetSendStats(&bSendStats); finishModel.SetSerializer(&m_serializer); finishModel.SetActions(&acts); finishModel.SetDialectVariant(&bDialectVariant); finishModel.SetShowSecDlg(&bShowSecDlg); finish.createPage(m_hInstance, IDD_FINISH, IDD_FINISH_AERO, MAKEINTRESOURCE(IDS_WIZARD_HEADER_FINISH)); sheet.addPage(&finish); sheet.runModal(m_hInstance, NULL, (LPWSTR)IDS_WIZARD_TITLE); }