예제 #1
0
파일: OutlookActions.cs 프로젝트: mo5h/omeo
        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);
        }