示例#1
0
 private void OnLeaveCompletion(object sender, FocusOutEventArgs e)
 {
     try
     {
         completionForm.Hide();
         OnLoseFocus?.Invoke(this, new EventArgs());
     }
     catch (Exception err)
     {
         ShowError(err);
     }
 }
示例#2
0
 public override bool LoseFocus()
 {
     if (HoldFocus)
     {
         return(false);
     }
     HasFocus = false;
     DisableInput();
     UserActions.LoseFocus();
     OnLoseFocus.SafeInvoke();
     return(true);
 }
示例#3
0
        public override bool LoseFocus()
        {
            if (mDestroyed)
            {
                return(true);
            }

            if (base.LoseFocus())
            {
                UserActions.LoseFocus();
                DisableInput();
                OnLoseFocus.SafeInvoke();
                if (DeactivateOnLoseFocus)
                {
                    GUIManager.Get.Deactivate(this);
                }
                return(true);
            }

            return(false);
        }
示例#4
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);
            }
        }
示例#5
0
 private void OnLeaveCompletion(object sender, FocusOutEventArgs e)
 {
     completionForm.Hide();
     OnLoseFocus?.Invoke(this, new EventArgs());
 }
示例#6
0
 public virtual void LoseFocus()
 {
     OnLoseFocus?.Invoke();
 }