Bloom.Edit.EditingView.OnLoad C# (CSharp) Method

OnLoad() protected method

protected OnLoad ( EventArgs e ) : void
e EventArgs
return void
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            //Why the check for null? In bl-283, user had been in settings dialog, which caused a closing down, but something
            //then did a callback to this view, such that ParentForm was null, and this died
            //This assert was driving me crazy (which is a short trip). I'd hit it every time I quit Bloom, but this things are fine. Debug.Assert(ParentForm != null);
            if(ParentForm != null)
            {
                ParentForm.Activated += new EventHandler(ParentForm_Activated);
                ParentForm.Deactivate += (sender, e1) => {
                                                             _editButtonsUpdateTimer.Enabled = false;
                };
            }
        }