in vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/BuildPropPage.vb [1045:1154]
Private Sub XMLDocumentationEnable_CheckStateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkXMLDocumentationFile.CheckStateChanged
Const XML_FILE_EXTENSION As String = ".XML"
If Me.chkXMLDocumentationFile.Checked Then
Me.txtXMLDocumentationFile.Enabled = True
If Trim(Me.txtXMLDocumentationFile.Text) = "" Then
Dim stOutputPath As String
Dim stAssemblyName As String
Dim obj As Object = Nothing
Dim RawDocFiles() As Object = RawPropertiesObjects(GetPropertyControlData(VsProjPropId.VBPROJPROPID_DocumentationFile))
Dim OutputPathData() As Object
Dim cLen As Integer = RawDocFiles.Length
ReDim OutputPathData(cLen)
Dim p As PropertyControlData = GetPropertyControlData(VsProjPropId.VBPROJPROPID_OutputPath)
For i As Integer = 0 To cLen - 1
OutputPathData(i) = p.GetPropertyValueNative(RawDocFiles(i))
Next i
GetCurrentProperty(VsProjPropId.VBPROJPROPID_AssemblyName, "AssemblyName", obj)
stAssemblyName = TryCast(obj, String)
GetCurrentProperty(VsProjPropId.VBPROJPROPID_AbsoluteProjectDirectory, "AbsoluteProjectDirectory", obj)
Dim stProjectDirectory As String = TryCast(obj, String)
If Microsoft.VisualBasic.Right(stProjectDirectory, 1) <> "\" Then
stProjectDirectory &= "\"
End If
If (Not IsNothing(m_stDocumentationFile)) Then
Dim i As Integer
For i = 0 To m_stDocumentationFile.Length - 1
If (Not IsNothing(OutputPathData)) Then
stOutputPath = TryCast(OutputPathData(i), String)
Else
GetProperty(VsProjPropId.VBPROJPROPID_OutputPath, obj)
stOutputPath = CType(obj, String)
End If
If (Not IsNothing(stOutputPath)) Then
If Microsoft.VisualBasic.Right(stOutputPath, 1) <> "\" Then
stOutputPath &= "\"
End If
If (Path.IsPathRooted(stOutputPath)) Then
If (String.Compare(Path.GetFullPath(stProjectDirectory), _
Microsoft.VisualBasic.Left(Path.GetFullPath(stOutputPath), Len(stProjectDirectory)), _
StringComparison.Ordinal) = 0) Then
m_stDocumentationFile(i) = stOutputPath & stAssemblyName & XML_FILE_EXTENSION
Else
m_stDocumentationFile(i) = stProjectDirectory & stAssemblyName & XML_FILE_EXTENSION
End If
Else
m_stDocumentationFile(i) = stOutputPath & stAssemblyName & XML_FILE_EXTENSION
End If
End If
Next
Dim objDocumentationFile As Object
objDocumentationFile = GetValueOrIndeterminateFromArray(m_stDocumentationFile)
If (Not (PropertyControlData.IsSpecialValue(objDocumentationFile))) Then
Me.txtXMLDocumentationFile.Text = TryCast(objDocumentationFile, String)
End If
End If
End If
Me.txtXMLDocumentationFile.Focus()
Else
Me.txtXMLDocumentationFile.Enabled = False
Me.txtXMLDocumentationFile.Text = ""
Dim i As Integer
For i = 0 To m_stDocumentationFile.Length - 1
m_stDocumentationFile(i) = ""
Next
End If
If Not m_bInsideInternalUpdate Then
SetDirty(Me.txtXMLDocumentationFile)
End If
End Sub