Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        { //INsertar
            NDesastre d = new NDesastre();

            d.Nombre      = textBox1.Text;
            d.Magnitud    = int.Parse(textBox2.Text);
            textBox1.Text = "";
            textBox2.Text = "";
            ld.Add(d);
            listBox1.Items.Add(d.Nombre + " " + d.Magnitud);
        }
Ejemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            StreamReader sr = new StreamReader("CatalogoDesastres.txt");
            String       line;
            NDesastre    d;

            ld.Clear();
            listBox1.Items.Clear();

            while ((line = sr.ReadLine()) != null)
            {
                d          = new NDesastre();
                d.Nombre   = line;
                d.Magnitud = int.Parse(sr.ReadLine());
                ld.Add(d);
                listBox1.Items.Add(d.Nombre + " " + d.Magnitud);
            }
            sr.Close();
        }
Ejemplo n.º 3
0
 public DesastreUbicado()
 {
     n = new NDesastre();
     u = new Ubicacion();
 }