void histogram_FormClosed( object sender, FormClosedEventArgs e ) { mnuShowHistogram.Checked = false; _histogramForm = null; }
private void mnuShowHistogram_Click( object sender, EventArgs e ) { mnuShowHistogram.Checked = !mnuShowHistogram.Checked; if ( mnuShowHistogram.Checked && _histogramForm == null ) { var p = new Point( ClientSize.Width, picTop.Bottom ); _histogramForm = new Dialogs.FHistogram( PointToScreen( p ) ); _histogramForm.Show( this ); Focus(); _histogramForm.FormClosed += histogram_FormClosed; _histogramForm.setData( _aktivFlik.currentBitmap() ); } else if ( !mnuShowHistogram.Checked && _histogramForm != null ) _histogramForm.Close(); }