internal DebugWindow(ParkingSolver solver) : this() { this.solver = solver; int layerCount = (int)Math.Ceiling(360 / solver.OrientationTolerance / 2); layerScrollBar.Maximum = layerCount - 1; //layerScrollBar.LargeChange =Math.Ceiling( layerCount/10.0); //layerScrollBar.ViewportSize = layerCount; for (int i = 0; i < layerCount; i++) { Color c = Gqqnbig.Drawing.ColorConversion.HslToRgb((i * 120) % 360, 1, 0.5); Brush brush = new SolidColorBrush(c); GridLayer l = new GridLayer(new Pen(brush, 0.5), solver.Map.Size, solver.DistanceTolerance); l.Visibility = System.Windows.Visibility.Collapsed; l.Width = solver.Map.Size.Width; l.Height = solver.Map.Size.Height; l.VerticalAlignment = VerticalAlignment.Top; l.HorizontalAlignment = HorizontalAlignment.Left; grid.Children.Add(l); } }
public MainWindow() { InitializeComponent(); endPoint = new Point(7.75, 135); endOrientation = 0; //task = new Task(new Point(100, 100), 180, endPoint, endOrientation); car = new Car(new Point(27.75, 214.4), 180); map = new Map(); solver = new ParkingSolver(2, 10, endPoint, endOrientation, map); painter = new CarPainter(canvas); }
public MainWindow() { InitializeComponent(); endPoint = new Point(793, 404); endOrientation = 180; //task = new Task(new Point(100, 100), 180, endPoint, endOrientation); car = new Car(new Point(444.4, 404), 0); map = new Map(); solver = new ParkingSolver(5, 10, endPoint, endOrientation, map); painter = new CarPainter(canvas); }