本文整理汇总了C#中IVsHierarchy.GetDteProject方法的典型用法代码示例。如果您正苦于以下问题:C# IVsHierarchy.GetDteProject方法的具体用法?C# IVsHierarchy.GetDteProject怎么用?C# IVsHierarchy.GetDteProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVsHierarchy
的用法示例。
在下文中一共展示了IVsHierarchy.GetDteProject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BeforeCloseProject
int IVsSolutionEvents.OnBeforeCloseProject(IVsHierarchy pHierarchy, int fRemoved)
{
if (BeforeCloseProject != null)
{
var project = pHierarchy.GetDteProject();
BeforeCloseProject(project, new BeforeCloseProjectEventArgs
{
Project = project,
Hierarchy = pHierarchy,
Removed = fRemoved == 1
});
}
return VSConstants.S_OK;
}
示例2: AfterOpenProject
int IVsSolutionEvents.OnAfterOpenProject(IVsHierarchy pHierarchy, int fAdded)
{
if (AfterOpenProject != null)
{
var project = pHierarchy.GetDteProject();
AfterOpenProject(project, new AfterOpenProjectEventArgs
{
Hierarchy = pHierarchy,
Project = project,
Added = fAdded == 1
});
}
return VSConstants.S_OK;
}
示例3: AfterLoadProject
int IVsSolutionEvents.OnAfterLoadProject(IVsHierarchy pStubHierarchy, IVsHierarchy pRealHierarchy)
{
if (AfterLoadProject != null)
{
var project = pRealHierarchy.GetDteProject();
AfterLoadProject(project, new AfterLoadProjectEventArgs
{
StubHierarchy = pStubHierarchy,
RealHierarchy = pRealHierarchy,
Project = project
});
}
return VSConstants.S_OK;
}
示例4: BeforeUnloadProject
int IVsSolutionEvents.OnBeforeUnloadProject(IVsHierarchy pRealHierarchy, IVsHierarchy pStubHierarchy)
{
if (BeforeUnloadProject != null)
{
var project = pRealHierarchy.GetDteProject();
BeforeUnloadProject(project, new BeforeUnloadProjectEventArgs
{
Project = project,
RealHierarchy = pRealHierarchy,
StubHierarchy = pStubHierarchy
});
}
return VSConstants.S_OK;
}
示例5: QueryUnloadProject
int IVsSolutionEvents.OnQueryUnloadProject(IVsHierarchy pRealHierarchy, ref int pfCancel)
{
if (QueryUnloadProject != null)
{
var project = pRealHierarchy.GetDteProject();
var eventArgs = new QueryUnloadProjectEventArgs
{
Project = project,
Cancel = pfCancel == 1
};
QueryUnloadProject(project, eventArgs);
pfCancel = eventArgs.Cancel ? 1 : 0;
}
return VSConstants.S_OK;
}
示例6: QueryCloseProject
int IVsSolutionEvents.OnQueryCloseProject(IVsHierarchy pHierarchy, int fRemoving, ref int pfCancel)
{
if (QueryCloseProject != null)
{
var project = pHierarchy.GetDteProject();
QueryCloseProject(project, new QueryCloseProjectEventArgs(pHierarchy, fRemoving == 1));
}
return VSConstants.S_OK;
}