Export (0) Print
Expand All

_dispVCProjectEngineEvents.SccEvent Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Signifies that a source code control event has occurred.

Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

void SccEvent(
	Object Item,
	enumSccEvent eventID
)

Parameters

Item
Type: System.Object

Required. The item.

eventID
Type: Microsoft.VisualStudio.VCProjectEngine.enumSccEvent

Required. The event. An enumSccEvent value.

The SccEvent method can be used to catch, allow a change, or disallow a change to project file settings. It can also be used when integrating your own source code system into Visual Studio.

[Visual Basic]

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub SccEvent(ByVal item As Object, ByVal eventid As enumSccEvent)
        Dim vcitem As VCProjectItem
        vcitem = item
        MsgBox(vcitem.Name)
    End Sub

    Sub Main()
        Dim projEngine As VCProjectEngine
        Dim evt As VCProjectEngineEvents
        Dim prj As VCProject
        Dim configuration As VCConfiguration
        prj = DTE.Solution.Projects.Item(1).Object
        projEngine = prj.VCProjectEngine
        evt = projEngine.Events
        AddHandler evt.SccEvent, AddressOf SccEvent
        configuration = prj.Configurations.Item("Debug")
        configuration.IntermediateDirectory = "DebugNew"
    End Sub

End Module

Show:
© 2014 Microsoft