Exemple #1
0
        ITabGroup GetTabGroup(IMenuItemContext context)
        {
            if (context.CreatorObject.Guid != new Guid(MenuConstants.GUIDOBJ_FILES_TABCONTROL_GUID))
            {
                return(null);
            }
            var g = context.Find <ITabGroup>();

            return(g != null && fileTabManager.Owns(g) ? g : null);
        }
Exemple #2
0
        TabGroupContext CreateContextInternal(IMenuItemContext context)
        {
            if (context.CreatorObject.Guid != new Guid(MenuConstants.GUIDOBJ_FILES_TABCONTROL_GUID))
            {
                return(null);
            }
            var tabGroup = context.Find <ITabGroup>();

            if (tabGroup == null || !fileTabManager.Owns(tabGroup))
            {
                return(null);
            }
            return(new TabGroupContext(tabGroup));
        }