Ejemplo n.º 1
0
        public Graph(GenericList <Vuelo> lv)
        {
            // inicializar lista de nodos
            listaNodos = new List <Node>();

            // se agrega el origen
            lv.ForEach(v => this.addVertex(v.getOrigen()));
            // se agrega el destino
            lv.ForEach(v => this.addVertex(v.getDestino()));

            // crear lista de adyacencia de cad nodo
            lv.ForEach(v => this.createAdy(v.getOrigen(), v.getDestino(), v.getCosto(), v.getTiempo()));
        }
Ejemplo n.º 2
0
 private void comprarVueloMaterialFlatButton_Click(object sender, EventArgs e)
 {
     flyList.ForEach(v => {
         if (rutaVuelo.CompareTo(v.ToString()) == 0)
         {
             FormularioForm formularioWindow = new FormularioForm(v);
             this.Hide();
             formularioWindow.ShowDialog();
             this.Show();
             this.comprarVueloMaterialFlatButton.Enabled = false;
             return;
         }
     });
 }