private void OnRemoveFromSidebar(ISidebarViewItem sidebarItem)
 {
     // Remove all of that type.
     SidebarItems
     .Where(sbi => sbi.GetType() == sidebarItem.GetType())
     .ToList()
     .ForEach(item => SidebarItems.Remove(item));
 }
Beispiel #2
0
        public void RemoveModule(Core.Plugins.Abstract.Module module)
        {
            // If not in the list there's nothing to do
            if (SidebarItemObjects.All(io => io.Value != module))
                return;

            var existing = SidebarItemObjects.First(io => io.Value == module);
            SidebarItems.Remove(existing.Key);
            SidebarItemObjects.Remove(existing.Key);
        }