public void LoadNewMap(string fileName, string[] mapContent) { HierarchicalGraph.Clear(); PRAstarHierarchy.Clear(); int width = mapContent[0].Length; int height = mapContent.Length; RemoveMapControls(); gMap = new GridMap(this, width, height, mapContent); RedrawMap(); editingModesButton_Click(b_nontraversable, null); BuildHPAClusters(); BuildPRAbstractMap(); tb_hpaTime.Text = hpaWatch.Elapsed.TotalMilliseconds.ToString(); tb_praTime.Text = praWatch.Elapsed.TotalMilliseconds.ToString(); }
private void newMapMenuItem_Click(object sender, EventArgs e) { HierarchicalGraph.Clear(); PRAstarHierarchy.Clear(); ToolStripMenuItem t = (ToolStripMenuItem)sender; int size = Convert.ToInt32(t.Tag); RemoveMapControls(); gMap = new GridMap(this, size, size); RedrawMap(); editingModesButton_Click(b_nontraversable, null); SetMapSize(); BuildHPAClusters(); Invalidate(); mainPanel.Invalidate(); }