public void SetData(Hashtable ht)
{
this.bounds = new Rect(float.Parse((string)ht["x"]), float.Parse((string)ht["y"]),
float.Parse((string)ht["w"]), float.Parse((string)ht["h"]));
this.statusID = int.Parse((string)ht["status"]);
this.showEmpty = bool.Parse((string)ht["empty"]);
if(ht.ContainsKey("scale"))
{
this.scaleMode = (ScaleMode)System.Enum.Parse(typeof(ScaleMode), (string)ht["scale"]);
this.alphaBlend = bool.Parse((string)ht["blend"]);
this.imageAspect = float.Parse((string)ht["aspect"]);
if(ht.ContainsKey(XMLHandler.NODES))
{
ArrayList s = (ArrayList)ht[XMLHandler.NODES];
foreach(Hashtable img in s)
{
if(img[XMLHandler.NODE_NAME] as string == "image")
{
this.imageName = (string)img[XMLHandler.CONTENT];
}
else if(img[XMLHandler.NODE_NAME] as string == "emptyimage")
{
this.emptyImageName = (string)img[XMLHandler.CONTENT];
}
}
}
}
else
{
this.barColor = int.Parse((string)ht["c1"]);
this.emptyColor = int.Parse((string)ht["c2"]);
}
}