Пример #1
0
        public void buildLayer(Size s)
        {
            fileNameBuilder = new FileNameBuilder(false);
            tb = new ThumbnailBuilder();

            mainpanel        = new Panel();
            ClosePanelButton = new Button();
            layoutPanel      = new TableLayoutPanel();

            ClosePanelButton.Image      = new Bitmap(global::SortImage.Properties.Resources.buttonCancel.GetThumbnailImage(ClosePanelButton.Size.Height, ClosePanelButton.Size.Height, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero));
            ClosePanelButton.ImageAlign = ContentAlignment.MiddleRight;
            ClosePanelButton.Left       = mainpanel.Width - ClosePanelButton.Width + 5;

            nextSetButton            = new Button();
            nextSetButton.Text       = "More...";
            nextSetButton.Left       = 50;
            nextSetButton.Image      = new Bitmap(global ::SortImage.Properties.Resources.next.GetThumbnailImage(nextSetButton.Size.Height, nextSetButton.Size.Height, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero));
            nextSetButton.ImageAlign = ContentAlignment.MiddleRight;

            layoutPanel.ColumnCount = 6;
            layoutPanel.GrowStyle   = TableLayoutPanelGrowStyle.AddRows;
            layoutPanel.Size        = new Size(s.Width, s.Height - ClosePanelButton.Height);
            layoutPanel.Location    = new System.Drawing.Point(50, 50);
            layoutPanel.Name        = "layoutPanel";
            layoutPanel.AutoScroll  = true;

            mainpanel.Size      = s;
            mainpanel.BackColor = Color.Silver;
            mainpanel.Controls.Add(layoutPanel);
            mainpanel.Dock = DockStyle.Fill;
            mainpanel.Controls.Add(nextSetButton); // New
            mainpanel.Controls.Add(ClosePanelButton);
        }
Пример #2
0
 public void LoadImage(string imageFilename, ThumbnailBuilder tnb)
 {
     image         = tnb.GetThumbnail(imageFilename);
     imageLocation = imageFilename;
 }