public Shapes(Shapes _shape) { this._ShapeStyle = _shape._ShapeStyle; switch (_shape._ShapeStyle) { case ShapeStyleMode.Line: this._ShapeEx = new LineEx(_shape._ShapeEx as LineEx); break; case ShapeStyleMode.Rectangle: this._ShapeEx = new RectangleEx(_shape._ShapeEx as RectangleEx); break; case ShapeStyleMode.Ellipse: this._ShapeEx = new EllipseEx(_shape._ShapeEx as EllipseEx); break; } }
public Shapes(ShapeStyleMode shape) { this._ShapeStyle = shape; switch (shape) { case ShapeStyleMode.Line: this._ShapeEx = new LineEx(); break; case ShapeStyleMode.Rectangle: this._ShapeEx = new RectangleEx(); break; case ShapeStyleMode.Ellipse: this._ShapeEx = new EllipseEx(); break; } }
public Shapes(SerializationInfo info, StreamingContext context) { try { this._ShapeStyle = (ShapeStyleMode)info.GetValue("_ShapeStyle", typeof(ShapeStyleMode)); } catch { this._ShapeStyle = ShapeStyleMode.Line; } try { this._ShapeEx = info.GetValue("_ShapeEx", typeof(Webb.Reports.ExControls.Data.ShapeEx)) as Webb.Reports.ExControls.Data.ShapeEx; } catch { this._ShapeEx = new LineEx(); } }