public void Apply(object Sender, OrcasAvalonApplicationCanvas World, Action <Action> AddDispose) { var Settings = new[] { new { Brush = Brushes.Red, Opacity = 0.5 }, new { Brush = Brushes.Yellow, Opacity = 0.5 }, new { Brush = Brushes.Purple, Opacity = 0.2 }, }.AtModulus(Z); var a = new Rectangle { Width = 4, Height = 8, Fill = Settings.Brush, Opacity = Settings.Opacity }.AttachTo(World).MoveTo(X + 2, Y); var b = new Rectangle { Width = 8, Height = 4, Fill = Settings.Brush, Opacity = Settings.Opacity }.AttachTo(World).MoveTo(X, Y + 2); AddDispose(() => a.Orphanize()); AddDispose(() => b.Orphanize()); if (Next != null) { Next.Apply(Sender, World, AddDispose); } }
public void Apply(object Sender, OrcasAvalonApplicationCanvas World, Action<Action> AddDispose) { var Settings = new[] { new {Brush = Brushes.Red, Opacity = 0.5 }, new {Brush = Brushes.Yellow, Opacity = 0.5 }, new {Brush = Brushes.Purple, Opacity = 0.2 }, }.AtModulus(Z); var a = new Rectangle { Width = 4, Height = 8, Fill = Settings.Brush, Opacity = Settings.Opacity }.AttachTo(World).MoveTo(X + 2, Y); var b = new Rectangle { Width = 8, Height = 4, Fill = Settings.Brush, Opacity = Settings.Opacity }.AttachTo(World).MoveTo(X, Y + 2); AddDispose(() => a.Orphanize()); AddDispose(() => b.Orphanize()); if (Next != null) Next.Apply(Sender, World, AddDispose); }