public static ToolWindow GetCrmDevExWindow(EnvDTE.Window window) { if (window.ObjectKind == null) { return(null); } Guid windowGuid = new Guid(StringFormatting.RemoveBracesToUpper(window.ObjectKind)); return(ExtensionConstants.CrmDevExToolWindows.FirstOrDefault(w => w.ToolWindowsId == windowGuid)); }
public static bool IsCrmDevExWindow(EnvDTE.Window window) { if (window.ObjectKind == null) { return(false); } Guid windowGuid = new Guid(StringFormatting.RemoveBracesToUpper(window.ObjectKind)); return(ExtensionConstants.CrmDevExToolWindows.Count(w => w.ToolWindowsId == windowGuid) > 0); }