private void SetShapes(IEnumerable<ShapeInfo> shapes) { if (shapes == this.shapes) return; this.ClearShapes(); if (shapes == null) return; foreach (ShapeInfo shape in shapes) this.AddShape(shape); }