private void SetType(PatternType type) { _patternType = type; IPattern result = null; switch (type) { case PatternType.Gradient: result = new GradientPattern(); break; case PatternType.Line: break; case PatternType.Marker: break; case PatternType.Picture: result = new PicturePattern(); break; case PatternType.Simple: result = new SimplePattern(); break; } if (result != null) { result.Outline = _innerPattern.Outline; } _innerPattern = result; }
private void SetType(PatternType type) { _patternType = type; IPattern result = null; switch (type) { case PatternType.Gradient: result = new GradientPattern(); break; case PatternType.Line: break; case PatternType.Marker: break; case PatternType.Picture: result = new PicturePattern(); break; case PatternType.Simple: result = new SimplePattern(); break; } if (result != null) result.Outline = _innerPattern.Outline; _innerPattern = result; }