Exemple #1
0
 // Token: 0x06002704 RID: 9988 RVA: 0x0008D6E4 File Offset: 0x0008B8E4
 public static ThemeStyleResource FromSlabStyle(SlabStyleFile style, string owaVersion, bool shouldSkipThemeFolder)
 {
     ResourceTarget.Filter targetFilter = ResourceTarget.Any;
     if (style.IsHighResolutionSprite())
     {
         if (style.IsForLayout(LayoutType.TouchWide))
         {
             targetFilter = ResourceTarget.WideHighResolution;
         }
         if (style.IsForLayout(LayoutType.TouchNarrow))
         {
             targetFilter = ResourceTarget.NarrowHighResolution;
         }
     }
     else
     {
         if (style.IsForLayout(LayoutType.Mouse))
         {
             targetFilter = ResourceTarget.MouseOnly;
         }
         if (style.IsForLayout(LayoutType.TouchWide))
         {
             targetFilter = ResourceTarget.WideOnly;
         }
         if (style.IsForLayout(LayoutType.TouchNarrow))
         {
             targetFilter = ResourceTarget.NarrowOnly;
         }
     }
     if (style.IsSprite())
     {
         return(new ThemeStyleResource(style.Name, targetFilter, owaVersion, shouldSkipThemeFolder));
     }
     return(new LocalizedThemeStyleResource(style.Name, targetFilter, owaVersion, shouldSkipThemeFolder));
 }
 private static SlabStyleFile[] LoadSlabStyleFiles(XmlNode node)
 {
     if (node.LocalName != "styles" && node.LocalName != "packagedStyles")
     {
         throw new SlabManifestFormatException(string.Format("styles node expected. Found {0}", node.LocalName));
     }
     SlabStyleFile[] array = new SlabStyleFile[node.ChildNodes.Count];
     for (int i = 0; i < node.ChildNodes.Count; i++)
     {
         string attributeValue  = SlabManifestLoader.GetAttributeValue(node.ChildNodes[i], "layout");
         string attributeValue2 = SlabManifestLoader.GetAttributeValue(node.ChildNodes[i], "type");
         array[i] = new SlabStyleFile
         {
             Name   = SlabManifestLoader.GetAttributeValue(node.ChildNodes[i], "name"),
             Layout = SlabManifestLoader.GetResourceLayout(attributeValue),
             Type   = attributeValue2
         };
     }
     return(array);
 }
        // Token: 0x060027DE RID: 10206 RVA: 0x00093020 File Offset: 0x00091220
        public override bool Equals(object obj)
        {
            SlabStyleFile slabStyleFile = obj as SlabStyleFile;

            return(slabStyleFile != null && this.Type == slabStyleFile.Type && this.Name == slabStyleFile.Name && base.Equals(obj));
        }