public static bool ContainsAnyDecorator(Figure figure) { var result = false; result |= RendererDecorator.ContainsAnyDecorator(figure.Renderer); result |= FillDecorator.ContainsAnyDecorator(figure.Style.FillStyle); return(result); }
private static void AddDecorators(Figure fig, FigureTreeNode fignode) { if (Helper.ContainsAnyDecorator(fig)) { if (FillDecorator.ContainsAnyDecorator(fig.Style.FillStyle)) { var list = FillDecorator.GetDecorators(fig.Style.FillStyle); foreach (var item in list) { fignode.Nodes.Add(string.Format("{0}FillStyleDecorator", item)); } } if (RendererDecorator.ContainsAnyDecorator(fig.Renderer)) { var list = RendererDecorator.GetDecorators(fig.Renderer); foreach (var item in list) { fignode.Nodes.Add(string.Format("{0}RendererDecorator", item)); } } } }