private void brightnessToolStripMenuItem_Click(object sender, EventArgs e) { brightnessFrm bFrm = new WindowsFormsApplication1.brightnessFrm(); bFrm.SetImgFactory(imageFactory); bFrm.Show(); bFrm.FormClosed += new FormClosedEventHandler(brightnessFrmClosed); }
void brightnessFrmClosed(object sender, FormClosedEventArgs e) { brightnessFrm bForm = (brightnessFrm)sender; pictureBox.Image = imageFactory.Image; }