Пример #1
0
        public MazeTestForm(MazeConfiguratorDelegate mazeConfigurator)
        {
            InitializeComponent();

            this.mazeConfigurator = mazeConfigurator;

            mazeUserControl.MazeForm = this as IMazeForm;
        }
Пример #2
0
        private void mazeUserControl_MouseClick(object sender, MouseEventArgs e)
        {
            double centerX = (double)e.X / mazeUserControl.Width;
            double centerY = (double)e.Y / mazeUserControl.Height;

            int    corners           = 3;
            double distortionWinding = 0.25;

            mazeConfigurator = DistortedOutlineShapeTest.DistortedPolygonConfiguratorDelegate(corners, 1, 0, centerX, centerY, 0.8, distortionWinding);
            this.Text        = string.Format(
                "DistortedOutlineShape: Polygon({0}) @ ({1:0.##}, {2:0.##}), Spiral({3:0.##})",
                corners, centerX, centerY, distortionWinding);

            BuildNewMaze();
        }