Bilder werden jetzt richtig geladen
This commit is contained in:
@@ -49,8 +49,7 @@ namespace SanSystem
|
||||
{
|
||||
|
||||
//pt_box.Image = Image.FromFile(Path.Combine("temp",schacht.SavedBilders[0].Speicherpfad));
|
||||
pt_box.Load(Path.Combine(schacht.SavedBilders[0].Speicherpfad));
|
||||
pt_box.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,5 +109,20 @@ namespace SanSystem
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void lb_pictures_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ListBox listBox = (ListBox)sender;
|
||||
if (listBox == null) return;
|
||||
int index = listBox.SelectedIndex;
|
||||
|
||||
string pfad = Path.Combine(schacht.SavedBilders[index].Speicherpfad);
|
||||
if (!File.Exists(pfad))
|
||||
{
|
||||
MessageBox.Show("Bilddatei mit den Pfad " + pfad + " nicht gefunden");
|
||||
}
|
||||
pt_box.Load(pfad);
|
||||
pt_box.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user