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.

220 lines
8.9 KiB

  1. VERSION 5.00
  2. Begin VB.PropertyPage ppgFileAccess
  3. Caption = "File Explorer: Determine File Access"
  4. ClientHeight = 3600
  5. ClientLeft = 0
  6. ClientTop = 0
  7. ClientWidth = 4800
  8. PaletteMode = 0 'Halftone
  9. ScaleHeight = 3600
  10. ScaleWidth = 4800
  11. Begin VB.OptionButton optNo
  12. Caption = "No"
  13. Height = 375
  14. Left = 240
  15. TabIndex = 1
  16. Top = 1800
  17. Value = -1 'True
  18. Width = 975
  19. End
  20. Begin VB.OptionButton optYes
  21. Caption = "Yes"
  22. Height = 375
  23. Left = 240
  24. TabIndex = 0
  25. Top = 1320
  26. Width = 975
  27. End
  28. Begin VB.Label Label1
  29. Caption = "Do you want to allow renaming and deleting files?"
  30. BeginProperty Font
  31. Name = "Arial"
  32. Size = 12
  33. Charset = 0
  34. Weight = 700
  35. Underline = 0 'False
  36. Italic = -1 'True
  37. Strikethrough = 0 'False
  38. EndProperty
  39. Height = 615
  40. Left = 240
  41. TabIndex = 2
  42. Top = 240
  43. Width = 3735
  44. End
  45. End
  46. Attribute VB_Name = "ppgFileAccess"
  47. Attribute VB_GlobalNameSpace = False
  48. Attribute VB_Creatable = True
  49. Attribute VB_PredeclaredId = False
  50. Attribute VB_Exposed = True
  51. Option Explicit
  52. ' ===========================================================================
  53. ' | THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF |
  54. ' | ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO |
  55. ' | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |
  56. ' | PARTICULAR PURPOSE. |
  57. ' | Copyright (c) 1998-1999 Microsoft Corporation |
  58. ' ===========================================================================
  59. ' =============================================================================
  60. ' File: ppgNetDrives.pag
  61. ' Project: FileExplorerSample
  62. ' Type: Property Page for Configuration Wizard
  63. ' =============================================================================
  64. ' Property pages used in a configuration wizard must implement the IWizardPage
  65. ' interface defined by the snap-in designer runtime. The runtime uses this
  66. ' interface to communicate Win32 property sheet events to the page. Note that
  67. ' unlike event handlers, methods of an implemented interface must all be present
  68. ' in the source file even if they do not contain any code.
  69. Implements IWizardPage
  70. ' FileExplorer's ConfigData object is passed in the event
  71. ' PropertyPage_SelectionChanged. We store it here so that IWizardPage methods
  72. ' will have access to it as the user interacts with the page.
  73. Private m_ConfigData As ConfigData
  74. ' =============================================================================
  75. ' Method: IWizardPage_Activate
  76. ' Type: Interface Method
  77. ' Description: Called when the page is about to be displayed.
  78. '
  79. ' Parameters: EnableBack Defaults to True. Set to False to disable the
  80. ' Back button.
  81. ' NextOrFinish Defaults to NextButton. Determines type of
  82. ' second button. Other options are
  83. ' EnabledFinishButton and DisabledFinishButton.
  84. ' FinishText If using a Finish button, determines the text
  85. ' that will be displayed in the button. If not
  86. ' set then defaults to "Finish".
  87. ' Output: None
  88. ' Notes: As this is not the first page of the wizard we enable the
  89. ' back button. As there are more pages to the wizard, we request
  90. ' a Next button rather than a Finish button.
  91. ' =============================================================================
  92. '
  93. Private Sub IWizardPage_Activate(EnableBack As Boolean, _
  94. NextOrFinish As SnapInLib.WizardPageButtonConstants, _
  95. FinishText As String)
  96. EnableBack = True
  97. NextOrFinish = EnabledNextButton
  98. End Sub
  99. ' =============================================================================
  100. ' Method: IWizardPage_Back
  101. ' Type: Interface Method
  102. ' Description: Called when the user clicks the Back button
  103. '
  104. ' Parameters: NextPage Defaults to zero to allow the user to return
  105. ' to the previous page. Set to -1 to disallow
  106. ' the move, or to a positive integer to move to
  107. ' another page. Pages are numbered from 1 to n
  108. ' based on the order in which the snap-in called
  109. ' PropertySheet.AddWizardPage.
  110. ' Output: None
  111. ' Notes: Apply any changes made by the user to the ConfigData object
  112. ' =============================================================================
  113. '
  114. Private Sub IWizardPage_Back(NextPage As Long)
  115. ApplyConfigChanges
  116. End Sub
  117. ' =============================================================================
  118. ' Method: IWizardPage_Cancel
  119. ' Type: Interface Method
  120. ' Description: Called when the user clicks the Cancel button
  121. '
  122. ' Parameters: Allow Defaults to True to allow the user to cancel
  123. ' the wizard. Set to False to disallow the
  124. ' the cancel.
  125. ' Output: None
  126. ' Notes: None
  127. ' =============================================================================
  128. '
  129. Private Sub IWizardPage_Cancel(Allow As Boolean)
  130. Allow = True
  131. End Sub
  132. ' =============================================================================
  133. ' Method: IWizardPage_Finish
  134. ' Type: Interface Method
  135. ' Description: Called when the user clicks the Finish button
  136. '
  137. ' Parameters: Allow Defaults to True to allow the user to finish
  138. ' the wizard. Set to False to disallow the
  139. ' the finish.
  140. ' Output: None
  141. ' Notes: None
  142. ' =============================================================================
  143. '
  144. Private Sub IWizardPage_Finish(Allow As Boolean)
  145. End Sub
  146. ' =============================================================================
  147. ' Method: IWizardPage_Next
  148. ' Type: Interface Method
  149. ' Description: Called when the user clicks the Next button
  150. '
  151. ' Parameters: NextPage Defaults to zero to allow the user to proceed
  152. ' to the next page. Set to -1 to disallow
  153. ' the move, or to a positive integer to move to
  154. ' another page. Pages are numbered from 1 to n
  155. ' based on the order in which the snap-in called
  156. ' PropertySheet.AddWizardPage.
  157. ' Output: None
  158. ' Notes: Apply any changes made by the user to the ConfigData object
  159. ' =============================================================================
  160. '
  161. Private Sub IWizardPage_Next(NextPage As Long)
  162. ApplyConfigChanges
  163. End Sub
  164. ' =============================================================================
  165. ' Method: ApplyConfigChanges()
  166. ' Type: Subroutine
  167. ' Description: Transfers the contents of the UI fields to the ConfigData object
  168. '
  169. ' Parameters: None
  170. ' Output: None
  171. ' Notes: None
  172. ' =============================================================================
  173. '
  174. Private Sub ApplyConfigChanges()
  175. If optYes.Value Then
  176. m_ConfigData.AllowFileAccess = True
  177. Else
  178. m_ConfigData.AllowFileAccess = False
  179. End If
  180. End Sub
  181. ' =============================================================================
  182. ' Method: PropertyPage_SelectionChanged
  183. ' Type: Event
  184. ' Description: Called when the property sheet passes the object(s) for which
  185. ' it is being displayed to the property page. For wizard pages
  186. ' the snap-in passes an object of its choice. The FileExplorer
  187. ' passes its ConfigData object.
  188. ' Parameters: None
  189. ' Output: None
  190. ' Notes: Store the ConfigData object in a member variable for use by
  191. ' IWizard page methods as the user interacts with the page.
  192. ' =============================================================================
  193. '
  194. Private Sub PropertyPage_SelectionChanged()
  195. On Error Resume Next
  196. Set m_ConfigData = SelectedControls(0)
  197. If m_ConfigData Is Nothing Then
  198. Set m_ConfigData = SelectedControls(0).Tag
  199. End If
  200. End Sub