private void button1_Click(object sender, EventArgs e) { InitialisationFichierTexte("graphe1.txt"); //numinitial = Convert.ToInt32(textBoxNoeudInitial.Text); //numfinal = Convert.ToInt32(textBox2.Text); numinitial = 0; numfinal = 6; Noeud Ninit = new Noeud(numinitial); Noeud NF = new Noeud(numfinal); ArbreRecherche so = new ArbreRecherche(matrice); List <Noeud> solution = so.Dijkstra(Ninit, NF); RemplirTexteArbre(false); RemplirTexteArbre(false); RemplirTexteArbre(true); if (reponseArbreVisible != reponseArbreNonVisible) { arbreEquivalent = false; } FormFinDijkstra correctionDijkstra = new FormFinDijkstra(ListeDesOuverts, ListeDesFermes, this.listeRepNoeudsOuverts, this.listeRepNoeudsFermes, so, arbreEquivalent); correctionDijkstra.Show(); this.Hide(); }
public FormDijkstra() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.FixedSingle; listBoxRepFermes.Enabled = false; listBoxRepOuverts.Enabled = false; reponses = new List <String> [2]; reponses[0] = new List <string>(); reponses[1] = new List <string>(); InitialisationFichierTexte("graphe1.txt"); Noeud Ninit = new Noeud(numinitial); Noeud NF = new Noeud(numfinal); ArbreRecherche sol = new ArbreRecherche(matrice); List <Noeud> solution = sol.Dijkstra(Ninit, NF); ListeDesOuverts = sol.ListeDesOuverts; ListeDesFermes = sol.ListeDesFermes; sol.GetArbreRecherche(this.treeViewExercice, true); sol.GetArbreRecherche(this.treeViewNonVisible, false); this.treeViewExercice.ExpandAll(); }