void Form_Closed(object sender, FormClosedEventArgs e) { CropDialog frm = (CropDialog)sender; pictureBox.Width = imageFactory.Image.Width; pictureBox.Height = imageFactory.Image.Height; pictureBox.Image = imageFactory.Image; }
private void CropBtn_Click(object sender, EventArgs e) { CropDialog cropDialog = new WindowsFormsApplication1.CropDialog(); cropDialog.SetImageFactory(imageFactory); cropDialog.Show(); cropDialog.FormClosed += new FormClosedEventHandler(Form_Closed); }