public void ReadXml (XmlElement element) { var width = element.GetIntAttribute ("width"); var height = element.GetIntAttribute ("height"); var size = Size; if (width != null) size.Width = width.Value; if (height != null) size.Height = height.Value; Size = size; }
public void ReadXml (XmlElement element) { var width = element.GetIntAttribute ("width") ?? 0; var height = element.GetIntAttribute ("height") ?? 0; Size = new Size (width, height); }
public void ReadXml (XmlElement element) { var x = element.GetIntAttribute ("x") ?? 0; var y = element.GetIntAttribute ("y") ?? 0; Point = new Point(x, y); }