Exemplo n.º 1
0
        private void OnQueryDisplayText(object sender, QueryDisplayTextEventArgs e)
        {
            //if (Closing)
            //{
            //    return;
            //}
            if (WinUtils.IsComponentInDesignMode(sender as Component) || m_repositoryPopupEdit != null || PopupControl == null)
            {
                return;
            }
            e.DisplayText = PopupControl.GetDisplayText();
            var popupEdit = sender as PopupContainerEdit;

            if (m_DisplayTextInternal != e.DisplayText)
            {
                m_DisplayTextInternal = e.DisplayText;
                if (popupEdit != null)
                {
                    popupEdit.ToolTip = e.DisplayText;
                }
                //if (OnDisplayTextChangedEvent != null)
                //    OnDisplayTextChangedEvent(this, EventArgs.Empty);
            }
            if (popupEdit != null)
            {
                popupEdit.Text = e.DisplayText;
            }
        }