/* * 名称:拷贝赋值 */ public bool Copy(CustomGraphObject _src) { if (null == _src) { return(false); } lock (mLockObject) { m_graphVertex.Clear(); foreach (var pt in _src.m_graphVertex) { m_graphVertex.Add(new strCustomPoint(pt.X, pt.Y)); } m_drawType = _src.GraphType; m_status = _src.GraphStatus; m_left = _src.GraphLeft; m_right = _src.GraphRight; m_top = _src.GraphTop; m_bottom = _src.GraphBottom; m_bModifyInfo = _src.bModifyInfo; m_modifyId = _src.ModifyId; m_modifyType = _src.ModifyType; return(true); } }
public CustomGraphObject(CustomGraphObject _object) : this() { if (null != _object) { foreach (var _point in _object.GraphVertex) { m_graphVertex.Add(new strCustomPoint(_point.X, _point.Y)); } m_drawType = _object.GraphType; m_status = _object.GraphStatus; m_left = _object.GraphLeft; m_right = _object.GraphRight; m_top = _object.GraphTop; m_bottom = _object.GraphBottom; m_bModifyInfo = _object.bModifyInfo; m_modifyId = _object.ModifyId; m_modifyType = _object.ModifyType; m_iCanvasWidth = _object.CanvasWidth; m_iCanvasHeight = _object.CanvasHeight; } }