public void Execute(IActionContext context) { if (context.SelectedResources.Count == 0) { return; } Core.UIManager.BeginUpdateSidebar(); Core.TabManager.CurrentTabId = Core.TabManager.Tabs [0].Id; Core.UIManager.EndUpdateSidebar(); IResource mailAccount = context.SelectedResources[0]; IResourceList resourceList = mailAccount.GetLinksOfTypeLive(null, Core.ContactManager.Props.LinkEmailAcctFrom); IResourceList resourceListTo = mailAccount.GetLinksOfTypeLive(null, Core.ContactManager.Props.LinkEmailAcctTo); IResourceList resourceListCC = mailAccount.GetLinksOfTypeLive(null, Core.ContactManager.Props.LinkEmailAcctCC); resourceList = resourceList.Union(resourceListTo); resourceList = resourceList.Union(resourceListCC); ResourceTypeHelper.ExcludeUnloadedPluginResources(resourceList); ResourceListDisplayOptions options = new ResourceListDisplayOptions(); options.Caption = "Messages for " + mailAccount.DisplayName; options.SetTransientContainer(Core.ResourceTreeManager.ResourceTreeRoot, StandardViewPanes.ViewsCategories); Core.ResourceBrowser.DisplayResourceList(null, resourceList, options); }
public void Execute(IActionContext context) { IResource flag = context.SelectedResources [0]; IResourceList resList = flag.GetLinksOfType(null, "Flag"); Core.UIManager.BeginUpdateSidebar(); Core.TabManager.SelectResourceTypeTab(null); Core.UIManager.EndUpdateSidebar(); ResourceListDisplayOptions options = new ResourceListDisplayOptions(); options.Caption = "Resources with " + flag.GetPropText(Core.Props.Name); options.SetTransientContainer(Core.ResourceTreeManager.ResourceTreeRoot, StandardViewPanes.ViewsCategories); Core.ResourceBrowser.DisplayResourceList(null, resList, options); }
public override void Execute(IActionContext context) { Core.UIManager.BeginUpdateSidebar(); Core.TabManager.CurrentTabId = "IM"; Core.UIManager.EndUpdateSidebar(); IResource account = context.SelectedResources [0]; IResourceList resList = account.GetLinksOfType(null, ICQPlugin._propFromICQ); resList = resList.Union(account.GetLinksOfType(null, ICQPlugin._propToICQ)); ResourceListDisplayOptions options = new ResourceListDisplayOptions(); options.Caption = "Messages for " + account.DisplayName; options.SetTransientContainer(Core.ResourceTreeManager.ResourceTreeRoot, StandardViewPanes.ViewsCategories); Core.ResourceBrowser.DisplayResourceList(null, resList, options); }
/** * When the "See All..." label is clicked, displays all links of the * specified type in the resource browser. */ private void OnSeeAllClick(object sender, EventArgs e) { if (_resourceList != null && _resourceList.Count == 1) { IResource res = _resourceList [0]; Control linkLabel = (Control)sender; int linkType = (int)linkLabel.Tag; IResourceList links; if (linkType < 0) { links = res.GetLinksToLive(null, -linkType); } else if (Core.ResourceStore.PropTypes [linkType].HasFlag(PropTypeFlags.DirectedLink)) { links = res.GetLinksFromLive(null, linkType); } else { links = res.GetLinksOfTypeLive(null, linkType); } links = ResourceTypeHelper.ExcludeUnloadedPluginResources(links); Core.UIManager.BeginUpdateSidebar(); Core.TabManager.SelectResourceTypeTab(null); Core.UIManager.EndUpdateSidebar(); ResourceListDisplayOptions options = new ResourceListDisplayOptions(); options.Caption = _store.PropTypes.GetPropDisplayName(linkType) + " links to " + res.DisplayName; options.TabFilter = false; options.SetTransientContainer(Core.ResourceTreeManager.ResourceTreeRoot, StandardViewPanes.ViewsCategories); Core.ResourceBrowser.DisplayResourceList(null, links, options); Core.ResourceBrowser.FocusResourceList(); } }