private static void Compare(IPlanarShape savedShape, IPlanarShape loadedShape, int version) { Assert.AreEqual <bool>(savedShape != null, loadedShape != null); if (savedShape != null && loadedShape != null) { Assert.AreEqual <int>(savedShape.Angle, loadedShape.Angle); Compare(savedShape.FillStyle, loadedShape.FillStyle, version); } }
private static void Compare(IPlanarShape shapeA, IPlanarShape shapeB, int version) { Assert.AreEqual <bool>(shapeA != null, shapeB != null); if (shapeA != null && shapeB != null) { Assert.AreEqual <int>(shapeA.Angle, shapeB.Angle); Compare(shapeA.FillStyle, shapeB.FillStyle, version); } }
/// <override></override> public override void CopyFrom(Shape source) { base.CopyFrom(source); if (source is IPlanarShape) { IPlanarShape src = (IPlanarShape)source; // Copy regular properties this._angle = src.Angle; // Copy templated properties this._privateFillStyle = (Template != null && src.FillStyle == ((IPlanarShape)Template.Shape).FillStyle) ? null : src.FillStyle; } }