private void setShapeProperty(ShapePropertyValueType type, object value) { switch (type) { case ShapePropertyValueType.Antialias: proCollector.Antialias = (bool)value; break; case ShapePropertyValueType.IndicatorSize: proCollector.IndicatorLineSize = (IndicatorSize)value; break; case ShapePropertyValueType.StrokeWidth: proCollector.PenWidth = (float)value; break; case ShapePropertyValueType.StrokeColor: proCollector.StrokeColor = (Color)value; break; case ShapePropertyValueType.StartLineCap: proCollector.StartLineCap = (LineCapType)value; break; case ShapePropertyValueType.EndLineCap: proCollector.EndLineCap = (LineCapType)value; break; case ShapePropertyValueType.LineDash: proCollector.LineDash = (LineDashType)value; break; case ShapePropertyValueType.LineJoin: proCollector.HowLineJoin = (LineJoin)value; break; case ShapePropertyValueType.PenAlignment: proCollector.PenAlign = (PenAlignment)value; break; case ShapePropertyValueType.FillColor: proCollector.FillColor = (Color)value; break; case ShapePropertyValueType.FillType: proCollector.FillType = (ShapeFillType)value; break; case ShapePropertyValueType.PaintType: proCollector.PaintType = (ShapePaintType)value; break; case ShapePropertyValueType.RoundedRadius: proCollector.RadiusAll = (int)value; break; } applyNewProperty(); }
public void SetNewShapePropertyValue(ShapePropertyValueType type, object value) { switch (currentTool) { case ToolType.Line: case ToolType.BrokenLine: case ToolType.IndicatorArrow: case ToolType.Rectangle: case ToolType.Ellipse: case ToolType.RoundedRect: case ToolType.ShapeSelect: setShapeProperty(type, value); break; } }