private void pictureBox1_DragDrop(object sender, DragEventArgs e) { s_ImageFilenames = FileFactory.GetFilenames(e); s_ImageFilenames.Sort(); if (s_ImageFilenames == null || s_ImageFilenames.Count == 0) { MessageBox.Show("Keine Fotos gefunden."); return; } s_IndexImage = 0; s_Imagefilename = s_ImageFilenames[s_IndexImage]; FormFactory.FillForm(s_Imagefilename, out m_Orientation); FormFactory.SetImage(s_Imagefilename, m_Orientation, s_IndexImage + 1); label16.Text = s_ImageFilenames.Count.ToString(); if (checkBox1.Checked) { Image histogram = (Image)HistogramFactory.CreateHistogram(s_Imagefilename); histogram = ImageFactory.ResizeImage(histogram, 215, 275); pictureBox2.Image = histogram; } }
public static void PreviousImage() { int index = Form1.Filenindex - 1; List <string> filenames = Form1.Filenames; if (index < 0) { Form1.Filenindex = index + 1; return; } ushort orientation; string filename = filenames[index]; FillForm(filename, out orientation); SetImage(filename, orientation, index + 1); Form1.Filenindex = index; Form1.Filename = filename; if (Form1.Histogram) { Image histogram = (Image)HistogramFactory.CreateHistogram(filename); histogram = ImageFactory.ResizeImage(histogram, 215, 275); Form1.Picturebox2.Image = histogram; } }