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.

94 lines
2.0 KiB

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