public void RenewFigure() { bool isFilled = false; if (Figure != null) { isFilled = Figure.IsFilled; } Figure = Fabric.CreateFigure(); Figure.Color = Pen.Color; Figure.ColorBackgroundFigure = Pen.Color; Figure.Width = (int)Pen.Width; Figure.FillFigure(isFilled); if (Fabric is NAngleByPointsFabric) { ((NPointsFigure)Figure).N = NAngle; } if (Fabric is NAngleFabric) { ((RightNAngleFigure)Figure).N = NAngle; } }