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.

88 lines
1.8 KiB

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