public void ReadConfig(NintendoSpySkin skin, XmlNode xnode) { Location = new Point { X = int.Parse(xnode.Attributes["x"].Value), Y = int.Parse(xnode.Attributes["y"].Value) }; if (xnode.Attributes["width"] != null) { Size.Width = int.Parse(xnode.Attributes["width"].Value); } if (xnode.Attributes["height"] != null) { Size.Height = int.Parse(xnode.Attributes["height"].Value); } if (xnode.Attributes["ignore"] != null) { IgnoredInSkins = xnode.Attributes["ignore"].Value.Split(';').ToList(); } ImagePath = System.IO.Path.Combine(skin.WorkingDir, xnode.Attributes["image"].Value); }
public static Skin Clone(Skin skin) { if (skin is SvgSkin svg) { var clone = new SvgSkin(); clone.Load(svg.Path); return(clone); } else if (skin is NintendoSpySkin nspy) { var clone = new NintendoSpySkin(); clone.Load(nspy.Path); return(clone); } else if (skin is PadpyghtSkin ppyght) { var clone = new PadpyghtSkin(); clone.Load(ppyght.Path); return(clone); } return(null); }