Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                //Get the path of specified file
                string filePath = openFileDialog1.FileName;
                textBox1.Text = filePath;

                LlenarGrafo grafo = new LlenarGrafo();
                grafo.inicio();
                grafo.ReadFile(filePath);
                foreach (Nodo nodo in grafo.Grafo)
                {
                    listBox1.Items.Add(nodo.Nombre);
                    listBox2.Items.Add(nodo.Nombre);
                }
            }
        }