/// <summary> /// Load bitmaps for the skin /// </summary> /// <param name="xmlNode"></param> /// <returns></returns> internal ArrayList LoadBitmaps(XmlNode xmlNode) { ArrayList mBitmaps = new ArrayList(); foreach (XmlNode node in xmlNode.ChildNodes) { SkinBitmap skinBitmap = (SkinBitmap)LoadElement(node); mBitmaps.Add(skinBitmap); } return(mBitmaps); }
/// <summary> /// Loads the style element from document node. /// </summary> /// <param name="objectNode">document node which repersents object</param> /// <returns>instance of class SlideElement</returns> private Object LoadElement(XmlNode styleNode) { string objectType = styleNode.Name; Object retobject = null; if (objectType == "bitmap") { retobject = new SkinBitmap(sResDir); } if (objectType == "element") { retobject = new SkinBaseElement(); ((SkinBaseElement)retobject).BitmapChanged += new BitmapChangedEventHandler(element_BitmapChanged); } else if (objectType == "control") { retobject = new SkinBaseControl(); ((SkinBaseElement)retobject).BitmapChanged += new BitmapChangedEventHandler(element_BitmapChanged); } else if (objectType == "property") { retobject = new SkinElementPropertyInfo(); } /*else if (objectType == "button") * { * retobject = new FlatToggleButton(); * ((SkinBaseElement)retobject).BitmapChanged += new BitmapChangedEventHandler( element_BitmapChanged); * ((FlatToggleButton)retobject).OnNeedUpdate +=new EventHandler(FormSkin_OnNeedUpdate); * ((FlatToggleButton)retobject).OnClick +=new EventHandler(FormSkin_OnClick); * } * else if (objectType == "dragbutton") * { * retobject = new DragFormButton(); * ((DragFormButton)retobject).OnDragBy +=new MouseEventHandler(FormSkin_OnDragBy); * } * else if (objectType == "resizebutton") * { * retobject = new ResizeFormButton(); * ((ResizeFormButton)retobject).OnResizeBy +=new MouseEventHandler(FormSkin_OnResizeBy); * }*/ if (retobject != null) { foreach (XmlAttribute node in styleNode.Attributes) { SetProperty(retobject, node); } } return(retobject); }