public static string GraphTypeTransToChinese(eCustomGraphDrawType _type) { string revalue = null; switch (_type) { case eCustomGraphDrawType.Line: revalue = "线段"; break; case eCustomGraphDrawType.DoubleLine: revalue = "两条线段"; break; case eCustomGraphDrawType.DirectLine: revalue = "方向线段"; break; case eCustomGraphDrawType.Rectangle: revalue = "矩形"; break; case eCustomGraphDrawType.Quadrangle: revalue = "四边形"; break; case eCustomGraphDrawType.Polygon: revalue = "多边形"; break; default: break; } return(revalue); }
/* * 名称:开始绘制图形 */ public bool StartDraw(eCustomGraphDrawType _type) { lock (mLockObject) { if (eCustomGraphStatus.BeDrawing == m_status) { return(false); } else { m_graphVertex.Clear(); m_drawType = _type; m_status = eCustomGraphStatus.BeDrawing; return(true); } } }