/// <summary> /// Constructor for the path map generator GUI. Takes the subfield list which is /// created by the split function in the main form. /// </summary> /// <param name="fields">List of subfields</param> public PathMapGenerator(List<Field> fields) { InitializeComponent(); rend = new Renderer(FieldView); wallsRend = new PolygonRenderable(Color.Brown, true); objectsRend = new PolygonRenderable(Color.Blue, true); regionsRend = new PolygonRenderable(Color.Yellow, 0.5f, true); fieldsRend = new PolygonRenderable(Color.Gray); pointRend = new PointRenderable(); pointRend.Show = false; lines = new List<PathRenderable>(); rend.AddRenderable(wallsRend); rend.AddRenderable(objectsRend); rend.AddRenderable(regionsRend); rend.AddRenderable(fieldsRend); rend.AddRenderable(pointRend); originalTool = rend.Tool; polyTool = new ClickTool(); polyTool.clicked += new EventHandler<ClickedEventArgs>(FieldViewClick); rend.Tool = polyTool; complete = false; PRMs = new List<PRMAlgorithm>(); rend.OnFormShown(); this.fields = fields; f = fields[0]; count = 1; LoadNext(); }