Ejemplo n.º 1
0
        private static Dictionary <StoreObjectType, Dictionary <string, WebPartListView> > LoadViews()
        {
            Dictionary <StoreObjectType, Dictionary <string, WebPartListView> > dictionary = new Dictionary <StoreObjectType, Dictionary <string, WebPartListView> >();
            Dictionary <string, WebPartListView> dictionary2 = new Dictionary <string, WebPartListView>(StringComparer.OrdinalIgnoreCase);

            dictionary2["messages"]              = new WebPartListView(new int?(7), null, new bool?(false), false);
            dictionary2["by sender"]             = new WebPartListView(new int?(1), new int?(0), new bool?(false), false);
            dictionary2["by subject"]            = new WebPartListView(new int?(3), new int?(0), new bool?(false), false);
            dictionary2["by conversation topic"] = new WebPartListView(null, null, null, true);
            dictionary2["two line"]              = new WebPartListView(null, null, new bool?(true), true);
            dictionary[StoreObjectType.Folder]   = dictionary2;
            Dictionary <string, WebPartListView> dictionary3 = new Dictionary <string, WebPartListView>(StringComparer.OrdinalIgnoreCase);

            dictionary3["daily"]   = new WebPartListView(null, null, null, false);
            dictionary3["weekly"]  = new WebPartListView(null, null, null, false);
            dictionary3["monthly"] = new WebPartListView(null, null, null, false);
            dictionary[StoreObjectType.CalendarFolder] = dictionary3;
            Dictionary <string, WebPartListView> dictionary4 = new Dictionary <string, WebPartListView>(StringComparer.OrdinalIgnoreCase);

            dictionary4["two line"]   = new WebPartListView(null, null, new bool?(true), true);
            dictionary4["phone list"] = new WebPartListView(null, null, new bool?(false), false);
            dictionary[StoreObjectType.ContactsFolder] = dictionary4;
            Dictionary <string, WebPartListView> dictionary5 = new Dictionary <string, WebPartListView>(StringComparer.OrdinalIgnoreCase);

            dictionary5["by due date"] = new WebPartListView(new int?(74), new int?(1), null, true);
            dictionary5["by subject"]  = new WebPartListView(new int?(3), new int?(0), new bool?(false), true);
            dictionary[StoreObjectType.TasksFolder] = dictionary5;
            return(dictionary);
        }
Ejemplo n.º 2
0
        public static WebPartListView LookUpWebPartView(StoreObjectType folderObjectType, string className, string view)
        {
            WebPartListView result = null;
            Dictionary <string, WebPartListView> dictionary = null;

            if (string.IsNullOrEmpty(view))
            {
                view = WebPartUtilities.GetDefaultView(className);
            }
            if (WebPartUtilities.Views.TryGetValue(folderObjectType, out dictionary))
            {
                dictionary.TryGetValue(view, out result);
            }
            return(result);
        }
        // Token: 0x06001916 RID: 6422 RVA: 0x00091F2C File Offset: 0x0009012C
        private bool IsViewValid(StoreObjectType objectType)
        {
            bool result = false;
            Dictionary <string, WebPartListView> dictionary = WebPartUtilities.Views[objectType];
            WebPartListView webPartListView = null;

            if (dictionary.TryGetValue(this.webPartParameters["view"], out webPartListView))
            {
                result = true;
                if (this.IsBasicClient() && webPartListView.IsPremiumOnly)
                {
                    result = false;
                }
            }
            return(result);
        }