Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.2 KiB

  1. // Copyright (c) 2002 Microsoft Corporation
  2. //
  3. // File: WebApplicationPage.h
  4. //
  5. // Synopsis: Defines the Web Application page
  6. // for the CYS Wizard
  7. //
  8. // History: 04/22/2002 JeffJon Created
  9. #include "pch.h"
  10. #include "resource.h"
  11. #include "InstallationUnitProvider.h"
  12. #include "WebApplicationPage.h"
  13. static PCWSTR WEBAPP_PAGE_HELP = L"cys.chm::/web_server_role.htm#websrvoptions";
  14. WebApplicationPage::WebApplicationPage()
  15. :
  16. CYSWizardPage(
  17. IDD_WEBAPP_PAGE,
  18. IDS_WEBAPP_TITLE,
  19. IDS_WEBAPP_SUBTITLE,
  20. WEBAPP_PAGE_HELP)
  21. {
  22. LOG_CTOR(WebApplicationPage);
  23. }
  24. WebApplicationPage::~WebApplicationPage()
  25. {
  26. LOG_DTOR(WebApplicationPage);
  27. }
  28. bool
  29. WebApplicationPage::OnSetActive()
  30. {
  31. LOG_FUNCTION(WebApplicationPage::OnSetActive);
  32. Win::PropSheet_SetWizButtons(
  33. Win::GetParent(hwnd),
  34. PSWIZB_NEXT | PSWIZB_BACK);
  35. return true;
  36. }
  37. int
  38. WebApplicationPage::Validate()
  39. {
  40. LOG_FUNCTION(WebApplicationPage::Validate);
  41. int nextPage = IDD_MILESTONE_PAGE;
  42. // Retrieve the data from the UI
  43. WebInstallationUnit& webInstallationUnit =
  44. InstallationUnitProvider::GetInstance().GetWebInstallationUnit();
  45. DWORD optionalComponents = webInstallationUnit.GetOptionalComponents();
  46. if (Win::IsDlgButtonChecked(hwnd, IDC_FRONT_PAGE_CHECK))
  47. {
  48. LOG(L"FrontPage Extensions checked");
  49. optionalComponents |= WebInstallationUnit::FRONTPAGE_EXTENSIONS_COMPONENT;
  50. }
  51. else
  52. {
  53. LOG(L"FrontPage Extensions unchecked");
  54. optionalComponents &= ~WebInstallationUnit::FRONTPAGE_EXTENSIONS_COMPONENT;
  55. }
  56. if (Win::IsDlgButtonChecked(hwnd, IDC_ASPNET_CHECK))
  57. {
  58. LOG(L"ASP.NET checked");
  59. optionalComponents |= WebInstallationUnit::ASPNET_COMPONENT;
  60. }
  61. else
  62. {
  63. LOG(L"ASP.NET unchecked");
  64. optionalComponents &= ~WebInstallationUnit::ASPNET_COMPONENT;
  65. }
  66. // Now set the option components for use in the rest of the installation
  67. webInstallationUnit.SetOptionalComponents(optionalComponents);
  68. LOG(String::format(
  69. L"nextPage = %1!d!",
  70. nextPage));
  71. return nextPage;
  72. }