Esempio n. 1
0
        void pic_Image_Click(object sender, EventArgs e)
        {
            if (processImage == null)
            {
                return;
            }
            PictureBox pic    = sender as PictureBox;
            PictureBox picAdd = new PictureBox();

            picAdd.Width    = pic.Width;
            picAdd.Height   = pic.Height;
            picAdd.Image    = pic.BackgroundImage.Clone() as Image;
            picAdd.SizeMode = PictureBoxSizeMode.StretchImage;
            picAdd.Location = new Point((this.panelContent.Width - pic.Width) / 2, (this.panelContent.Height - pic.Height) / 2);
            picAdd.Click   += new EventHandler(picAdd_Click);
            WinFormHelper.DropMove(picAdd);
            picAdd.MouseMove += new MouseEventHandler(picAdd_MouseMove);
            this.panelContent.Controls.Add(picAdd);
            this.currentPic = picAdd;

            //throw new NotImplementedException();
        }