KeePass.Forms.GroupForm.OnFormLoad C# (CSharp) Method

OnFormLoad() private method

private OnFormLoad ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void OnFormLoad(object sender, EventArgs e)
        {
            Debug.Assert(m_pwGroup != null); if(m_pwGroup == null) throw new InvalidOperationException();
            Debug.Assert(m_pwDatabase != null); if(m_pwDatabase == null) throw new InvalidOperationException();

            GlobalWindowManager.AddWindow(this);

            BannerFactory.CreateBannerEx(this, m_bannerImage,
                Properties.Resources.B48x48_Folder_Txt, KPRes.EditGroup,
                KPRes.EditGroupDesc);
            this.Icon = Properties.Resources.KeePass;

            UIUtil.SetButtonImage(m_btnAutoTypeEdit,
                Properties.Resources.B16x16_Wizard, true);

            m_dtExpires.CustomFormat = DateTimeFormatInfo.CurrentInfo.ShortDatePattern +
                " " + DateTimeFormatInfo.CurrentInfo.LongTimePattern;

            m_pwIconIndex = m_pwGroup.IconId;
            m_pwCustomIconID = m_pwGroup.CustomIconUuid;

            m_tbName.Text = m_pwGroup.Name;
            m_tbNotes.Text = m_pwGroup.Notes;

            if(m_pwCustomIconID != PwUuid.Zero)
                UIUtil.SetButtonImage(m_btnIcon, m_pwDatabase.GetCustomIcon(
                    m_pwCustomIconID), true);
            else
                UIUtil.SetButtonImage(m_btnIcon, m_ilClientIcons.Images[
                    (int)m_pwIconIndex], true);

            if(m_pwGroup.Expires)
            {
                m_dtExpires.Value = m_pwGroup.ExpiryTime;
                m_cbExpires.Checked = true;
            }
            else // Does not expire
            {
                m_dtExpires.Value = DateTime.Now;
                m_cbExpires.Checked = false;
            }

            UIUtil.MakeInheritableBoolComboBox(m_cmbEnableAutoType,
                m_pwGroup.EnableAutoType, m_pwGroup.GetAutoTypeEnabledInherited());
            UIUtil.MakeInheritableBoolComboBox(m_cmbEnableSearching,
                m_pwGroup.EnableSearching, m_pwGroup.GetSearchingEnabledInherited());

            m_tbDefaultAutoTypeSeq.Text = m_pwGroup.GetAutoTypeSequenceInherited();

            if(m_pwGroup.DefaultAutoTypeSequence.Length == 0)
                m_rbAutoTypeInherit.Checked = true;
            else m_rbAutoTypeOverride.Checked = true;

            CustomizeForScreenReader();
            EnableControlsEx();
            UIUtil.SetFocus(m_tbName, this);
        }