AlbedoDatabaseGenerator.Form1.OnClosing C# (CSharp) Метод

OnClosing() защищенный Метод

protected OnClosing ( CancelEventArgs e ) : void
e CancelEventArgs
Результат void
        protected override void OnClosing( CancelEventArgs e )
        {
            base.OnClosing( e );

            if ( m_Database != null && m_Database.Entries.Length > 0 )
            {
                DialogResult	R = MessageBox( "Do you wish to save the database before closing the application?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question );
                if ( R == DialogResult.Cancel )
                {
                    e.Cancel = true;
                    return;
                }

                if ( R == DialogResult.Yes )
                    buttonSaveDatabase_Click( null, EventArgs.Empty );
            }
        }