Dateien können jetzt über FTP heruntergeladen werden

This commit is contained in:
Husky
2018-07-01 20:42:13 +02:00
parent e45ae7447d
commit 592b41a926
11 changed files with 145 additions and 20 deletions

View File

@@ -29,13 +29,14 @@ namespace SanSystem
cb_erledigt.DataBindings.Add(new Binding("Checked", schacht, "Fertig"));
lb_pictures.DataSource = schacht.SavedBilders;
mydestination = schacht.CheckVerzeichnisse("");
mydestination = schacht.CheckVerzeichnisse(Global.Instance.Projektpfad);
if(schacht.SavedBilders.Count > 0)
{
//pt_box.Image = Image.FromFile(Path.Combine("temp",schacht.SavedBilders[0].Speicherpfad));
pt_box.Load(Path.Combine("temp", schacht.SavedBilders[0].Speicherpfad));
pt_box.Load(Path.Combine(schacht.SavedBilders[0].Speicherpfad));
pt_box.SizeMode = PictureBoxSizeMode.StretchImage;
}
}
@@ -55,11 +56,11 @@ namespace SanSystem
{
if (pt_box == null) throw new Exception();
string speicherpfad = Path.Combine(mydestination, targetname);
File.Copy(source, Path.Combine("temp",speicherpfad));
File.Copy(source, speicherpfad);
bilder.Bildname = "Anbindung";
bilder.Speicherpfad = speicherpfad;
schacht.SavedBilders.Add(bilder);
pt_box.Load(Path.Combine("temp", schacht.SavedBilders[0].Speicherpfad));
pt_box.Load(schacht.SavedBilders[0].Speicherpfad);
pt_box.SizeMode = PictureBoxSizeMode.StretchImage;
lb_pictures.DataSource = null;
lb_pictures.DataSource = schacht.SavedBilders;
@@ -90,7 +91,7 @@ namespace SanSystem
schacht.SavedBilders.Remove(bild);
pt_box.Image = null;
pt_box.Dispose();
File.Delete(Path.Combine(Global.Instance.projektpfad, bild.Speicherpfad));
File.Delete(Path.Combine(Global.Instance.Projektpfad, bild.Speicherpfad));
lb_pictures.DataSource = null;
lb_pictures.DataSource = schacht.SavedBilders;
}