private void EscribirManga()
 {
     file = new Clases.C_Fichero("mangas.txt");
     file.AbrirW();
     file.Escribir("\n");
     file.Escribir("Manga-" + DateTime.Now.ToShortDateString() + "-" + manga.Apertura_manga.TimeOfDay.ToString() + "-" + manga.Cierre_ventana.TimeOfDay.ToString() + "-" + manga.Cierre_manga.TimeOfDay.ToString());
     string bali = "B-";
     for (int i = 0; i < manga.Balizas.Count; i++)
     {
         bali += manga.Balizas[i].Numero.ToString()+"-";
     }
     bali = bali.TrimEnd(';');
     file.Escribir(bali);
     //Escribir Dorsal - Nombre - Provincia - Pais - Parapente - puntos - balizasmarcadas - hora_desp - hora_ater
     for (int i = 0; i < manga.Competidores.Count; i++)
     {
         Clases.C_Competidor compeAux = manga.Competidores[i];
         string tmp = "P-";
         tmp = compeAux.Dorsal.ToString() + "-" + compeAux.Nombre_apellido + "-" + compeAux.Provincia + "-" + compeAux.Pais + "-" + compeAux.Parapente + "-" + compeAux.Total_de_puntos.ToString() + "-";
         for (int j = 0; j < manga.Competidores[i].Balizas_marcadas.Count; j++)
         {
             tmp += manga.Competidores[i].Balizas_marcadas[j].Numero.ToString()+";";
         }
         tmp = tmp.TrimEnd(';');
         tmp+="-" + compeAux.Hora_despegue.TimeOfDay.ToString()+"-"+compeAux.Hora_aterrizaje.TimeOfDay.ToString();
         //tmp += manga.Competidores[i].Total_de_puntos.ToString();
         //file.Escribir(manga.Competidores[i].Dorsal.ToString() + " " + tmp);
         file.Escribir(tmp);
         tmp = "";
     }
     file.CerrarW();
 }
 private void btn_terminar_Click(object sender, EventArgs e)
 {
     string tmp;
     file = new Clases.C_Fichero("pilotos.txt");
     file.AbrirW();
     for (int i = 0; i < pilotos.Count; i++)
     {
         tmp = pilotos[i].Dorsal.ToString() + "," + pilotos[i].Nombre_apellido + "," + pilotos[i].Club + "," + pilotos[i].Provincia + "," + pilotos[i].Pais + "," + pilotos[i].Parapente;
         file.Escribir(tmp);
     }
     file.CerrarW();
     this.Close();
 }
 private void btn_terminar_Click(object sender, EventArgs e)
 {
     string tmp;
     file = new Clases.C_Fichero("balizas.txt");
     file.AbrirW();
     for (int i = 0; i < balizas.Count; i++)
     {
         tmp = balizas[i].Numero.ToString() + "," + balizas[i].Nombre + "," + balizas[i].Puntos.ToString();
         file.Escribir(tmp);
     }
     file.CerrarW();
     this.Close();
 }