public override void ReadXml(System.Xml.Linq.XElement element) { X = new DrawingExpression(this, "Center X =", element.ReadString("X")); Y = new DrawingExpression(this, "Center Y =", element.ReadString("Y")); R = new DrawingExpression(this, "Radius =", element.ReadString("R")); base.ReadXml(element); }
public override void ReadXml(System.Xml.Linq.XElement element) { base.ReadXml(element); Url = element.ReadString("Url"); Text = element.ReadString("Text"); var x = element.ReadDouble("X"); var y = element.ReadDouble("Y"); Enabled = element.ReadBool("Enabled", true); this.MoveTo(x, y); }
public override void ReadXml(System.Xml.Linq.XElement element) { //base.ReadXml(element); Center = new System.Windows.Point(element.ReadDouble("X"), element.ReadDouble("Y")); Width = element.ReadDouble("Width"); Height = element.ReadDouble("Height"); File = element.ReadString("File"); }
public override void ReadXml(System.Xml.Linq.XElement element) { base.ReadXml(element); var algorithm = element.ReadString("Algorithm"); if (string.IsNullOrEmpty(algorithm)) { throw new Exception("When reading the IntersectionPoint, the Algorithm attribute " + "was not specified. This point will not be created. Full text:\n" + element.ToString()); } var method = typeof(IntersectionAlgorithms).GetMethod(algorithm); if (method == null) { throw new Exception(string.Format("When reading the IntersectionPoint, the Algorithm method " + "'{0}' wasn't found.", algorithm)); } var @delegate = Delegate.CreateDelegate(typeof(Func <IFigure, IFigure, Point>), method); Algorithm = @delegate as Func <IFigure, IFigure, Point>; this.RecalculateAndUpdateVisual(); }
public override void ReadXml(System.Xml.Linq.XElement element) { base.ReadXml(element); mFunctionText = element.ReadString("Function"); }
public override void ReadXml(System.Xml.Linq.XElement element) { base.ReadXml(element); XExpression.Text = element.ReadString("X"); YExpression.Text = element.ReadString("Y"); }