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.

95 lines
1.8 KiB

  1. // Copyright (c) 2001 Microsoft Corporation
  2. //
  3. // File: RemoteDesktopPage.h
  4. //
  5. // Synopsis: Defines the Remote Desktop page
  6. // for the CYS Wizard
  7. //
  8. // History: 12/18/2001 JeffJon Created
  9. #include "pch.h"
  10. #include "resource.h"
  11. #include "InstallationUnitProvider.h"
  12. #include "RemoteDesktopPage.h"
  13. #include "state.h"
  14. static PCWSTR REMOTEDESKTOP_PAGE_HELP = L"cys.chm::/cys_configuring_remote_desktop_server.htm";
  15. RemoteDesktopPage::RemoteDesktopPage()
  16. :
  17. CYSWizardPage(
  18. IDD_REMOTE_DESKTOP_PAGE,
  19. IDS_REMOTE_DESKTOP_TITLE,
  20. IDS_REMOTE_DESKTOP_SUBTITLE,
  21. REMOTEDESKTOP_PAGE_HELP)
  22. {
  23. LOG_CTOR(RemoteDesktopPage);
  24. }
  25. RemoteDesktopPage::~RemoteDesktopPage()
  26. {
  27. LOG_DTOR(RemoteDesktopPage);
  28. }
  29. void
  30. RemoteDesktopPage::OnInit()
  31. {
  32. LOG_FUNCTION(RemoteDesktopPage::OnInit);
  33. }
  34. bool
  35. RemoteDesktopPage::OnSetActive()
  36. {
  37. LOG_FUNCTION(RemoteDesktopPage::OnSetActive);
  38. Win::PropSheet_SetWizButtons(
  39. Win::GetParent(hwnd),
  40. PSWIZB_NEXT | PSWIZB_BACK);
  41. return true;
  42. }
  43. int
  44. RemoteDesktopPage::Validate()
  45. {
  46. LOG_FUNCTION(RemoteDesktopPage::Validate);
  47. int nextPage = -1;
  48. InstallationUnitProvider::GetInstance().GetRemoteAdminInstallationUnit().SetEnableRemoteDesktop(
  49. Win::Button_GetCheck(
  50. Win::GetDlgItem(hwnd, IDC_ENABLE_REMOTE_DESKTOP_CHECK)));
  51. SAKInstallationUnit& sakInstall =
  52. InstallationUnitProvider::GetInstance().GetSAKInstallationUnit();
  53. if (!State::GetInstance().Is64Bit() &&
  54. (!sakInstall.IsNASAdminInstalled() ||
  55. !sakInstall.IsWebAdminInstalled()))
  56. {
  57. nextPage = IDD_SAK_PAGE;
  58. }
  59. else
  60. {
  61. nextPage = IDD_MILESTONE_PAGE;
  62. }
  63. LOG(String::format(
  64. L"nextPage = %1!d!",
  65. nextPage));
  66. return nextPage;
  67. }