private void ShowSnapshot(Bitmap snapshot) { if (InvokeRequired) { Invoke(new Action <Bitmap>(ShowSnapshot), snapshot); } else { if (snapshotForm == null) { snapshotForm = new SnapshotForm( ); snapshotForm.FormClosed += new FormClosedEventHandler(SnapshotForm_FormClosed); snapshotForm.Show( ); } snapshotForm.SetImage(snapshot); } }
private void SnapshotForm_FormClosed(object sender, FormClosedEventArgs e) { snapshotForm = null; }