Beispiel #1
0
 void ClickOnThumbnail( ImageDisplay nail )
 {
     if (ThumbnailList.Contains(nail))
         ThumbnailClick( nail, EventArgs.Empty );
     else
         Debug.WriteLine( "Tried to access non-existing Thumbnail" );
 }
Beispiel #2
0
        void GenerateThumbnails()
        {
            ThumbnailList.ForEach( I => I.Dispose() );
            ThumbnailList.Clear();
            panel1.Controls.Clear();

            int heightSoFar = 0;
            for ( int i = 0; i < WorkingFile.Images.Count; i++ )
            {
                ImageDisplay img = new ImageDisplay();
                img.Image = WorkingFile.Images[i];
                img.Centered = false;
                img.DrawOrigin = false;
                img.Width = panel1.ClientSize.Width;
                img.Height = img.Width;
                img.Top = heightSoFar;
                heightSoFar += img.Height + ThumbnailPadding;
                ThumbnailList.Add( img );
                panel1.Controls.Add( img );
                img.Click += new EventHandler( ThumbnailClick );
            }
            panel1.Refresh();
        }