/// <summary> /// Copy the properties of this <see cref="ZedGraphWebEllipseObj"/> to the specified /// <see cref="ZedGraph.EllipseObj"/> object. /// </summary> /// <param name="item">The destination <see cref="ZedGraph.EllipseObj"/> object</param> internal void CopyTo( EllipseObj item ) { base.CopyTo( item ); this.Border.CopyTo( item.Border ); this.Fill.CopyTo( item.Fill ); }
/// <summary> /// Add the <see cref="ZedGraphWebGraphObj" /> objects defined in the webcontrol to /// the <see cref="GraphPane" /> as <see cref="GraphObj" /> objects. /// </summary> /// <param name="g">The <see cref="Graphics" /> instance of interest.</param> /// <param name="pane">The <see cref="GraphPane" /> object to receive the /// <see cref="GraphObj" /> objects.</param> protected void AddWebGraphItems(IGraphics g, GraphPane pane) { try { ZedGraphWebGraphObj draw; for (int i = 0; i < GraphObjList.Count; i++) { draw = GraphObjList[i]; if (draw is ZedGraphWebTextObj) { var item = (ZedGraphWebTextObj) draw; var x = new TextObj(); item.CopyTo(x); pane.GraphObjList.Add(x); } else if (draw is ZedGraphWebArrowObj) { var item = (ZedGraphWebArrowObj) draw; var x = new ArrowObj(); item.CopyTo(x); pane.GraphObjList.Add(x); } else if (draw is ZedGraphWebImageObj) { var item = (ZedGraphWebImageObj) draw; var x = new ImageObj(); item.CopyTo(x); pane.GraphObjList.Add(x); } else if (draw is ZedGraphWebBoxObj) { var item = (ZedGraphWebBoxObj) draw; var x = new BoxObj(); item.CopyTo(x); pane.GraphObjList.Add(x); } else if (draw is ZedGraphWebEllipseObj) { var item = (ZedGraphWebEllipseObj) draw; var x = new EllipseObj(); item.CopyTo(x); pane.GraphObjList.Add(x); } } } catch (Exception ex) { Log.Debug("Exception thrown at AddWebGraphItems: " + ex.Message, ex); } }