protected void OnSkinResourcesChanged(SkinResources newResources) { if (_active) { UpdateTarget(); } }
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); }
//StateSetList getSkinStateSets(); public SkinResources getSkins() { SkinResources results = new SkinResources(); foreach (SkinResource i in skin_state_sets.Keys) { results.Add(i); } return(results); }
void Start() { _instance = this; }
public SkinResources() { if(_instance!=null)return; _instance = this; }