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.

92 lines
2.0 KiB

  1. // Copyright (c) 2001 Microsoft Corporation
  2. //
  3. // File: AdminPackAndWebPage.h
  4. //
  5. // Synopsis: Defines the AdminPackAndWebPage that
  6. // asks the user if they want to install
  7. // the Admin Pack and the Web Admin tools
  8. //
  9. // History: 06/01/2001 JeffJon Created
  10. #include "pch.h"
  11. #include "resource.h"
  12. #include "InstallationUnitProvider.h"
  13. #include "AdminPackAndWebPage.h"
  14. #include "state.h"
  15. static PCWSTR ADMIN_PACK_AND_WEB_PAGE_HELP = L"cys.chm::/cys_adminpack.htm";
  16. AdminPackAndWebPage::AdminPackAndWebPage()
  17. :
  18. CYSWizardPage(
  19. IDD_ADMIN_PACK_AND_WEB_PAGE,
  20. IDS_ADMIN_PACK_TITLE,
  21. IDS_ADMIN_PACK_SUBTITLE,
  22. ADMIN_PACK_AND_WEB_PAGE_HELP)
  23. {
  24. LOG_CTOR(AdminPackAndWebPage);
  25. }
  26. AdminPackAndWebPage::~AdminPackAndWebPage()
  27. {
  28. LOG_DTOR(AdminPackAndWebPage);
  29. }
  30. void
  31. AdminPackAndWebPage::OnInit()
  32. {
  33. LOG_FUNCTION(AdminPackAndWebPage::OnInit);
  34. Win::SetDlgItemText(
  35. hwnd,
  36. IDC_TOO_LONG_STATIC,
  37. String::load(IDS_ADMIN_PACK_PAGE_TEXT));
  38. }
  39. bool
  40. AdminPackAndWebPage::OnSetActive()
  41. {
  42. LOG_FUNCTION(AdminPackAndWebPage::OnSetActive);
  43. Win::PropSheet_SetWizButtons(
  44. Win::GetParent(hwnd),
  45. PSWIZB_NEXT | PSWIZB_BACK);
  46. return true;
  47. }
  48. int
  49. AdminPackAndWebPage::Validate()
  50. {
  51. LOG_FUNCTION(AdminPackAndWebPage::Validate);
  52. int nextPage = IDD_MILESTONE_PAGE;
  53. // Get the checkbox value to see if we should install
  54. // the Admin Pack
  55. InstallationUnitProvider::GetInstance().GetAdminPackInstallationUnit().SetInstallAdminPack(
  56. Win::Button_GetCheck(
  57. Win::GetDlgItem(
  58. hwnd,
  59. IDC_INSTALL_ADMINPACK_CHECK)));
  60. InstallationUnitProvider::GetInstance().GetSAKInstallationUnit().SetInstallWebAdmin(
  61. Win::Button_GetCheck(
  62. Win::GetDlgItem(
  63. hwnd,
  64. IDC_INSTALL_WEBADMIN_CHECK)));
  65. LOG(String::format(
  66. L"nextPage = %1!d!",
  67. nextPage));
  68. return nextPage;
  69. }