/// <summary>
        /// moves the ornaments
        /// </summary>
        /// <param name="ornament">the given ornament</param>
        public void VisitOrnament(Ornament ornament)
        {
            ornament.GetComponent().Accept(this);
            Vector x = ornament.GetVector(ornament.Position);

            Canvas.SetTop(ornament.TextBlock, x.Y);
            Canvas.SetLeft(ornament.TextBlock, x.X);
        }
        public void VisitOrnament(Ornament ornament)
        {
            ornament.TextBlock.Text = ornament.Name.ToString();
            Vector x = ornament.GetVector(ornament.Position);

            Canvas.SetTop(ornament.TextBlock, x.Y);
            Canvas.SetLeft(ornament.TextBlock, x.X);
            ornament.GetComponent().Accept(this);
            MainWindow.AppWindow.PutOnScreen(ornament.TextBlock);
        }
 /// <summary>
 /// puts the ornament on the main window and calls the next ornament and at last the shape (go's from bottom to top so shape first)
 /// </summary>
 /// <param name="ornament">the given ornament</param>
 public void VisitOrnament(Ornament ornament)
 {
     ornament.GetComponent().Accept(this);
     MainWindow.AppWindow.RemoveShape(ornament.TextBlock);
 }
예제 #4
0
 public void VisitOrnament(Ornament ornament)
 {
     _printer.PrintToFile($"{ornament.Depth}{ornament.ToString()}");
     ornament.GetComponent().Accept(this);
 }