private DateTime GetRestrictDate(IResource resFolder) { if (Refresh) { return(_indexStartDate); } if (resFolder != null) { bool seeAll = Folder.GetSeeAll(resFolder); if (seeAll) { return(DateTime.MinValue); } if (!seeAll && _indexStartDate == DateTime.MinValue) { Folder.SetSeeAllAsync(resFolder); } } return(_indexStartDate); }
internal void DisplayResourceList(IResource folder, IResourceList resourceList) { ResourceListDisplayOptions options = new ResourceListDisplayOptions(); _folder = folder; bool displayUnread = folder.HasProp(Core.Props.DisplayUnread); if (displayUnread) { options.CaptionTemplate = "Unread messages in %OWNER%"; } else { options.CaptionTemplate = "Messages in %OWNER%"; } options.SelectedResource = Folder.GetSelectedMail(_folder); if (Folder.IsIgnored(_folder)) { options.StatusLine = "This folder is in the ignore list"; options.StatusLine += ". Click to remove from the ignored folders list"; options.StatusLineClickHandler = OnClickOnBrowserStatus; } else { DateTime dateRestriction = Settings.IndexStartDate; if (dateRestriction.CompareTo(DateTime.MinValue) != 0 && !Folder.GetSeeAll(_folder)) { options.StatusLine = "Showing messages since " + dateRestriction.ToShortDateString(); options.StatusLine += ". Click to see all messages"; options.StatusLineClickHandler = OnClickOnBrowserStatus; } } options.SortSettings = new SortSettings(Core.Props.Date, false); if (_folder.HasProp(Core.Props.DisplayThreaded)) { options.ThreadingHandler = Core.PluginLoader.CompositeThreadingHandler; } Core.ResourceBrowser.DisplayResourceList(_folder, resourceList, options); }