示例#1
0
        internal override void ApplyOwner(IDocumentEssential owner)
        {
            Owner = owner;
            SetTextProperties(Font, FontColor);

            if (OnMouseEnter != null)
            {
                OnMouseEnter.ApplyOwner(owner);
            }
            if (OnMouseExit != null)
            {
                OnMouseExit.ApplyOwner(owner);
            }
            if (OnMouseDown != null)
            {
                OnMouseDown.ApplyOwner(owner);
            }
            if (OnMouseUp != null)
            {
                OnMouseUp.ApplyOwner(owner);
            }
            if (OnReceiveFocus != null)
            {
                OnReceiveFocus.ApplyOwner(owner);
            }
            if (OnLoseFocus != null)
            {
                OnLoseFocus.ApplyOwner(owner);
            }
            if (OnPageOpen != null)
            {
                OnPageOpen.ApplyOwner(owner);
            }
            if (OnPageClose != null)
            {
                OnPageClose.ApplyOwner(owner);
            }
            if (OnPageVisible != null)
            {
                OnPageVisible.ApplyOwner(owner);
            }
            if (OnPageInvisible != null)
            {
                OnPageInvisible.ApplyOwner(owner);
            }
            if (OnKeyPressed != null)
            {
                OnKeyPressed.ApplyOwner(owner);
            }
            if (OnBeforeFormatting != null)
            {
                OnBeforeFormatting.ApplyOwner(owner);
            }
            if (OnChange != null)
            {
                OnChange.ApplyOwner(owner);
            }
            if (OnOtherFieldChanged != null)
            {
                OnOtherFieldChanged.ApplyOwner(owner);
            }
            if (OnActivated != null)
            {
                OnActivated.ApplyOwner(owner);
            }
        }