Exemplo n.º 1
0
 protected void OnSkinResourcesChanged(SkinResources newResources)
 {
     if (_active)
     {
         UpdateTarget();
     }
 }
Exemplo n.º 2
0
        protected ICollection <ListItem> CollectSkinResourcesColors(SkinResources resourceBundle)
        {
            ICollection <ListItem> result = new List <ListItem>();

            foreach (KeyValuePair <object, object> localStyleResource in resourceBundle.LocalStyleResources)
            {
                object key   = localStyleResource.Key;
                object value = localStyleResource.Value;
                object c;
                object testString;
                int    testInt;
                if (TypeConverter.Convert(value, typeof(Color), out c))
                {
                    // Avoid conversion of strings containing int values
                    if (!TypeConverter.Convert(value, typeof(string), out testString) || !int.TryParse((string)testString, out testInt))
                    {
                        Color color = (Color)c;
                        result.Add(BuildColorListItem(key.ToString(), color));
                    }
                }
            }
            SkinResources inherited = resourceBundle.InheritedSkinResources;

            if (inherited != null)
            {
                CollectionUtils.AddAll(result, CollectSkinResourcesColors(inherited));
            }
            return(result);
        }
Exemplo n.º 3
0
        //StateSetList getSkinStateSets();

        public SkinResources getSkins()
        {
            SkinResources results = new SkinResources();

            foreach (SkinResource i in skin_state_sets.Keys)
            {
                results.Add(i);
            }
            return(results);
        }
Exemplo n.º 4
0
 void Start()
 {
     _instance = this;
 }
Exemplo n.º 5
0
 public SkinResources()
 {
     if(_instance!=null)return;
     _instance = this;
 }