void searchThread1_DoWork(object sender, DoWorkEventArgs e) { Container cont = (Container)e.Argument; xmlImagen img = new xmlImagen(cont.SelectedAlbum, cont.full_path); //if(SelectedAlbumControl.thisAlbum != null) // SelectedAlbumControl.thisAlbum.InsertImagen(img); }
public static dAlbum LoadAlbumFromTxml(string path) { StreamReader reader; dAlbum thisAlbum = new dAlbum(); if (File.Exists(path)){ reader = new StreamReader(path); } else//TODO:: Si no existe q hago. return null; thisAlbum._sversion = reader.ReadLine(); thisAlbum._snombre = reader.ReadLine(); int totalImages = int.Parse(reader.ReadLine()); for (int k = 0; k < totalImages; k++) { xmlImagen img = new xmlImagen(thisAlbum); img.LoadLine(reader); thisAlbum.InsertImagen(img); } reader.Close(); thisAlbum.need_change = false; //el album no necesita guardarse return thisAlbum; thisAlbum._full_path = path; }
public static dAlbum LoadAlbumFromTzip(string path) { //FileStream filereader; StreamReader reader; dAlbum thisAlbum = new dAlbum(); if (File.Exists(path)){ reader = IO.Descompact(path); } //reader = new StreamReader(path); else//TODO:: Si no existe q hago. return null; thisAlbum._sversion = reader.ReadLine(); thisAlbum._snombre = reader.ReadLine(); int totalImages = int.Parse(reader.ReadLine()); for (int k = 0; k < totalImages; k++) { xmlImagen img = new xmlImagen(thisAlbum); img.LoadLine(reader); thisAlbum.InsertImagen(img); } reader.Close(); File.Delete(Application.ExecutablePath + "tmp"); thisAlbum.need_change = false; //el album recie creado no necesita guardarse thisAlbum._full_path = path; //esta es la direccion del album ahora return thisAlbum; }
void searchThread1_DoWork(object sender, DoWorkEventArgs e) { Container cont = (Container)e.Argument; dImagen img; if (cont.full_path == "RED") img = new xmlImagen(); else img = new xmlImagen(cont.full_path); cont.SelectedAlbum.InsertImagen(img); }