Ejemplo n.º 1
0
        void HandleImages(XmlNode imgnode)
        {
            string imgname = GetStrParam(imgnode, "image", null);

            if (imgname == null)
            {
                return;
            }
            string name    = GetStrParam(imgnode, "name", null);
            string docking = FixDockingVal(GetStrParam(imgnode, "dock", "cc"));
            int    x       = GetIntParam(imgnode, "x", 0);
            int    y       = GetIntParam(imgnode, "y", 0);
            Color  col     = GetColorParam(imgnode, "color", Color.White);
            int    opacity = GetIntParam(imgnode, "opacity", -1) * 255 / 100;

            if ((opacity >= 0) && (opacity <= 255))
            {
                col = Color.FromArgb(opacity, col.R, col.G, col.B);
            }
            List <DecorItem> dlist = GetListFromLevel(imgnode);
            DecorItem        dcr   = new DecorImage(imgname, docking, x, y, col);

            dlist.Add(dcr);
            if (name != null)
            {
                dcr.name         = name;
                DecorItems[name] = dcr;
            }
        }
Ejemplo n.º 2
0
 void HandleImages(XmlNode imgnode)
 {
     string imgname = GetStrParam(imgnode, "image", null);
     if (imgname == null)
         return;
     string name = GetStrParam(imgnode, "name", null);
     string docking = FixDockingVal(GetStrParam(imgnode, "dock", "cc"));
     int x = GetIntParam(imgnode, "x", 0);
     int y = GetIntParam(imgnode, "y", 0);
     Color col = GetColorParam(imgnode, "color", Color.White);
     int opacity = GetIntParam(imgnode, "opacity", -1) * 255 / 100;
     if ((opacity >= 0) && (opacity <= 255))
         col = Color.FromArgb(opacity, col.R, col.G, col.B);
     List<DecorItem> dlist = GetListFromLevel(imgnode);
     DecorItem dcr = new DecorImage(imgname, docking, x, y, col);
     dlist.Add(dcr);
     if (name != null)
     {
         dcr.name = name;
         DecorItems[name] = dcr;
     }
 }