예제 #1
0
    public static Project GetSelectedProject(this DTE dte)
    {
        Project result = null;

        try
        {
            IVsProject vsProj = Global.GetSelectedVsProject();
            if (vsProj != null)
            {
                result = dte.GetProjectByFile(vsProj.FileName());
            }
        }
        catch { }
        return(result);
    }
예제 #2
0
파일: Global.cs 프로젝트: quizgb/LHJ.Tools
    public static Project GetSelectedProject(this DTE dte)
    {
        Project project = (Project)null;

        try
        {
            IVsProject selectedVsProject = Global.GetSelectedVsProject();
            if (selectedVsProject != null)
            {
                project = dte.GetProjectByFile(selectedVsProject.FileName());
            }
        }
        catch
        {
        }
        return(project);
    }