Ejemplo n.º 1
0
        /// <summary>
        /// Handles the new maze.
        /// </summary>
        /// <param name="d">The d.</param>
        /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/>
        private static void HandleNewMaze(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Maze     m  = e.NewValue as Maze;
            MazeDraw md = d as MazeDraw;

            md.Draw();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Handles the new position.
        /// </summary>
        /// <param name="d">The d.</param>
        /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/>
        private static void HandleNewPos(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Position s = (Position)e.NewValue;
            MazeDraw m = d as MazeDraw;

            Canvas.SetTop(m.Player, s.Row);
            Canvas.SetLeft(m.Player, s.Col);
        }